Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug where buffers are not initialised. #42

Merged
merged 2 commits into from
Aug 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions STM32_CAN.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ to same folder with sketch and haven #define HAL_CAN_MODULE_ENABLED there. See e
#if defined(STM32F0xx)
#define CAN1_TX_IRQn CEC_CAN_IRQn
#define CAN1_RX0_IRQn CEC_CAN_IRQn
#define CAN1_RX0_IRQHandler CEC_CAN_IRQHandler
#endif

#include <Arduino.h>
Expand Down Expand Up @@ -193,8 +194,8 @@ class STM32_CAN {
uint8_t timeseg2, uint8_t sjw);
uint32_t getAPB1Clock(void);

volatile CAN_message_t *rx_buffer;
volatile CAN_message_t *tx_buffer;
volatile CAN_message_t *rx_buffer = nullptr;
volatile CAN_message_t *tx_buffer = nullptr;

static constexpr Baudrate_entry_t BAUD_RATE_TABLE_48M[] {
{
Expand Down
Loading