Skip to content

Commit d300a41

Browse files
committed
Further refinement and initial workflow try
1 parent d702c0c commit d300a41

File tree

6 files changed

+274
-196
lines changed

6 files changed

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

README.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,38 @@
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)
77

8+
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.
89

10+
## Motivation
911

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.
12+
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.
1113

12-
By using the SparkFun Toolkit, Arduino drivers achieve the following benefits:
14+
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:
1315

1416
* Use a well-tested and validated implementation
1517
* Reduce development effort
1618
* Implement functionality following a common structure
1719
* Set the foundation for future enhancements - as the capabilities of the toolkit grow, these features become available with little to any implementation effort.
1820

19-
## Current Status
21+
## Documentation
22+
23+
The SparkFun Toolkit Development documentation is available [here](https://docs.sparkfun.com/SparkFun_Toolkit)
24+
25+
## Installation and Use
26+
27+
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.
28+
29+
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.
30+
31+
To mark the `SparkFun Toolkit` as a dependency, add the following line to the `library.properties` file for your library.
2032

21-
### December 2023
33+
```INI
34+
depends=SparkFun Toolkit
35+
```
2236

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.
37+
## Examples
2438

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

27-
|||
28-
|---|---|
29-
|[Bus Implementation](docs/ar_ibus.md) | The architecture and use of the Toolkit Communication Bus Interface
41+
* [SparkFun Qwiic Pulsed Coherent Radar Sensor XM125](https://github.com/sparkfun/SparkFun_Qwiic_XM125_Arduino_Library)
42+
* [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-config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ PROJECT_NAME = "SparkFun Toolkit"
4848
# could be handy for archiving the generated documentation or if some version
4949
# control system is used.
5050

51-
PROJECT_NUMBER =
51+
# PROJECT_NUMBER =
5252

5353
# Using the PROJECT_BRIEF tag one can provide an optional one line description
5454
# for a project that appears at the top of each page and should give viewer a
5555
# quick idea about the purpose of the project. Keep the description short.
5656

57-
PROJECT_BRIEF = "Common Library Functionality"
57+
PROJECT_BRIEF = "Core Functionality Library"
5858

5959
# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
6060
# in the documentation. The maximum height of the logo should not exceed 55

0 commit comments

Comments
 (0)