![]() |
LibDriver HX711
|
hx711 base driver modules More...
Data Structures | |
| struct | hx711_handle_s |
| hx711 handle structure definition More... | |
| struct | hx711_info_s |
| hx711 info structure definition More... | |
Typedefs | |
| typedef struct hx711_handle_s | hx711_handle_t |
| hx711 handle structure definition | |
| typedef struct hx711_info_s | hx711_info_t |
| hx711 info structure definition | |
Enumerations | |
| enum | hx711_mode_t { HX711_MODE_CHANNEL_A_GAIN_128 = 0x01 , HX711_MODE_CHANNEL_B_GAIN_32 = 0x02 , HX711_MODE_CHANNEL_A_GAIN_64 = 0x03 } |
| hx711 mode enumeration definition More... | |
Functions | |
| uint8_t | hx711_info (hx711_info_t *info) |
| get chip's information | |
| uint8_t | hx711_init (hx711_handle_t *handle) |
| initialize the chip | |
| uint8_t | hx711_deinit (hx711_handle_t *handle) |
| close the chip | |
| uint8_t | hx711_set_mode (hx711_handle_t *handle, hx711_mode_t mode) |
| set the chip mode | |
| uint8_t | hx711_get_mode (hx711_handle_t *handle, hx711_mode_t *mode) |
| get the chip mode | |
| uint8_t | hx711_read (hx711_handle_t *handle, int32_t *raw, double *voltage_v) |
| read the 24 bits raw ad from the chip | |
hx711 base driver modules
| typedef struct hx711_handle_s hx711_handle_t |
hx711 handle structure definition
| typedef struct hx711_info_s hx711_info_t |
hx711 info structure definition
| enum hx711_mode_t |
hx711 mode enumeration definition
| Enumerator | |
|---|---|
| HX711_MODE_CHANNEL_A_GAIN_128 | channel A 128 gain |
| HX711_MODE_CHANNEL_B_GAIN_32 | channel B 32 gain |
| HX711_MODE_CHANNEL_A_GAIN_64 | channel A 64 gain |
Definition at line 64 of file driver_hx711.h.
| uint8_t hx711_deinit | ( | hx711_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to an hx711 handle structure |
Definition at line 277 of file driver_hx711.c.
| uint8_t hx711_get_mode | ( | hx711_handle_t * | handle, |
| hx711_mode_t * | mode ) |
get the chip mode
| [in] | *handle | pointer to an hx711 handle structure |
| [out] | *mode | pointer to a chip mode |
Definition at line 351 of file driver_hx711.c.
| uint8_t hx711_info | ( | hx711_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to an hx711 info structure |
Definition at line 431 of file driver_hx711.c.
| uint8_t hx711_init | ( | hx711_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to an hx711 handle structure |
Definition at line 183 of file driver_hx711.c.
| uint8_t hx711_read | ( | hx711_handle_t * | handle, |
| int32_t * | raw, | ||
| double * | voltage_v ) |
read the 24 bits raw ad from the chip
| [in] | *handle | pointer to an hx711 handle structure |
| [out] | *raw | pointer to a raw adc buffer |
| [out] | *voltage_v | pointer to a converted adc buffer |
Definition at line 380 of file driver_hx711.c.
| uint8_t hx711_set_mode | ( | hx711_handle_t * | handle, |
| hx711_mode_t | mode ) |
set the chip mode
| [in] | *handle | pointer to an hx711 handle structure |
| [in] | mode | chip mode |
Definition at line 316 of file driver_hx711.c.