![]() |
LibDriver AS5600
|
as5600 base driver modules More...
Data Structures | |
| struct | as5600_handle_s |
| as5600 handle structure definition More... | |
| struct | as5600_info_s |
| as5600 information structure definition More... | |
Typedefs | |
| typedef struct as5600_handle_s | as5600_handle_t |
| as5600 handle structure definition | |
| typedef struct as5600_info_s | as5600_info_t |
| as5600 information structure definition | |
Functions | |
| uint8_t | as5600_info (as5600_info_t *info) |
| get chip's information | |
| uint8_t | as5600_init (as5600_handle_t *handle) |
| initialize the chip | |
| uint8_t | as5600_deinit (as5600_handle_t *handle) |
| close the chip | |
| uint8_t | as5600_read (as5600_handle_t *handle, uint16_t *angle_raw, float *deg) |
| read the magnetic angle | |
| uint8_t | as5600_angle_convert_to_register (as5600_handle_t *handle, float deg, uint16_t *reg) |
| convert the angle to the register raw data | |
| uint8_t | as5600_angle_convert_to_data (as5600_handle_t *handle, uint16_t reg, float *deg) |
| convert the register raw data to the angle | |
| uint8_t | as5600_set_start_position (as5600_handle_t *handle, uint16_t pos) |
| set the start position | |
| uint8_t | as5600_get_start_position (as5600_handle_t *handle, uint16_t *pos) |
| get the start position | |
| uint8_t | as5600_set_stop_position (as5600_handle_t *handle, uint16_t pos) |
| set the stop position | |
| uint8_t | as5600_get_stop_position (as5600_handle_t *handle, uint16_t *pos) |
| get the stop position | |
| uint8_t | as5600_set_max_angle (as5600_handle_t *handle, uint16_t ang) |
| set the max angle | |
| uint8_t | as5600_get_max_angle (as5600_handle_t *handle, uint16_t *ang) |
| get the max angle | |
| uint8_t | as5600_set_watch_dog (as5600_handle_t *handle, as5600_bool_t enable) |
| enable or disable the watch dog | |
| uint8_t | as5600_get_watch_dog (as5600_handle_t *handle, as5600_bool_t *enable) |
| get the watch dog status | |
| uint8_t | as5600_set_fast_filter_threshold (as5600_handle_t *handle, as5600_fast_filter_threshold_t threshold) |
| set the fast filter threshold | |
| uint8_t | as5600_get_fast_filter_threshold (as5600_handle_t *handle, as5600_fast_filter_threshold_t *threshold) |
| get the fast filter threshold | |
| uint8_t | as5600_set_slow_filter (as5600_handle_t *handle, as5600_slow_filter_t filter) |
| set the slow filter | |
| uint8_t | as5600_get_slow_filter (as5600_handle_t *handle, as5600_slow_filter_t *filter) |
| get the slow filter | |
| uint8_t | as5600_set_pwm_frequency (as5600_handle_t *handle, as5600_pwm_frequency_t freq) |
| set the pwm frequency | |
| uint8_t | as5600_get_pwm_frequency (as5600_handle_t *handle, as5600_pwm_frequency_t *freq) |
| get the pwm frequency | |
| uint8_t | as5600_set_output_stage (as5600_handle_t *handle, as5600_output_stage_t stage) |
| set the output stage | |
| uint8_t | as5600_get_output_stage (as5600_handle_t *handle, as5600_output_stage_t *stage) |
| get the output stage | |
| uint8_t | as5600_set_hysteresis (as5600_handle_t *handle, as5600_hysteresis_t hysteresis) |
| set the hysteresis | |
| uint8_t | as5600_get_hysteresis (as5600_handle_t *handle, as5600_hysteresis_t *hysteresis) |
| get the hysteresis | |
| uint8_t | as5600_set_power_mode (as5600_handle_t *handle, as5600_power_mode_t mode) |
| set the power mode | |
| uint8_t | as5600_get_power_mode (as5600_handle_t *handle, as5600_power_mode_t *mode) |
| get the power mode | |
| uint8_t | as5600_get_raw_angle (as5600_handle_t *handle, uint16_t *ang) |
| get the raw angle | |
| uint8_t | as5600_get_angle (as5600_handle_t *handle, uint16_t *ang) |
| get the angle | |
| uint8_t | as5600_get_status (as5600_handle_t *handle, uint8_t *status) |
| get the status | |
| uint8_t | as5600_get_agc (as5600_handle_t *handle, uint8_t *agc) |
| get the automatic gain control | |
| uint8_t | as5600_get_magnitude (as5600_handle_t *handle, uint16_t *magnitude) |
| get the magnitude | |
| uint8_t | as5600_set_burn (as5600_handle_t *handle, as5600_burn_t burn) |
| set the burn | |
as5600 base driver modules
| typedef struct as5600_handle_s as5600_handle_t |
as5600 handle structure definition
| typedef struct as5600_info_s as5600_info_t |
as5600 information structure definition
| enum as5600_bool_t |
as5600 bool enumeration definition
| Enumerator | |
|---|---|
| AS5600_BOOL_FALSE | disable |
| AS5600_BOOL_TRUE | enable |
Definition at line 62 of file driver_as5600.h.
| enum as5600_burn_t |
as5600 burn enumeration definition
Definition at line 150 of file driver_as5600.h.
as5600 fast filter threshold enumeration definition
Definition at line 125 of file driver_as5600.h.
| enum as5600_hysteresis_t |
as5600 hysteresis enumeration definition
| Enumerator | |
|---|---|
| AS5600_HYSTERESIS_OFF | off |
| AS5600_HYSTERESIS_1LSB | 1 lsb |
| AS5600_HYSTERESIS_2LSB | 2 lsb |
| AS5600_HYSTERESIS_3LSB | 3 lsb |
Definition at line 82 of file driver_as5600.h.
as5600 output stage enumeration definition
Definition at line 93 of file driver_as5600.h.
| enum as5600_power_mode_t |
as5600 power mode enumeration definition
| Enumerator | |
|---|---|
| AS5600_POWER_MODE_NOM | normal |
| AS5600_POWER_MODE_LPM1 | low power 1 |
| AS5600_POWER_MODE_LPM2 | low power 2 |
| AS5600_POWER_MODE_LPM3 | low power 3 |
Definition at line 71 of file driver_as5600.h.
as5600 pwm frequency enumeration definition
| Enumerator | |
|---|---|
| AS5600_PWM_FREQUENCY_115HZ | 115Hz |
| AS5600_PWM_FREQUENCY_230HZ | 230Hz |
| AS5600_PWM_FREQUENCY_460HZ | 460Hz |
| AS5600_PWM_FREQUENCY_920HZ | 920Hz |
Definition at line 103 of file driver_as5600.h.
| enum as5600_slow_filter_t |
as5600 slow filter enumeration definition
| Enumerator | |
|---|---|
| AS5600_SLOW_FILTER_16X | 16x |
| AS5600_SLOW_FILTER_8X | 8x |
| AS5600_SLOW_FILTER_4X | 4x |
| AS5600_SLOW_FILTER_2X | 2x |
Definition at line 114 of file driver_as5600.h.
| enum as5600_status_t |
as5600 status enumeration definition
| Enumerator | |
|---|---|
| AS5600_STATUS_MD | agc minimum gain overflow, magnet too strong |
| AS5600_STATUS_ML | agc maximum gain overflow, magnet too weak |
| AS5600_STATUS_MH | magnet was detected |
Definition at line 140 of file driver_as5600.h.
| uint8_t as5600_angle_convert_to_data | ( | as5600_handle_t * | handle, |
| uint16_t | reg, | ||
| float * | deg ) |
convert the register raw data to the angle
| [in] | *handle | pointer to an as5600 handle structure |
| [in] | reg | register raw data |
| [out] | *deg | pointer to an angle buffer |
Definition at line 296 of file driver_as5600.c.
| uint8_t as5600_angle_convert_to_register | ( | as5600_handle_t * | handle, |
| float | deg, | ||
| uint16_t * | reg ) |
convert the angle to the register raw data
| [in] | *handle | pointer to an as5600 handle structure |
| [in] | deg | angle |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 269 of file driver_as5600.c.
| uint8_t as5600_deinit | ( | as5600_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to an as5600 handle structure |
Definition at line 196 of file driver_as5600.c.
| uint8_t as5600_get_agc | ( | as5600_handle_t * | handle, |
| uint8_t * | agc ) |
get the automatic gain control
| [in] | *handle | pointer to an as5600 handle structure |
| [out] | *agc | pointer to an agc buffer |
Definition at line 1221 of file driver_as5600.c.
| uint8_t as5600_get_angle | ( | as5600_handle_t * | handle, |
| uint16_t * | ang ) |
get the angle
| [in] | *handle | pointer to an as5600 handle structure |
| [out] | *ang | pointer to an ang buffer |
Definition at line 1149 of file driver_as5600.c.
| uint8_t as5600_get_fast_filter_threshold | ( | as5600_handle_t * | handle, |
| as5600_fast_filter_threshold_t * | threshold ) |
get the fast filter threshold
| [in] | *handle | pointer to an as5600 handle structure |
| [out] | *threshold | pointer to a fast filter threshold buffer |
Definition at line 691 of file driver_as5600.c.
| uint8_t as5600_get_hysteresis | ( | as5600_handle_t * | handle, |
| as5600_hysteresis_t * | hysteresis ) |
get the hysteresis
| [in] | *handle | pointer to an as5600 handle structure |
| [out] | *hysteresis | pointer to a hysteresis buffer |
Definition at line 999 of file driver_as5600.c.
| uint8_t as5600_get_magnitude | ( | as5600_handle_t * | handle, |
| uint16_t * | magnitude ) |
get the magnitude
| [in] | *handle | pointer to an as5600 handle structure |
| [out] | *magnitude | pointer to a magnitude buffer |
Definition at line 1255 of file driver_as5600.c.
| uint8_t as5600_get_max_angle | ( | as5600_handle_t * | handle, |
| uint16_t * | ang ) |
get the max angle
| [in] | *handle | pointer to an as5600 handle structure |
| [out] | *ang | pointer to a max angle buffer |
Definition at line 534 of file driver_as5600.c.
| uint8_t as5600_get_output_stage | ( | as5600_handle_t * | handle, |
| as5600_output_stage_t * | stage ) |
get the output stage
| [in] | *handle | pointer to an as5600 handle structure |
| [out] | *stage | pointer to an output stage buffer |
Definition at line 922 of file driver_as5600.c.
| uint8_t as5600_get_power_mode | ( | as5600_handle_t * | handle, |
| as5600_power_mode_t * | mode ) |
get the power mode
| [in] | *handle | pointer to an as5600 handle structure |
| [out] | *mode | pointer to a power mode buffer |
Definition at line 1076 of file driver_as5600.c.
| uint8_t as5600_get_pwm_frequency | ( | as5600_handle_t * | handle, |
| as5600_pwm_frequency_t * | freq ) |
get the pwm frequency
| [in] | *handle | pointer to an as5600 handle structure |
| [out] | *freq | pointer to a pwm frequency buffer |
Definition at line 845 of file driver_as5600.c.
| uint8_t as5600_get_raw_angle | ( | as5600_handle_t * | handle, |
| uint16_t * | ang ) |
get the raw angle
| [in] | *handle | pointer to an as5600 handle structure |
| [out] | *ang | pointer to an ang buffer |
Definition at line 1111 of file driver_as5600.c.
| uint8_t as5600_get_slow_filter | ( | as5600_handle_t * | handle, |
| as5600_slow_filter_t * | filter ) |
get the slow filter
| [in] | *handle | pointer to an as5600 handle structure |
| [out] | *filter | pointer to a slow filter buffer |
Definition at line 768 of file driver_as5600.c.
| uint8_t as5600_get_start_position | ( | as5600_handle_t * | handle, |
| uint16_t * | pos ) |
get the start position
| [in] | *handle | pointer to an as5600 handle structure |
| [out] | *pos | pointer to a start position buffer |
Definition at line 368 of file driver_as5600.c.
| uint8_t as5600_get_status | ( | as5600_handle_t * | handle, |
| uint8_t * | status ) |
get the status
| [in] | *handle | pointer to an as5600 handle structure |
| [out] | *status | pointer to a status buffer |
Definition at line 1187 of file driver_as5600.c.
| uint8_t as5600_get_stop_position | ( | as5600_handle_t * | handle, |
| uint16_t * | pos ) |
get the stop position
| [in] | *handle | pointer to an as5600 handle structure |
| [out] | *pos | pointer to a stop position buffer |
Definition at line 451 of file driver_as5600.c.
| uint8_t as5600_get_watch_dog | ( | as5600_handle_t * | handle, |
| as5600_bool_t * | enable ) |
get the watch dog status
| [in] | *handle | pointer to an as5600 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 614 of file driver_as5600.c.
| uint8_t as5600_info | ( | as5600_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to an as5600 info structure |
Definition at line 1399 of file driver_as5600.c.
| uint8_t as5600_init | ( | as5600_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to an as5600 handle structure |
Definition at line 134 of file driver_as5600.c.
| uint8_t as5600_read | ( | as5600_handle_t * | handle, |
| uint16_t * | angle_raw, | ||
| float * | deg ) |
read the magnetic angle
| [in] | *handle | pointer to an as5600 handle structure |
| [out] | *angle_raw | pointer to a raw angle buffer |
| [out] | *deg | pointer to a converted angle buffer |
Definition at line 230 of file driver_as5600.c.
| uint8_t as5600_set_burn | ( | as5600_handle_t * | handle, |
| as5600_burn_t | burn ) |
set the burn
| [in] | *handle | pointer to an as5600 handle structure |
| [in] | burn | set command |
Definition at line 1293 of file driver_as5600.c.
| uint8_t as5600_set_fast_filter_threshold | ( | as5600_handle_t * | handle, |
| as5600_fast_filter_threshold_t | threshold ) |
set the fast filter threshold
| [in] | *handle | pointer to an as5600 handle structure |
| [in] | threshold | fast filter threshold |
Definition at line 649 of file driver_as5600.c.
| uint8_t as5600_set_hysteresis | ( | as5600_handle_t * | handle, |
| as5600_hysteresis_t | hysteresis ) |
set the hysteresis
| [in] | *handle | pointer to an as5600 handle structure |
| [in] | hysteresis | input hysteresis |
Definition at line 957 of file driver_as5600.c.
| uint8_t as5600_set_max_angle | ( | as5600_handle_t * | handle, |
| uint16_t | ang ) |
set the max angle
| [in] | *handle | pointer to an as5600 handle structure |
| [in] | ang | max angle |
Definition at line 490 of file driver_as5600.c.
| uint8_t as5600_set_output_stage | ( | as5600_handle_t * | handle, |
| as5600_output_stage_t | stage ) |
set the output stage
| [in] | *handle | pointer to an as5600 handle structure |
| [in] | stage | output stage |
Definition at line 880 of file driver_as5600.c.
| uint8_t as5600_set_power_mode | ( | as5600_handle_t * | handle, |
| as5600_power_mode_t | mode ) |
set the power mode
| [in] | *handle | pointer to an as5600 handle structure |
| [in] | mode | power mode |
Definition at line 1034 of file driver_as5600.c.
| uint8_t as5600_set_pwm_frequency | ( | as5600_handle_t * | handle, |
| as5600_pwm_frequency_t | freq ) |
set the pwm frequency
| [in] | *handle | pointer to an as5600 handle structure |
| [in] | freq | pwm frequency |
Definition at line 803 of file driver_as5600.c.
| uint8_t as5600_set_slow_filter | ( | as5600_handle_t * | handle, |
| as5600_slow_filter_t | filter ) |
set the slow filter
| [in] | *handle | pointer to an as5600 handle structure |
| [in] | filter | slow filter |
Definition at line 726 of file driver_as5600.c.
| uint8_t as5600_set_start_position | ( | as5600_handle_t * | handle, |
| uint16_t | pos ) |
set the start position
| [in] | *handle | pointer to an as5600 handle structure |
| [in] | pos | start position |
Definition at line 324 of file driver_as5600.c.
| uint8_t as5600_set_stop_position | ( | as5600_handle_t * | handle, |
| uint16_t | pos ) |
set the stop position
| [in] | *handle | pointer to an as5600 handle structure |
| [in] | pos | stop position |
Definition at line 407 of file driver_as5600.c.
| uint8_t as5600_set_watch_dog | ( | as5600_handle_t * | handle, |
| as5600_bool_t | enable ) |
enable or disable the watch dog
| [in] | *handle | pointer to an as5600 handle structure |
| [in] | enable | bool value |
Definition at line 572 of file driver_as5600.c.