... | @@ -145,7 +145,7 @@ You can find more information about how to use the GPIO and what pins you can us |
... | @@ -145,7 +145,7 @@ You can find more information about how to use the GPIO and what pins you can us |
|
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:
|
|
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:
|
|
|
|
|
|
```cpp
|
|
```cpp
|
|
#include <Common.h>
|
|
#include <Common.h>board
|
|
#include <drivers/led/SimpleLed.h>
|
|
#include <drivers/led/SimpleLed.h>
|
|
|
|
|
|
using namespace miosix;
|
|
using namespace miosix;
|
... | @@ -165,7 +165,7 @@ int main() |
... | @@ -165,7 +165,7 @@ int main() |
|
## Compile with SBS
|
|
## Compile with SBS
|
|
|
|
|
|
Just as before we have to add what we wrote to `sbs.conf`. This time though
|
|
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:
|
|
we will also have to compile `SimpleLed.cpp` with our entrypoint.
|
|
|
|
|
|
Add a new `srcfiles` group in `sbs.conf`, after `#srcfiles`:
|
|
Add a new `srcfiles` group in `sbs.conf`, after `#srcfiles`:
|
|
|
|
|
... | @@ -175,7 +175,7 @@ Type: srcfiles |
... | @@ -175,7 +175,7 @@ Type: srcfiles |
|
Files: src/shared/drivers/led/SimpleLed.cpp
|
|
Files: src/shared/drivers/led/SimpleLed.cpp
|
|
```
|
|
```
|
|
|
|
|
|
Now you can add the entrypoint (a.k.a *board*, because it's a software that will
|
|
Now you can add the entrypoint (a.k.a _board_, because it's a software that will
|
|
run on a board).
|
|
run on a board).
|
|
|
|
|
|
```
|
|
```
|
... | | ... | |