stm32: Improved CAN support for STM32 (#2976)

Reworked the STM32F0 CAN bus implementation. It's more robust and higher performance.

Added support for function remapping to different pins.  API is emulating an STM32F0.

Improved and ported CAN bus to STM32F0, F1 and F4.

Signed-off-by: Pontus Borg <glpontus@gmail.com>
This commit is contained in:
bondus 2020-06-25 00:59:38 +02:00 committed by GitHub
parent 7cab732ae9
commit 7a8e9591e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 493 additions and 279 deletions

View file

@ -1,17 +0,0 @@
#ifndef CORE_INC_CAN_H_
#define CORE_INC_CAN_H_
// Read UUID (6bytes)
#define PKT_ID_UUID (0x321)
// Set address (2bytes) to UUID (6b)
#define PKT_ID_SET (0x322)
// UUID response from slave (6bytes)
#define PKT_ID_UUID_RESP (0x323)
#define STM32_UUID_ADDR (0x1FFFF7AC)
#define SHORT_UUID_LEN (6)
void CanInit(void);
void CanTransmit(uint32_t id, uint32_t dlc, uint8_t *pkt);
#endif /* CORE_INC_CAN_H_ */