![]() |
LibDriver QMC5883L
|
qmc5883l base driver modules More...
Data Structures | |
| struct | qmc5883l_handle_s |
| qmc5883l handle structure definition More... | |
| struct | qmc5883l_info_s |
| qmc5883l information structure definition More... | |
Typedefs | |
| typedef struct qmc5883l_handle_s | qmc5883l_handle_t |
| qmc5883l handle structure definition | |
| typedef struct qmc5883l_info_s | qmc5883l_info_t |
| qmc5883l information structure definition | |
Functions | |
| uint8_t | qmc5883l_info (qmc5883l_info_t *info) |
| get chip's information | |
| uint8_t | qmc5883l_init (qmc5883l_handle_t *handle) |
| initialize the chip | |
| uint8_t | qmc5883l_deinit (qmc5883l_handle_t *handle) |
| close the chip | |
| uint8_t | qmc5883l_read (qmc5883l_handle_t *handle, int16_t raw[3], float m_gauss[3]) |
| read data | |
| uint8_t | qmc5883l_read_temperature (qmc5883l_handle_t *handle, int16_t *raw, float *deg) |
| read temperature | |
| uint8_t | qmc5883l_get_status (qmc5883l_handle_t *handle, uint8_t *status) |
| get status | |
| uint8_t | qmc5883l_set_mode (qmc5883l_handle_t *handle, qmc5883l_mode_t mode) |
| set the chip mode | |
| uint8_t | qmc5883l_get_mode (qmc5883l_handle_t *handle, qmc5883l_mode_t *mode) |
| get the chip mode | |
| uint8_t | qmc5883l_set_output_rate (qmc5883l_handle_t *handle, qmc5883l_output_rate_t rate) |
| set the output rate | |
| uint8_t | qmc5883l_get_output_rate (qmc5883l_handle_t *handle, qmc5883l_output_rate_t *rate) |
| get the output rate | |
| uint8_t | qmc5883l_set_full_scale (qmc5883l_handle_t *handle, qmc5883l_full_scale_t scale) |
| set the full scale | |
| uint8_t | qmc5883l_get_full_scale (qmc5883l_handle_t *handle, qmc5883l_full_scale_t *scale) |
| get the full scale | |
| uint8_t | qmc5883l_set_over_sample (qmc5883l_handle_t *handle, qmc5883l_over_sample_t sample) |
| set the over sample | |
| uint8_t | qmc5883l_get_over_sample (qmc5883l_handle_t *handle, qmc5883l_over_sample_t *sample) |
| get the over sample | |
| uint8_t | qmc5883l_set_interrupt (qmc5883l_handle_t *handle, qmc5883l_bool_t enable) |
| enable or disable interrupt | |
| uint8_t | qmc5883l_get_interrupt (qmc5883l_handle_t *handle, qmc5883l_bool_t *enable) |
| get interrupt status | |
| uint8_t | qmc5883l_set_pointer_roll_over (qmc5883l_handle_t *handle, qmc5883l_bool_t enable) |
| enable or disable pointer roll over | |
| uint8_t | qmc5883l_get_pointer_roll_over (qmc5883l_handle_t *handle, qmc5883l_bool_t *enable) |
| get pointer roll over status | |
| uint8_t | qmc5883l_soft_reset (qmc5883l_handle_t *handle) |
| soft reset | |
| uint8_t | qmc5883l_set_period (qmc5883l_handle_t *handle, uint8_t fbr) |
| set period | |
| uint8_t | qmc5883l_get_period (qmc5883l_handle_t *handle, uint8_t *fbr) |
| get period | |
qmc5883l base driver modules
| typedef struct qmc5883l_handle_s qmc5883l_handle_t |
qmc5883l handle structure definition
| typedef struct qmc5883l_info_s qmc5883l_info_t |
qmc5883l information structure definition
| enum qmc5883l_bool_t |
qmc5883l bool enumeration definition
| Enumerator | |
|---|---|
| QMC5883L_BOOL_FALSE | false |
| QMC5883L_BOOL_TRUE | true |
Definition at line 62 of file driver_qmc5883l.h.
qmc5883l full scale enumeration definition
| Enumerator | |
|---|---|
| QMC5883L_FULL_SCALE_2GAUSS | 2gauss |
| QMC5883L_FULL_SCALE_8GAUSS | 8gauss |
Definition at line 101 of file driver_qmc5883l.h.
| enum qmc5883l_mode_t |
qmc5883l mode enumeration definition
| Enumerator | |
|---|---|
| QMC5883L_MODE_STANDBY | standby mode |
| QMC5883L_MODE_CONTINUOUS | continuous mode |
Definition at line 81 of file driver_qmc5883l.h.
qmc5883l output rate enumeration definition
| Enumerator | |
|---|---|
| QMC5883L_OUTPUT_RATE_10HZ | 10Hz |
| QMC5883L_OUTPUT_RATE_50HZ | 50Hz |
| QMC5883L_OUTPUT_RATE_100HZ | 100Hz |
| QMC5883L_OUTPUT_RATE_200HZ | 200Hz |
Definition at line 90 of file driver_qmc5883l.h.
qmc5883l over sample enumeration definition
| Enumerator | |
|---|---|
| QMC5883L_OVER_SAMPLE_512 | 512 |
| QMC5883L_OVER_SAMPLE_256 | 256 |
| QMC5883L_OVER_SAMPLE_128 | 128 |
| QMC5883L_OVER_SAMPLE_64 | 64 |
Definition at line 110 of file driver_qmc5883l.h.
| enum qmc5883l_status_t |
qmc5883l status enumeration definition
| Enumerator | |
|---|---|
| QMC5883L_STATUS_DOR | data skip |
| QMC5883L_STATUS_OVL | out of range |
| QMC5883L_STATUS_DRDY | data ready |
Definition at line 71 of file driver_qmc5883l.h.
| uint8_t qmc5883l_deinit | ( | qmc5883l_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to a qmc5883l handle structure |
Definition at line 185 of file driver_qmc5883l.c.
| uint8_t qmc5883l_get_full_scale | ( | qmc5883l_handle_t * | handle, |
| qmc5883l_full_scale_t * | scale ) |
get the full scale
| [in] | *handle | pointer to a qmc5883l handle structure |
| [out] | *scale | pointer to a full scale buffer |
Definition at line 523 of file driver_qmc5883l.c.
| uint8_t qmc5883l_get_interrupt | ( | qmc5883l_handle_t * | handle, |
| qmc5883l_bool_t * | enable ) |
get interrupt status
| [in] | *handle | pointer to a qmc5883l handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 687 of file driver_qmc5883l.c.
| uint8_t qmc5883l_get_mode | ( | qmc5883l_handle_t * | handle, |
| qmc5883l_mode_t * | mode ) |
get the chip mode
| [in] | *handle | pointer to a qmc5883l handle structure |
| [out] | *mode | pointer to a chip mode buffer |
Definition at line 359 of file driver_qmc5883l.c.
| uint8_t qmc5883l_get_output_rate | ( | qmc5883l_handle_t * | handle, |
| qmc5883l_output_rate_t * | rate ) |
get the output rate
| [in] | *handle | pointer to a qmc5883l handle structure |
| [out] | *rate | pointer to an output rate buffer |
Definition at line 441 of file driver_qmc5883l.c.
| uint8_t qmc5883l_get_over_sample | ( | qmc5883l_handle_t * | handle, |
| qmc5883l_over_sample_t * | sample ) |
get the over sample
| [in] | *handle | pointer to a qmc5883l handle structure |
| [out] | *sample | pointer to an over sample buffer |
Definition at line 605 of file driver_qmc5883l.c.
| uint8_t qmc5883l_get_period | ( | qmc5883l_handle_t * | handle, |
| uint8_t * | fbr ) |
get period
| [in] | *handle | pointer to a qmc5883l handle structure |
| [out] | *fbr | pointer to a param buffer |
Definition at line 888 of file driver_qmc5883l.c.
| uint8_t qmc5883l_get_pointer_roll_over | ( | qmc5883l_handle_t * | handle, |
| qmc5883l_bool_t * | enable ) |
get pointer roll over status
| [in] | *handle | pointer to a qmc5883l handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 769 of file driver_qmc5883l.c.
| uint8_t qmc5883l_get_status | ( | qmc5883l_handle_t * | handle, |
| uint8_t * | status ) |
get status
| [in] | *handle | pointer to a qmc5883l handle structure |
| [out] | *status | pointer to a status buffer |
Definition at line 238 of file driver_qmc5883l.c.
| uint8_t qmc5883l_info | ( | qmc5883l_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to a qmc5883l info structure |
Definition at line 1072 of file driver_qmc5883l.c.
| uint8_t qmc5883l_init | ( | qmc5883l_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to a qmc5883l handle structure |
Definition at line 85 of file driver_qmc5883l.c.
| uint8_t qmc5883l_read | ( | qmc5883l_handle_t * | handle, |
| int16_t | raw[3], | ||
| float | m_gauss[3] ) |
read data
| [in] | *handle | pointer to a qmc5883l handle structure |
| [out] | *raw | pointer to a raw data buffer |
| [out] | *m_gauss | pointer to a converted data buffer |
Definition at line 924 of file driver_qmc5883l.c.
| uint8_t qmc5883l_read_temperature | ( | qmc5883l_handle_t * | handle, |
| int16_t * | raw, | ||
| float * | deg ) |
read temperature
| [in] | *handle | pointer to a qmc5883l handle structure |
| [out] | *raw | pointer to a raw data buffer |
| [out] | *deg | pointer to a converted data buffer |
Definition at line 276 of file driver_qmc5883l.c.
| uint8_t qmc5883l_set_full_scale | ( | qmc5883l_handle_t * | handle, |
| qmc5883l_full_scale_t | scale ) |
set the full scale
| [in] | *handle | pointer to a qmc5883l handle structure |
| [in] | scale | set full scale |
Definition at line 478 of file driver_qmc5883l.c.
| uint8_t qmc5883l_set_interrupt | ( | qmc5883l_handle_t * | handle, |
| qmc5883l_bool_t | enable ) |
enable or disable interrupt
| [in] | *handle | pointer to a qmc5883l handle structure |
| [in] | enable | bool value |
Definition at line 642 of file driver_qmc5883l.c.
| uint8_t qmc5883l_set_mode | ( | qmc5883l_handle_t * | handle, |
| qmc5883l_mode_t | mode ) |
set the chip mode
| [in] | *handle | pointer to a qmc5883l handle structure |
| [in] | mode | chip mode |
Definition at line 314 of file driver_qmc5883l.c.
| uint8_t qmc5883l_set_output_rate | ( | qmc5883l_handle_t * | handle, |
| qmc5883l_output_rate_t | rate ) |
set the output rate
| [in] | *handle | pointer to a qmc5883l handle structure |
| [in] | rate | output rate |
Definition at line 396 of file driver_qmc5883l.c.
| uint8_t qmc5883l_set_over_sample | ( | qmc5883l_handle_t * | handle, |
| qmc5883l_over_sample_t | sample ) |
set the over sample
| [in] | *handle | pointer to a qmc5883l handle structure |
| [in] | sample | over sample |
Definition at line 560 of file driver_qmc5883l.c.
| uint8_t qmc5883l_set_period | ( | qmc5883l_handle_t * | handle, |
| uint8_t | fbr ) |
set period
| [in] | *handle | pointer to a qmc5883l handle structure |
| [in] | fbr | set param |
Definition at line 851 of file driver_qmc5883l.c.
| uint8_t qmc5883l_set_pointer_roll_over | ( | qmc5883l_handle_t * | handle, |
| qmc5883l_bool_t | enable ) |
enable or disable pointer roll over
| [in] | *handle | pointer to a qmc5883l handle structure |
| [in] | enable | bool value |
Definition at line 724 of file driver_qmc5883l.c.
| uint8_t qmc5883l_soft_reset | ( | qmc5883l_handle_t * | handle | ) |
soft reset
| [in] | *handle | pointer to a qmc5883l handle structure |
Definition at line 805 of file driver_qmc5883l.c.