![]() |
LibDriver NTC
|
ntc basic driver modules More...
Data Structures | |
| struct | ntc_table_s |
| ntc table structure definition More... | |
| struct | ntc_handle_s |
| ntc handle structure definition More... | |
| struct | ntc_info_s |
| ntc information structure definition More... | |
Macros | |
| #define | NTC_FILTER_BUFFER_SIZE 32 |
| ntc filter buffer size definition | |
Typedefs | |
| typedef struct ntc_table_s | ntc_table_t |
| ntc table structure definition | |
| typedef struct ntc_handle_s | ntc_handle_t |
| ntc handle structure definition | |
| typedef struct ntc_info_s | ntc_info_t |
| ntc information structure definition | |
Enumerations | |
| enum | ntc_circuit_t { NTC_CIRCUIT_VCC_NTC_R_GND = 0x00 , NTC_CIRCUIT_VCC_R_NTC_GND = 0x01 } |
| ntc circuit enumeration definition More... | |
| enum | ntc_algorithm_t { NTC_ALGORITHM_BETA_FORMULA = 0x00 , NTC_ALGORITHM_STEINHART_HART = 0x01 , NTC_ALGORITHM_LOOKUP_TABLE = 0x02 } |
| ntc algorithm enumeration definition More... | |
| enum | ntc_filter_t { NTC_FILTER_NONE = 0x00 , NTC_FILTER_FIRST_ORDER_LAG = 0x01 , NTC_FILTER_MEDIAN = 0x02 , NTC_FILTER_ANTI_SPIKE_AVERAGE = 0x03 , NTC_FILTER_MOVING_AVERAGE = 0x04 , NTC_FILTER_WEIGHTED_MOVING_AVERAGE = 0x05 , NTC_FILTER_LIMITING = 0x06 , NTC_FILTER_KALMAN = 0x07 } |
| ntc filter enumeration definition More... | |
Functions | |
| uint8_t | ntc_info (ntc_info_t *info) |
| get chip's information | |
| uint8_t | ntc_init (ntc_handle_t *handle) |
| initialize the chip | |
| uint8_t | ntc_deinit (ntc_handle_t *handle) |
| close the chip | |
| uint8_t | ntc_read_temperature (ntc_handle_t *handle, float *ohm, float *degrees_celsius) |
| read temperature | |
| uint8_t | ntc_calculate_temperature (ntc_handle_t *handle, float ohm, float *degrees_celsius) |
| calculate temperature | |
| uint8_t | ntc_calculate_temperature_with_filter (ntc_handle_t *handle, float *ohm, uint16_t len, float *degrees_celsius) |
| calculate temperature with filter | |
| uint8_t | ntc_set_algorithm (ntc_handle_t *handle, ntc_algorithm_t algorithm) |
| set algorithm | |
| uint8_t | ntc_get_algorithm (ntc_handle_t *handle, ntc_algorithm_t *algorithm) |
| get algorithm | |
| uint8_t | ntc_set_algorithm_beta_formula_beta_value (ntc_handle_t *handle, float beta) |
| set algorithm beta formula beta value | |
| uint8_t | ntc_get_algorithm_beta_formula_beta_value (ntc_handle_t *handle, float *beta) |
| get algorithm beta formula beta value | |
| uint8_t | ntc_set_algorithm_beta_formula_r25_ohm (ntc_handle_t *handle, float r25_ohm) |
| set algorithm beta formula r25 ohm | |
| uint8_t | ntc_get_algorithm_beta_formula_r25_ohm (ntc_handle_t *handle, float *r25_ohm) |
| get algorithm beta formula r25 ohm | |
| uint8_t | ntc_set_algorithm_steinhart_hart (ntc_handle_t *handle, double a, double b, double c) |
| set algorithm steinhart hart | |
| uint8_t | ntc_get_algorithm_steinhart_hart (ntc_handle_t *handle, double *a, double *b, double *c) |
| get algorithm steinhart hart | |
| uint8_t | ntc_load_algorithm_lookup_table (ntc_handle_t *handle, const ntc_table_t *table, uint16_t table_len) |
| load algorithm lookup table | |
| uint8_t | ntc_set_circuit (ntc_handle_t *handle, ntc_circuit_t circuit) |
| set circuit | |
| uint8_t | ntc_get_circuit (ntc_handle_t *handle, ntc_circuit_t *circuit) |
| get circuit | |
| uint8_t | ntc_set_circuit_fixed_resistor (ntc_handle_t *handle, float r_fixed_ohm) |
| set circuit fixed resistor | |
| uint8_t | ntc_get_circuit_fixed_resistor (ntc_handle_t *handle, float *r_fixed_ohm) |
| get circuit fixed resistor | |
ntc basic driver modules
| #define NTC_FILTER_BUFFER_SIZE 32 |
| typedef struct ntc_handle_s ntc_handle_t |
ntc handle structure definition
| typedef struct ntc_info_s ntc_info_t |
ntc information structure definition
| typedef struct ntc_table_s ntc_table_t |
ntc table structure definition
| enum ntc_algorithm_t |
ntc algorithm enumeration definition
| Enumerator | |
|---|---|
| NTC_ALGORITHM_BETA_FORMULA | beta formula |
| NTC_ALGORITHM_STEINHART_HART | stein-hart hart |
| NTC_ALGORITHM_LOOKUP_TABLE | lookup table |
Definition at line 79 of file driver_ntc.h.
| enum ntc_circuit_t |
ntc circuit enumeration definition
| Enumerator | |
|---|---|
| NTC_CIRCUIT_VCC_NTC_R_GND | vcc -> ntc -> r_fixed -> gnd |
| NTC_CIRCUIT_VCC_R_NTC_GND | vcc -> r_fixed -> ntc -> gnd |
Definition at line 70 of file driver_ntc.h.
| enum ntc_filter_t |
ntc filter enumeration definition
Definition at line 89 of file driver_ntc.h.
| uint8_t ntc_calculate_temperature | ( | ntc_handle_t * | handle, |
| float | ohm, | ||
| float * | degrees_celsius ) |
calculate temperature
| [in] | *handle | pointer to a ntc handle structure |
| [in] | ohm | resistor in ohm |
| [out] | *degrees_celsius | pointer to a degrees celsius buffer |
Definition at line 1728 of file driver_ntc.c.
| uint8_t ntc_calculate_temperature_with_filter | ( | ntc_handle_t * | handle, |
| float * | ohm, | ||
| uint16_t | len, | ||
| float * | degrees_celsius ) |
calculate temperature with filter
| [in] | *handle | pointer to a ntc handle structure |
| [in] | *ohm | pointer to a resistor in ohm |
| [in] | len | resistor length |
| [out] | *degrees_celsius | pointer to a degrees celsius buffer |
Definition at line 1765 of file driver_ntc.c.
| uint8_t ntc_deinit | ( | ntc_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to a ntc handle structure |
Definition at line 1369 of file driver_ntc.c.
| uint8_t ntc_get_algorithm | ( | ntc_handle_t * | handle, |
| ntc_algorithm_t * | algorithm ) |
get algorithm
| [in] | *handle | pointer to a ntc handle structure |
| [out] | *algorithm | pointer to a ntc algorithm type buffer |
Definition at line 699 of file driver_ntc.c.
| uint8_t ntc_get_algorithm_beta_formula_beta_value | ( | ntc_handle_t * | handle, |
| float * | beta ) |
get algorithm beta formula beta value
| [in] | *handle | pointer to a ntc handle structure |
| [out] | *beta | pointer to a beta value buffer |
Definition at line 751 of file driver_ntc.c.
| uint8_t ntc_get_algorithm_beta_formula_r25_ohm | ( | ntc_handle_t * | handle, |
| float * | r25_ohm ) |
get algorithm beta formula r25 ohm
| [in] | *handle | pointer to a ntc handle structure |
| [out] | *r25_ohm | pointer to a r25 ohm buffer |
Definition at line 803 of file driver_ntc.c.
| uint8_t ntc_get_algorithm_steinhart_hart | ( | ntc_handle_t * | handle, |
| double * | a, | ||
| double * | b, | ||
| double * | c ) |
get algorithm steinhart hart
| [in] | *handle | pointer to a ntc handle structure |
| [out] | *a | pointer to a param a buffer |
| [out] | *b | pointer to a param b buffer |
| [out] | *c | pointer to a param c buffer |
Definition at line 861 of file driver_ntc.c.
| uint8_t ntc_get_circuit | ( | ntc_handle_t * | handle, |
| ntc_circuit_t * | circuit ) |
get circuit
| [in] | *handle | pointer to a ntc handle structure |
| [out] | *circuit | pointer to a ntc circuit buffer |
Definition at line 602 of file driver_ntc.c.
| uint8_t ntc_get_circuit_fixed_resistor | ( | ntc_handle_t * | handle, |
| float * | r_fixed_ohm ) |
get circuit fixed resistor
| [in] | *handle | pointer to a ntc handle structure |
| [out] | *r_fixed_ohm | pointer to a fixed resistor buffer |
Definition at line 654 of file driver_ntc.c.
| uint8_t ntc_info | ( | ntc_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to a ntc info structure |
Definition at line 1807 of file driver_ntc.c.
| uint8_t ntc_init | ( | ntc_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to a ntc handle structure |
Definition at line 1282 of file driver_ntc.c.
| uint8_t ntc_load_algorithm_lookup_table | ( | ntc_handle_t * | handle, |
| const ntc_table_t * | table, | ||
| uint16_t | table_len ) |
load algorithm lookup table
| [in] | *handle | pointer to a ntc handle structure |
| [in] | *table | pointer to a ntc table buffer |
| [in] | table_len | table length |
Definition at line 893 of file driver_ntc.c.
| uint8_t ntc_read_temperature | ( | ntc_handle_t * | handle, |
| float * | ohm, | ||
| float * | degrees_celsius ) |
read temperature
| [in] | *handle | pointer to a ntc handle structure |
| [out] | *ohm | pointer to a resistor in ohm |
| [out] | *degrees_celsius | pointer to a degrees celsius buffer |
Definition at line 1410 of file driver_ntc.c.
| uint8_t ntc_set_algorithm | ( | ntc_handle_t * | handle, |
| ntc_algorithm_t | algorithm ) |
set algorithm
| [in] | *handle | pointer to a ntc handle structure |
| [in] | algorithm | ntc algorithm type |
Definition at line 673 of file driver_ntc.c.
| uint8_t ntc_set_algorithm_beta_formula_beta_value | ( | ntc_handle_t * | handle, |
| float | beta ) |
set algorithm beta formula beta value
| [in] | *handle | pointer to a ntc handle structure |
| [in] | beta | beta value |
Definition at line 725 of file driver_ntc.c.
| uint8_t ntc_set_algorithm_beta_formula_r25_ohm | ( | ntc_handle_t * | handle, |
| float | r25_ohm ) |
set algorithm beta formula r25 ohm
| [in] | *handle | pointer to a ntc handle structure |
| [in] | r25_ohm | r25 ohm |
Definition at line 777 of file driver_ntc.c.
| uint8_t ntc_set_algorithm_steinhart_hart | ( | ntc_handle_t * | handle, |
| double | a, | ||
| double | b, | ||
| double | c ) |
set algorithm steinhart hart
| [in] | *handle | pointer to a ntc handle structure |
| [in] | a | param a |
| [in] | b | param b |
| [in] | c | param c |
Definition at line 831 of file driver_ntc.c.
| uint8_t ntc_set_circuit | ( | ntc_handle_t * | handle, |
| ntc_circuit_t | circuit ) |
set circuit
| [in] | *handle | pointer to a ntc handle structure |
| [in] | circuit | ntc circuit |
Definition at line 576 of file driver_ntc.c.
| uint8_t ntc_set_circuit_fixed_resistor | ( | ntc_handle_t * | handle, |
| float | r_fixed_ohm ) |
set circuit fixed resistor
| [in] | *handle | pointer to a ntc handle structure |
| [in] | r_fixed_ohm | fixed resistor in ohm |
Definition at line 628 of file driver_ntc.c.