| ... | ... | @@ -140,7 +140,7 @@ void SimpleLed::switchToState(bool newState) |
|
|
|
As you can see, `PD14` is set as an `output` pin in the constructor and its digital value can be set to `high` or `low`.
|
|
|
|
You can find more information about how to use the GPIO and what pins you can use, in the [GPIO Usage](GPIO-Usage-&-Used-Pins) page.
|
|
|
|
|
|
|
|
## Write an entrypoint
|
|
|
|
## Create your entrypoint
|
|
|
|
|
|
|
|
To write a program that uses this driver, an entrypoint is needed as before: in `src/entrypoints` add a file called `test-led-driver.cpp` and write:
|
|
|
|
|
| ... | ... | @@ -162,7 +162,7 @@ int main() |
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Add everything to SBS
|
|
|
|
## Compile with SBS
|
|
|
|
|
|
|
|
Just as before we have to add what we wrote to `sbs.conf`. This time though
|
|
|
|
we will also have to compile `SimpleLed.cpp` with our entrypoint. The way to do this is:
|
| ... | ... | |