![]() |
LibDriver MAG3110
|
mag3110 base driver modules More...
Data Structures | |
| struct | mag3110_handle_s |
| mag3110 handle structure definition More... | |
| struct | mag3110_info_s |
| mag3110 information structure definition More... | |
Typedefs | |
| typedef struct mag3110_handle_s | mag3110_handle_t |
| mag3110 handle structure definition | |
| typedef struct mag3110_info_s | mag3110_info_t |
| mag3110 information structure definition | |
Functions | |
| uint8_t | mag3110_info (mag3110_info_t *info) |
| get chip's information | |
| uint8_t | mag3110_init (mag3110_handle_t *handle) |
| initialize the chip | |
| uint8_t | mag3110_deinit (mag3110_handle_t *handle) |
| close the chip | |
| uint8_t | mag3110_read (mag3110_handle_t *handle, int16_t raw[3], float ut[3]) |
| read data | |
| uint8_t | mag3110_reset (mag3110_handle_t *handle) |
| reset | |
| uint8_t | mag3110_read_die_temperature (mag3110_handle_t *handle, int8_t *raw, float *degree) |
| read die temperature | |
| uint8_t | mag3110_get_data_ready_status (mag3110_handle_t *handle, uint8_t *status) |
| get data ready status | |
| uint8_t | mag3110_get_mode_status (mag3110_handle_t *handle, mag3110_mode_status_t *mode) |
| get mode status | |
| uint8_t | mag3110_set_offset_x (mag3110_handle_t *handle, uint16_t offset) |
| set offset x | |
| uint8_t | mag3110_get_offset_x (mag3110_handle_t *handle, uint16_t *offset) |
| get offset x | |
| uint8_t | mag3110_set_offset_y (mag3110_handle_t *handle, uint16_t offset) |
| set offset y | |
| uint8_t | mag3110_get_offset_y (mag3110_handle_t *handle, uint16_t *offset) |
| get offset y | |
| uint8_t | mag3110_set_offset_z (mag3110_handle_t *handle, uint16_t offset) |
| set offset z | |
| uint8_t | mag3110_get_offset_z (mag3110_handle_t *handle, uint16_t *offset) |
| get offset z | |
| uint8_t | mag3110_set_rate_over_sample (mag3110_handle_t *handle, mag3110_rate_over_sample_t rate_over_sample) |
| set rate over sample | |
| uint8_t | mag3110_get_rate_over_sample (mag3110_handle_t *handle, mag3110_rate_over_sample_t *rate_over_sample) |
| get rate over sample | |
| uint8_t | mag3110_set_fast_read_mode (mag3110_handle_t *handle, mag3110_bool_t enable) |
| enable or disable fast read mode | |
| uint8_t | mag3110_get_fast_read_mode (mag3110_handle_t *handle, mag3110_bool_t *enable) |
| get fast read mode status | |
| uint8_t | mag3110_set_trigger_mode (mag3110_handle_t *handle, mag3110_bool_t enable) |
| enable or disable trigger mode | |
| uint8_t | mag3110_get_trigger_mode (mag3110_handle_t *handle, mag3110_bool_t *enable) |
| get trigger mode status | |
| uint8_t | mag3110_set_mode (mag3110_handle_t *handle, mag3110_mode_t mode) |
| set mode | |
| uint8_t | mag3110_get_mode (mag3110_handle_t *handle, mag3110_mode_t *mode) |
| get mode | |
| uint8_t | mag3110_set_automatic_magnetic_sensor_reset (mag3110_handle_t *handle, mag3110_bool_t enable) |
| enable or disable automatic magnetic sensor reset | |
| uint8_t | mag3110_set_disable_offset_correction (mag3110_handle_t *handle, mag3110_bool_t enable) |
| enable or disable offset correction | |
| uint8_t | mag3110_get_disable_offset_correction (mag3110_handle_t *handle, mag3110_bool_t *enable) |
| get offset correction status | |
| uint8_t | mag3110_offset_convert_to_register (mag3110_handle_t *handle, float ut, uint16_t *reg) |
| convert the offset to the register raw data | |
| uint8_t | mag3110_offset_convert_to_data (mag3110_handle_t *handle, uint16_t reg, float *ut) |
| convert the register raw data to the offset threshold | |
mag3110 base driver modules
| typedef struct mag3110_handle_s mag3110_handle_t |
mag3110 handle structure definition
| typedef struct mag3110_info_s mag3110_info_t |
mag3110 information structure definition
| enum mag3110_bool_t |
mag3110 bool enumeration definition
| Enumerator | |
|---|---|
| MAG3110_BOOL_FALSE | false |
| MAG3110_BOOL_TRUE | true |
Definition at line 62 of file driver_mag3110.h.
mag3110 mode status enumeration definition
| Enumerator | |
|---|---|
| MAG3110_MODE_STATUS_STANDBY | standby mode |
| MAG3110_MODE_STATUS_ACTIVE_RAW | active mode, raw data mode |
| MAG3110_MODE_STATUS_ACTIVE_NON_RAW | active mode, non-raw user-corrected data |
Definition at line 86 of file driver_mag3110.h.
| enum mag3110_mode_t |
mag3110 mode enumeration definition
| Enumerator | |
|---|---|
| MAG3110_MODE_STANDBY | standby mode |
| MAG3110_MODE_ACTIVE | active mode |
Definition at line 96 of file driver_mag3110.h.
mag3110 rate over sample enumeration definition
Definition at line 105 of file driver_mag3110.h.
| enum mag3110_status_t |
mag3110 status enumeration definition
Definition at line 71 of file driver_mag3110.h.
| uint8_t mag3110_deinit | ( | mag3110_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to a mag3110 handle structure |
Definition at line 1213 of file driver_mag3110.c.
| uint8_t mag3110_get_data_ready_status | ( | mag3110_handle_t * | handle, |
| uint8_t * | status ) |
get data ready status
| [in] | *handle | pointer to a mag3110 handle structure |
| [out] | *status | pointer to a status buffer |
Definition at line 131 of file driver_mag3110.c.
| uint8_t mag3110_get_disable_offset_correction | ( | mag3110_handle_t * | handle, |
| mag3110_bool_t * | enable ) |
get offset correction status
| [in] | *handle | pointer to a mag3110 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 983 of file driver_mag3110.c.
| uint8_t mag3110_get_fast_read_mode | ( | mag3110_handle_t * | handle, |
| mag3110_bool_t * | enable ) |
get fast read mode status
| [in] | *handle | pointer to a mag3110 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 692 of file driver_mag3110.c.
| uint8_t mag3110_get_mode | ( | mag3110_handle_t * | handle, |
| mag3110_mode_t * | mode ) |
get mode
| [in] | *handle | pointer to a mag3110 handle structure |
| [out] | *mode | pointer to a chip mode buffer |
Definition at line 856 of file driver_mag3110.c.
| uint8_t mag3110_get_mode_status | ( | mag3110_handle_t * | handle, |
| mag3110_mode_status_t * | mode ) |
get mode status
| [in] | *handle | pointer to a mag3110 handle structure |
| [out] | *mode | pointer to a mode buffer |
Definition at line 166 of file driver_mag3110.c.
| uint8_t mag3110_get_offset_x | ( | mag3110_handle_t * | handle, |
| uint16_t * | offset ) |
get offset x
| [in] | *handle | pointer to a mag3110 handle structure |
| [out] | *offset | pointer to an offset buffer |
Definition at line 315 of file driver_mag3110.c.
| uint8_t mag3110_get_offset_y | ( | mag3110_handle_t * | handle, |
| uint16_t * | offset ) |
get offset y
| [in] | *handle | pointer to a mag3110 handle structure |
| [out] | *offset | pointer to an offset buffer |
Definition at line 401 of file driver_mag3110.c.
| uint8_t mag3110_get_offset_z | ( | mag3110_handle_t * | handle, |
| uint16_t * | offset ) |
get offset z
| [in] | *handle | pointer to a mag3110 handle structure |
| [out] | *offset | pointer to an offset buffer |
Definition at line 487 of file driver_mag3110.c.
| uint8_t mag3110_get_rate_over_sample | ( | mag3110_handle_t * | handle, |
| mag3110_rate_over_sample_t * | rate_over_sample ) |
get rate over sample
| [in] | *handle | pointer to a mag3110 handle structure |
| [out] | *rate_over_sample | pointer to a rate over sample buffer |
Definition at line 610 of file driver_mag3110.c.
| uint8_t mag3110_get_trigger_mode | ( | mag3110_handle_t * | handle, |
| mag3110_bool_t * | enable ) |
get trigger mode status
| [in] | *handle | pointer to a mag3110 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 774 of file driver_mag3110.c.
| uint8_t mag3110_info | ( | mag3110_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to a mag3110 info structure |
Definition at line 1413 of file driver_mag3110.c.
| uint8_t mag3110_init | ( | mag3110_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to a mag3110 handle structure |
Definition at line 1084 of file driver_mag3110.c.
| uint8_t mag3110_offset_convert_to_data | ( | mag3110_handle_t * | handle, |
| uint16_t | reg, | ||
| float * | ut ) |
convert the register raw data to the offset threshold
| [in] | *handle | pointer to a mag3110 handle structure |
| [in] | reg | register raw data |
| [out] | *ut | pointer to an offset threshold buffer |
Definition at line 234 of file driver_mag3110.c.
| uint8_t mag3110_offset_convert_to_register | ( | mag3110_handle_t * | handle, |
| float | ut, | ||
| uint16_t * | reg ) |
convert the offset to the register raw data
| [in] | *handle | pointer to a mag3110 handle structure |
| [in] | ut | offset threshold |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 203 of file driver_mag3110.c.
| uint8_t mag3110_read | ( | mag3110_handle_t * | handle, |
| int16_t | raw[3], | ||
| float | ut[3] ) |
read data
| [in] | *handle | pointer to a mag3110 handle structure |
| [out] | *raw | pointer to a raw data buffer |
| [out] | *ut | pointer to a converted data buffer |
Definition at line 1266 of file driver_mag3110.c.
| uint8_t mag3110_read_die_temperature | ( | mag3110_handle_t * | handle, |
| int8_t * | raw, | ||
| float * | degree ) |
read die temperature
| [in] | *handle | pointer to a mag3110 handle structure |
| [out] | *raw | pointer to a raw buffer |
| [out] | *degree | pointer to a converted degree buffer |
Definition at line 527 of file driver_mag3110.c.
| uint8_t mag3110_reset | ( | mag3110_handle_t * | handle | ) |
reset
| [in] | *handle | pointer to a mag3110 handle structure |
Definition at line 1020 of file driver_mag3110.c.
| uint8_t mag3110_set_automatic_magnetic_sensor_reset | ( | mag3110_handle_t * | handle, |
| mag3110_bool_t | enable ) |
enable or disable automatic magnetic sensor reset
| [in] | *handle | pointer to a mag3110 handle structure |
| [in] | enable | bool value |
Definition at line 893 of file driver_mag3110.c.
| uint8_t mag3110_set_disable_offset_correction | ( | mag3110_handle_t * | handle, |
| mag3110_bool_t | enable ) |
enable or disable offset correction
| [in] | *handle | pointer to a mag3110 handle structure |
| [in] | enable | bool value |
Definition at line 938 of file driver_mag3110.c.
| uint8_t mag3110_set_fast_read_mode | ( | mag3110_handle_t * | handle, |
| mag3110_bool_t | enable ) |
enable or disable fast read mode
| [in] | *handle | pointer to a mag3110 handle structure |
| [in] | enable | bool value |
Definition at line 647 of file driver_mag3110.c.
| uint8_t mag3110_set_mode | ( | mag3110_handle_t * | handle, |
| mag3110_mode_t | mode ) |
set mode
| [in] | *handle | pointer to a mag3110 handle structure |
| [in] | mode | chip mode |
Definition at line 811 of file driver_mag3110.c.
| uint8_t mag3110_set_offset_x | ( | mag3110_handle_t * | handle, |
| uint16_t | offset ) |
set offset x
| [in] | *handle | pointer to a mag3110 handle structure |
| [in] | offset | set offset |
Definition at line 269 of file driver_mag3110.c.
| uint8_t mag3110_set_offset_y | ( | mag3110_handle_t * | handle, |
| uint16_t | offset ) |
set offset y
| [in] | *handle | pointer to a mag3110 handle structure |
| [in] | offset | set offset |
Definition at line 355 of file driver_mag3110.c.
| uint8_t mag3110_set_offset_z | ( | mag3110_handle_t * | handle, |
| uint16_t | offset ) |
set offset z
| [in] | *handle | pointer to a mag3110 handle structure |
| [in] | offset | set offset |
Definition at line 441 of file driver_mag3110.c.
| uint8_t mag3110_set_rate_over_sample | ( | mag3110_handle_t * | handle, |
| mag3110_rate_over_sample_t | rate_over_sample ) |
set rate over sample
| [in] | *handle | pointer to a mag3110 handle structure |
| [in] | rate_over_sample | rate over sample |
Definition at line 565 of file driver_mag3110.c.
| uint8_t mag3110_set_trigger_mode | ( | mag3110_handle_t * | handle, |
| mag3110_bool_t | enable ) |
enable or disable trigger mode
| [in] | *handle | pointer to a mag3110 handle structure |
| [in] | enable | bool value |
Definition at line 729 of file driver_mag3110.c.