Skip to content

Commit

Permalink
Merge pull request #42 from TT-ZX/main
Browse files Browse the repository at this point in the history
Fix bug where buffers are not initialised.
  • Loading branch information
pazi88 authored Aug 21, 2024
2 parents ae6ccad + b000df6 commit 52ed65a
Showing 1 changed file with 3 additions and 2 deletions.
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

0 comments on commit 52ed65a

Please sign in to comment.