| ... | ... | @@ -23,7 +23,10 @@ If you want to know more about GPIOs, check out the [GPIO Tutorial - Miosix Wiki |
|
|
|
#### 1. Template API
|
|
|
|
To use a pin in your board you can simply do:
|
|
|
|
```cpp
|
|
|
|
typedef miosix::Gpio<GPIOA_BASE, 5> somePin; // Define pin PA5 as somePin
|
|
|
|
// define pin PA5 as somePin
|
|
|
|
typedef miosix::Gpio<GPIOA_BASE, 5> somePin;
|
|
|
|
// or alternatively
|
|
|
|
using somePin = miosix::Gpio<GPIOA_BASE, 5>;
|
|
|
|
```
|
|
|
|
|
|
|
|
To read from that pin:
|
| ... | ... | |