Basic implementation for STM32F3
This commit is contained in:
17
README.md
17
README.md
@ -3,6 +3,8 @@
|
||||
This repository contains an abstraction layer to provide a simplified & unified
|
||||
interface to the STM32 bxCAN and FDCAN peripherals.
|
||||
|
||||
**Warning**: Currently, only bxCAN (for the STM32F3 series) is supported.
|
||||
|
||||
## Installation
|
||||
|
||||
Simply add the repository to your `Core/Lib` directory. You can also add it as a
|
||||
@ -11,3 +13,18 @@ git submodule:
|
||||
mkdir -p Core/Lib
|
||||
cd Core/Lib
|
||||
git submodule add ssh://git@git.fasttube.de:313/FaSTTUBe/FT_CAN_AL.git
|
||||
|
||||
The library needs to be told what STM family you're using, so make sure one of
|
||||
the following symbols is defined when `FT_CAN_AL.c` is compiled or `FT_CAN_AL.h`
|
||||
is included:
|
||||
|
||||
- STM32F3
|
||||
|
||||
## Usage
|
||||
|
||||
1. Include `FT_CAN_AL.h`
|
||||
2. Call `ftcan_init()` with the appropriate handle
|
||||
3. Call `ftcan_add_filter()` with all your filters
|
||||
4. To transmit messages, call `ftcan_transmit()`
|
||||
5. When a message is received, `ftcan_msg_received_cb()` is called. It has a
|
||||
default empty implementation, which you can simply override.
|
||||
|
||||
Reference in New Issue
Block a user