![]() |
LibDriver ADXL345
|
adxl345 basic driver modules More...
Data Structures | |
| struct | adxl345_handle_s |
| adxl345 handle structure definition More... | |
| struct | adxl345_info_s |
| adxl345 information structure definition More... | |
Typedefs | |
| typedef struct adxl345_handle_s | adxl345_handle_t |
| adxl345 handle structure definition | |
| typedef struct adxl345_info_s | adxl345_info_t |
| adxl345 information structure definition | |
Functions | |
| uint8_t | adxl345_info (adxl345_info_t *info) |
| get chip's information | |
| uint8_t | adxl345_init (adxl345_handle_t *handle) |
| initialize the chip | |
| uint8_t | adxl345_deinit (adxl345_handle_t *handle) |
| close the chip | |
| uint8_t | adxl345_set_interface (adxl345_handle_t *handle, adxl345_interface_t interface) |
| set the chip interface | |
| uint8_t | adxl345_get_interface (adxl345_handle_t *handle, adxl345_interface_t *interface) |
| get the chip interface | |
| uint8_t | adxl345_set_addr_pin (adxl345_handle_t *handle, adxl345_address_t addr_pin) |
| set the iic address pin | |
| uint8_t | adxl345_get_addr_pin (adxl345_handle_t *handle, adxl345_address_t *addr_pin) |
| get the iic address pin | |
| uint8_t | adxl345_read (adxl345_handle_t *handle, int16_t(*raw)[3], float(*g)[3], uint16_t *len) |
| read the data | |
| uint8_t | adxl345_irq_handler (adxl345_handle_t *handle) |
| irq handler | |
| uint8_t | adxl345_set_tap_threshold (adxl345_handle_t *handle, uint8_t threshold) |
| set the tap threshold | |
| uint8_t | adxl345_get_tap_threshold (adxl345_handle_t *handle, uint8_t *threshold) |
| get the tap threshold | |
| uint8_t | adxl345_tap_threshold_convert_to_register (adxl345_handle_t *handle, float g, uint8_t *reg) |
| convert the tap threshold to the register raw data | |
| uint8_t | adxl345_tap_threshold_convert_to_data (adxl345_handle_t *handle, uint8_t reg, float *g) |
| convert the register raw data to the tap threshold | |
| uint8_t | adxl345_set_offset (adxl345_handle_t *handle, int8_t x, int8_t y, int8_t z) |
| set the axis offset | |
| uint8_t | adxl345_get_offset (adxl345_handle_t *handle, int8_t *x, int8_t *y, int8_t *z) |
| get the axis offset | |
| uint8_t | adxl345_offset_convert_to_register (adxl345_handle_t *handle, float g, int8_t *reg) |
| convert the offset to the register raw data | |
| uint8_t | adxl345_offset_convert_to_data (adxl345_handle_t *handle, int8_t reg, float *g) |
| convert the register raw data to the offset | |
| uint8_t | adxl345_set_duration (adxl345_handle_t *handle, uint8_t t) |
| set the duration | |
| uint8_t | adxl345_get_duration (adxl345_handle_t *handle, uint8_t *t) |
| get the duration | |
| uint8_t | adxl345_duration_convert_to_register (adxl345_handle_t *handle, uint32_t us, uint8_t *reg) |
| convert the duration to the register raw data | |
| uint8_t | adxl345_duration_convert_to_data (adxl345_handle_t *handle, uint8_t reg, uint32_t *us) |
| convert the register raw data to the duration | |
| uint8_t | adxl345_set_latent (adxl345_handle_t *handle, uint8_t t) |
| set the latent | |
| uint8_t | adxl345_get_latent (adxl345_handle_t *handle, uint8_t *t) |
| get the latent | |
| uint8_t | adxl345_latent_convert_to_register (adxl345_handle_t *handle, float ms, uint8_t *reg) |
| convert the latent to the register raw data | |
| uint8_t | adxl345_latent_convert_to_data (adxl345_handle_t *handle, uint8_t reg, float *ms) |
| convert the register raw data to the latent | |
| uint8_t | adxl345_set_window (adxl345_handle_t *handle, uint8_t t) |
| set the window | |
| uint8_t | adxl345_get_window (adxl345_handle_t *handle, uint8_t *t) |
| get the window | |
| uint8_t | adxl345_window_convert_to_register (adxl345_handle_t *handle, float ms, uint8_t *reg) |
| convert the window time to the register raw data | |
| uint8_t | adxl345_window_convert_to_data (adxl345_handle_t *handle, uint8_t reg, float *ms) |
| convert the register raw data to the window time | |
| uint8_t | adxl345_set_action_threshold (adxl345_handle_t *handle, uint8_t threshold) |
| set the action threshold | |
| uint8_t | adxl345_get_action_threshold (adxl345_handle_t *handle, uint8_t *threshold) |
| get the action threshold | |
| uint8_t | adxl345_action_threshold_convert_to_register (adxl345_handle_t *handle, float g, uint8_t *reg) |
| convert the action threshold to the register raw data | |
| uint8_t | adxl345_action_threshold_convert_to_data (adxl345_handle_t *handle, uint8_t reg, float *g) |
| convert the register raw data to the action threshold | |
| uint8_t | adxl345_set_inaction_threshold (adxl345_handle_t *handle, uint8_t threshold) |
| set the inaction threshold | |
| uint8_t | adxl345_get_inaction_threshold (adxl345_handle_t *handle, uint8_t *threshold) |
| get the inaction threshold | |
| uint8_t | adxl345_inaction_threshold_convert_to_register (adxl345_handle_t *handle, float g, uint8_t *reg) |
| convert the inaction threshold to the register raw data | |
| uint8_t | adxl345_inaction_threshold_convert_to_data (adxl345_handle_t *handle, uint8_t reg, float *g) |
| convert the register raw data to the inaction threshold | |
| uint8_t | adxl345_set_inaction_time (adxl345_handle_t *handle, uint8_t t) |
| set the inaction time | |
| uint8_t | adxl345_get_inaction_time (adxl345_handle_t *handle, uint8_t *t) |
| get the inaction time | |
| uint8_t | adxl345_inaction_time_convert_to_register (adxl345_handle_t *handle, uint8_t s, uint8_t *reg) |
| convert the inaction time to the register raw data | |
| uint8_t | adxl345_inaction_time_convert_to_data (adxl345_handle_t *handle, uint8_t reg, uint8_t *s) |
| convert the register raw data to the inaction time | |
| uint8_t | adxl345_set_action_inaction (adxl345_handle_t *handle, adxl345_action_inaction_t type, adxl345_bool_t enable) |
| enable or disable the action or inaction | |
| uint8_t | adxl345_get_action_inaction (adxl345_handle_t *handle, adxl345_action_inaction_t type, adxl345_bool_t *enable) |
| get the action or inaction status | |
| uint8_t | adxl345_set_action_coupled (adxl345_handle_t *handle, adxl345_coupled_t coupled) |
| set the action coupled | |
| uint8_t | adxl345_get_action_coupled (adxl345_handle_t *handle, adxl345_coupled_t *coupled) |
| get the action coupled | |
| uint8_t | adxl345_set_inaction_coupled (adxl345_handle_t *handle, adxl345_coupled_t coupled) |
| set the inaction coupled | |
| uint8_t | adxl345_get_inaction_coupled (adxl345_handle_t *handle, adxl345_coupled_t *coupled) |
| get the inaction coupled | |
| uint8_t | adxl345_set_free_fall_threshold (adxl345_handle_t *handle, uint8_t threshold) |
| set the free fall threshold | |
| uint8_t | adxl345_get_free_fall_threshold (adxl345_handle_t *handle, uint8_t *threshold) |
| get the free fall threshold | |
| uint8_t | adxl345_free_fall_threshold_convert_to_register (adxl345_handle_t *handle, float g, uint8_t *reg) |
| convert the free fall threshold to the register raw data | |
| uint8_t | adxl345_free_fall_threshold_convert_to_data (adxl345_handle_t *handle, uint8_t reg, float *g) |
| convert the register raw data to the free fall threshold | |
| uint8_t | adxl345_set_free_fall_time (adxl345_handle_t *handle, uint8_t t) |
| set the free fall time | |
| uint8_t | adxl345_get_free_fall_time (adxl345_handle_t *handle, uint8_t *t) |
| get the free fall time | |
| uint8_t | adxl345_free_fall_time_convert_to_register (adxl345_handle_t *handle, uint16_t ms, uint8_t *reg) |
| convert the free fall time to the register raw data | |
| uint8_t | adxl345_free_fall_time_convert_to_data (adxl345_handle_t *handle, uint8_t reg, uint16_t *ms) |
| convert the register raw data to the free fall time | |
| uint8_t | adxl345_set_tap_axis (adxl345_handle_t *handle, adxl345_tap_axis_t axis, adxl345_bool_t enable) |
| enable or disable the tap axis | |
| uint8_t | adxl345_get_tap_axis (adxl345_handle_t *handle, adxl345_tap_axis_t axis, adxl345_bool_t *enable) |
| get the tap axis status | |
| uint8_t | adxl345_set_tap_suppress (adxl345_handle_t *handle, adxl345_bool_t enable) |
| enable or disable the tap suppress | |
| uint8_t | adxl345_get_tap_suppress (adxl345_handle_t *handle, adxl345_bool_t *enable) |
| get the tap suppress status | |
| uint8_t | adxl345_get_tap_status (adxl345_handle_t *handle, uint8_t *status) |
| get the tap status | |
| uint8_t | adxl345_set_rate (adxl345_handle_t *handle, adxl345_rate_t rate) |
| set the sampling rate | |
| uint8_t | adxl345_get_rate (adxl345_handle_t *handle, adxl345_rate_t *rate) |
| get the sampling rate | |
| uint8_t | adxl345_set_self_test (adxl345_handle_t *handle, adxl345_bool_t enable) |
| enable or disable the self test | |
| uint8_t | adxl345_get_self_test (adxl345_handle_t *handle, adxl345_bool_t *enable) |
| get the self test status | |
| uint8_t | adxl345_set_spi_wire (adxl345_handle_t *handle, adxl345_spi_wire_t wire) |
| set the chip spi wire | |
| uint8_t | adxl345_get_spi_wire (adxl345_handle_t *handle, adxl345_spi_wire_t *wire) |
| get the chip spi wire | |
| uint8_t | adxl345_set_full_resolution (adxl345_handle_t *handle, adxl345_bool_t enable) |
| enable or disable the full resolution | |
| uint8_t | adxl345_get_full_resolution (adxl345_handle_t *handle, adxl345_bool_t *enable) |
| get the full resolution status | |
| uint8_t | adxl345_set_justify (adxl345_handle_t *handle, adxl345_justify_t enable) |
| enable or disable the justify | |
| uint8_t | adxl345_get_justify (adxl345_handle_t *handle, adxl345_justify_t *enable) |
| get the justify status | |
| uint8_t | adxl345_set_range (adxl345_handle_t *handle, adxl345_range_t range) |
| set the chip range | |
| uint8_t | adxl345_get_range (adxl345_handle_t *handle, adxl345_range_t *range) |
| get the chip range | |
| uint8_t | adxl345_set_mode (adxl345_handle_t *handle, adxl345_mode_t mode) |
| set the chip mode | |
| uint8_t | adxl345_get_mode (adxl345_handle_t *handle, adxl345_mode_t *mode) |
| get the chip mode | |
| uint8_t | adxl345_set_trigger_pin (adxl345_handle_t *handle, adxl345_interrupt_pin_t pin) |
| set the trigger pin | |
| uint8_t | adxl345_get_trigger_pin (adxl345_handle_t *handle, adxl345_interrupt_pin_t *pin) |
| get the trigger pin | |
| uint8_t | adxl345_get_trigger_status (adxl345_handle_t *handle, adxl345_trigger_status_t *status) |
| get the trigger status | |
| uint8_t | adxl345_set_link_activity_inactivity (adxl345_handle_t *handle, adxl345_bool_t enable) |
| enable or disable the activity and inactivity linking | |
| uint8_t | adxl345_get_link_activity_inactivity (adxl345_handle_t *handle, adxl345_bool_t *enable) |
| get the activity and inactivity linking status | |
| uint8_t | adxl345_set_auto_sleep (adxl345_handle_t *handle, adxl345_bool_t enable) |
| enable or disable the auto sleep | |
| uint8_t | adxl345_get_auto_sleep (adxl345_handle_t *handle, adxl345_bool_t *enable) |
| get the auto sleep status | |
| uint8_t | adxl345_set_measure (adxl345_handle_t *handle, adxl345_bool_t enable) |
| enable or disable the measure | |
| uint8_t | adxl345_get_measure (adxl345_handle_t *handle, adxl345_bool_t *enable) |
| get the measure status | |
| uint8_t | adxl345_set_sleep (adxl345_handle_t *handle, adxl345_bool_t enable) |
| enable or disable the sleep mode | |
| uint8_t | adxl345_get_sleep (adxl345_handle_t *handle, adxl345_bool_t *enable) |
| get the sleep mode status | |
| uint8_t | adxl345_set_sleep_frequency (adxl345_handle_t *handle, adxl345_sleep_frequency_t sleep_frequency) |
| set the sleep frequency | |
| uint8_t | adxl345_get_sleep_frequency (adxl345_handle_t *handle, adxl345_sleep_frequency_t *sleep_frequency) |
| get the sleep frequency | |
adxl345 basic driver modules
| typedef struct adxl345_handle_s adxl345_handle_t |
adxl345 handle structure definition
| typedef struct adxl345_info_s adxl345_info_t |
adxl345 information structure definition
adxl345 action inaction enumeration definition
Definition at line 99 of file driver_adxl345.h.
adxl345 action tap status enumeration definition
Definition at line 122 of file driver_adxl345.h.
| enum adxl345_address_t |
adxl345 address enumeration definition
| Enumerator | |
|---|---|
| ADXL345_ADDRESS_ALT_0 | addr pin connected to the GND |
| ADXL345_ADDRESS_ALT_1 | addr pin connected to the VCC |
Definition at line 72 of file driver_adxl345.h.
| enum adxl345_bool_t |
adxl345 bool enumeration definition
| Enumerator | |
|---|---|
| ADXL345_BOOL_FALSE | false |
| ADXL345_BOOL_TRUE | true |
Definition at line 81 of file driver_adxl345.h.
| enum adxl345_coupled_t |
adxl345 coupled enumeration definition
| Enumerator | |
|---|---|
| ADXL345_COUPLED_DC | DC coupled |
| ADXL345_COUPLED_AC | AC coupled |
Definition at line 90 of file driver_adxl345.h.
| enum adxl345_interface_t |
adxl345 interface enumeration definition
| Enumerator | |
|---|---|
| ADXL345_INTERFACE_IIC | iic interface function |
| ADXL345_INTERFACE_SPI | spi interface function |
Definition at line 63 of file driver_adxl345.h.
| enum adxl345_justify_t |
adxl345 justify enumeration definition
| Enumerator | |
|---|---|
| ADXL345_JUSTIFY_RIGHT | right justify |
| ADXL345_JUSTIFY_LEFT | left justify |
Definition at line 174 of file driver_adxl345.h.
| enum adxl345_mode_t |
adxl345 mode enumeration definition
| Enumerator | |
|---|---|
| ADXL345_MODE_BYPASS | bypass mode |
| ADXL345_MODE_FIFO | fifo mode |
| ADXL345_MODE_STREAM | stream mode |
| ADXL345_MODE_TRIGGER | trigger mode |
Definition at line 205 of file driver_adxl345.h.
| enum adxl345_range_t |
adxl345 range enumeration definition
| Enumerator | |
|---|---|
| ADXL345_RANGE_2G | ±2G |
| ADXL345_RANGE_4G | ±4G |
| ADXL345_RANGE_8G | ±8G |
| ADXL345_RANGE_16G | ±16G |
Definition at line 183 of file driver_adxl345.h.
| enum adxl345_rate_t |
adxl345 rate enumeration definition
Definition at line 136 of file driver_adxl345.h.
adxl345 sleep frequency enumeration definition
| Enumerator | |
|---|---|
| ADXL345_SLEEP_FREQUENCY_8HZ | sleep 8Hz |
| ADXL345_SLEEP_FREQUENCY_4HZ | sleep 4Hz |
| ADXL345_SLEEP_FREQUENCY_2HZ | sleep 2Hz |
| ADXL345_SLEEP_FREQUENCY_1HZ | sleep 1Hz |
Definition at line 194 of file driver_adxl345.h.
| enum adxl345_spi_wire_t |
adxl345 spi wire enumeration definition
| Enumerator | |
|---|---|
| ADXL345_SPI_WIRE_4 | wire 4 |
| ADXL345_SPI_WIRE_3 | wire 3 |
Definition at line 165 of file driver_adxl345.h.
| enum adxl345_tap_axis_t |
adxl345 tap axis enumeration definition
| Enumerator | |
|---|---|
| ADXL345_TAP_AXIS_X | x axis tap |
| ADXL345_TAP_AXIS_Y | y axis tap |
| ADXL345_TAP_AXIS_Z | z axis tap |
Definition at line 112 of file driver_adxl345.h.
adxl345 trigger status enumeration definition
| Enumerator | |
|---|---|
| ADXL345_TRIGGER_NOT_OCCURRED | not occurred |
| ADXL345_TRIGGER_OCCURRED | occurred |
Definition at line 216 of file driver_adxl345.h.
| uint8_t adxl345_action_threshold_convert_to_data | ( | adxl345_handle_t * | handle, |
| uint8_t | reg, | ||
| float * | g ) |
convert the register raw data to the action threshold
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | reg | register raw data |
| [out] | *g | pointer to an action threshold buffer |
Definition at line 915 of file driver_adxl345.c.
| uint8_t adxl345_action_threshold_convert_to_register | ( | adxl345_handle_t * | handle, |
| float | g, | ||
| uint8_t * | reg ) |
convert the action threshold to the register raw data
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | g | action threshold |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 888 of file driver_adxl345.c.
| uint8_t adxl345_deinit | ( | adxl345_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to an adxl345 handle structure |
Definition at line 3277 of file driver_adxl345.c.
| uint8_t adxl345_duration_convert_to_data | ( | adxl345_handle_t * | handle, |
| uint8_t | reg, | ||
| uint32_t * | us ) |
convert the register raw data to the duration
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | reg | register raw data |
| [out] | *us | pointer to a duration buffer |
Definition at line 603 of file driver_adxl345.c.
| uint8_t adxl345_duration_convert_to_register | ( | adxl345_handle_t * | handle, |
| uint32_t | us, | ||
| uint8_t * | reg ) |
convert the duration to the register raw data
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | us | duration |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 576 of file driver_adxl345.c.
| uint8_t adxl345_free_fall_threshold_convert_to_data | ( | adxl345_handle_t * | handle, |
| uint8_t | reg, | ||
| float * | g ) |
convert the register raw data to the free fall threshold
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | reg | register raw data |
| [out] | *g | pointer to a free fall threshold buffer |
Definition at line 1451 of file driver_adxl345.c.
| uint8_t adxl345_free_fall_threshold_convert_to_register | ( | adxl345_handle_t * | handle, |
| float | g, | ||
| uint8_t * | reg ) |
convert the free fall threshold to the register raw data
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | g | free fall threshold |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 1424 of file driver_adxl345.c.
| uint8_t adxl345_free_fall_time_convert_to_data | ( | adxl345_handle_t * | handle, |
| uint8_t | reg, | ||
| uint16_t * | ms ) |
convert the register raw data to the free fall time
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | reg | register raw data |
| [out] | *ms | pointer to a free fall time buffer |
Definition at line 1555 of file driver_adxl345.c.
| uint8_t adxl345_free_fall_time_convert_to_register | ( | adxl345_handle_t * | handle, |
| uint16_t | ms, | ||
| uint8_t * | reg ) |
convert the free fall time to the register raw data
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | ms | free fall time |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 1528 of file driver_adxl345.c.
| uint8_t adxl345_get_action_coupled | ( | adxl345_handle_t * | handle, |
| adxl345_coupled_t * | coupled ) |
get the action coupled
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *coupled | pointer to an action coupled buffer |
Definition at line 1263 of file driver_adxl345.c.
| uint8_t adxl345_get_action_inaction | ( | adxl345_handle_t * | handle, |
| adxl345_action_inaction_t | type, | ||
| adxl345_bool_t * | enable ) |
get the action or inaction status
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | type | action or inaction type |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 1189 of file driver_adxl345.c.
| uint8_t adxl345_get_action_threshold | ( | adxl345_handle_t * | handle, |
| uint8_t * | threshold ) |
get the action threshold
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *threshold | pointer to an action threshold buffer |
Definition at line 863 of file driver_adxl345.c.
| uint8_t adxl345_get_addr_pin | ( | adxl345_handle_t * | handle, |
| adxl345_address_t * | addr_pin ) |
get the iic address pin
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *addr_pin | pointer to an address pin buffer |
Definition at line 243 of file driver_adxl345.c.
| uint8_t adxl345_get_auto_sleep | ( | adxl345_handle_t * | handle, |
| adxl345_bool_t * | enable ) |
get the auto sleep status
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 2859 of file driver_adxl345.c.
| uint8_t adxl345_get_duration | ( | adxl345_handle_t * | handle, |
| uint8_t * | t ) |
get the duration
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *t | pointer to a duration buffer |
Definition at line 551 of file driver_adxl345.c.
| uint8_t adxl345_get_free_fall_threshold | ( | adxl345_handle_t * | handle, |
| uint8_t * | threshold ) |
get the free fall threshold
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *threshold | pointer to a free fall threshold buffer |
Definition at line 1399 of file driver_adxl345.c.
| uint8_t adxl345_get_free_fall_time | ( | adxl345_handle_t * | handle, |
| uint8_t * | t ) |
get the free fall time
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *t | pointer to a free fall time buffer |
Definition at line 1503 of file driver_adxl345.c.
| uint8_t adxl345_get_full_resolution | ( | adxl345_handle_t * | handle, |
| adxl345_bool_t * | enable ) |
get the full resolution status
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 2267 of file driver_adxl345.c.
| uint8_t adxl345_get_inaction_coupled | ( | adxl345_handle_t * | handle, |
| adxl345_coupled_t * | coupled ) |
get the inaction coupled
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *coupled | pointer to an inaction coupled buffer |
Definition at line 1337 of file driver_adxl345.c.
| uint8_t adxl345_get_inaction_threshold | ( | adxl345_handle_t * | handle, |
| uint8_t * | threshold ) |
get the inaction threshold
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *threshold | pointer to an inaction threshold buffer |
Definition at line 967 of file driver_adxl345.c.
| uint8_t adxl345_get_inaction_time | ( | adxl345_handle_t * | handle, |
| uint8_t * | t ) |
get the inaction time
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *t | pointer to an inaction time buffer |
Definition at line 1071 of file driver_adxl345.c.
| uint8_t adxl345_get_interface | ( | adxl345_handle_t * | handle, |
| adxl345_interface_t * | interface ) |
get the chip interface
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *interface | pointer to a chip interface buffer |
Definition at line 201 of file driver_adxl345.c.
| uint8_t adxl345_get_justify | ( | adxl345_handle_t * | handle, |
| adxl345_justify_t * | enable ) |
get the justify status
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 2341 of file driver_adxl345.c.
| uint8_t adxl345_get_latent | ( | adxl345_handle_t * | handle, |
| uint8_t * | t ) |
get the latent
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *t | pointer to a latent time buffer |
Definition at line 655 of file driver_adxl345.c.
| uint8_t adxl345_get_link_activity_inactivity | ( | adxl345_handle_t * | handle, |
| adxl345_bool_t * | enable ) |
get the activity and inactivity linking status
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 2785 of file driver_adxl345.c.
| uint8_t adxl345_get_measure | ( | adxl345_handle_t * | handle, |
| adxl345_bool_t * | enable ) |
get the measure status
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 2933 of file driver_adxl345.c.
| uint8_t adxl345_get_mode | ( | adxl345_handle_t * | handle, |
| adxl345_mode_t * | mode ) |
get the chip mode
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *mode | pointer to a chip mode buffer |
Definition at line 2489 of file driver_adxl345.c.
| uint8_t adxl345_get_offset | ( | adxl345_handle_t * | handle, |
| int8_t * | x, | ||
| int8_t * | y, | ||
| int8_t * | z ) |
get the axis offset
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *x | pointer to an x axis offset |
| [out] | *y | pointer to a y axis offset |
| [out] | *z | pointer to a z axis offset |
Definition at line 423 of file driver_adxl345.c.
| uint8_t adxl345_get_range | ( | adxl345_handle_t * | handle, |
| adxl345_range_t * | range ) |
get the chip range
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *range | pointer to a measurement range buffer |
Definition at line 2415 of file driver_adxl345.c.
| uint8_t adxl345_get_rate | ( | adxl345_handle_t * | handle, |
| adxl345_rate_t * | rate ) |
get the sampling rate
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *rate | pointer to a sampling rate buffer |
Definition at line 1794 of file driver_adxl345.c.
| uint8_t adxl345_get_self_test | ( | adxl345_handle_t * | handle, |
| adxl345_bool_t * | enable ) |
get the self test status
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 2045 of file driver_adxl345.c.
| uint8_t adxl345_get_sleep | ( | adxl345_handle_t * | handle, |
| adxl345_bool_t * | enable ) |
get the sleep mode status
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 3007 of file driver_adxl345.c.
| uint8_t adxl345_get_sleep_frequency | ( | adxl345_handle_t * | handle, |
| adxl345_sleep_frequency_t * | sleep_frequency ) |
get the sleep frequency
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *sleep_frequency | pointer to a sleep frequency buffer |
Definition at line 3081 of file driver_adxl345.c.
| uint8_t adxl345_get_spi_wire | ( | adxl345_handle_t * | handle, |
| adxl345_spi_wire_t * | wire ) |
get the chip spi wire
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *wire | pointer to a spi wire buffer |
Definition at line 2119 of file driver_adxl345.c.
| uint8_t adxl345_get_tap_axis | ( | adxl345_handle_t * | handle, |
| adxl345_tap_axis_t | axis, | ||
| adxl345_bool_t * | enable ) |
get the tap axis status
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | axis | tap axis |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 1621 of file driver_adxl345.c.
| uint8_t adxl345_get_tap_status | ( | adxl345_handle_t * | handle, |
| uint8_t * | status ) |
get the tap status
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *status | pointer to a tap status buffer |
Definition at line 1732 of file driver_adxl345.c.
| uint8_t adxl345_get_tap_suppress | ( | adxl345_handle_t * | handle, |
| adxl345_bool_t * | enable ) |
get the tap suppress status
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 1695 of file driver_adxl345.c.
| uint8_t adxl345_get_tap_threshold | ( | adxl345_handle_t * | handle, |
| uint8_t * | threshold ) |
get the tap threshold
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *threshold | pointer to a tap threshold buffer |
Definition at line 291 of file driver_adxl345.c.
| uint8_t adxl345_get_trigger_pin | ( | adxl345_handle_t * | handle, |
| adxl345_interrupt_pin_t * | pin ) |
get the trigger pin
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *pin | pointer to a trigger pin buffer |
Definition at line 2563 of file driver_adxl345.c.
| uint8_t adxl345_get_trigger_status | ( | adxl345_handle_t * | handle, |
| adxl345_trigger_status_t * | status ) |
get the trigger status
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *status | pointer to a trigger status buffer |
Definition at line 2711 of file driver_adxl345.c.
| uint8_t adxl345_get_window | ( | adxl345_handle_t * | handle, |
| uint8_t * | t ) |
get the window
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | *t | pointer to a window time buffer |
Definition at line 759 of file driver_adxl345.c.
| uint8_t adxl345_inaction_threshold_convert_to_data | ( | adxl345_handle_t * | handle, |
| uint8_t | reg, | ||
| float * | g ) |
convert the register raw data to the inaction threshold
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | reg | register raw data |
| [out] | *g | pointer to an inaction threshold buffer |
Definition at line 1019 of file driver_adxl345.c.
| uint8_t adxl345_inaction_threshold_convert_to_register | ( | adxl345_handle_t * | handle, |
| float | g, | ||
| uint8_t * | reg ) |
convert the inaction threshold to the register raw data
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | g | inaction threshold |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 992 of file driver_adxl345.c.
| uint8_t adxl345_inaction_time_convert_to_data | ( | adxl345_handle_t * | handle, |
| uint8_t | reg, | ||
| uint8_t * | s ) |
convert the register raw data to the inaction time
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | reg | register raw data |
| [out] | *s | pointer to an inaction time buffer |
Definition at line 1123 of file driver_adxl345.c.
| uint8_t adxl345_inaction_time_convert_to_register | ( | adxl345_handle_t * | handle, |
| uint8_t | s, | ||
| uint8_t * | reg ) |
convert the inaction time to the register raw data
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | s | inaction time |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 1096 of file driver_adxl345.c.
| uint8_t adxl345_info | ( | adxl345_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to an adxl345 info structure |
Definition at line 3912 of file driver_adxl345.c.
| uint8_t adxl345_init | ( | adxl345_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to an adxl345 handle structure |
Definition at line 3156 of file driver_adxl345.c.
| uint8_t adxl345_irq_handler | ( | adxl345_handle_t * | handle | ) |
irq handler
| [in] | *handle | pointer to an adxl345 handle structure |
Definition at line 3770 of file driver_adxl345.c.
| uint8_t adxl345_latent_convert_to_data | ( | adxl345_handle_t * | handle, |
| uint8_t | reg, | ||
| float * | ms ) |
convert the register raw data to the latent
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | reg | register raw data |
| [out] | *ms | pointer to a latent buffer |
Definition at line 707 of file driver_adxl345.c.
| uint8_t adxl345_latent_convert_to_register | ( | adxl345_handle_t * | handle, |
| float | ms, | ||
| uint8_t * | reg ) |
convert the latent to the register raw data
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | ms | time |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 680 of file driver_adxl345.c.
| uint8_t adxl345_offset_convert_to_data | ( | adxl345_handle_t * | handle, |
| int8_t | reg, | ||
| float * | g ) |
convert the register raw data to the offset
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | reg | register raw data |
| [out] | *g | pointer to an offset buffer |
Definition at line 499 of file driver_adxl345.c.
| uint8_t adxl345_offset_convert_to_register | ( | adxl345_handle_t * | handle, |
| float | g, | ||
| int8_t * | reg ) |
convert the offset to the register raw data
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | g | offset |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 472 of file driver_adxl345.c.
| uint8_t adxl345_read | ( | adxl345_handle_t * | handle, |
| int16_t(*) | raw[3], | ||
| float(*) | g[3], | ||
| uint16_t * | len ) |
read the data
| [in] | *handle | pointer to an adxl345 handle structure |
| [out] | **raw | pointer to a raw data buffer |
| [out] | **g | pointer to a converted data buffer |
| [in,out] | *len | pointer to a length buffer |
Definition at line 3335 of file driver_adxl345.c.
| uint8_t adxl345_set_action_coupled | ( | adxl345_handle_t * | handle, |
| adxl345_coupled_t | coupled ) |
set the action coupled
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | coupled | action coupled |
Definition at line 1226 of file driver_adxl345.c.
| uint8_t adxl345_set_action_inaction | ( | adxl345_handle_t * | handle, |
| adxl345_action_inaction_t | type, | ||
| adxl345_bool_t | enable ) |
enable or disable the action or inaction
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | type | action or inaction type |
| [in] | enable | bool value |
Definition at line 1151 of file driver_adxl345.c.
| uint8_t adxl345_set_action_threshold | ( | adxl345_handle_t * | handle, |
| uint8_t | threshold ) |
set the action threshold
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | threshold | action threshold |
Definition at line 838 of file driver_adxl345.c.
| uint8_t adxl345_set_addr_pin | ( | adxl345_handle_t * | handle, |
| adxl345_address_t | addr_pin ) |
set the iic address pin
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | addr_pin | address pin |
Definition at line 222 of file driver_adxl345.c.
| uint8_t adxl345_set_auto_sleep | ( | adxl345_handle_t * | handle, |
| adxl345_bool_t | enable ) |
enable or disable the auto sleep
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | enable | bool value |
Definition at line 2822 of file driver_adxl345.c.
| uint8_t adxl345_set_duration | ( | adxl345_handle_t * | handle, |
| uint8_t | t ) |
set the duration
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | t | duration |
Definition at line 526 of file driver_adxl345.c.
| uint8_t adxl345_set_free_fall_threshold | ( | adxl345_handle_t * | handle, |
| uint8_t | threshold ) |
set the free fall threshold
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | threshold | free fall threshold |
Definition at line 1374 of file driver_adxl345.c.
| uint8_t adxl345_set_free_fall_time | ( | adxl345_handle_t * | handle, |
| uint8_t | t ) |
set the free fall time
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | t | free fall time |
Definition at line 1478 of file driver_adxl345.c.
| uint8_t adxl345_set_full_resolution | ( | adxl345_handle_t * | handle, |
| adxl345_bool_t | enable ) |
enable or disable the full resolution
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | enable | bool value |
Definition at line 2230 of file driver_adxl345.c.
| uint8_t adxl345_set_inaction_coupled | ( | adxl345_handle_t * | handle, |
| adxl345_coupled_t | coupled ) |
set the inaction coupled
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | coupled | inaction coupled |
Definition at line 1300 of file driver_adxl345.c.
| uint8_t adxl345_set_inaction_threshold | ( | adxl345_handle_t * | handle, |
| uint8_t | threshold ) |
set the inaction threshold
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | threshold | inaction threshold |
Definition at line 942 of file driver_adxl345.c.
| uint8_t adxl345_set_inaction_time | ( | adxl345_handle_t * | handle, |
| uint8_t | t ) |
set the inaction time
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | t | inaction time |
Definition at line 1046 of file driver_adxl345.c.
| uint8_t adxl345_set_interface | ( | adxl345_handle_t * | handle, |
| adxl345_interface_t | interface ) |
set the chip interface
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | interface | chip interface |
Definition at line 180 of file driver_adxl345.c.
| uint8_t adxl345_set_justify | ( | adxl345_handle_t * | handle, |
| adxl345_justify_t | enable ) |
enable or disable the justify
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | enable | bool value |
Definition at line 2304 of file driver_adxl345.c.
| uint8_t adxl345_set_latent | ( | adxl345_handle_t * | handle, |
| uint8_t | t ) |
set the latent
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | t | latent time |
Definition at line 630 of file driver_adxl345.c.
| uint8_t adxl345_set_link_activity_inactivity | ( | adxl345_handle_t * | handle, |
| adxl345_bool_t | enable ) |
enable or disable the activity and inactivity linking
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | enable | bool value |
Definition at line 2748 of file driver_adxl345.c.
| uint8_t adxl345_set_measure | ( | adxl345_handle_t * | handle, |
| adxl345_bool_t | enable ) |
enable or disable the measure
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | enable | bool value |
Definition at line 2896 of file driver_adxl345.c.
| uint8_t adxl345_set_mode | ( | adxl345_handle_t * | handle, |
| adxl345_mode_t | mode ) |
set the chip mode
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | mode | chip mode |
Definition at line 2452 of file driver_adxl345.c.
| uint8_t adxl345_set_offset | ( | adxl345_handle_t * | handle, |
| int8_t | x, | ||
| int8_t | y, | ||
| int8_t | z ) |
set the axis offset
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | x | x axis offset |
| [in] | y | y axis offset |
| [in] | z | z axis offset |
Definition at line 372 of file driver_adxl345.c.
| uint8_t adxl345_set_range | ( | adxl345_handle_t * | handle, |
| adxl345_range_t | range ) |
set the chip range
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | range | measurement range |
Definition at line 2378 of file driver_adxl345.c.
| uint8_t adxl345_set_rate | ( | adxl345_handle_t * | handle, |
| adxl345_rate_t | rate ) |
set the sampling rate
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | rate | sampling rate |
Definition at line 1757 of file driver_adxl345.c.
| uint8_t adxl345_set_self_test | ( | adxl345_handle_t * | handle, |
| adxl345_bool_t | enable ) |
enable or disable the self test
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | enable | bool value |
Definition at line 2008 of file driver_adxl345.c.
| uint8_t adxl345_set_sleep | ( | adxl345_handle_t * | handle, |
| adxl345_bool_t | enable ) |
enable or disable the sleep mode
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | enable | bool value |
Definition at line 2970 of file driver_adxl345.c.
| uint8_t adxl345_set_sleep_frequency | ( | adxl345_handle_t * | handle, |
| adxl345_sleep_frequency_t | sleep_frequency ) |
set the sleep frequency
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | sleep_frequency | sleep frequency |
Definition at line 3044 of file driver_adxl345.c.
| uint8_t adxl345_set_spi_wire | ( | adxl345_handle_t * | handle, |
| adxl345_spi_wire_t | wire ) |
set the chip spi wire
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | wire | spi wire |
Definition at line 2082 of file driver_adxl345.c.
| uint8_t adxl345_set_tap_axis | ( | adxl345_handle_t * | handle, |
| adxl345_tap_axis_t | axis, | ||
| adxl345_bool_t | enable ) |
enable or disable the tap axis
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | axis | tap axis |
| [in] | enable | bool value |
Definition at line 1583 of file driver_adxl345.c.
| uint8_t adxl345_set_tap_suppress | ( | adxl345_handle_t * | handle, |
| adxl345_bool_t | enable ) |
enable or disable the tap suppress
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | enable | bool value |
Definition at line 1658 of file driver_adxl345.c.
| uint8_t adxl345_set_tap_threshold | ( | adxl345_handle_t * | handle, |
| uint8_t | threshold ) |
set the tap threshold
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | threshold | tap threshold |
Definition at line 266 of file driver_adxl345.c.
| uint8_t adxl345_set_trigger_pin | ( | adxl345_handle_t * | handle, |
| adxl345_interrupt_pin_t | pin ) |
set the trigger pin
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | pin | trigger pin |
Definition at line 2526 of file driver_adxl345.c.
| uint8_t adxl345_set_window | ( | adxl345_handle_t * | handle, |
| uint8_t | t ) |
set the window
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | t | window time |
Definition at line 734 of file driver_adxl345.c.
| uint8_t adxl345_tap_threshold_convert_to_data | ( | adxl345_handle_t * | handle, |
| uint8_t | reg, | ||
| float * | g ) |
convert the register raw data to the tap threshold
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | reg | register raw data |
| [out] | *g | pointer to a tap threshold buffer |
Definition at line 343 of file driver_adxl345.c.
| uint8_t adxl345_tap_threshold_convert_to_register | ( | adxl345_handle_t * | handle, |
| float | g, | ||
| uint8_t * | reg ) |
convert the tap threshold to the register raw data
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | g | tap threshold |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 316 of file driver_adxl345.c.
| uint8_t adxl345_window_convert_to_data | ( | adxl345_handle_t * | handle, |
| uint8_t | reg, | ||
| float * | ms ) |
convert the register raw data to the window time
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | reg | register raw data |
| [out] | *ms | pointer to a window time buffer |
Definition at line 811 of file driver_adxl345.c.
| uint8_t adxl345_window_convert_to_register | ( | adxl345_handle_t * | handle, |
| float | ms, | ||
| uint8_t * | reg ) |
convert the window time to the register raw data
| [in] | *handle | pointer to an adxl345 handle structure |
| [in] | ms | window time |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 784 of file driver_adxl345.c.