@@ -128,8 +128,7 @@ static st_fifo_out_slot gyr_slot[SLOT_NUMBER];
128128 * and are strictly related to the hardware platform used.
129129 *
130130 */
131- static int32_t platform_write (void * handle , uint8_t reg ,
132- uint8_t * bufp ,
131+ static int32_t platform_write (void * handle , uint8_t reg , const uint8_t * bufp ,
133132 uint16_t len );
134133static int32_t platform_read (void * handle , uint8_t reg , uint8_t * bufp ,
135134 uint16_t len );
@@ -297,20 +296,20 @@ void lsm6dso32x_compressed_fifo(void)
297296 * @param len number of consecutive register to write
298297 *
299298 */
300- static int32_t platform_write (void * handle , uint8_t reg ,
301- uint8_t * bufp ,
299+ static int32_t platform_write (void * handle , uint8_t reg , const uint8_t * bufp ,
302300 uint16_t len )
303301{
304302#if defined(NUCLEO_F411RE )
305303 HAL_I2C_Mem_Write (handle , LSM6DSO32X_I2C_ADD_L , reg ,
306- I2C_MEMADD_SIZE_8BIT , bufp , len , 1000 );
304+ I2C_MEMADD_SIZE_8BIT , ( uint8_t * ) bufp , len , 1000 );
307305#elif defined(STEVAL_MKI109V3 )
308306 HAL_GPIO_WritePin (CS_up_GPIO_Port , CS_up_Pin , GPIO_PIN_RESET );
309307 HAL_SPI_Transmit (handle , & reg , 1 , 1000 );
310- HAL_SPI_Transmit (handle , bufp , len , 1000 );
308+ HAL_SPI_Transmit (handle , ( uint8_t * ) bufp , len , 1000 );
311309 HAL_GPIO_WritePin (CS_up_GPIO_Port , CS_up_Pin , GPIO_PIN_SET );
312310#elif defined(SPC584B_DIS )
313- i2c_lld_write (handle , LSM6DSO32X_I2C_ADD_L & 0xFE , reg , bufp , len );
311+ i2c_lld_write (handle , LSM6DSO32X_I2C_ADD_L & 0xFE , reg ,
312+ (uint8_t * ) bufp , len );
314313#endif
315314 return 0 ;
316315}
0 commit comments