driver mma7660fc motion header file
uint8_t mma7660fc_set_auto_wake_up(mma7660fc_handle_t *handle, mma7660fc_bool_t enable)
enable or disable auto wake up
uint8_t mma7660fc_init(mma7660fc_handle_t *handle)
initialize the chip
uint8_t mma7660fc_set_shake_x_interrupt(mma7660fc_handle_t *handle, mma7660fc_bool_t enable)
enable or disable shake x interrupt
uint8_t mma7660fc_set_sleep_counter_prescaler(mma7660fc_handle_t *handle, mma7660fc_sleep_counter_prescaler_t prescaler)
set sleep counter prescaler
uint8_t mma7660fc_set_interrupt_pin_type(mma7660fc_handle_t *handle, mma7660fc_interrupt_pin_type_t type)
set interrupt pin type
uint8_t mma7660fc_read(mma7660fc_handle_t *handle, int8_t raw[3], float g[3])
read the data
uint8_t mma7660fc_set_tap_detection_threshold(mma7660fc_handle_t *handle, uint8_t threshold)
set tap detection threshold
uint8_t mma7660fc_deinit(mma7660fc_handle_t *handle)
close the chip
uint8_t mma7660fc_set_shake_z_interrupt(mma7660fc_handle_t *handle, mma7660fc_bool_t enable)
enable or disable shake z interrupt
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
uint8_t mma7660fc_set_tilt_debounce_filter(mma7660fc_handle_t *handle, mma7660fc_tilt_debounce_filter_t filter)
set tilt debounce filter
uint8_t mma7660fc_set_auto_wake_rate(mma7660fc_handle_t *handle, mma7660fc_auto_wake_rate_t rate)
set auto wake rate
uint8_t mma7660fc_set_mode(mma7660fc_handle_t *handle, mma7660fc_mode_t mode)
set mode
uint8_t mma7660fc_set_auto_sleep_interrupt(mma7660fc_handle_t *handle, mma7660fc_bool_t enable)
enable or disable auto sleep interrupt
struct mma7660fc_handle_s mma7660fc_handle_t
mma7660fc handle structure definition
uint8_t mma7660fc_set_update_interrupt(mma7660fc_handle_t *handle, mma7660fc_bool_t enable)
enable or disable update interrupt status
uint8_t mma7660fc_set_front_back_interrupt(mma7660fc_handle_t *handle, mma7660fc_bool_t enable)
enable or disable front back interrupt
uint8_t mma7660fc_set_tap_interrupt(mma7660fc_handle_t *handle, mma7660fc_bool_t enable)
enable or disable tap interrupt
uint8_t mma7660fc_set_tap_x_detection(mma7660fc_handle_t *handle, mma7660fc_bool_t enable)
enable or disable tap x detection
uint8_t mma7660fc_set_tap_y_detection(mma7660fc_handle_t *handle, mma7660fc_bool_t enable)
enable or disable tap y detection
uint8_t mma7660fc_set_auto_sleep(mma7660fc_handle_t *handle, mma7660fc_bool_t enable)
enable or disable auto sleep
uint8_t mma7660fc_set_interrupt_active_level(mma7660fc_handle_t *handle, mma7660fc_interrupt_active_level_t level)
set interrupt active level
uint8_t mma7660fc_set_tap_pulse_debounce_count(mma7660fc_handle_t *handle, uint8_t count)
set tap pulse debounce count
uint8_t mma7660fc_irq_handler(mma7660fc_handle_t *handle)
irq handler
uint8_t mma7660fc_set_tap_detection_rate(mma7660fc_handle_t *handle, mma7660fc_auto_sleep_rate_t rate)
set tap detection rate
uint8_t mma7660fc_set_shake_y_interrupt(mma7660fc_handle_t *handle, mma7660fc_bool_t enable)
enable or disable shake y interrupt
uint8_t mma7660fc_set_sleep_count(mma7660fc_handle_t *handle, uint8_t count)
set sleep count
uint8_t mma7660fc_set_tap_z_detection(mma7660fc_handle_t *handle, mma7660fc_bool_t enable)
enable or disable tap z detection
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
#define MMA7660FC_MOTION_DEFAULT_UPDATE_INTERRUPT
uint8_t mma7660fc_motion_read(float g[3])
motion example read
uint8_t mma7660fc_motion_deinit(void)
motion example deinit
#define MMA7660FC_MOTION_DEFAULT_AUTO_SLEEP
#define MMA7660FC_MOTION_DEFAULT_INTERRUPT_PIN_TYPE
#define MMA7660FC_MOTION_DEFAULT_SLEEP_COUNTER_PRESCALER
#define MMA7660FC_MOTION_DEFAULT_TAP_INTERRUPT
#define MMA7660FC_MOTION_DEFAULT_FRONT_BACK_INTERRUPT
mma7660fc motion example default definition
uint8_t mma7660fc_motion_irq_handler(void)
motion irq
#define MMA7660FC_MOTION_DEFAULT_AUTO_WAKE_UP
#define MMA7660FC_MOTION_DEFAULT_SLEEP_COUNT
#define MMA7660FC_MOTION_DEFAULT_TAP_Y
#define MMA7660FC_MOTION_DEFAULT_SHAKE_X
#define MMA7660FC_MOTION_DEFAULT_SHAKE_Y
#define MMA7660FC_MOTION_DEFAULT_TAP_DETECTION_THRESHOLD
#define MMA7660FC_MOTION_DEFAULT_TAP_PULSE_DEBOUNCE
#define MMA7660FC_MOTION_DEFAULT_TAP_Z
#define MMA7660FC_MOTION_DEFAULT_TAP_X
#define MMA7660FC_MOTION_DEFAULT_AUTO_WAKE_RATE
#define MMA7660FC_MOTION_DEFAULT_AUTO_SLEEP_INTERRUPT
#define MMA7660FC_MOTION_DEFAULT_INTERRUPT_ACTIVE_LEVEL
#define MMA7660FC_MOTION_DEFAULT_AUTO_SLEEP_RATE
#define MMA7660FC_MOTION_DEFAULT_TILT_DEBOUNCE_FILTER
uint8_t mma7660fc_motion_init(void(*callback)(uint8_t type))
motion example init
#define MMA7660FC_MOTION_DEFAULT_UP_DOWN_RIGHT_LEFT_INTERRUPT
#define MMA7660FC_MOTION_DEFAULT_SHAKE_Z
uint8_t mma7660fc_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
void mma7660fc_interface_delay_ms(uint32_t ms)
interface delay ms
uint8_t mma7660fc_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
uint8_t mma7660fc_interface_iic_init(void)
interface iic bus init
void mma7660fc_interface_debug_print(const char *const fmt,...)
interface print format data
uint8_t mma7660fc_interface_iic_deinit(void)
interface iic bus deinit
#define DRIVER_MMA7660FC_LINK_RECEIVE_CALLBACK(HANDLE, FUC)
link receive_callback function
#define DRIVER_MMA7660FC_LINK_IIC_READ(HANDLE, FUC)
link iic_read function
#define DRIVER_MMA7660FC_LINK_DEBUG_PRINT(HANDLE, FUC)
link debug_print function
#define DRIVER_MMA7660FC_LINK_IIC_INIT(HANDLE, FUC)
link iic_init function
#define DRIVER_MMA7660FC_LINK_INIT(HANDLE, STRUCTURE)
initialize mma7660fc_handle_t structure
#define DRIVER_MMA7660FC_LINK_DELAY_MS(HANDLE, FUC)
link delay_ms function
#define DRIVER_MMA7660FC_LINK_IIC_WRITE(HANDLE, FUC)
link iic_write function
#define DRIVER_MMA7660FC_LINK_IIC_DEINIT(HANDLE, FUC)
link iic_deinit function