![]() |
LibDriver MMA7660FC
|
mma7660fc base driver modules More...
Data Structures | |
| struct | mma7660fc_handle_s |
| mma7660fc handle structure definition More... | |
| struct | mma7660fc_info_s |
| mma7660fc information structure definition More... | |
Typedefs | |
| typedef struct mma7660fc_handle_s | mma7660fc_handle_t |
| mma7660fc handle structure definition | |
| typedef struct mma7660fc_info_s | mma7660fc_info_t |
| mma7660fc information structure definition | |
mma7660fc base driver modules
| typedef struct mma7660fc_handle_s mma7660fc_handle_t |
mma7660fc handle structure definition
| typedef struct mma7660fc_info_s mma7660fc_info_t |
mma7660fc information structure definition
mma7660fc auto sleep rate enumeration definition
AUTO_SLEEP_RATE SLEEP_COUNTER_PRESCALER_1 SLEEP_COUNTER_PRESCALER_16 minimum maximum minimum maximum AUTO_SLEEP_RATE_1 1s 256s 16s 4096s AUTO_SLEEP_RATE_2 0.5s 128s 8s 2048s AUTO_SLEEP_RATE_4 0.25s 64s 4s 1024s AUTO_SLEEP_RATE_8 0.125s 32s 2s 512s AUTO_SLEEP_RATE_16 0.0625s 16s 1s 256s AUTO_SLEEP_RATE_32 0.03125s 8s 0.5s 128s AUTO_SLEEP_RATE_64 0.01560s 4s 0.25s 64s AUTO_SLEEP_RATE_120 0.00836s 2s 0.133s 34.24s
Definition at line 137 of file driver_mma7660fc.h.
mma7660fc auto wake rate enumeration definition
WAKE_RATE TIME
AUTO_WAKE_RATE_32 31.25ms AUTO_WAKE_RATE_16 62.5ms AUTO_WAKE_RATE_8 125ms AUTO_WAKE_RATE_1 1000ms
| Enumerator | |
|---|---|
| MMA7660FC_AUTO_WAKE_RATE_32 | 32 samples/second |
| MMA7660FC_AUTO_WAKE_RATE_16 | 16 samples/second |
| MMA7660FC_AUTO_WAKE_RATE_8 | 8 samples/second |
| MMA7660FC_AUTO_WAKE_RATE_1 | 1 samples/second |
Definition at line 158 of file driver_mma7660fc.h.
| enum mma7660fc_bool_t |
mma7660fc bool enumeration definition
| Enumerator | |
|---|---|
| MMA7660FC_BOOL_FALSE | disable |
| MMA7660FC_BOOL_TRUE | enable |
Definition at line 62 of file driver_mma7660fc.h.
mma7660fc interrupt active level enumeration definition
| Enumerator | |
|---|---|
| MMA7660FC_INTERRUPT_ACTIVE_LEVEL_LOW | active low |
| MMA7660FC_INTERRUPT_ACTIVE_LEVEL_HIGH | active high |
Definition at line 117 of file driver_mma7660fc.h.
mma7660fc interrupt pin type enumeration definition
| Enumerator | |
|---|---|
| MMA7660FC_INTERRUPT_PIN_TYPE_OPEN_DRAIN | open drain |
| MMA7660FC_INTERRUPT_PIN_TYPE_PUSH_PULL | push-pull |
Definition at line 108 of file driver_mma7660fc.h.
| enum mma7660fc_mode_t |
mma7660fc mode enumeration definition
| Enumerator | |
|---|---|
| MMA7660FC_MODE_STANDBY | standby mode |
| MMA7660FC_MODE_TEST | test mode |
| MMA7660FC_MODE_ACTIVE | active mode |
Definition at line 89 of file driver_mma7660fc.h.
mma7660fc sleep counter prescaler enumeration definition
| Enumerator | |
|---|---|
| MMA7660FC_SLEEP_COUNTER_PRESCALER_1 | divide-by-1 |
| MMA7660FC_SLEEP_COUNTER_PRESCALER_16 | divide-by-16 |
Definition at line 99 of file driver_mma7660fc.h.
| enum mma7660fc_status_t |
mma7660fc status enumeration definition
Definition at line 71 of file driver_mma7660fc.h.
mma7660fc tilt debounce filter enumeration definition
Definition at line 169 of file driver_mma7660fc.h.
| uint8_t mma7660fc_deinit | ( | mma7660fc_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to a mma7660fc handle structure |
Definition at line 2354 of file driver_mma7660fc.c.
| uint8_t mma7660fc_get_auto_sleep | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_bool_t * | enable ) |
get auto sleep status
| [in] | *handle | pointer to a mma7660fc handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 1170 of file driver_mma7660fc.c.
| uint8_t mma7660fc_get_auto_sleep_interrupt | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_bool_t * | enable ) |
get auto sleep interrupt status
| [in] | *handle | pointer to a mma7660fc handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 596 of file driver_mma7660fc.c.
| uint8_t mma7660fc_get_auto_sleep_status | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_bool_t * | enable ) |
get auto sleep status
| [in] | *handle | pointer to a mma7660fc handle structure |
| [out] | *enable | pointer to a bool buffer |
Definition at line 159 of file driver_mma7660fc.c.
| uint8_t mma7660fc_get_auto_wake_rate | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_auto_wake_rate_t * | rate ) |
get auto wake rate
| [in] | *handle | pointer to a mma7660fc handle structure |
| [out] | *rate | pointer to an auto wake rate buffer |
Definition at line 1580 of file driver_mma7660fc.c.
| uint8_t mma7660fc_get_auto_wake_up | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_bool_t * | enable ) |
get auto wake up status
| [in] | *handle | pointer to a mma7660fc handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 1088 of file driver_mma7660fc.c.
| uint8_t mma7660fc_get_auto_wake_up_status | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_bool_t * | enable ) |
get auto wake up status
| [in] | *handle | pointer to a mma7660fc handle structure |
| [out] | *enable | pointer to a bool buffer |
Definition at line 196 of file driver_mma7660fc.c.
| uint8_t mma7660fc_get_front_back_interrupt | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_bool_t * | enable ) |
get front back interrupt status
| [in] | *handle | pointer to a mma7660fc handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 350 of file driver_mma7660fc.c.
| uint8_t mma7660fc_get_interrupt_active_level | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_interrupt_active_level_t * | level ) |
get interrupt active level
| [in] | *handle | pointer to a mma7660fc handle structure |
| [out] | *level | pointer to an interrupt active level buffer |
Definition at line 1416 of file driver_mma7660fc.c.
| uint8_t mma7660fc_get_interrupt_pin_type | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_interrupt_pin_type_t * | type ) |
get interrupt pin type
| [in] | *handle | pointer to a mma7660fc handle structure |
| [out] | *type | pointer to an interrupt pin type buffer |
Definition at line 1334 of file driver_mma7660fc.c.
| uint8_t mma7660fc_get_mode | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_mode_t * | mode ) |
get mode
| [in] | *handle | pointer to a mma7660fc handle structure |
| [out] | *mode | pointer to a chip mode buffer |
Definition at line 1006 of file driver_mma7660fc.c.
| uint8_t mma7660fc_get_shake_x_interrupt | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_bool_t * | enable ) |
get shake x interrupt status
| [in] | *handle | pointer to a mma7660fc handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 760 of file driver_mma7660fc.c.
| uint8_t mma7660fc_get_shake_y_interrupt | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_bool_t * | enable ) |
get shake y interrupt status
| [in] | *handle | pointer to a mma7660fc handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 842 of file driver_mma7660fc.c.
| uint8_t mma7660fc_get_shake_z_interrupt | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_bool_t * | enable ) |
get shake z interrupt status
| [in] | *handle | pointer to a mma7660fc handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 924 of file driver_mma7660fc.c.
| uint8_t mma7660fc_get_sleep_count | ( | mma7660fc_handle_t * | handle, |
| uint8_t * | count ) |
get sleep count
| [in] | *handle | pointer to a mma7660fc handle structure |
| [out] | *count | pointer to a count buffer |
Definition at line 270 of file driver_mma7660fc.c.
| uint8_t mma7660fc_get_sleep_counter_prescaler | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_sleep_counter_prescaler_t * | prescaler ) |
get sleep counter prescaler
| [in] | *handle | pointer to a mma7660fc handle structure |
| [out] | *prescaler | pointer to a sleep counter prescaler buffer |
Definition at line 1252 of file driver_mma7660fc.c.
| uint8_t mma7660fc_get_tap_detection_rate | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_auto_sleep_rate_t * | rate ) |
get tap detection rate
| [in] | *handle | pointer to a mma7660fc handle structure |
| [out] | *rate | pointer to a tap detection rate buffer |
Definition at line 1498 of file driver_mma7660fc.c.
| uint8_t mma7660fc_get_tap_detection_threshold | ( | mma7660fc_handle_t * | handle, |
| uint8_t * | threshold ) |
get tap detection threshold
| [in] | *handle | pointer to a mma7660fc handle structure |
| [out] | *threshold | pointer to a tap detection threshold buffer |
Definition at line 1751 of file driver_mma7660fc.c.
| uint8_t mma7660fc_get_tap_interrupt | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_bool_t * | enable ) |
get tap interrupt status
| [in] | *handle | pointer to a mma7660fc handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 514 of file driver_mma7660fc.c.
| uint8_t mma7660fc_get_tap_pulse_debounce_count | ( | mma7660fc_handle_t * | handle, |
| uint8_t * | count ) |
get tap pulse debounce count
| [in] | *handle | pointer to a mma7660fc handle structure |
| [out] | *count | pointer to a tap pulse debounce count buffer |
Definition at line 2071 of file driver_mma7660fc.c.
| uint8_t mma7660fc_get_tap_x_detection | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_bool_t * | enable ) |
get tap x detection status
| [in] | *handle | pointer to a mma7660fc handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 1833 of file driver_mma7660fc.c.
| uint8_t mma7660fc_get_tap_y_detection | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_bool_t * | enable ) |
get tap y detection status
| [in] | *handle | pointer to a mma7660fc handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 1915 of file driver_mma7660fc.c.
| uint8_t mma7660fc_get_tap_z_detection | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_bool_t * | enable ) |
get tap z detection status
| [in] | *handle | pointer to a mma7660fc handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 1997 of file driver_mma7660fc.c.
| uint8_t mma7660fc_get_tilt_debounce_filter | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_tilt_debounce_filter_t * | filter ) |
get tilt debounce filter
| [in] | *handle | pointer to a mma7660fc handle structure |
| [out] | *filter | pointer to a tilt debounce filter buffer |
Definition at line 1662 of file driver_mma7660fc.c.
| uint8_t mma7660fc_get_tilt_status | ( | mma7660fc_handle_t * | handle, |
| uint8_t * | status ) |
get tilt status
| [in] | *handle | pointer to a mma7660fc handle structure |
| [out] | *status | pointer to a status buffer |
Definition at line 124 of file driver_mma7660fc.c.
| uint8_t mma7660fc_get_up_down_right_left_interrupt | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_bool_t * | enable ) |
get up down right left interrupt status
| [in] | *handle | pointer to a mma7660fc handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 432 of file driver_mma7660fc.c.
| uint8_t mma7660fc_get_update_interrupt | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_bool_t * | enable ) |
get update interrupt status
| [in] | *handle | pointer to a mma7660fc handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 678 of file driver_mma7660fc.c.
| uint8_t mma7660fc_info | ( | mma7660fc_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to a mma7660fc info structure |
Definition at line 2546 of file driver_mma7660fc.c.
| uint8_t mma7660fc_init | ( | mma7660fc_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to a mma7660fc handle structure |
Definition at line 2285 of file driver_mma7660fc.c.
| uint8_t mma7660fc_irq_handler | ( | mma7660fc_handle_t * | handle | ) |
irq handler
| [in] | *handle | pointer to a mma7660fc handle structure |
Definition at line 2166 of file driver_mma7660fc.c.
| uint8_t mma7660fc_read | ( | mma7660fc_handle_t * | handle, |
| int8_t | raw[3], | ||
| float | g[3] ) |
read the data
| [in] | *handle | pointer to a mma7660fc handle structure |
| [out] | *raw | pointer to a raw pressure buffer |
| [out] | *g | pointer to a converted data buffer |
Definition at line 2407 of file driver_mma7660fc.c.
| uint8_t mma7660fc_set_auto_sleep | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_bool_t | enable ) |
enable or disable auto sleep
| [in] | *handle | pointer to a mma7660fc handle structure |
| [in] | enable | bool value |
Definition at line 1125 of file driver_mma7660fc.c.
| uint8_t mma7660fc_set_auto_sleep_interrupt | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_bool_t | enable ) |
enable or disable auto sleep interrupt
| [in] | *handle | pointer to a mma7660fc handle structure |
| [in] | enable | bool value |
Definition at line 551 of file driver_mma7660fc.c.
| uint8_t mma7660fc_set_auto_wake_rate | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_auto_wake_rate_t | rate ) |
set auto wake rate
| [in] | *handle | pointer to a mma7660fc handle structure |
| [in] | rate | auto wake rate |
Definition at line 1535 of file driver_mma7660fc.c.
| uint8_t mma7660fc_set_auto_wake_up | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_bool_t | enable ) |
enable or disable auto wake up
| [in] | *handle | pointer to a mma7660fc handle structure |
| [in] | enable | bool value |
Definition at line 1043 of file driver_mma7660fc.c.
| uint8_t mma7660fc_set_front_back_interrupt | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_bool_t | enable ) |
enable or disable front back interrupt
| [in] | *handle | pointer to a mma7660fc handle structure |
| [in] | enable | bool value |
Definition at line 305 of file driver_mma7660fc.c.
| uint8_t mma7660fc_set_interrupt_active_level | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_interrupt_active_level_t | level ) |
set interrupt active level
| [in] | *handle | pointer to a mma7660fc handle structure |
| [in] | level | interrupt active level |
Definition at line 1371 of file driver_mma7660fc.c.
| uint8_t mma7660fc_set_interrupt_pin_type | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_interrupt_pin_type_t | type ) |
set interrupt pin type
| [in] | *handle | pointer to a mma7660fc handle structure |
| [in] | type | interrupt pin type |
Definition at line 1289 of file driver_mma7660fc.c.
| uint8_t mma7660fc_set_mode | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_mode_t | mode ) |
set mode
| [in] | *handle | pointer to a mma7660fc handle structure |
| [in] | mode | chip mode |
Definition at line 961 of file driver_mma7660fc.c.
| uint8_t mma7660fc_set_shake_x_interrupt | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_bool_t | enable ) |
enable or disable shake x interrupt
| [in] | *handle | pointer to a mma7660fc handle structure |
| [in] | enable | bool value |
Definition at line 715 of file driver_mma7660fc.c.
| uint8_t mma7660fc_set_shake_y_interrupt | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_bool_t | enable ) |
enable or disable shake y interrupt
| [in] | *handle | pointer to a mma7660fc handle structure |
| [in] | enable | bool value |
Definition at line 797 of file driver_mma7660fc.c.
| uint8_t mma7660fc_set_shake_z_interrupt | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_bool_t | enable ) |
enable or disable shake z interrupt
| [in] | *handle | pointer to a mma7660fc handle structure |
| [in] | enable | bool value |
Definition at line 879 of file driver_mma7660fc.c.
| uint8_t mma7660fc_set_sleep_count | ( | mma7660fc_handle_t * | handle, |
| uint8_t | count ) |
set sleep count
| [in] | *handle | pointer to a mma7660fc handle structure |
| [in] | count | sleep count |
Definition at line 233 of file driver_mma7660fc.c.
| uint8_t mma7660fc_set_sleep_counter_prescaler | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_sleep_counter_prescaler_t | prescaler ) |
set sleep counter prescaler
| [in] | *handle | pointer to a mma7660fc handle structure |
| [in] | prescaler | sleep counter prescaler |
Definition at line 1207 of file driver_mma7660fc.c.
| uint8_t mma7660fc_set_tap_detection_rate | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_auto_sleep_rate_t | rate ) |
set tap detection rate
| [in] | *handle | pointer to a mma7660fc handle structure |
| [in] | rate | tap detection rate |
Definition at line 1453 of file driver_mma7660fc.c.
| uint8_t mma7660fc_set_tap_detection_threshold | ( | mma7660fc_handle_t * | handle, |
| uint8_t | threshold ) |
set tap detection threshold
| [in] | *handle | pointer to a mma7660fc handle structure |
| [in] | threshold | tap detection threshold |
Definition at line 1700 of file driver_mma7660fc.c.
| uint8_t mma7660fc_set_tap_interrupt | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_bool_t | enable ) |
enable or disable tap interrupt
| [in] | *handle | pointer to a mma7660fc handle structure |
| [in] | enable | bool value |
Definition at line 469 of file driver_mma7660fc.c.
| uint8_t mma7660fc_set_tap_pulse_debounce_count | ( | mma7660fc_handle_t * | handle, |
| uint8_t | count ) |
set tap pulse debounce count
| [in] | *handle | pointer to a mma7660fc handle structure |
| [in] | count | tap pulse debounce count |
Definition at line 2034 of file driver_mma7660fc.c.
| uint8_t mma7660fc_set_tap_x_detection | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_bool_t | enable ) |
enable or disable tap x detection
| [in] | *handle | pointer to a mma7660fc handle structure |
| [in] | enable | bool value |
Definition at line 1788 of file driver_mma7660fc.c.
| uint8_t mma7660fc_set_tap_y_detection | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_bool_t | enable ) |
enable or disable tap y detection
| [in] | *handle | pointer to a mma7660fc handle structure |
| [in] | enable | bool value |
Definition at line 1870 of file driver_mma7660fc.c.
| uint8_t mma7660fc_set_tap_z_detection | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_bool_t | enable ) |
enable or disable tap z detection
| [in] | *handle | pointer to a mma7660fc handle structure |
| [in] | enable | bool value |
Definition at line 1952 of file driver_mma7660fc.c.
| uint8_t mma7660fc_set_tilt_debounce_filter | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_tilt_debounce_filter_t | filter ) |
set tilt debounce filter
| [in] | *handle | pointer to a mma7660fc handle structure |
| [in] | filter | tilt debounce filter |
Definition at line 1617 of file driver_mma7660fc.c.
| uint8_t mma7660fc_set_up_down_right_left_interrupt | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_bool_t | enable ) |
enable or disable up down right left interrupt
| [in] | *handle | pointer to a mma7660fc handle structure |
| [in] | enable | bool value |
Definition at line 387 of file driver_mma7660fc.c.
| uint8_t mma7660fc_set_update_interrupt | ( | mma7660fc_handle_t * | handle, |
| mma7660fc_bool_t | enable ) |
enable or disable update interrupt status
| [in] | *handle | pointer to a mma7660fc handle structure |
| [in] | enable | bool value |
Definition at line 633 of file driver_mma7660fc.c.
| uint8_t mma7660fc_tap_pulse_debounce_convert_to_data | ( | mma7660fc_handle_t * | handle, |
| uint8_t | reg, | ||
| float * | ms ) |
convert the register raw data to tap pulse debounce
| [in] | *handle | pointer to a mma7660fc handle structure |
| [in] | reg | register raw data |
| [out] | *ms | pointer to a time buffer |
Definition at line 2133 of file driver_mma7660fc.c.
| uint8_t mma7660fc_tap_pulse_debounce_convert_to_register | ( | mma7660fc_handle_t * | handle, |
| float | ms, | ||
| uint8_t * | reg ) |
convert tap pulse debounce to the register raw data
| [in] | *handle | pointer to a mma7660fc handle structure |
| [in] | ms | time in ms |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 2106 of file driver_mma7660fc.c.