Platform/ECM3532/M3/framework/sensor_mgr/src/sensor.c
/**
 * Sal Sensor Read
 *
 * @param sDrvHandle  Sensor driver handle
 * @param iSensor Sensor type
 * @param ui8Buf pointer to contain data read from sensor
 * @param ui8Len Lenght of buffer
 *
 * @return 0 on success, negative error code on failure.
 */
Sal Sensor Read
@param sDrvHandle  Sensor driver handle
@param iSensor Sensor type
@param ui8Buf pointer to contain data read from sensor
@param ui8Len Lenght of buffer

@return 0 on success, negative error code on failure.
Sal Sensor Read @param sDrvHandle Sensor driver handle @param iSensor Sensor type @param ui8Buf pointer to contain data read from sensor @param ui8Len Lenght of buffer @return 0 on success negative error code on failure .
int32_t SalSensorRead(tSDrvHandle sDrvHandle, tSensorType iSensor,
                    uint8_t *ui8Buf, uint8_t ui8Len)
{
    int32_t ret = -EINVAL;
    uint8_t ui8Idx;
    tDrvHandle vDrvHandle;
    if ((sDrvHandle != INVALID_HANDLE) && (sDrvHandle < DRIVER_MAX_CNT))
    {
        vDrvHandle = sHandleMapList[sDrvHandle].vDrvHandle;
        if (vDrvHandle != INVALID_HANDLE)
        {
            ui8Idx = sHandleMapList[sDrvHandle].ui8SensorDevIndex;
            ret = sSensorDevList[ui8Idx].sDops->
                DrvRead(vDrvHandle, iSensor, ui8Buf, ui8Len);
        }
        else
        {
            ecm35xx_printf("SM Read: Error Invalid Handle\r\n");
        }
    }
    return ret;
}
int32_t SalSensorRead ( tSDrvHandle sDrvHandle , tSensorType iSensor , uint8_t * ui8Buf , uint8_t ui8Len ) { int32_t ret = - EINVAL ; uint8_t ui8Idx ; tDrvHandle vDrvHandle ; if ( ( sDrvHandle != INVALID_HANDLE ) && ( sDrvHandle < DRIVER_MAX_CNT ) ) { vDrvHandle = sHandleMapList [ sDrvHandle ] . vDrvHandle ; if ( vDrvHandle != INVALID_HANDLE ) { ui8Idx = sHandleMapList [ sDrvHandle ] . ui8SensorDevIndex ; ret = sSensorDevList [ ui8Idx ] . sDops -> DrvRead ( vDrvHandle , iSensor , ui8Buf , ui8Len ) ; } else { ecm35xx_printf ( " \r \n " ) ; } } return ret ; }
Sal Sensor Read
 @param sDrvHandle  Sensor driver handle
 @param iSensor Sensor type
 @param ui8Buf pointer to contain data read from sensor
 @param ui8Len Lenght of buffer
Sal Sensor Read @param sDrvHandle Sensor driver handle @param iSensor Sensor type @param ui8Buf pointer to contain data read from sensor @param ui8Len Lenght of buffer