LibDriver MMA7660FC
Loading...
Searching...
No Matches
mma7660fc example driver function

mma7660fc example driver modules More...

Collaboration diagram for mma7660fc example driver function:

Macros

#define MMA7660FC_MOTION_DEFAULT_FRONT_BACK_INTERRUPT   MMA7660FC_BOOL_TRUE
 mma7660fc motion example default definition
#define MMA7660FC_MOTION_DEFAULT_UP_DOWN_RIGHT_LEFT_INTERRUPT   MMA7660FC_BOOL_TRUE
#define MMA7660FC_MOTION_DEFAULT_TAP_INTERRUPT   MMA7660FC_BOOL_TRUE
#define MMA7660FC_MOTION_DEFAULT_AUTO_SLEEP_INTERRUPT   MMA7660FC_BOOL_TRUE
#define MMA7660FC_MOTION_DEFAULT_UPDATE_INTERRUPT   MMA7660FC_BOOL_FALSE
#define MMA7660FC_MOTION_DEFAULT_SHAKE_X   MMA7660FC_BOOL_TRUE
#define MMA7660FC_MOTION_DEFAULT_SHAKE_Y   MMA7660FC_BOOL_TRUE
#define MMA7660FC_MOTION_DEFAULT_SHAKE_Z   MMA7660FC_BOOL_TRUE
#define MMA7660FC_MOTION_DEFAULT_SLEEP_COUNTER_PRESCALER   MMA7660FC_SLEEP_COUNTER_PRESCALER_1
#define MMA7660FC_MOTION_DEFAULT_AUTO_SLEEP_RATE   MMA7660FC_AUTO_SLEEP_RATE_120
#define MMA7660FC_MOTION_DEFAULT_AUTO_WAKE_RATE   MMA7660FC_AUTO_WAKE_RATE_32
#define MMA7660FC_MOTION_DEFAULT_SLEEP_COUNT   127
#define MMA7660FC_MOTION_DEFAULT_AUTO_WAKE_UP   MMA7660FC_BOOL_TRUE
#define MMA7660FC_MOTION_DEFAULT_AUTO_SLEEP   MMA7660FC_BOOL_TRUE
#define MMA7660FC_MOTION_DEFAULT_INTERRUPT_PIN_TYPE   MMA7660FC_INTERRUPT_PIN_TYPE_PUSH_PULL
#define MMA7660FC_MOTION_DEFAULT_INTERRUPT_ACTIVE_LEVEL   MMA7660FC_INTERRUPT_ACTIVE_LEVEL_LOW
#define MMA7660FC_MOTION_DEFAULT_TILT_DEBOUNCE_FILTER   MMA7660FC_TILT_DEBOUNCE_FILTER_8
#define MMA7660FC_MOTION_DEFAULT_TAP_DETECTION_THRESHOLD   2
#define MMA7660FC_MOTION_DEFAULT_TAP_X   MMA7660FC_BOOL_TRUE
#define MMA7660FC_MOTION_DEFAULT_TAP_Y   MMA7660FC_BOOL_TRUE
#define MMA7660FC_MOTION_DEFAULT_TAP_Z   MMA7660FC_BOOL_TRUE
#define MMA7660FC_MOTION_DEFAULT_TAP_PULSE_DEBOUNCE   10.0f

Functions

uint8_t mma7660fc_basic_init (void)
 basic example init
uint8_t mma7660fc_basic_deinit (void)
 basic example deinit
uint8_t mma7660fc_basic_read (float g[3])
 basic example read
uint8_t mma7660fc_motion_irq_handler (void)
 motion irq
uint8_t mma7660fc_motion_init (void(*callback)(uint8_t type))
 motion example init
uint8_t mma7660fc_motion_deinit (void)
 motion example deinit
uint8_t mma7660fc_motion_read (float g[3])
 motion example read

Detailed Description

mma7660fc example driver modules

Macro Definition Documentation

◆ MMA7660FC_MOTION_DEFAULT_AUTO_SLEEP

#define MMA7660FC_MOTION_DEFAULT_AUTO_SLEEP   MMA7660FC_BOOL_TRUE

enable auto sleep

Definition at line 67 of file driver_mma7660fc_motion.h.

◆ MMA7660FC_MOTION_DEFAULT_AUTO_SLEEP_INTERRUPT

#define MMA7660FC_MOTION_DEFAULT_AUTO_SLEEP_INTERRUPT   MMA7660FC_BOOL_TRUE

enable auto sleep interrupt

Definition at line 57 of file driver_mma7660fc_motion.h.

◆ MMA7660FC_MOTION_DEFAULT_AUTO_SLEEP_RATE

#define MMA7660FC_MOTION_DEFAULT_AUTO_SLEEP_RATE   MMA7660FC_AUTO_SLEEP_RATE_120

tap detection rate 120

Definition at line 63 of file driver_mma7660fc_motion.h.

◆ MMA7660FC_MOTION_DEFAULT_AUTO_WAKE_RATE

#define MMA7660FC_MOTION_DEFAULT_AUTO_WAKE_RATE   MMA7660FC_AUTO_WAKE_RATE_32

auto wake rate 32

Definition at line 64 of file driver_mma7660fc_motion.h.

◆ MMA7660FC_MOTION_DEFAULT_AUTO_WAKE_UP

#define MMA7660FC_MOTION_DEFAULT_AUTO_WAKE_UP   MMA7660FC_BOOL_TRUE

enable auto wake up

Definition at line 66 of file driver_mma7660fc_motion.h.

◆ MMA7660FC_MOTION_DEFAULT_FRONT_BACK_INTERRUPT

#define MMA7660FC_MOTION_DEFAULT_FRONT_BACK_INTERRUPT   MMA7660FC_BOOL_TRUE

mma7660fc motion example default definition

enable front back interrupt

Definition at line 54 of file driver_mma7660fc_motion.h.

◆ MMA7660FC_MOTION_DEFAULT_INTERRUPT_ACTIVE_LEVEL

#define MMA7660FC_MOTION_DEFAULT_INTERRUPT_ACTIVE_LEVEL   MMA7660FC_INTERRUPT_ACTIVE_LEVEL_LOW

low

Definition at line 69 of file driver_mma7660fc_motion.h.

◆ MMA7660FC_MOTION_DEFAULT_INTERRUPT_PIN_TYPE

#define MMA7660FC_MOTION_DEFAULT_INTERRUPT_PIN_TYPE   MMA7660FC_INTERRUPT_PIN_TYPE_PUSH_PULL

push-pull

Definition at line 68 of file driver_mma7660fc_motion.h.

◆ MMA7660FC_MOTION_DEFAULT_SHAKE_X

#define MMA7660FC_MOTION_DEFAULT_SHAKE_X   MMA7660FC_BOOL_TRUE

enable shake x interrupt

Definition at line 59 of file driver_mma7660fc_motion.h.

◆ MMA7660FC_MOTION_DEFAULT_SHAKE_Y

#define MMA7660FC_MOTION_DEFAULT_SHAKE_Y   MMA7660FC_BOOL_TRUE

enable shake y interrupt

Definition at line 60 of file driver_mma7660fc_motion.h.

◆ MMA7660FC_MOTION_DEFAULT_SHAKE_Z

#define MMA7660FC_MOTION_DEFAULT_SHAKE_Z   MMA7660FC_BOOL_TRUE

enable shake z interrupt

Definition at line 61 of file driver_mma7660fc_motion.h.

◆ MMA7660FC_MOTION_DEFAULT_SLEEP_COUNT

#define MMA7660FC_MOTION_DEFAULT_SLEEP_COUNT   127

sleep count 127

Definition at line 65 of file driver_mma7660fc_motion.h.

◆ MMA7660FC_MOTION_DEFAULT_SLEEP_COUNTER_PRESCALER

#define MMA7660FC_MOTION_DEFAULT_SLEEP_COUNTER_PRESCALER   MMA7660FC_SLEEP_COUNTER_PRESCALER_1

sleep counter prescaler 1

Definition at line 62 of file driver_mma7660fc_motion.h.

◆ MMA7660FC_MOTION_DEFAULT_TAP_DETECTION_THRESHOLD

#define MMA7660FC_MOTION_DEFAULT_TAP_DETECTION_THRESHOLD   2

threshold 2

Definition at line 71 of file driver_mma7660fc_motion.h.

◆ MMA7660FC_MOTION_DEFAULT_TAP_INTERRUPT

#define MMA7660FC_MOTION_DEFAULT_TAP_INTERRUPT   MMA7660FC_BOOL_TRUE

enable tap interrupt

Definition at line 56 of file driver_mma7660fc_motion.h.

◆ MMA7660FC_MOTION_DEFAULT_TAP_PULSE_DEBOUNCE

#define MMA7660FC_MOTION_DEFAULT_TAP_PULSE_DEBOUNCE   10.0f

10ms

Definition at line 75 of file driver_mma7660fc_motion.h.

◆ MMA7660FC_MOTION_DEFAULT_TAP_X

#define MMA7660FC_MOTION_DEFAULT_TAP_X   MMA7660FC_BOOL_TRUE

enable tap x

Definition at line 72 of file driver_mma7660fc_motion.h.

◆ MMA7660FC_MOTION_DEFAULT_TAP_Y

#define MMA7660FC_MOTION_DEFAULT_TAP_Y   MMA7660FC_BOOL_TRUE

enable tap y

Definition at line 73 of file driver_mma7660fc_motion.h.

◆ MMA7660FC_MOTION_DEFAULT_TAP_Z

#define MMA7660FC_MOTION_DEFAULT_TAP_Z   MMA7660FC_BOOL_TRUE

enable tap z

Definition at line 74 of file driver_mma7660fc_motion.h.

◆ MMA7660FC_MOTION_DEFAULT_TILT_DEBOUNCE_FILTER

#define MMA7660FC_MOTION_DEFAULT_TILT_DEBOUNCE_FILTER   MMA7660FC_TILT_DEBOUNCE_FILTER_8

filter 8

Definition at line 70 of file driver_mma7660fc_motion.h.

◆ MMA7660FC_MOTION_DEFAULT_UP_DOWN_RIGHT_LEFT_INTERRUPT

#define MMA7660FC_MOTION_DEFAULT_UP_DOWN_RIGHT_LEFT_INTERRUPT   MMA7660FC_BOOL_TRUE

enable up down right left interrupt

Definition at line 55 of file driver_mma7660fc_motion.h.

◆ MMA7660FC_MOTION_DEFAULT_UPDATE_INTERRUPT

#define MMA7660FC_MOTION_DEFAULT_UPDATE_INTERRUPT   MMA7660FC_BOOL_FALSE

disable update interrupt

Definition at line 58 of file driver_mma7660fc_motion.h.

Function Documentation

◆ mma7660fc_basic_deinit()

uint8_t mma7660fc_basic_deinit ( void )

basic example deinit

Returns
status code
  • 0 success
  • 1 deinit failed
Note
none

Definition at line 333 of file driver_mma7660fc_basic.c.

Here is the call graph for this function:

◆ mma7660fc_basic_init()

uint8_t mma7660fc_basic_init ( void )

basic example init

Returns
status code
  • 0 success
  • 1 init failed
Note
none

Definition at line 48 of file driver_mma7660fc_basic.c.

Here is the call graph for this function:

◆ mma7660fc_basic_read()

uint8_t mma7660fc_basic_read ( float g[3])

basic example read

Parameters
[out]*gpointer to a converted data buffer
Returns
status code
  • 0 success
  • 1 read failed
Note
none

Definition at line 312 of file driver_mma7660fc_basic.c.

Here is the call graph for this function:

◆ mma7660fc_motion_deinit()

uint8_t mma7660fc_motion_deinit ( void )

motion example deinit

Returns
status code
  • 0 success
  • 1 deinit failed
Note
none

Definition at line 362 of file driver_mma7660fc_motion.c.

Here is the call graph for this function:

◆ mma7660fc_motion_init()

uint8_t mma7660fc_motion_init ( void(* callback )(uint8_t type))

motion example init

Parameters
[in]*callbackpointer to a callback address
Returns
status code
  • 0 success
  • 1 init failed
Note
none

Definition at line 66 of file driver_mma7660fc_motion.c.

Here is the call graph for this function:

◆ mma7660fc_motion_irq_handler()

uint8_t mma7660fc_motion_irq_handler ( void )

motion irq

Returns
status code
  • 0 success
  • 1 run failed
Note
none

Definition at line 48 of file driver_mma7660fc_motion.c.

Here is the call graph for this function:

◆ mma7660fc_motion_read()

uint8_t mma7660fc_motion_read ( float g[3])

motion example read

Parameters
[out]*gpointer to a converted data buffer
Returns
status code
  • 0 success
  • 1 read failed
Note
none

Definition at line 341 of file driver_mma7660fc_motion.c.

Here is the call graph for this function: