mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/TACOS.git
synced 2025-06-10 16:45:59 +00:00
README: Instructions for CAN
This commit is contained in:
parent
104d2931be
commit
b5180002a7
16
README.md
16
README.md
@ -65,4 +65,18 @@ PS: For not officially supported chips use this as the include:
|
||||
#include <sta/devices/stm32/mcu/common.hpp>
|
||||
#define STA_MCU_LITTLE_ENDIAN
|
||||
#define STA_PLATFORM_STM32
|
||||
```
|
||||
```
|
||||
## Setting up the CAN Bus
|
||||
|
||||
To enable the CAN Bus two things need to be done:
|
||||
1. Enable CAN in the IOC with the RX0 and RX1 Interrupts enabled.
|
||||
2. Add the following code to the `sta/config.hpp` file:
|
||||
```
|
||||
#define STA_CAN_BUS_ENABLE
|
||||
```
|
||||
PS: For not officially supported chips add this:
|
||||
```
|
||||
#define STA_STM32_CAN_HANDLE {YOUR_HCAN_HANDLE}
|
||||
```
|
||||
|
||||
After this messages will automatically be forwarded to the task with it's ID. To send messages use the interface defined in `tacos.hpp`.
|
Loading…
x
Reference in New Issue
Block a user