Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
lut_data.c
00001 #include "admw1001/admw1001_lut_data.h" 00002 #include "admw1001/admw1001_sensor_types.h" 00003 #include "inc/admw_config_types.h" 00004 /* 00005 * The following table provide linearisation data for a 4-wire bridge sensor 00006 * identified with the ADMW1001_ADC_SENSOR_BRIDGE_4WIRE_1 00007 * sensor type. The Look-Up Table provided maps a range of input (X) 00008 * values to a corresponding range of output (Y) values. In this example, 00009 * the bridge sensor input in millivolts is effectively translated to volts. 00010 */ 00011 ADMW1001_LUT_DESCRIPTOR bridge_4wire_1_range1_desc = { 00012 .geometry = ADMW1001_LUT_GEOMETRY_NES_1D, 00013 .channel =ADMW1001_CH_ID_ANLG_1_UNIVERSAL , 00014 .equation = ADMW1001_LUT_EQUATION_LUT, 00015 .dir = ADMW1001_LUT_TC_DIRECTION_FORWARD, 00016 .sensor = ADMW1001_ADC_SENSOR_BRIDGE_4WIRE , 00017 .dataType = ADMW1001_LUT_DATA_TYPE_FLOAT32, 00018 .length = 0, /* Filled by admw_1001_AssembleLutData() */ 00019 .crc16 = 0 /* Filled by admw_1001_AssembleLutData() */ 00020 }; 00021 ADMW1001_LUT_1D_NES bridge_4wire_1_range1_data = { 00022 .nElements = 2, 00023 .lut = { 00024 -0.5f, /* x(min) */ 00025 +0.5f, /* x(max) */ 00026 -0.5f, /* y(min) */ 00027 +0.5f, /* y(max) */ 00028 }, 00029 }; 00030 00031 /* 00032 * The following variables can be passed as parameters to 00033 * admw_1001_AssembleLutData() 00034 */ 00035 ADMW1001_LUT_DESCRIPTOR *lut_desc_list[] = { 00036 &bridge_4wire_1_range1_desc, 00037 }; 00038 00039 ADMW1001_LUT_TABLE_DATA *lut_data_list[] = { 00040 (ADMW1001_LUT_TABLE_DATA *) &bridge_4wire_1_range1_data, 00041 }; 00042 00043 unsigned lut_num_tables = 00044 (sizeof(lut_desc_list) / sizeof(lut_desc_list[0])); 00045
Generated on Wed Jul 13 2022 05:15:07 by
1.7.2