... | @@ -27,6 +27,9 @@ Consider that the GPIOs associated to the SPI bus (`SPI1` in this example) can v |
... | @@ -27,6 +27,9 @@ Consider that the GPIOs associated to the SPI bus (`SPI1` in this example) can v |
|
`PA5`, `PA6` and `PA7`.
|
|
`PA5`, `PA6` and `PA7`.
|
|
|
|
|
|
```cpp
|
|
```cpp
|
|
|
|
namespace Boardcore
|
|
|
|
{
|
|
|
|
|
|
using namespace miosix;
|
|
using namespace miosix;
|
|
|
|
|
|
typedef Gpio<GPIOA_BASE, 5> sck;
|
|
typedef Gpio<GPIOA_BASE, 5> sck;
|
... | @@ -72,10 +75,13 @@ private: |
... | @@ -72,10 +75,13 @@ private: |
|
|
|
|
|
## Cpp file
|
|
## Cpp file
|
|
|
|
|
|
Import the header file and specify that we are using the `miosix` namespace:
|
|
Import the header file and specify the namespaces:
|
|
|
|
|
|
```cpp
|
|
```cpp
|
|
#include "SpiDriver.h"
|
|
#include "SpiDriver.h”
|
|
|
|
|
|
|
|
namespace Boardcore
|
|
|
|
{
|
|
|
|
|
|
using namespace miosix;
|
|
using namespace miosix;
|
|
```
|
|
```
|
... | | ... | |