LibDriver BMM150
Loading...
Searching...
No Matches
bmm150 example driver function

bmm150 example driver modules More...

Collaboration diagram for bmm150 example driver function:

Macros

#define BMM150_BASIC_DEFAULT_REPXY   47
 bmm150 basic example default definition
#define BMM150_BASIC_DEFAULT_REPZ   83
#define BMM150_BASIC_DEFAULT_DATA_RATE   BMM150_DATA_RATE_10HZ
#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_DATA_OVERRUN   BMM150_BOOL_FALSE
 bmm150 interrupt example default definition
#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_OVERFLOW   BMM150_BOOL_FALSE
#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_HIGH_THRESHOLD_Z   BMM150_BOOL_TRUE
#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_HIGH_THRESHOLD_Y   BMM150_BOOL_TRUE
#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_HIGH_THRESHOLD_X   BMM150_BOOL_TRUE
#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_LOW_THRESHOLD_Z   BMM150_BOOL_TRUE
#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_LOW_THRESHOLD_Y   BMM150_BOOL_TRUE
#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_LOW_THRESHOLD_X   BMM150_BOOL_TRUE
#define BMM150_INTERRUPT_DEFAULT_DATA_READY_PIN   BMM150_BOOL_TRUE
#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_PIN   BMM150_BOOL_TRUE
#define BMM150_INTERRUPT_DEFAULT_DATA_READY_PIN_POLARITY   BMM150_DATA_READY_PIN_POLARITY_LOW
#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_LATCH   BMM150_BOOL_TRUE
#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_PIN_POLARITY   BMM150_INTERRUPT_PIN_POLARITY_LOW
#define BMM150_INTERRUPT_DEFAULT_REPXY   47
#define BMM150_INTERRUPT_DEFAULT_REPZ   83
#define BMM150_INTERRUPT_DEFAULT_DATA_RATE   BMM150_DATA_RATE_2HZ
#define BMM150_SHOT_DEFAULT_REPXY   47
 bmm150 shot example default definition
#define BMM150_SHOT_DEFAULT_REPZ   83
#define BMM150_SHOT_DEFAULT_DATA_RATE   BMM150_DATA_RATE_10HZ

Functions

uint8_t bmm150_basic_init (bmm150_interface_t interface, bmm150_address_t addr_pin)
 basic example init
uint8_t bmm150_basic_deinit (void)
 basic example deinit
uint8_t bmm150_basic_read (float ut[3])
 basic example read
uint8_t bmm150_interrupt_irq_handler (void)
 interrupt irq
uint8_t bmm150_interrupt_init (bmm150_interface_t interface, bmm150_address_t addr_pin, float low_threshold_ut, float high_threshold_ut, void(*callback)(uint8_t type))
 interrupt example init
uint8_t bmm150_interrupt_deinit (void)
 interrupt example deinit
uint8_t bmm150_interrupt_read (float ut[3])
 interrupt example read
uint8_t bmm150_shot_init (bmm150_interface_t interface, bmm150_address_t addr_pin)
 shot example init
uint8_t bmm150_shot_deinit (void)
 shot example deinit
uint8_t bmm150_shot_read (float ut[3])
 shot example read

Detailed Description

bmm150 example driver modules

Macro Definition Documentation

◆ BMM150_BASIC_DEFAULT_DATA_RATE

#define BMM150_BASIC_DEFAULT_DATA_RATE   BMM150_DATA_RATE_10HZ

10Hz

Definition at line 58 of file driver_bmm150_basic.h.

◆ BMM150_BASIC_DEFAULT_REPXY

#define BMM150_BASIC_DEFAULT_REPXY   47

bmm150 basic example default definition

47

Definition at line 56 of file driver_bmm150_basic.h.

◆ BMM150_BASIC_DEFAULT_REPZ

#define BMM150_BASIC_DEFAULT_REPZ   83

83

Definition at line 57 of file driver_bmm150_basic.h.

◆ BMM150_INTERRUPT_DEFAULT_DATA_RATE

#define BMM150_INTERRUPT_DEFAULT_DATA_RATE   BMM150_DATA_RATE_2HZ

2Hz

Definition at line 69 of file driver_bmm150_interrupt.h.

◆ BMM150_INTERRUPT_DEFAULT_DATA_READY_PIN

#define BMM150_INTERRUPT_DEFAULT_DATA_READY_PIN   BMM150_BOOL_TRUE

enable data ready pin

Definition at line 62 of file driver_bmm150_interrupt.h.

◆ BMM150_INTERRUPT_DEFAULT_DATA_READY_PIN_POLARITY

#define BMM150_INTERRUPT_DEFAULT_DATA_READY_PIN_POLARITY   BMM150_DATA_READY_PIN_POLARITY_LOW

polarity low

Definition at line 64 of file driver_bmm150_interrupt.h.

◆ BMM150_INTERRUPT_DEFAULT_INTERRUPT_DATA_OVERRUN

#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_DATA_OVERRUN   BMM150_BOOL_FALSE

bmm150 interrupt example default definition

disable data overrun

Definition at line 54 of file driver_bmm150_interrupt.h.

◆ BMM150_INTERRUPT_DEFAULT_INTERRUPT_HIGH_THRESHOLD_X

#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_HIGH_THRESHOLD_X   BMM150_BOOL_TRUE

enable high threshold x

Definition at line 58 of file driver_bmm150_interrupt.h.

◆ BMM150_INTERRUPT_DEFAULT_INTERRUPT_HIGH_THRESHOLD_Y

#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_HIGH_THRESHOLD_Y   BMM150_BOOL_TRUE

enable high threshold y

Definition at line 57 of file driver_bmm150_interrupt.h.

◆ BMM150_INTERRUPT_DEFAULT_INTERRUPT_HIGH_THRESHOLD_Z

#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_HIGH_THRESHOLD_Z   BMM150_BOOL_TRUE

enable high threshold z

Definition at line 56 of file driver_bmm150_interrupt.h.

◆ BMM150_INTERRUPT_DEFAULT_INTERRUPT_LATCH

#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_LATCH   BMM150_BOOL_TRUE

enable latch

Definition at line 65 of file driver_bmm150_interrupt.h.

◆ BMM150_INTERRUPT_DEFAULT_INTERRUPT_LOW_THRESHOLD_X

#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_LOW_THRESHOLD_X   BMM150_BOOL_TRUE

enable low threshold x

Definition at line 61 of file driver_bmm150_interrupt.h.

◆ BMM150_INTERRUPT_DEFAULT_INTERRUPT_LOW_THRESHOLD_Y

#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_LOW_THRESHOLD_Y   BMM150_BOOL_TRUE

enable low threshold y

Definition at line 60 of file driver_bmm150_interrupt.h.

◆ BMM150_INTERRUPT_DEFAULT_INTERRUPT_LOW_THRESHOLD_Z

#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_LOW_THRESHOLD_Z   BMM150_BOOL_TRUE

enable low threshold z

Definition at line 59 of file driver_bmm150_interrupt.h.

◆ BMM150_INTERRUPT_DEFAULT_INTERRUPT_OVERFLOW

#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_OVERFLOW   BMM150_BOOL_FALSE

disable overflow

Definition at line 55 of file driver_bmm150_interrupt.h.

◆ BMM150_INTERRUPT_DEFAULT_INTERRUPT_PIN

#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_PIN   BMM150_BOOL_TRUE

enable interrupt pin

Definition at line 63 of file driver_bmm150_interrupt.h.

◆ BMM150_INTERRUPT_DEFAULT_INTERRUPT_PIN_POLARITY

#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_PIN_POLARITY   BMM150_INTERRUPT_PIN_POLARITY_LOW

polarity low

Definition at line 66 of file driver_bmm150_interrupt.h.

◆ BMM150_INTERRUPT_DEFAULT_REPXY

#define BMM150_INTERRUPT_DEFAULT_REPXY   47

47

Definition at line 67 of file driver_bmm150_interrupt.h.

◆ BMM150_INTERRUPT_DEFAULT_REPZ

#define BMM150_INTERRUPT_DEFAULT_REPZ   83

83

Definition at line 68 of file driver_bmm150_interrupt.h.

◆ BMM150_SHOT_DEFAULT_DATA_RATE

#define BMM150_SHOT_DEFAULT_DATA_RATE   BMM150_DATA_RATE_10HZ

10Hz

Definition at line 56 of file driver_bmm150_shot.h.

◆ BMM150_SHOT_DEFAULT_REPXY

#define BMM150_SHOT_DEFAULT_REPXY   47

bmm150 shot example default definition

47

Definition at line 54 of file driver_bmm150_shot.h.

◆ BMM150_SHOT_DEFAULT_REPZ

#define BMM150_SHOT_DEFAULT_REPZ   83

83

Definition at line 55 of file driver_bmm150_shot.h.

Function Documentation

◆ bmm150_basic_deinit()

uint8_t bmm150_basic_deinit ( void )

basic example deinit

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

Definition at line 326 of file driver_bmm150_basic.c.

Here is the call graph for this function:

◆ bmm150_basic_init()

uint8_t bmm150_basic_init ( bmm150_interface_t interface,
bmm150_address_t addr_pin )

basic example init

Parameters
[in]interfacechip interface
[in]addr_piniic device address
Returns
status code
  • 0 success
  • 1 init failed
Note
none

Definition at line 50 of file driver_bmm150_basic.c.

Here is the call graph for this function:

◆ bmm150_basic_read()

uint8_t bmm150_basic_read ( float ut[3])

basic example read

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

Definition at line 306 of file driver_bmm150_basic.c.

Here is the call graph for this function:

◆ bmm150_interrupt_deinit()

uint8_t bmm150_interrupt_deinit ( void )

interrupt example deinit

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

Definition at line 429 of file driver_bmm150_interrupt.c.

Here is the call graph for this function:

◆ bmm150_interrupt_init()

uint8_t bmm150_interrupt_init ( bmm150_interface_t interface,
bmm150_address_t addr_pin,
float low_threshold_ut,
float high_threshold_ut,
void(* callback )(uint8_t type) )

interrupt example init

Parameters
[in]interfacechip interface
[in]addr_piniic device address
[in]low_threshold_utlow threshold in ut
[in]high_threshold_uthigh threshold in ut
[in]*callbackpointer to an irq callback address
Returns
status code
  • 0 success
  • 1 init failed
Note
none

Definition at line 70 of file driver_bmm150_interrupt.c.

Here is the call graph for this function:

◆ bmm150_interrupt_irq_handler()

uint8_t bmm150_interrupt_irq_handler ( void )

interrupt irq

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

Definition at line 48 of file driver_bmm150_interrupt.c.

Here is the call graph for this function:

◆ bmm150_interrupt_read()

uint8_t bmm150_interrupt_read ( float ut[3])

interrupt example read

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

Definition at line 409 of file driver_bmm150_interrupt.c.

Here is the call graph for this function:

◆ bmm150_shot_deinit()

uint8_t bmm150_shot_deinit ( void )

shot example deinit

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

Definition at line 343 of file driver_bmm150_shot.c.

Here is the call graph for this function:

◆ bmm150_shot_init()

uint8_t bmm150_shot_init ( bmm150_interface_t interface,
bmm150_address_t addr_pin )

shot example init

Parameters
[in]interfacechip interface
[in]addr_piniic device address
Returns
status code
  • 0 success
  • 1 init failed
Note
none

Definition at line 50 of file driver_bmm150_shot.c.

Here is the call graph for this function:

◆ bmm150_shot_read()

uint8_t bmm150_shot_read ( float ut[3])

shot example read

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

Definition at line 323 of file driver_bmm150_shot.c.

Here is the call graph for this function: