Skip to content

Commit 7a3a055

Browse files
authored
Merge pull request #14 from waterloop/feature/86dregz06/Monitor-IMU-data-with-STM32
IMU driver
2 parents f4efda4 + e331181 commit 7a3a055

File tree

93 files changed

+116483
-113889
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+116483
-113889
lines changed

Common/Inc/config.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
#define MOTOR_CONTROLLER_K2 0x10F8108D
1212
#define MOTOR_CONTROLLER 0xFF
1313
#define MOTOR_CONTROLLER_WARN MOTOR_CONTROLLER - WARN_OFFSET
14+
1415
// BMS
1516
#define BMS_BOARD 0xFF
1617
#define BMS_BOARD_WARN BMS_TEMP - WARN_OFFSET
18+
1719
// SENSORS
1820
#define SENSOR_BOARD_1 0xFF
1921
#define SENSOR_BOARD_1_WARN SENSOR_BOARD_1 - WARN_OFFSET
@@ -53,7 +55,7 @@ const Data_Segment_t BMS_ERROR_CODE = {BMS_BOARD, 8, 8};
5355

5456
// BEGIN SENSORS BOARD DEFS
5557
//FIRST FRAME
56-
const Data_Segment_t PRESSURE_SENSOR_DATA = {SENSOR_BOARD_1, 1, 2};
58+
const Data_Segment_t PRESSURE = {SENSOR_BOARD_1, 1, 2};
5759
const Data_Segment_t LIM_ONE_TEMP = {SENSOR_BOARD_1, 3, 4};
5860
const Data_Segment_t LIM_TWO_TEMP = {SENSOR_BOARD_1, 5, 6};
5961
const Data_Segment_t SENSORS_ERROR_CODE_1 = {SENSOR_BOARD_1, 8, 8};

Common/Src/can_driver.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#include "can_driver.h"
22

3+
#define WARN_OFFSET 0xFF
4+
35
static uint32_t tx_mailbox;
46
#define WARN_OFFSET 0xFF
57

Sensors/.cproject

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,4 +175,5 @@
175175
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
176176
</scannerConfigBuildInfo>
177177
</storageModule>
178+
<storageModule moduleId="refreshScope"/>
178179
</cproject>

Sensors/.mxproject

Lines changed: 31 additions & 29 deletions
Large diffs are not rendered by default.

Sensors/Core/Inc/can.h

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,52 @@
1-
/* USER CODE BEGIN Header */
2-
/**
3-
******************************************************************************
4-
* @file can.h
5-
* @brief This file contains all the function prototypes for
6-
* the can.c file
7-
******************************************************************************
8-
* @attention
9-
*
10-
* Copyright (c) 2024 STMicroelectronics.
11-
* All rights reserved.
12-
*
13-
* This software is licensed under terms that can be found in the LICENSE file
14-
* in the root directory of this software component.
15-
* If no LICENSE file comes with this software, it is provided AS-IS.
16-
*
17-
******************************************************************************
18-
*/
19-
/* USER CODE END Header */
20-
/* Define to prevent recursive inclusion -------------------------------------*/
21-
#ifndef __CAN_H__
22-
#define __CAN_H__
23-
24-
#ifdef __cplusplus
25-
extern "C" {
26-
#endif
27-
28-
/* Includes ------------------------------------------------------------------*/
29-
#include "main.h"
30-
31-
/* USER CODE BEGIN Includes */
32-
33-
/* USER CODE END Includes */
34-
35-
extern CAN_HandleTypeDef hcan3;
36-
37-
/* USER CODE BEGIN Private defines */
38-
39-
/* USER CODE END Private defines */
40-
41-
void MX_CAN3_Init(void);
42-
43-
/* USER CODE BEGIN Prototypes */
44-
45-
/* USER CODE END Prototypes */
46-
47-
#ifdef __cplusplus
48-
}
49-
#endif
50-
51-
#endif /* __CAN_H__ */
52-
1+
/* USER CODE BEGIN Header */
2+
/**
3+
******************************************************************************
4+
* @file can.h
5+
* @brief This file contains all the function prototypes for
6+
* the can.c file
7+
******************************************************************************
8+
* @attention
9+
*
10+
* Copyright (c) 2024 STMicroelectronics.
11+
* All rights reserved.
12+
*
13+
* This software is licensed under terms that can be found in the LICENSE file
14+
* in the root directory of this software component.
15+
* If no LICENSE file comes with this software, it is provided AS-IS.
16+
*
17+
******************************************************************************
18+
*/
19+
/* USER CODE END Header */
20+
/* Define to prevent recursive inclusion -------------------------------------*/
21+
#ifndef __CAN_H__
22+
#define __CAN_H__
23+
24+
#ifdef __cplusplus
25+
extern "C" {
26+
#endif
27+
28+
/* Includes ------------------------------------------------------------------*/
29+
#include "main.h"
30+
31+
/* USER CODE BEGIN Includes */
32+
33+
/* USER CODE END Includes */
34+
35+
extern CAN_HandleTypeDef hcan3;
36+
37+
/* USER CODE BEGIN Private defines */
38+
39+
/* USER CODE END Private defines */
40+
41+
void MX_CAN3_Init(void);
42+
43+
/* USER CODE BEGIN Prototypes */
44+
45+
/* USER CODE END Prototypes */
46+
47+
#ifdef __cplusplus
48+
}
49+
#endif
50+
51+
#endif /* __CAN_H__ */
52+

Sensors/Core/Inc/gpio.h

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
1-
/* USER CODE BEGIN Header */
2-
/**
3-
******************************************************************************
4-
* @file gpio.h
5-
* @brief This file contains all the function prototypes for
6-
* the gpio.c file
7-
******************************************************************************
8-
* @attention
9-
*
10-
* Copyright (c) 2024 STMicroelectronics.
11-
* All rights reserved.
12-
*
13-
* This software is licensed under terms that can be found in the LICENSE file
14-
* in the root directory of this software component.
15-
* If no LICENSE file comes with this software, it is provided AS-IS.
16-
*
17-
******************************************************************************
18-
*/
19-
/* USER CODE END Header */
20-
/* Define to prevent recursive inclusion -------------------------------------*/
21-
#ifndef __GPIO_H__
22-
#define __GPIO_H__
23-
24-
#ifdef __cplusplus
25-
extern "C" {
26-
#endif
27-
28-
/* Includes ------------------------------------------------------------------*/
29-
#include "main.h"
30-
31-
/* USER CODE BEGIN Includes */
32-
33-
/* USER CODE END Includes */
34-
35-
/* USER CODE BEGIN Private defines */
36-
37-
/* USER CODE END Private defines */
38-
39-
void MX_GPIO_Init(void);
40-
41-
/* USER CODE BEGIN Prototypes */
42-
43-
/* USER CODE END Prototypes */
44-
45-
#ifdef __cplusplus
46-
}
47-
#endif
48-
#endif /*__ GPIO_H__ */
49-
1+
/* USER CODE BEGIN Header */
2+
/**
3+
******************************************************************************
4+
* @file gpio.h
5+
* @brief This file contains all the function prototypes for
6+
* the gpio.c file
7+
******************************************************************************
8+
* @attention
9+
*
10+
* Copyright (c) 2024 STMicroelectronics.
11+
* All rights reserved.
12+
*
13+
* This software is licensed under terms that can be found in the LICENSE file
14+
* in the root directory of this software component.
15+
* If no LICENSE file comes with this software, it is provided AS-IS.
16+
*
17+
******************************************************************************
18+
*/
19+
/* USER CODE END Header */
20+
/* Define to prevent recursive inclusion -------------------------------------*/
21+
#ifndef __GPIO_H__
22+
#define __GPIO_H__
23+
24+
#ifdef __cplusplus
25+
extern "C" {
26+
#endif
27+
28+
/* Includes ------------------------------------------------------------------*/
29+
#include "main.h"
30+
31+
/* USER CODE BEGIN Includes */
32+
33+
/* USER CODE END Includes */
34+
35+
/* USER CODE BEGIN Private defines */
36+
37+
/* USER CODE END Private defines */
38+
39+
void MX_GPIO_Init(void);
40+
41+
/* USER CODE BEGIN Prototypes */
42+
43+
/* USER CODE END Prototypes */
44+
45+
#ifdef __cplusplus
46+
}
47+
#endif
48+
#endif /*__ GPIO_H__ */
49+

Sensors/Core/Inc/i2c.h

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/* USER CODE BEGIN Header */
2+
/**
3+
******************************************************************************
4+
* @file i2c.h
5+
* @brief This file contains all the function prototypes for
6+
* the i2c.c file
7+
******************************************************************************
8+
* @attention
9+
*
10+
* Copyright (c) 2024 STMicroelectronics.
11+
* All rights reserved.
12+
*
13+
* This software is licensed under terms that can be found in the LICENSE file
14+
* in the root directory of this software component.
15+
* If no LICENSE file comes with this software, it is provided AS-IS.
16+
*
17+
******************************************************************************
18+
*/
19+
/* USER CODE END Header */
20+
/* Define to prevent recursive inclusion -------------------------------------*/
21+
#ifndef __I2C_H__
22+
#define __I2C_H__
23+
24+
#ifdef __cplusplus
25+
extern "C" {
26+
#endif
27+
28+
/* Includes ------------------------------------------------------------------*/
29+
#include "main.h"
30+
31+
/* USER CODE BEGIN Includes */
32+
33+
/* USER CODE END Includes */
34+
35+
extern I2C_HandleTypeDef hi2c2;
36+
37+
/* USER CODE BEGIN Private defines */
38+
39+
/* USER CODE END Private defines */
40+
41+
void MX_I2C2_Init(void);
42+
43+
/* USER CODE BEGIN Prototypes */
44+
45+
/* USER CODE END Prototypes */
46+
47+
#ifdef __cplusplus
48+
}
49+
#endif
50+
51+
#endif /* __I2C_H__ */
52+

0 commit comments

Comments
 (0)