Skip to content

Commit 45f4c65

Browse files
authored
Merge pull request #33 from sparkfun/main
Moving main up to develop
2 parents 2e65cd4 + a0ead5f commit 45f4c65

File tree

18 files changed

+3355
-202
lines changed

18 files changed

+3355
-202
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Build Documentation and Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
id-token: write
12+
pages: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: true
17+
18+
jobs:
19+
# Build job
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
# Checkout the repository
24+
- name: Checkout repository
25+
uses: actions/checkout@v2
26+
with:
27+
fetch-depth: 0
28+
submodules: "true"
29+
30+
- name: Set Version
31+
run: echo "PROJECT_NUMBER = `git describe --tags`" >> ./docs/doxygen/doxygen-config
32+
33+
- name: Build Documentation
34+
uses: mattnotmitt/doxygen-action@v1.9.5
35+
with:
36+
doxyfile-path: "./docs/doxygen/doxygen-config"
37+
38+
# Upload the documentation as an artifact
39+
- name: Upload documentation
40+
uses: actions/upload-pages-artifact@v3.0.1
41+
with:
42+
path: ./docs/html
43+
44+
# Deploy job
45+
deploy:
46+
# Add a dependency to the build job
47+
needs: build
48+
49+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
50+
permissions:
51+
pages: write # to deploy to Pages
52+
id-token: write # to verify the deployment originates from an appropriate source
53+
54+
# Deploy to the github-pages environment
55+
environment:
56+
name: github-pages
57+
url: ${{ steps.deployment.outputs.page_url }}
58+
59+
# Specify runner + deployment step
60+
runs-on: ubuntu-latest
61+
steps:
62+
- name: Deploy to GitHub Pages
63+
id: deployment
64+
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
# VSCode directories
22
.vscode
33

4+
5+
docs/html/

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "docs/doxygen/doxygen-awesome-css"]
2+
path = docs/doxygen/doxygen-awesome-css
3+
url = https://github.com/jothepro/doxygen-awesome-css.git

README.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,40 @@
44
![GitHub issues](https://img.shields.io/github/issues/sparkfun/SparkFun_Toolkit)
55
![GitHub release (with filter)](https://img.shields.io/github/v/release/sparkfun/SparkFun_Toolkit)
66
![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/sparkfun/SparkFun_Toolkit)
7+
![Documentation Build](https://github.com/sparkfun/SparkFun_Toolkit/actions/workflows/build-deploy-ghpages.yml/badge.svg)
78

9+
The SparkFun Toolkit provides a common set of core functionality for use across the SparkFun Arduino Driver library. Instead of each device driver library implementing it's own communication layers, error types and design, the SparkFun Toolkit library is used.
810

11+
## Motivation
912

10-
The SparkFun Toolkit provides a common set of core functionality for use across the SparkFun Arduino Driver library. Instead of each device driver library implementing it's own communication layers, error types and design, the SparkFun Toolkit library is used.
13+
Often, the same core functionality is implemented with a majority of our Arduino libraries, each implementation providing the same functionality, but implemented differently. The result is solutions that have different quirks, and impossible to maintain/support effectively. The SparkFun Toolkit solves this issue.
1114

12-
By using the SparkFun Toolkit, Arduino drivers achieve the following benefits:
15+
The SparkFun Toolkit provides a single implementation of common functionality used in the software developed for SparkFun boards. Initially targeted at the Arduino development environment, the SparkFun Toolkit delivers the following benefits:
1316

1417
* Use a well-tested and validated implementation
1518
* Reduce development effort
1619
* Implement functionality following a common structure
1720
* Set the foundation for future enhancements - as the capabilities of the toolkit grow, these features become available with little to any implementation effort.
1821

19-
## Current Status
22+
## Documentation
23+
24+
The SparkFun Toolkit Development documentation is available [here](https://docs.sparkfun.com/SparkFun_Toolkit)
25+
26+
## Installation and Use
27+
28+
To use the SparkFun Toolkit directly, or in library development kit is installable via the Arduino Library Manager - search for `SparkFun ToolKit` within the Arduino Library Manager to install.
29+
30+
However, for solutions that use the SparkFun Toolkit, it is installed automatically during the Arduino library installation process, by marking the Toolkit as a dependency when publishing your library.
31+
32+
To mark the `SparkFun Toolkit` as a dependency, add the following line to the `library.properties` file for your library.
2033

21-
### December 2023
34+
```INI
35+
depends=SparkFun Toolkit
36+
```
2237

23-
The SparkFun Toolkit is available as a *Beta* release, with the intent of testing and validation by SparkFun. The community are free to use this toolkit with the understanding that interfaces, types and class structures could change.
38+
## Examples
2439

25-
### Documentation
40+
The following Arduino Libraries are making use of the SparkFun Toolkit:
2641

27-
|||
28-
|---|---|
29-
|[Bus Implementation](docs/ar_ibus.md) | The architecture and use of the Toolkit Communication Bus Interface
42+
* [SparkFun Qwiic Pulsed Coherent Radar Sensor XM125](https://github.com/sparkfun/SparkFun_Qwiic_XM125_Arduino_Library)
43+
* [SparkFun Qwiic AS7331 Spectral UV Sensor](https://github.com/sparkfun/SparkFun_AS7331_Arduino_Library)

docs/ar_ibus.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Overview - Device Bus Interface - sfeTkIBus
1+
# Device Bus Interface - Overview
22

33
One of the foundational capabilities of the SparkFun Toolkit is bus communication with devices. This is a common task almost all libraries implement using their own implementation for I2C, SPI or UART bus communication.
44

55
For bus communication, the SparkFun Toolkit is designed to provide a common implementation for use across all SparkFun libraries. Additionally, the bus architecture is modeled on a *driver* pattern, separating the individual bus setup/configuration from data communication, enabling a single device implementation to easily support a variety of device bus types.
66

7-
### The Bus Interface Design Pattern
7+
## The Bus Interface Design Pattern
88

99
This pattern allows an application to develop against the common bus interface without regard to the underlying bus type or implementation. This *plug-in* nature of this model enables core application reuse across a range of bus devices. What to use a different bus type? Just use a different driver.
1010

@@ -35,9 +35,9 @@ The key class to support this pattern are:
3535

3636
| | |
3737
|------|-------|
38-
**sfeTkIBus** | A virtual C++ class that device the bus ```sfeTkIBus``` interface |
39-
**sfeTkII2C** | Sub-class of the ```sfeTkIIBus``` interface, it provides an interface for I2C devices|
40-
**sfeTkISPI** | Sub-class of the ```sfeTkIIBus``` interface, it provides an interface for SPI devices |
38+
|**sfeTkIBus** | A virtual C++ class that device the bus ```sfeTkIBus``` interface |
39+
|**sfeTkII2C** | Sub-class of the ```sfeTkIIBus``` interface, it provides an interface for I2C devices|
40+
|**sfeTkISPI** | Sub-class of the ```sfeTkIIBus``` interface, it provides an interface for SPI devices |
4141

4242
### The sfeTkIBus Interface
4343

@@ -47,12 +47,12 @@ The interface methods:
4747

4848
| Method| Definition |
4949
|------|-------|
50-
**writeRegisterByte** | Write a byte of data to a particular register of a device |
51-
**writeRegisterWord** | Write a word of data to a particular register of a device |
52-
**writeRegisterRegion** | Write an array of data to a particular register of a device|
53-
**readRegisterByte** | Read a byte of data from a particular register of a device |
54-
**readRegisterWord** | Read a word of data from a particular register of a device |
55-
**readRegisterRegion** | Read an array of data from a particular register of a device |
50+
|**writeRegisterByte** | Write a byte of data to a particular register of a device |
51+
|**writeRegisterWord** | Write a word of data to a particular register of a device |
52+
|**writeRegisterRegion** | Write an array of data to a particular register of a device|
53+
|**readRegisterByte** | Read a byte of data from a particular register of a device |
54+
|**readRegisterWord** | Read a word of data from a particular register of a device |
55+
|**readRegisterRegion** | Read an array of data from a particular register of a device |
5656

5757
> [!NOTE]
5858
> This interface only defines the methods to read and write data on the given bus. Any address, or bus specific settings is provided/implemented by the implementation/specialization of this interface.
@@ -67,9 +67,9 @@ This class sub-classes from the ```sfeTkIBus``` interface adding additional func
6767

6868
| Method| Definition |
6969
|------|-------|
70-
**ping** | Determine if a devices is connected to the I2C device at the address set on this bus object. This is an interface method |
71-
**setAddress** | Set the I2C address to use for this I2C object |
72-
**address** | Returns the address used by this I2C object |
70+
|**ping** | Determine if a devices is connected to the I2C device at the address set on this bus object. This is an interface method |
71+
|**setAddress** | Set the I2C address to use for this I2C object |
72+
|**address** | Returns the address used by this I2C object |
7373

7474
> [!NOTE]
7575
> The ```sfeTkII2C``` class manages the device address for the I2C bus. As such, each I2C device instantiates/uses an instance of the ```sfeTkII2C``` class.
@@ -84,8 +84,8 @@ This class sub-classes from the ```sfeTkIBus``` interface adding additional func
8484

8585
| Method| Definition |
8686
|------|-------|
87-
**setCS** | Set the CS Pin to use for this SPI object |
88-
**cs** | Returns the CS Pin used by this SPI object |
87+
|**setCS** | Set the CS Pin to use for this SPI object |
88+
|**cs** | Returns the CS Pin used by this SPI object |
8989

9090
> [!NOTE]
9191
> The ```sfeTkISPI``` class manages CS Pin for the SPI bus. As such, each SPI device instantiates/uses an instance of the ```sfeTkISPI``` class.

docs/doxygen/doxygen-awesome-css

Submodule doxygen-awesome-css added at 9f97817

0 commit comments

Comments
 (0)