Skip to content

Commit

Permalink
validated
Browse files Browse the repository at this point in the history
  • Loading branch information
caiodasilva2005 committed Oct 22, 2024
1 parent 8c4b3f6 commit 014690f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Core/Src/monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ uint16_t convert_can(uint16_t original_value, device_loc_t mode)
osThreadId_t temp_monitor_handle;
const osThreadAttr_t temp_monitor_attributes = {
.name = "TempMonitor",
.stack_size = 64 * 8,
.stack_size = 64 * 16,
.priority = (osPriority_t)osPriorityHigh1,
};

Expand Down
9 changes: 4 additions & 5 deletions Core/Src/msb.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ extern device_loc_t device_loc;
osMutexId_t i2c_mutex;

// reads imu reg
static inline int read_reg(uint8_t *data,
static inline int imu_read_reg(uint8_t *data,
uint8_t reg,
uint8_t length) {

return HAL_I2C_Mem_Read(&hi2c3, LSM6DSO_I2C_ADDRESS, reg,
I2C_MEMADD_SIZE_8BIT, data, length, HAL_MAX_DELAY);
}

// read imu write
static inline int write_reg(uint8_t *data,
// read imu write
static inline int imu_write_reg(uint8_t *data,
uint8_t reg,
uint8_t length) {

Expand Down Expand Up @@ -61,8 +61,7 @@ int8_t msb_init()
#ifdef SENSOR_IMU

/* Initialize the IMU */
lsm6dso_t imu;
assert(!lsm6dso_init(&imu, read_reg, write_reg)); /* This is always connected */
assert(!lsm6dso_init(&imu, imu_read_reg, imu_write_reg)); /* This is always connected */
#endif

#ifdef SENSOR_TOF
Expand Down

0 comments on commit 014690f

Please sign in to comment.