![]() |
LibDriver CS1237
|
cs1237 basic driver modules More...
Data Structures | |
| struct | cs1237_handle_s |
| cs1237 handle structure definition More... | |
| struct | cs1237_info_s |
| cs1237 information structure definition More... | |
Macros | |
| #define | CS1237_COMMAND_DATA_DELAY 5 |
| cs1237 command data delay definition | |
Typedefs | |
| typedef struct cs1237_handle_s | cs1237_handle_t |
| cs1237 handle structure definition | |
| typedef struct cs1237_info_s | cs1237_info_t |
| cs1237 information structure definition | |
Enumerations | |
| enum | cs1237_bool_t { CS1237_BOOL_FALSE = 0x00 , CS1237_BOOL_TRUE = 0x01 } |
| cs1237 bool enumeration definition More... | |
| enum | cs1237_adc_rate_t { CS1237_ADC_RATE_10HZ = 0x00 , CS1237_ADC_RATE_40HZ = 0x01 , CS1237_ADC_RATE_640HZ = 0x02 , CS1237_ADC_RATE_1280HZ = 0x03 } |
| cs1237 adc rate enumeration definition More... | |
| enum | cs1237_pga_t { CS1237_PGA_1 = 0x00 , CS1237_PGA_2 = 0x01 , CS1237_PGA_64 = 0x02 , CS1237_PGA_128 = 0x03 } |
| cs1237 pga enumeration definition More... | |
| enum | cs1237_channel_t { CS1237_CHANNEL_A = 0x00 , CS1237_CHANNEL_TEMPERATURE = 0x02 , CS1237_CHANNEL_SHORT_CIRCUIT = 0x03 } |
| cs1237 channel enumeration definition More... | |
Functions | |
| uint8_t | cs1237_info (cs1237_info_t *info) |
| get chip's information | |
| uint8_t | cs1237_set_reference_voltage (cs1237_handle_t *handle, float volt) |
| set reference voltage | |
| uint8_t | cs1237_get_reference_voltage (cs1237_handle_t *handle, float *volt) |
| get reference voltage | |
| uint8_t | cs1237_set_temperature_calibration_point (cs1237_handle_t *handle, int32_t temperature_raw, float temperature_deg) |
| set temperature calibration point | |
| uint8_t | cs1237_get_temperature_calibration_point (cs1237_handle_t *handle, int32_t *temperature_raw, float *temperature_deg) |
| get temperature calibration point | |
| uint8_t | cs1237_init (cs1237_handle_t *handle) |
| initialize the chip | |
| uint8_t | cs1237_deinit (cs1237_handle_t *handle) |
| close the chip | |
| uint8_t | cs1237_read (cs1237_handle_t *handle, int32_t *raw, double *mv) |
| read voltage | |
| uint8_t | cs1237_read_temperature (cs1237_handle_t *handle, int32_t *raw, float *degrees) |
| read temperature | |
| uint8_t | cs1237_wake_up (cs1237_handle_t *handle) |
| wake up | |
| uint8_t | cs1237_power_down (cs1237_handle_t *handle) |
| power down | |
| uint8_t | cs1237_set_reference_voltage_output (cs1237_handle_t *handle, cs1237_bool_t enable) |
| enable or disable reference voltage output | |
| uint8_t | cs1237_get_reference_voltage_output (cs1237_handle_t *handle, cs1237_bool_t *enable) |
| get reference voltage output status | |
| uint8_t | cs1237_set_adc_rate (cs1237_handle_t *handle, cs1237_adc_rate_t rate) |
| set adc rate | |
| uint8_t | cs1237_get_adc_rate (cs1237_handle_t *handle, cs1237_adc_rate_t *rate) |
| get adc rate | |
| uint8_t | cs1237_set_pga (cs1237_handle_t *handle, cs1237_pga_t pga) |
| set adc pga | |
| uint8_t | cs1237_get_pga (cs1237_handle_t *handle, cs1237_pga_t *pga) |
| get adc pga | |
| uint8_t | cs1237_set_channel (cs1237_handle_t *handle, cs1237_channel_t channel) |
| set adc channel | |
| uint8_t | cs1237_get_channel (cs1237_handle_t *handle, cs1237_channel_t *channel) |
| get adc channel | |
cs1237 basic driver modules
| #define CS1237_COMMAND_DATA_DELAY 5 |
| typedef struct cs1237_handle_s cs1237_handle_t |
cs1237 handle structure definition
| typedef struct cs1237_info_s cs1237_info_t |
cs1237 information structure definition
| enum cs1237_adc_rate_t |
cs1237 adc rate enumeration definition
| Enumerator | |
|---|---|
| CS1237_ADC_RATE_10HZ | 10hz |
| CS1237_ADC_RATE_40HZ | 40hz |
| CS1237_ADC_RATE_640HZ | 640hz |
| CS1237_ADC_RATE_1280HZ | 1280hz |
Definition at line 78 of file driver_cs1237.h.
| enum cs1237_bool_t |
cs1237 bool enumeration definition
| Enumerator | |
|---|---|
| CS1237_BOOL_FALSE | false |
| CS1237_BOOL_TRUE | true |
Definition at line 69 of file driver_cs1237.h.
| enum cs1237_channel_t |
cs1237 channel enumeration definition
| Enumerator | |
|---|---|
| CS1237_CHANNEL_A | channel a |
| CS1237_CHANNEL_TEMPERATURE | channel temperature |
| CS1237_CHANNEL_SHORT_CIRCUIT | channel short circuit |
Definition at line 100 of file driver_cs1237.h.
| enum cs1237_pga_t |
cs1237 pga enumeration definition
| Enumerator | |
|---|---|
| CS1237_PGA_1 | 1 |
| CS1237_PGA_2 | 2 |
| CS1237_PGA_64 | 64 |
| CS1237_PGA_128 | 128 |
Definition at line 89 of file driver_cs1237.h.
| uint8_t cs1237_deinit | ( | cs1237_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to a cs1237 handle structure |
Definition at line 1305 of file driver_cs1237.c.
| uint8_t cs1237_get_adc_rate | ( | cs1237_handle_t * | handle, |
| cs1237_adc_rate_t * | rate ) |
get adc rate
| [in] | *handle | pointer to a cs1237 handle structure |
| [out] | *rate | pointer to an adc rate buffer |
Definition at line 773 of file driver_cs1237.c.
| uint8_t cs1237_get_channel | ( | cs1237_handle_t * | handle, |
| cs1237_channel_t * | channel ) |
get adc channel
| [in] | *handle | pointer to a cs1237 handle structure |
| [out] | *channel | pointer to an adc channel buffer |
Definition at line 972 of file driver_cs1237.c.
| uint8_t cs1237_get_pga | ( | cs1237_handle_t * | handle, |
| cs1237_pga_t * | pga ) |
get adc pga
| [in] | *handle | pointer to a cs1237 handle structure |
| [out] | *pga | pointer to an adc pga buffer |
Definition at line 866 of file driver_cs1237.c.
| uint8_t cs1237_get_reference_voltage | ( | cs1237_handle_t * | handle, |
| float * | volt ) |
get reference voltage
| [in] | *handle | pointer to a cs1237 handle structure |
| [out] | *volt | pointer to a reference voltage buffer |
Definition at line 587 of file driver_cs1237.c.
| uint8_t cs1237_get_reference_voltage_output | ( | cs1237_handle_t * | handle, |
| cs1237_bool_t * | enable ) |
get reference voltage output status
| [in] | *handle | pointer to a cs1237 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 697 of file driver_cs1237.c.
| uint8_t cs1237_get_temperature_calibration_point | ( | cs1237_handle_t * | handle, |
| int32_t * | temperature_raw, | ||
| float * | temperature_deg ) |
get temperature calibration point
| [in] | *handle | pointer to a cs1237 handle structure |
| [out] | *temperature_raw | pointer to a temperature raw value buffer |
| [out] | *temperature_deg | pointer to a temperature degrees buffer |
Definition at line 632 of file driver_cs1237.c.
| uint8_t cs1237_info | ( | cs1237_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to a cs1237 info structure |
Definition at line 1453 of file driver_cs1237.c.
| uint8_t cs1237_init | ( | cs1237_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to a cs1237 handle structure |
Definition at line 1186 of file driver_cs1237.c.
| uint8_t cs1237_power_down | ( | cs1237_handle_t * | handle | ) |
power down
| [in] | *handle | pointer to a cs1237 handle structure |
Definition at line 1019 of file driver_cs1237.c.
| uint8_t cs1237_read | ( | cs1237_handle_t * | handle, |
| int32_t * | raw, | ||
| double * | mv ) |
read voltage
| [in] | *handle | pointer to a cs1237 handle structure |
| [out] | *raw | pointer to a raw buffer |
| [out] | *mv | pointer to a mv buffer |
Definition at line 1086 of file driver_cs1237.c.
| uint8_t cs1237_read_temperature | ( | cs1237_handle_t * | handle, |
| int32_t * | raw, | ||
| float * | degrees ) |
read temperature
| [in] | *handle | pointer to a cs1237 handle structure |
| [out] | *raw | pointer to a raw buffer |
| [out] | *degrees | pointer to a degrees buffer |
Definition at line 1133 of file driver_cs1237.c.
| uint8_t cs1237_set_adc_rate | ( | cs1237_handle_t * | handle, |
| cs1237_adc_rate_t | rate ) |
set adc rate
| [in] | *handle | pointer to a cs1237 handle structure |
| [in] | rate | adc rate |
Definition at line 732 of file driver_cs1237.c.
| uint8_t cs1237_set_channel | ( | cs1237_handle_t * | handle, |
| cs1237_channel_t | channel ) |
set adc channel
| [in] | *handle | pointer to a cs1237 handle structure |
| [in] | channel | adc channel |
Definition at line 918 of file driver_cs1237.c.
| uint8_t cs1237_set_pga | ( | cs1237_handle_t * | handle, |
| cs1237_pga_t | pga ) |
set adc pga
| [in] | *handle | pointer to a cs1237 handle structure |
| [in] | pga | adc pga |
Definition at line 808 of file driver_cs1237.c.
| uint8_t cs1237_set_reference_voltage | ( | cs1237_handle_t * | handle, |
| float | volt ) |
set reference voltage
| [in] | *handle | pointer to a cs1237 handle structure |
| [in] | volt | reference voltage |
Definition at line 566 of file driver_cs1237.c.
| uint8_t cs1237_set_reference_voltage_output | ( | cs1237_handle_t * | handle, |
| cs1237_bool_t | enable ) |
enable or disable reference voltage output
| [in] | *handle | pointer to a cs1237 handle structure |
| [in] | enable | bool value |
Definition at line 656 of file driver_cs1237.c.
| uint8_t cs1237_set_temperature_calibration_point | ( | cs1237_handle_t * | handle, |
| int32_t | temperature_raw, | ||
| float | temperature_deg ) |
set temperature calibration point
| [in] | *handle | pointer to a cs1237 handle structure |
| [in] | temperature_raw | temperature raw value |
| [in] | temperature_deg | temperature degrees |
Definition at line 609 of file driver_cs1237.c.
| uint8_t cs1237_wake_up | ( | cs1237_handle_t * | handle | ) |
wake up
| [in] | *handle | pointer to a cs1237 handle structure |
Definition at line 1051 of file driver_cs1237.c.