... | @@ -6,6 +6,7 @@ The `bsp.cpp` contains the implementation of some functions that are called when |
... | @@ -6,6 +6,7 @@ The `bsp.cpp` contains the implementation of some functions that are called when |
|
|
|
|
|
## 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()
|
|
{
|
|
{
|
... | @@ -46,6 +47,7 @@ Note that `myspi` and `mysensor` along with their corresponding GPIOs are define |
... | @@ -46,6 +47,7 @@ Note that `myspi` and `mysensor` along with their corresponding GPIOs are define |
|
|
|
|
|
## bspInit2
|
|
## bspInit2
|
|
This function contains the configurations needed to access other `USART` ports of the microcontroller.
|
|
This function contains the configurations needed to access other `USART` ports of the microcontroller.
|
|
|
|
|
|
```cpp
|
|
```cpp
|
|
void bspInit2()
|
|
void bspInit2()
|
|
{
|
|
{
|
... | @@ -57,7 +59,8 @@ void bspInit2() |
... | @@ -57,7 +59,8 @@ void bspInit2() |
|
}
|
|
}
|
|
```
|
|
```
|
|
## 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()
|
|
{
|
|
{
|
... | | ... | |