| ... | @@ -4,7 +4,7 @@ The `bsp.cpp` and `bsp_impl.h` files can be found under: `/libs/miosix-kernel/ar |
... | @@ -4,7 +4,7 @@ The `bsp.cpp` and `bsp_impl.h` files can be found under: `/libs/miosix-kernel/ar |
|
|
|
|
|
|
|
The `bsp.cpp` contains the implementation of some functions that are called when the board is powered up and initialized.
|
|
The `bsp.cpp` contains the implementation of some functions that are called when the board is powered up and initialized.
|
|
|
|
|
|
|
|
### IRQbspInit
|
|
## IRQbspInit
|
|
|
In this function the speed of the GPIO ports is configured. Here you can also configure the GPIO mode (e.g. configuring the correct alternate mode for the pins that belong to an SPI bus), the default serial port along with its speed and so on.
|
|
In this function the speed of the GPIO ports is configured. Here you can also configure the GPIO mode (e.g. configuring the correct alternate mode for the pins that belong to an SPI bus), the default serial port along with its speed and so on.
|
|
|
```cpp
|
|
```cpp
|
|
|
void IRQbspInit()
|
|
void IRQbspInit()
|
| ... | @@ -44,7 +44,7 @@ void IRQbspInit() |
... | @@ -44,7 +44,7 @@ void IRQbspInit() |
|
|
```
|
|
```
|
|
|
Note that `myspi` and `mysensor` along with their corresponding GPIOs are defined in the [hardware mapping](Hardware-Mapping) file (`hwmapping.h`).
|
|
Note that `myspi` and `mysensor` along with their corresponding GPIOs are defined in the [hardware mapping](Hardware-Mapping) file (`hwmapping.h`).
|
|
|
|
|
|
|
|
### bspInit2
|
|
## bspInit2
|
|
|
```cpp
|
|
```cpp
|
|
|
void bspInit2()
|
|
void bspInit2()
|
|
|
{
|
|
{
|
| ... | @@ -55,7 +55,7 @@ void bspInit2() |
... | @@ -55,7 +55,7 @@ void bspInit2() |
|
|
#endif //WITH_FILESYSTEM
|
|
#endif //WITH_FILESYSTEM
|
|
|
}
|
|
}
|
|
|
```
|
|
```
|
|
|
### Shutdown and Reboot
|
|
## Shutdown and Reboot
|
|
|
Usually for safety reasons when designing a new board for a rocket, we never want the board to completely shotdown. So in that case the *shutdown()* function performs a *reboot()*.
|
|
Usually for safety reasons when designing a new board for a rocket, we never want the board to completely shotdown. So in that case the *shutdown()* function performs a *reboot()*.
|
|
|
```cpp
|
|
```cpp
|
|
|
void shutdown()
|
|
void shutdown()
|
| ... | | ... | |