Skip to content

Commit a2cdb10

Browse files
Merge pull request #4932 from LMESTM/can_reset
Fix STM32 CAN reset to not lose context
2 parents 617f410 + 5997811 commit a2cdb10

File tree

33 files changed

+139
-184
lines changed

33 files changed

+139
-184
lines changed

targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F042K6/objects.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ struct port_s {
5454
__IO uint32_t *reg_out;
5555
};
5656

57-
struct can_s {
58-
CANName can;
59-
int index;
60-
};
61-
6257
#include "common_objects.h"
6358

6459
#ifdef __cplusplus

targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F072RB/objects.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ struct port_s {
5454
__IO uint32_t *reg_out;
5555
};
5656

57-
struct can_s {
58-
CANName can;
59-
int index;
60-
};
61-
6257
#include "common_objects.h"
6358

6459
#ifdef __cplusplus

targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F091RC/objects.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ struct port_s {
5454
__IO uint32_t *reg_out;
5555
};
5656

57-
struct can_s {
58-
CANName can;
59-
int index;
60-
};
61-
6257
#include "common_objects.h"
6358

6459
#ifdef __cplusplus

targets/TARGET_STM/TARGET_STM32F0/common_objects.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,14 @@ struct dac_s {
128128
};
129129
#endif
130130

131+
#if DEVICE_CAN
132+
struct can_s {
133+
CAN_HandleTypeDef CanHandle;
134+
int index;
135+
int hz;
136+
};
137+
#endif
138+
131139
#ifdef __cplusplus
132140
}
133141
#endif

targets/TARGET_STM/TARGET_STM32F1/TARGET_BLUEPILL_F103C8/objects.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ struct port_s {
5454
__IO uint32_t *reg_out;
5555
};
5656

57-
struct can_s {
58-
CANName can;
59-
int index;
60-
};
61-
6257
#include "common_objects.h"
6358

6459
#ifdef __cplusplus

targets/TARGET_STM/TARGET_STM32F1/TARGET_NUCLEO_F103RB/objects.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ struct port_s {
5454
__IO uint32_t *reg_out;
5555
};
5656

57-
struct can_s {
58-
CANName can;
59-
int index;
60-
};
61-
6257
#include "common_objects.h"
6358

6459
#ifdef __cplusplus

targets/TARGET_STM/TARGET_STM32F1/common_objects.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,14 @@ struct analogin_s {
116116
uint8_t channel;
117117
};
118118

119+
#if DEVICE_CAN
120+
struct can_s {
121+
CAN_HandleTypeDef CanHandle;
122+
int index;
123+
int hz;
124+
};
125+
#endif
126+
119127
#include "gpio_object.h"
120128

121129
#ifdef __cplusplus

targets/TARGET_STM/TARGET_STM32F2/objects.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,13 @@ struct pwmout_s {
136136
uint8_t inverted;
137137
};
138138

139+
#ifdef DEVICE_CAN
139140
struct can_s {
140-
CANName can;
141+
CAN_HandleTypeDef CanHandle;
141142
int index;
143+
int hz;
142144
};
145+
#endif
143146

144147
#define GPIO_IP_WITHOUT_BRR
145148
#include "gpio_object.h"

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F302x8/objects.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ struct port_s {
5454
__IO uint32_t *reg_out;
5555
};
5656

57-
struct can_s {
58-
CANName can;
59-
int index;
60-
};
61-
6257
#include "common_objects.h"
6358

6459
#ifdef __cplusplus

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303x8/objects.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ struct port_s {
5454
__IO uint32_t *reg_out;
5555
};
5656

57-
struct can_s {
58-
CANName can;
59-
int index;
60-
};
61-
6257
#include "common_objects.h"
6358

6459
#ifdef __cplusplus

0 commit comments

Comments
 (0)