Vybhav Kadaba
/
EV-PRO-MW1001_MWARE1239
Register map updated
Diff: src/admw_1001.c
- Revision:
- 50:d84305e5e1c0
- Parent:
- 48:5731f1aa2c5a
- Child:
- 52:d32ea3dfc8ac
--- a/src/admw_1001.c Thu Feb 06 11:04:31 2020 +0000 +++ b/src/admw_1001.c Mon Feb 17 11:23:39 2020 +0000 @@ -388,7 +388,7 @@ return ADMW_SUCCESS; } -ADMW_RESULT deviceInformation(ADMW_DEVICE_HANDLE hDevice) +ADMW_RESULT admw_deviceInformation(ADMW_DEVICE_HANDLE hDevice) { uint16_t nAddress = REG_CORE_REVISION; char nData[ADMW_VERSION_REG_VAL_SIZE]; //4 Bytes of version register data @@ -433,8 +433,8 @@ if (bWaitForCompletion) { do { - /* Allow a minimum 50usec delay for status update before checking */ - admw_TimeDelayUsec(50); + /* Allow a minimum 100usec delay for status update before checking */ + admw_TimeDelayUsec(100); eRet = admw_GetCommandRunningState(hDevice, &bCommandRunning); if (eRet) @@ -645,7 +645,7 @@ admw_TimeDelayUsec(ADMW1001_HOST_COMMS_XFER_DELAY); } while ((commandResponse[0] != ADMW1001_HOST_COMMS_CMD_RESP_0) || (commandResponse[1] != ADMW1001_HOST_COMMS_CMD_RESP_1)); - + for (unsigned i = 0; i < nRequested; i++) { bool bHoldCs = true; /* Keep the CS signal asserted for all but the last sample */ @@ -690,7 +690,7 @@ nValidSamples++; - admw_TimeDelayUsec(30); + admw_TimeDelayUsec(ADMW1001_HOST_COMMS_XFER_DELAY); } *pnReturned = nValidSamples; @@ -902,18 +902,15 @@ ADMW_CORE_Mode_t modeReg; READ_REG_U8(hDevice, modeReg.VALUE8, CORE_MODE); - if(eMeasurementMode==ADMW_MEASUREMENT_MODE_NORMAL) { + if (eMeasurementMode == (modeReg.Conversion_Mode == CORE_MODE_SINGLECYCLE)) + *peOperatingMode = ADMW1001_OPERATING_MODE_SINGLECYCLE; + else + *peOperatingMode = ADMW1001_OPERATING_MODE_CONTINUOUS; - if (modeReg.Conversion_Mode == CORE_MODE_SINGLECYCLE) - *peOperatingMode = ADMW1001_OPERATING_MODE_SINGLECYCLE; - else - *peOperatingMode = ADMW1001_OPERATING_MODE_CONTINUOUS; - } - if (eMeasurementMode == ADMW_MEASUREMENT_MODE_OMIT_RAW) { - *pnBytesPerSample = 5; + *pnBytesPerSample = 8; } else { - *pnBytesPerSample = 8; + *pnBytesPerSample = 12; } for (ADMW1001_CH_ID chId = ADMW1001_CH_ID_ANLG_1_UNIVERSAL; @@ -937,7 +934,7 @@ * active when those sensors are selected and we use the count * from the corresponding "physical" channel */ -#if 0 /* SPI sensors arent supported at present to be added back once there is +#if 0 /* SPI sensors arent supported at present to be added back once there is * support for these sensors */ ADMW_CORE_Sensor_Type_t sensorTypeReg; @@ -970,14 +967,30 @@ if (modeReg.Drdy_Mode == CORE_MODE_DRDY_PER_CONVERSION) { *pnSamplesPerDataready = 1; + } else if (modeReg.Drdy_Mode == CORE_MODE_DRDY_PER_CYCLE) { + *pnSamplesPerDataready = nSamplesPerCycle; + } else if (modeReg.Drdy_Mode == CORE_MODE_DRDY_PER_FIFO_FILL) { + ADMW_CORE_Fifo_Num_Cycles_t fifoNumCyclesReg; + + READ_REG_U8(hDevice, fifoNumCyclesReg.VALUE8, CORE_FIFO_NUM_CYCLES); + + *pnSamplesPerDataready = nSamplesPerCycle * fifoNumCyclesReg.Fifo_Num_Cycles; } else { - *pnSamplesPerDataready = nSamplesPerCycle; + ADMW_LOG_ERROR("Invalid DRDY mode %d specified", + modeReg.Drdy_Mode); + return ADMW_INVALID_PARAM; } if (modeReg.Drdy_Mode == CORE_MODE_DRDY_PER_CONVERSION) { *peDataReadyMode = ADMW1001_DATAREADY_PER_CONVERSION; + } else if (modeReg.Drdy_Mode == CORE_MODE_DRDY_PER_CYCLE) { + *peDataReadyMode = ADMW1001_DATAREADY_PER_CYCLE; + } else if (modeReg.Drdy_Mode == CORE_MODE_DRDY_PER_FIFO_FILL) { + *peDataReadyMode = ADMW1001_DATAREADY_PER_FIFO_FILL; } else { - *peDataReadyMode = ADMW1001_DATAREADY_PER_CYCLE; + ADMW_LOG_ERROR("Invalid DRDY mode %d specified", + modeReg.Drdy_Mode); + return ADMW_INVALID_PARAM; } return ADMW_SUCCESS; @@ -1002,7 +1015,7 @@ ADMW_DEVICE_HANDLE hDevice, ADMW1001_POWER_MODE powerMode) { - ADMW_CORE_Power_Config_t powerConfigReg; + ADMW_CORE_Power_Config_t powerConfigReg = { 0 }; if (powerMode == ADMW1001_POWER_MODE_HIBERNATION) { powerConfigReg.Power_Mode_MCU = CORE_POWER_CONFIG_HIBERNATION; @@ -1069,6 +1082,8 @@ modeReg.Drdy_Mode = CORE_MODE_DRDY_PER_CONVERSION; } else if (eDataReadyMode == ADMW1001_DATAREADY_PER_CYCLE) { modeReg.Drdy_Mode = CORE_MODE_DRDY_PER_CYCLE; + } else if (eDataReadyMode == ADMW1001_DATAREADY_PER_FIFO_FILL) { + modeReg.Drdy_Mode = CORE_MODE_DRDY_PER_FIFO_FILL; } else { ADMW_LOG_ERROR("Invalid data-ready mode %d specified", eDataReadyMode); return ADMW_INVALID_PARAM; @@ -1081,7 +1096,7 @@ ADMW_RESULT admw_SetCycleControl(ADMW_DEVICE_HANDLE hDevice, uint32_t nCycleInterval, - bool vBiasEnable, + bool vBiasEnable, bool vPostExecCurrentState, bool vGroundSwitch) { @@ -1093,7 +1108,7 @@ cycleControlReg.Cycle_Time_Units = CORE_CYCLE_CONTROL_SECONDS; } else { ADMW_LOG_ERROR("Invalid nCycleInterval %d specified", nCycleInterval); - return ADMW_INVALID_PARAM; + return ADMW_INVALID_PARAM; } if (vBiasEnable == true) { @@ -1101,35 +1116,33 @@ } CHECK_REG_FIELD_VAL(CORE_CYCLE_CONTROL_CYCLE_TIME, nCycleInterval); cycleControlReg.Cycle_Time = nCycleInterval; - - switch(vPostExecCurrentState) - { - case ADMW1001_ADC_EXC_STATE_CYCLE_POWER: - cycleControlReg.PST_MEAS_EXC_CTRL = CORE_CYCLE_CONTROL_POWERCYCLE; - break; - case ADMW1001_ADC_EXC_STATE_ALWAYS_ON: - cycleControlReg.PST_MEAS_EXC_CTRL = CORE_CYCLE_CONTROL_ALWAYSON; - break; - default: - ADMW_LOG_ERROR("Invalid Post measurement Excitation Current state %d specified", - vPostExecCurrentState); - return ADMW_INVALID_PARAM; + + switch(vPostExecCurrentState) { + case ADMW1001_ADC_EXC_STATE_CYCLE_POWER: + cycleControlReg.PST_MEAS_EXC_CTRL = CORE_CYCLE_CONTROL_POWERCYCLE; + break; + case ADMW1001_ADC_EXC_STATE_ALWAYS_ON: + cycleControlReg.PST_MEAS_EXC_CTRL = CORE_CYCLE_CONTROL_ALWAYSON; + break; + default: + ADMW_LOG_ERROR("Invalid Post measurement Excitation Current state %d specified", + vPostExecCurrentState); + return ADMW_INVALID_PARAM; } - - switch(vGroundSwitch) - { - case ADMW1001_ADC_GND_SW_OPEN: - cycleControlReg.GND_SW_CTRL = CORE_CYCLE_CONTROL_CYCLE_SW; - break; - case ADMW1001_ADC_GND_SW_CLOSED: - cycleControlReg.GND_SW_CTRL = CORE_CYCLE_CONTROL_CLOSE_SW; - break; - default: - ADMW_LOG_ERROR("Invalid ground switch state %d specified", - vGroundSwitch); - return ADMW_INVALID_PARAM; + + switch(vGroundSwitch) { + case ADMW1001_ADC_GND_SW_OPEN: + cycleControlReg.GND_SW_CTRL = CORE_CYCLE_CONTROL_OPEN_SW; + break; + case ADMW1001_ADC_GND_SW_CLOSED: + cycleControlReg.GND_SW_CTRL = CORE_CYCLE_CONTROL_CLOSE_SW; + break; + default: + ADMW_LOG_ERROR("Invalid ground switch state %d specified", + vGroundSwitch); + return ADMW_INVALID_PARAM; } - + WRITE_REG_U16(hDevice, cycleControlReg.VALUE16, CORE_CYCLE_CONTROL); return ADMW_SUCCESS; @@ -1142,6 +1155,14 @@ return ADMW_SUCCESS; } +static ADMW_RESULT admw_SetFifoNumCycles( + ADMW_DEVICE_HANDLE hDevice, + uint8_t fifoNumCycles) +{ + WRITE_REG_U8(hDevice, fifoNumCycles, CORE_FIFO_NUM_CYCLES); + + return ADMW_SUCCESS; +} static ADMW_RESULT admw_SetExternalReferenceValues( ADMW_DEVICE_HANDLE hDevice, @@ -1152,14 +1173,14 @@ return ADMW_SUCCESS; } static ADMW_RESULT admw_SetAVDDVoltage( - ADMW_DEVICE_HANDLE hDevice, - float32_t AVDDVoltage) - { + ADMW_DEVICE_HANDLE hDevice, + float32_t AVDDVoltage) +{ - WRITE_REG_FLOAT(hDevice, AVDDVoltage, CORE_AVDD_VOLTAGE); + WRITE_REG_FLOAT(hDevice, AVDDVoltage, CORE_AVDD_VOLTAGE); - return ADMW_SUCCESS; - } + return ADMW_SUCCESS; +} ADMW_RESULT admw1001_SetMeasurementConfig( ADMW_DEVICE_HANDLE hDevice, @@ -1184,17 +1205,33 @@ return eRet; } + if (pMeasConfig->fifoNumCycles > 0) { + eRet = admw_SetFifoNumCycles(hDevice, + pMeasConfig->fifoNumCycles); + } + + if (eRet != ADMW_SUCCESS) { + ADMW_LOG_ERROR("Failed to set the FIFO number of cycles."); + return eRet; + } + if(pMeasConfig->externalRef1Value > 0) { eRet = admw_SetExternalReferenceValues(hDevice, pMeasConfig->externalRef1Value); } - if((pMeasConfig->AVDDVoltage >= 3.0) && (pMeasConfig->AVDDVoltage <= 3.6)) - { + + if (eRet != ADMW_SUCCESS) { + ADMW_LOG_ERROR("Failed to set external reference values"); + return eRet; + } + + if((pMeasConfig->AVDDVoltage >= 3.0) && (pMeasConfig->AVDDVoltage <= 3.6)) { eRet = admw_SetAVDDVoltage(hDevice, pMeasConfig->AVDDVoltage); } + if (eRet != ADMW_SUCCESS) { - ADMW_LOG_ERROR("Failed to set external reference values"); + ADMW_LOG_ERROR("Failed to set AVDD Voltge"); return eRet; } @@ -1212,7 +1249,6 @@ return ADMW_SUCCESS; } - ADMW_RESULT admw1001_SetDiagnosticsConfig( ADMW_DEVICE_HANDLE hDevice, ADMW1001_DIAGNOSTICS_CONFIG *pDiagnosticsConfig) @@ -1313,18 +1349,37 @@ /* Ensure that the sensor type is valid for this channel */ switch(sensorType) { + case ADMW1001_ADC_SENSOR_RTD_2WIRE_PT10: + + case ADMW1001_ADC_SENSOR_RTD_2WIRE_PT50: + case ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100: + case ADMW1001_ADC_SENSOR_RTD_2WIRE_PT200: + case ADMW1001_ADC_SENSOR_RTD_2WIRE_PT500: + case ADMW1001_ADC_SENSOR_RTD_2WIRE_PT1000: + case ADMW1001_ADC_SENSOR_RTD_2WIRE_PT1000_0P00375: + case ADMW1001_ADC_SENSOR_RTD_2WIRE_NI120: + case ADMW1001_ADC_SENSOR_RTD_2WIRE_CUSTOM: + case ADMW1001_ADC_SENSOR_RTD_4WIRE_PT10: + + case ADMW1001_ADC_SENSOR_RTD_4WIRE_PT50: + case ADMW1001_ADC_SENSOR_RTD_4WIRE_PT100: + case ADMW1001_ADC_SENSOR_RTD_4WIRE_PT200: + case ADMW1001_ADC_SENSOR_RTD_4WIRE_PT500: + case ADMW1001_ADC_SENSOR_RTD_4WIRE_PT1000: + case ADMW1001_ADC_SENSOR_RTD_4WIRE_PT1000_0P00375: + case ADMW1001_ADC_SENSOR_RTD_4WIRE_NI120: + case ADMW1001_ADC_SENSOR_RTD_4WIRE_CUSTOM: + case ADMW1001_ADC_SENSOR_RTD_3WIRE_PT10: + + case ADMW1001_ADC_SENSOR_RTD_3WIRE_PT50: case ADMW1001_ADC_SENSOR_RTD_3WIRE_PT100: + case ADMW1001_ADC_SENSOR_RTD_3WIRE_PT200: + case ADMW1001_ADC_SENSOR_RTD_3WIRE_PT500: case ADMW1001_ADC_SENSOR_RTD_3WIRE_PT1000: - case ADMW1001_ADC_SENSOR_RTD_3WIRE_1: - case ADMW1001_ADC_SENSOR_RTD_3WIRE_2: - case ADMW1001_ADC_SENSOR_RTD_3WIRE_3: - case ADMW1001_ADC_SENSOR_RTD_3WIRE_4: - case ADMW1001_ADC_SENSOR_RTD_4WIRE_PT100: - case ADMW1001_ADC_SENSOR_RTD_4WIRE_PT1000: - case ADMW1001_ADC_SENSOR_RTD_4WIRE_1: - case ADMW1001_ADC_SENSOR_RTD_4WIRE_2: - case ADMW1001_ADC_SENSOR_RTD_4WIRE_3: - case ADMW1001_ADC_SENSOR_RTD_4WIRE_4: + case ADMW1001_ADC_SENSOR_RTD_3WIRE_PT1000_0P00375 : + + case ADMW1001_ADC_SENSOR_RTD_3WIRE_NI120: + case ADMW1001_ADC_SENSOR_RTD_3WIRE_CUSTOM: case ADMW1001_ADC_SENSOR_BRIDGE_4WIRE_1: case ADMW1001_ADC_SENSOR_BRIDGE_4WIRE_2: case ADMW1001_ADC_SENSOR_BRIDGE_4WIRE_3: @@ -1333,28 +1388,23 @@ case ADMW1001_ADC_SENSOR_BRIDGE_6WIRE_2: case ADMW1001_ADC_SENSOR_BRIDGE_6WIRE_3: case ADMW1001_ADC_SENSOR_BRIDGE_6WIRE_4: - case ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100: - case ADMW1001_ADC_SENSOR_RTD_2WIRE_PT1000: - case ADMW1001_ADC_SENSOR_RTD_2WIRE_1: - case ADMW1001_ADC_SENSOR_RTD_2WIRE_2: - case ADMW1001_ADC_SENSOR_RTD_2WIRE_3: - case ADMW1001_ADC_SENSOR_RTD_2WIRE_4: - case ADMW1001_ADC_SENSOR_DIODE_2C_TYPEA: - case ADMW1001_ADC_SENSOR_DIODE_3C_TYPEA: - case ADMW1001_ADC_SENSOR_DIODE_2C_1: - case ADMW1001_ADC_SENSOR_DIODE_3C_1: - case ADMW1001_ADC_SENSOR_THERMISTOR_A_10K: - case ADMW1001_ADC_SENSOR_THERMISTOR_B_10K: - case ADMW1001_ADC_SENSOR_THERMISTOR_1: - case ADMW1001_ADC_SENSOR_THERMISTOR_2: - case ADMW1001_ADC_SENSOR_THERMISTOR_3: - case ADMW1001_ADC_SENSOR_THERMISTOR_4: + case ADMW1001_ADC_SENSOR_DIODE: + case ADMW1001_ADC_SENSOR_THERMISTOR_44004_44033_2P252K_AT_25C: + case ADMW1001_ADC_SENSOR_THERMISTOR_44005_44030_3K_AT_25C: + case ADMW1001_ADC_SENSOR_THERMISTOR_44007_44034_5K_AT_25C: + case ADMW1001_ADC_SENSOR_THERMISTOR_44006_44031_10K_AT_25C: + case ADMW1001_ADC_SENSOR_THERMISTOR_44008_44032_30K_AT_25C: + case ADMW1001_ADC_SENSOR_THERMISTOR_YSI_400: + case ADMW1001_ADC_SENSOR_THERMISTOR_SPECTRUM_1003K_1K: + case ADMW1001_ADC_SENSOR_THERMISTOR_CUSTOM_STEINHART_HART: + case ADMW1001_ADC_SENSOR_THERMISTOR_CUSTOM_TABLE: case ADMW1001_ADC_SENSOR_SINGLE_ENDED_ABSOLUTE: case ADMW1001_ADC_SENSOR_DIFFERENTIAL_ABSOLUTE: case ADMW1001_ADC_SENSOR_SINGLE_ENDED_RATIO: case ADMW1001_ADC_SENSOR_DIFFERENTIAL_RATIO: - if (! (ADMW1001_CHANNEL_IS_ADC_SENSOR(eChannelId) || - ADMW1001_CHANNEL_IS_ADC_CJC(eChannelId) || ADMW1001_CHANNEL_IS_ADC(eChannelId) )) { + + if (! (ADMW1001_CHANNEL_IS_ADC_CJC(eChannelId) || + ADMW1001_CHANNEL_IS_ADC(eChannelId) )) { ADMW_LOG_ERROR( "Invalid ADC sensor type %d specified for channel %d", sensorType, eChannelId); @@ -1369,10 +1419,12 @@ case ADMW1001_ADC_SENSOR_THERMOCOUPLE_J: case ADMW1001_ADC_SENSOR_THERMOCOUPLE_K: case ADMW1001_ADC_SENSOR_THERMOCOUPLE_T: - case ADMW1001_ADC_SENSOR_THERMOCOUPLE_1: - case ADMW1001_ADC_SENSOR_THERMOCOUPLE_2: - case ADMW1001_ADC_SENSOR_THERMOCOUPLE_3: - case ADMW1001_ADC_SENSOR_THERMOCOUPLE_4: + case ADMW1001_ADC_SENSOR_THERMOCOUPLE_E: + case ADMW1001_ADC_SENSOR_THERMOCOUPLE_N: + case ADMW1001_ADC_SENSOR_THERMOCOUPLE_R: + case ADMW1001_ADC_SENSOR_THERMOCOUPLE_S: + case ADMW1001_ADC_SENSOR_THERMOCOUPLE_B: + case ADMW1001_ADC_SENSOR_THERMOCOUPLE_CUSTOM: if (! ADMW1001_CHANNEL_IS_ADC_VOLTAGE(eChannelId)) { ADMW_LOG_ERROR( "Invalid ADC sensor type %d specified for channel %d", @@ -1779,6 +1831,7 @@ switch(sensorType) { case ADMW1001_I2C_SENSOR_HUMIDITY_A: case ADMW1001_I2C_SENSOR_HUMIDITY_B: + case ADMW1001_I2C_SENSOR_TEMPERATURE_ADT742X: sensorTypeReg.Sensor_Type = sensorType; break; default: @@ -1812,7 +1865,6 @@ digitalSensorComms.VALUE16 = REG_RESET_VAL(CORE_DIGITAL_SENSOR_COMMSn); if(pDigitalComms->useCustomCommsConfig) { - digitalSensorComms.Digital_Sensor_Comms_En = 1; if(pDigitalComms->i2cClockSpeed == ADMW1001_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED_100K) { digitalSensorComms.I2C_Clock = CORE_DIGITAL_SENSOR_COMMS_I2C_100K; @@ -1892,10 +1944,9 @@ pDigitalComms->spiClock); return ADMW_INVALID_PARAM; } - } else { - digitalSensorComms.Digital_Sensor_Comms_En = 0; } + WRITE_REG_U16(hDevice, digitalSensorComms.VALUE16, CORE_DIGITAL_SENSOR_COMMSn(eChannelId)); return ADMW_SUCCESS; @@ -2106,17 +2157,6 @@ { ADMW_CORE_Settling_Time_t settlingTimeReg; - if (nSettlingTime < (1 << 12)) - { - - settlingTimeReg.Settling_Time_Units = CORE_SETTLING_TIME_MILLISECONDS; - } - else - { - settlingTimeReg.Settling_Time_Units = CORE_SETTLING_TIME_SECONDS; - nSettlingTime /= 1000; - } - CHECK_REG_FIELD_VAL(CORE_SETTLING_TIME_SETTLING_TIME, nSettlingTime); settlingTimeReg.Settling_Time = nSettlingTime; @@ -2307,6 +2347,7 @@ { ADMW1001_LUT_HEADER *pLutHeader = &pLutData->header; ADMW1001_LUT_TABLE *pLutTable = pLutData->tables; + unsigned actualLength = 0; if (pLutData->header.signature != ADMW_LUT_SIGNATURE) { @@ -2314,7 +2355,10 @@ ADMW_LUT_SIGNATURE, pLutHeader->signature); return ADMW_INVALID_SIGNATURE; } - + if ((pLutData->tables->descriptor.geometry!= ADMW1001_LUT_GEOMETRY_NES_1D) && + (pLutData->tables->data.lut1dNes.nElements > MAX_LUT_NUM_ENTRIES)) { + return ADMW_INVALID_PARAM; + } for (unsigned i = 0; i < pLutHeader->numTables; i++) { ADMW1001_LUT_DESCRIPTOR *pDesc = &pLutTable->descriptor; ADMW1001_LUT_TABLE_DATA *pData = &pLutTable->data; @@ -2337,14 +2381,6 @@ } break; case ADMW1001_LUT_GEOMETRY_NES_1D: - case ADMW1001_LUT_GEOMETRY_NES_2D: - case ADMW1001_LUT_GEOMETRY_ES_1D: - case ADMW1001_LUT_GEOMETRY_ES_2D: - if (pDesc->equation != ADMW1001_LUT_EQUATION_LUT) { - ADMW_LOG_ERROR("Invalid equation %u specified for LUT table %u", - pDesc->equation, i); - return ADMW_INVALID_PARAM; - } break; default: ADMW_LOG_ERROR("Invalid geometry %u specified for LUT table %u", @@ -2394,7 +2430,6 @@ return ADMW_SUCCESS; } - ADMW_RESULT admw1001_SetLutDataRaw( ADMW_DEVICE_HANDLE const hDevice, ADMW1001_LUT_RAW * const pLutData) @@ -2411,22 +2446,11 @@ switch (pDesc->geometry) { case ADMW1001_LUT_GEOMETRY_COEFFS: if (pDesc->equation == ADMW1001_LUT_EQUATION_BIVARIATE_POLYN) - *pLength = ADMW1001_LUT_2D_POLYN_COEFF_LIST_SIZE(pData->coeffList2d); - else *pLength = ADMW1001_LUT_COEFF_LIST_SIZE(pData->coeffList); break; case ADMW1001_LUT_GEOMETRY_NES_1D: *pLength = ADMW1001_LUT_1D_NES_SIZE(pData->lut1dNes); break; - case ADMW1001_LUT_GEOMETRY_NES_2D: - *pLength = ADMW1001_LUT_2D_NES_SIZE(pData->lut2dNes); - break; - case ADMW1001_LUT_GEOMETRY_ES_1D: - *pLength = ADMW1001_LUT_1D_ES_SIZE(pData->lut1dEs); - break; - case ADMW1001_LUT_GEOMETRY_ES_2D: - *pLength = ADMW1001_LUT_2D_ES_SIZE(pData->lut2dEs); - break; default: ADMW_LOG_ERROR("Invalid LUT table geometry %d specified\r\n", pDesc->geometry);