Platform/ECM3532/M3/hw/sensor_drv/icm20602/icm20602_spi.c
/***************************************************************************/
/**
 *
 * _Icm20602Read - Read from the Icm20602
 *
 * @param icm_spi_bus SPI bus/instance id.
 * @param ui8Reg Register to read.
 * @param ui32NumBytes Number of bytes to read.
 *
 * @return Return the read value opf the requested register.
 *
 ******************************************************************************/
Read from the Icm20602
@param icm_spi_bus SPI bus/instance id.
@param ui8Reg Register to read.
@param ui32NumBytes Number of bytes to read.

@return Return the read value opf the requested register.
Read from the Icm20602 @param icm_spi_bus SPI bus / instance id . @param ui8Reg Register to read . @param ui32NumBytes Number of bytes to read . @return Return the read value opf the requested register .
static void _Icm20602Read(uint8_t icm_spi_bus, uint8_t ui8Reg, uint8_t* pui8RxData, uint32_t ui32NumBytes)
{
    uint8_t pui8TxData[1];
     Setup the read.
    pui8TxData[0] = ui8Reg | 0x80;
    Enable CS of icm20602 sensor in SPI mode
    HalSpiAssertCS(icm_spi_bus, PIN30, CS_ACTIVE_LOW);
    HalSpiXfer(icm_spi_bus, pui8TxData, 1, pui8RxData, ui32NumBytes, NULL, NULL);
    Disable CS of icm20602 sensor
    HalSpiDeAssertCS(icm_spi_bus, PIN30);
}
static void _Icm20602Read ( uint8_t icm_spi_bus , uint8_t ui8Reg , uint8_t * pui8RxData , uint32_t ui32NumBytes ) { uint8_t pui8TxData [ 1 ] ; pui8TxData [ 0 ] = ui8Reg | 0x80 ; HalSpiAssertCS ( icm_spi_bus , PIN30 , CS_ACTIVE_LOW ) ; HalSpiXfer ( icm_spi_bus , pui8TxData , 1 , pui8RxData , ui32NumBytes , NULL , NULL ) ; HalSpiDeAssertCS ( icm_spi_bus , PIN30 ) ; }
_Icm20602Read - Read from the Icm20602
 @param icm_spi_bus SPI bus/instance id.
_Icm20602Read - Read from the Icm20602 @param icm_spi_bus SPI bus / instance id .
// // Setup the read. // //Enable CS of icm20602 sensor in SPI mode //Disable CS of icm20602 sensor