Compare commits
2 Commits
b2929ad664
...
add-F3-mac
| Author | SHA1 | Date | |
|---|---|---|---|
| 5832f00cbc | |||
| 66983c30d3 |
@ -141,7 +141,10 @@ HAL_StatusTypeDef ftcan_transmit(uint16_t id, const uint8_t *data,
|
||||
header.FDFormat = FDCAN_CLASSIC_CAN;
|
||||
header.TxEventFifoControl = FDCAN_NO_TX_EVENTS;
|
||||
|
||||
return HAL_FDCAN_AddMessageToTxFifoQ(hcan, &header, data);
|
||||
// HAL_FDCAN_AddMessageToTxFifoQ doesn't modify the data, but it's not marked
|
||||
// as const for some reason.
|
||||
uint8_t *data_nonconst = (uint8_t *)data;
|
||||
return HAL_FDCAN_AddMessageToTxFifoQ(hcan, &header, data_nonconst);
|
||||
}
|
||||
|
||||
HAL_StatusTypeDef ftcan_add_filter(uint16_t id, uint16_t mask) {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#ifndef CAN_HALAL_H
|
||||
#define CAN_HALAL_H
|
||||
|
||||
#if defined(STM32F3)
|
||||
#if defined(STM32F302x8) || defined(STM32F302xB) || defined(STM32F302xC) || defined(STM32F3)
|
||||
#include "stm32f3xx_hal.h"
|
||||
#define FTCAN_IS_BXCAN
|
||||
#define FTCAN_NUM_FILTERS 13
|
||||
|
||||
Reference in New Issue
Block a user