![]() |
LibDriver HMC5883L
|
hmc5883l base driver modules More...
Data Structures | |
| struct | hmc5883l_handle_s |
| hmc5883l handle structure definition More... | |
| struct | hmc5883l_info_s |
| hmc5883l information structure definition More... | |
Typedefs | |
| typedef struct hmc5883l_handle_s | hmc5883l_handle_t |
| hmc5883l handle structure definition | |
| typedef struct hmc5883l_info_s | hmc5883l_info_t |
| hmc5883l information structure definition | |
Functions | |
| uint8_t | hmc5883l_info (hmc5883l_info_t *info) |
| get chip's information | |
| uint8_t | hmc5883l_init (hmc5883l_handle_t *handle) |
| initialize the chip | |
| uint8_t | hmc5883l_deinit (hmc5883l_handle_t *handle) |
| close the chip | |
| uint8_t | hmc5883l_single_read (hmc5883l_handle_t *handle, int16_t raw[3], float m_gauss[3]) |
| read data once | |
| uint8_t | hmc5883l_start_continuous_read (hmc5883l_handle_t *handle) |
| start reading data | |
| uint8_t | hmc5883l_stop_continuous_read (hmc5883l_handle_t *handle) |
| stop reading data | |
| uint8_t | hmc5883l_continuous_read (hmc5883l_handle_t *handle, int16_t raw[3], float m_gauss[3]) |
| read data continuously | |
| uint8_t | hmc5883l_set_average_sample (hmc5883l_handle_t *handle, hmc5883l_average_sample_t average_sample) |
| set the average sample rate | |
| uint8_t | hmc5883l_get_average_sample (hmc5883l_handle_t *handle, hmc5883l_average_sample_t *average_sample) |
| get the average sample rate | |
| uint8_t | hmc5883l_set_data_output_rate (hmc5883l_handle_t *handle, hmc5883l_data_output_rate_t data_rate) |
| set the data output rate | |
| uint8_t | hmc5883l_get_data_output_rate (hmc5883l_handle_t *handle, hmc5883l_data_output_rate_t *data_rate) |
| get the data output rate | |
| uint8_t | hmc5883l_set_mode (hmc5883l_handle_t *handle, hmc5883l_mode_t mode) |
| set the chip mode | |
| uint8_t | hmc5883l_get_mode (hmc5883l_handle_t *handle, hmc5883l_mode_t *mode) |
| get the chip mode | |
| uint8_t | hmc5883l_set_gain (hmc5883l_handle_t *handle, hmc5883l_gain_t gain) |
| set the chip gain | |
| uint8_t | hmc5883l_get_gain (hmc5883l_handle_t *handle, hmc5883l_gain_t *gain) |
| get the chip gain | |
| uint8_t | hmc5883l_enable_high_speed_iic (hmc5883l_handle_t *handle) |
| enable the high speed iic | |
| uint8_t | hmc5883l_disable_high_speed_iic (hmc5883l_handle_t *handle) |
| disable the high speed iic | |
hmc5883l base driver modules
| typedef struct hmc5883l_handle_s hmc5883l_handle_t |
hmc5883l handle structure definition
| typedef struct hmc5883l_info_s hmc5883l_info_t |
hmc5883l information structure definition
hmc5883l average sample enumeration definition
| Enumerator | |
|---|---|
| HMC5883L_AVERAGE_SAMPLE_1 | average sample 1 |
| HMC5883L_AVERAGE_SAMPLE_2 | average sample 2 |
| HMC5883L_AVERAGE_SAMPLE_4 | average sample 4 |
| HMC5883L_AVERAGE_SAMPLE_8 | average sample 8 |
Definition at line 63 of file driver_hmc5883l.h.
hmc5883l data output rate enumeration definition
Definition at line 74 of file driver_hmc5883l.h.
| enum hmc5883l_gain_t |
hmc5883l gain enumeration definition
Definition at line 98 of file driver_hmc5883l.h.
| enum hmc5883l_mode_t |
hmc5883l mode enumeration definition
| Enumerator | |
|---|---|
| HMC5883L_MODE_NORMAL | normal mode |
| HMC5883L_MODE_POSITIVE_BIAS | positive bias mode |
| HMC5883L_MODE_NEGATIVE_BIAS | negative bias mode |
Definition at line 88 of file driver_hmc5883l.h.
| uint8_t hmc5883l_continuous_read | ( | hmc5883l_handle_t * | handle, |
| int16_t | raw[3], | ||
| float | m_gauss[3] ) |
read data continuously
| [in] | *handle | pointer to an hmc5883l handle structure |
| [out] | *raw | pointer to a raw data buffer |
| [out] | *m_gauss | pointer to a converted data buffer |
Definition at line 939 of file driver_hmc5883l.c.
| uint8_t hmc5883l_deinit | ( | hmc5883l_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to an hmc5883l handle structure |
Definition at line 292 of file driver_hmc5883l.c.
| uint8_t hmc5883l_disable_high_speed_iic | ( | hmc5883l_handle_t * | handle | ) |
disable the high speed iic
| [in] | *handle | pointer to an hmc5883l handle structure |
Definition at line 679 of file driver_hmc5883l.c.
| uint8_t hmc5883l_enable_high_speed_iic | ( | hmc5883l_handle_t * | handle | ) |
enable the high speed iic
| [in] | *handle | pointer to an hmc5883l handle structure |
Definition at line 643 of file driver_hmc5883l.c.
| uint8_t hmc5883l_get_average_sample | ( | hmc5883l_handle_t * | handle, |
| hmc5883l_average_sample_t * | average_sample ) |
get the average sample rate
| [in] | *handle | pointer to an hmc5883l handle structure |
| [out] | *average_sample | pointer to an average sample rate buffer |
Definition at line 382 of file driver_hmc5883l.c.
| uint8_t hmc5883l_get_data_output_rate | ( | hmc5883l_handle_t * | handle, |
| hmc5883l_data_output_rate_t * | data_rate ) |
get the data output rate
| [in] | *handle | pointer to an hmc5883l handle structure |
| [out] | *data_rate | pointer to a data output rate buffer |
Definition at line 457 of file driver_hmc5883l.c.
| uint8_t hmc5883l_get_gain | ( | hmc5883l_handle_t * | handle, |
| hmc5883l_gain_t * | gain ) |
get the chip gain
| [in] | *handle | pointer to an hmc5883l handle structure |
| [out] | *gain | pointer to a chip gain buffer |
Definition at line 607 of file driver_hmc5883l.c.
| uint8_t hmc5883l_get_mode | ( | hmc5883l_handle_t * | handle, |
| hmc5883l_mode_t * | mode ) |
get the chip mode
| [in] | *handle | pointer to an hmc5883l handle structure |
| [out] | *mode | pointer to a chip mode buffer |
Definition at line 532 of file driver_hmc5883l.c.
| uint8_t hmc5883l_info | ( | hmc5883l_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to an hmc5883l info structure |
Definition at line 1121 of file driver_hmc5883l.c.
| uint8_t hmc5883l_init | ( | hmc5883l_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to an hmc5883l handle structure |
Definition at line 178 of file driver_hmc5883l.c.
| uint8_t hmc5883l_set_average_sample | ( | hmc5883l_handle_t * | handle, |
| hmc5883l_average_sample_t | average_sample ) |
set the average sample rate
| [in] | *handle | pointer to an hmc5883l handle structure |
| [in] | average_sample | average sample rate |
Definition at line 344 of file driver_hmc5883l.c.
| uint8_t hmc5883l_set_data_output_rate | ( | hmc5883l_handle_t * | handle, |
| hmc5883l_data_output_rate_t | data_rate ) |
set the data output rate
| [in] | *handle | pointer to an hmc5883l handle structure |
| [in] | data_rate | data output rate |
Definition at line 419 of file driver_hmc5883l.c.
| uint8_t hmc5883l_set_gain | ( | hmc5883l_handle_t * | handle, |
| hmc5883l_gain_t | gain ) |
set the chip gain
| [in] | *handle | pointer to an hmc5883l handle structure |
| [in] | gain | chip gain |
Definition at line 569 of file driver_hmc5883l.c.
| uint8_t hmc5883l_set_mode | ( | hmc5883l_handle_t * | handle, |
| hmc5883l_mode_t | mode ) |
set the chip mode
| [in] | *handle | pointer to an hmc5883l handle structure |
| [in] | mode | chip mode |
Definition at line 494 of file driver_hmc5883l.c.
| uint8_t hmc5883l_single_read | ( | hmc5883l_handle_t * | handle, |
| int16_t | raw[3], | ||
| float | m_gauss[3] ) |
read data once
| [in] | *handle | pointer to an hmc5883l handle structure |
| [out] | *raw | pointer to a raw data buffer |
| [out] | *m_gauss | pointer to a converted data buffer |
Definition at line 717 of file driver_hmc5883l.c.
| uint8_t hmc5883l_start_continuous_read | ( | hmc5883l_handle_t * | handle | ) |
start reading data
| [in] | *handle | pointer to an hmc5883l handle structure |
Definition at line 864 of file driver_hmc5883l.c.
| uint8_t hmc5883l_stop_continuous_read | ( | hmc5883l_handle_t * | handle | ) |
stop reading data
| [in] | *handle | pointer to an hmc5883l handle structure |
Definition at line 900 of file driver_hmc5883l.c.