LibDriver MAG3110
Loading...
Searching...
No Matches
mag3110 base driver function

mag3110 base driver modules More...

Collaboration diagram for mag3110 base driver function:

Data Structures

struct  mag3110_handle_s
 mag3110 handle structure definition More...
struct  mag3110_info_s
 mag3110 information structure definition More...

Typedefs

typedef struct mag3110_handle_s mag3110_handle_t
 mag3110 handle structure definition
typedef struct mag3110_info_s mag3110_info_t
 mag3110 information structure definition

Enumerations

enum  mag3110_bool_t { MAG3110_BOOL_FALSE = 0x00 , MAG3110_BOOL_TRUE = 0x01 }
 mag3110 bool enumeration definition More...
enum  mag3110_status_t {
  MAG3110_STATUS_ZYX_OVERWRITE = (1 << 7) , MAG3110_STATUS_Z_OVERWRITE = (1 << 6) , MAG3110_STATUS_Y_OVERWRITE = (1 << 5) , MAG3110_STATUS_X_OVERWRITE = (1 << 4) ,
  MAG3110_STATUS_ZYX_READY = (1 << 3) , MAG3110_STATUS_Z_READY = (1 << 2) , MAG3110_STATUS_Y_READY = (1 << 1) , MAG3110_STATUS_X_READY = (1 << 0)
}
 mag3110 status enumeration definition More...
enum  mag3110_mode_status_t { MAG3110_MODE_STATUS_STANDBY = 0x00 , MAG3110_MODE_STATUS_ACTIVE_RAW = 0x01 , MAG3110_MODE_STATUS_ACTIVE_NON_RAW = 0x02 }
 mag3110 mode status enumeration definition More...
enum  mag3110_mode_t { MAG3110_MODE_STANDBY = 0x00 , MAG3110_MODE_ACTIVE = 0x01 }
 mag3110 mode enumeration definition More...
enum  mag3110_rate_over_sample_t {
  MAG3110_RATE_80HZ_OVER_SAMPLE_16 = 0x00 , MAG3110_RATE_40HZ_OVER_SAMPLE_32 = 0x01 , MAG3110_RATE_20HZ_OVER_SAMPLE_64 = 0x02 , MAG3110_RATE_10HZ_OVER_SAMPLE_128 = 0x03 ,
  MAG3110_RATE_40HZ_OVER_SAMPLE_16 = 0x04 , MAG3110_RATE_20HZ_OVER_SAMPLE_32 = 0x05 , MAG3110_RATE_10HZ_OVER_SAMPLE_64 = 0x06 , MAG3110_RATE_5HZ_OVER_SAMPLE_128 = 0x07 ,
  MAG3110_RATE_20HZ_OVER_SAMPLE_16 = 0x08 , MAG3110_RATE_10HZ_OVER_SAMPLE_32 = 0x09 , MAG3110_RATE_5HZ_OVER_SAMPLE_64 = 0x0A , MAG3110_RATE_2P5HZ_OVER_SAMPLE_128 = 0x0B ,
  MAG3110_RATE_10HZ_OVER_SAMPLE_16 = 0x0C , MAG3110_RATE_5HZ_OVER_SAMPLE_32 = 0x0D , MAG3110_RATE_2P5HZ_OVER_SAMPLE_64 = 0x0E , MAG3110_RATE_1P25HZ_OVER_SAMPLE_128 = 0x0F ,
  MAG3110_RATE_5HZ_OVER_SAMPLE_16 = 0x10 , MAG3110_RATE_2P5HZ_OVER_SAMPLE_32 = 0x11 , MAG3110_RATE_1P25HZ_OVER_SAMPLE_64 = 0x12 , MAG3110_RATE_0P63HZ_OVER_SAMPLE_128 = 0x13 ,
  MAG3110_RATE_2P5HZ_OVER_SAMPLE_16 = 0x14 , MAG3110_RATE_1P25HZ_OVER_SAMPLE_32 = 0x15 , MAG3110_RATE_0P63HZ_OVER_SAMPLE_64 = 0x16 , MAG3110_RATE_0P31HZ_OVER_SAMPLE_128 = 0x17 ,
  MAG3110_RATE_1P25HZ_OVER_SAMPLE_16 = 0x18 , MAG3110_RATE_0P63HZ_OVER_SAMPLE_32 = 0x19 , MAG3110_RATE_0P31HZ_OVER_SAMPLE_64 = 0x1A , MAG3110_RATE_0P16HZ_OVER_SAMPLE_128 = 0x1B ,
  MAG3110_RATE_0P63HZ_OVER_SAMPLE_16 = 0x1C , MAG3110_RATE_0P31HZ_OVER_SAMPLE_32 = 0x1D , MAG3110_RATE_0P16HZ_OVER_SAMPLE_64 = 0x1E , MAG3110_RATE_0P08HZ_OVER_SAMPLE_128 = 0x1F
}
 mag3110 rate over sample enumeration definition More...

Functions

uint8_t mag3110_info (mag3110_info_t *info)
 get chip's information
uint8_t mag3110_init (mag3110_handle_t *handle)
 initialize the chip
uint8_t mag3110_deinit (mag3110_handle_t *handle)
 close the chip
uint8_t mag3110_read (mag3110_handle_t *handle, int16_t raw[3], float ut[3])
 read data
uint8_t mag3110_reset (mag3110_handle_t *handle)
 reset
uint8_t mag3110_read_die_temperature (mag3110_handle_t *handle, int8_t *raw, float *degree)
 read die temperature
uint8_t mag3110_get_data_ready_status (mag3110_handle_t *handle, uint8_t *status)
 get data ready status
uint8_t mag3110_get_mode_status (mag3110_handle_t *handle, mag3110_mode_status_t *mode)
 get mode status
uint8_t mag3110_set_offset_x (mag3110_handle_t *handle, uint16_t offset)
 set offset x
uint8_t mag3110_get_offset_x (mag3110_handle_t *handle, uint16_t *offset)
 get offset x
uint8_t mag3110_set_offset_y (mag3110_handle_t *handle, uint16_t offset)
 set offset y
uint8_t mag3110_get_offset_y (mag3110_handle_t *handle, uint16_t *offset)
 get offset y
uint8_t mag3110_set_offset_z (mag3110_handle_t *handle, uint16_t offset)
 set offset z
uint8_t mag3110_get_offset_z (mag3110_handle_t *handle, uint16_t *offset)
 get offset z
uint8_t mag3110_set_rate_over_sample (mag3110_handle_t *handle, mag3110_rate_over_sample_t rate_over_sample)
 set rate over sample
uint8_t mag3110_get_rate_over_sample (mag3110_handle_t *handle, mag3110_rate_over_sample_t *rate_over_sample)
 get rate over sample
uint8_t mag3110_set_fast_read_mode (mag3110_handle_t *handle, mag3110_bool_t enable)
 enable or disable fast read mode
uint8_t mag3110_get_fast_read_mode (mag3110_handle_t *handle, mag3110_bool_t *enable)
 get fast read mode status
uint8_t mag3110_set_trigger_mode (mag3110_handle_t *handle, mag3110_bool_t enable)
 enable or disable trigger mode
uint8_t mag3110_get_trigger_mode (mag3110_handle_t *handle, mag3110_bool_t *enable)
 get trigger mode status
uint8_t mag3110_set_mode (mag3110_handle_t *handle, mag3110_mode_t mode)
 set mode
uint8_t mag3110_get_mode (mag3110_handle_t *handle, mag3110_mode_t *mode)
 get mode
uint8_t mag3110_set_automatic_magnetic_sensor_reset (mag3110_handle_t *handle, mag3110_bool_t enable)
 enable or disable automatic magnetic sensor reset
uint8_t mag3110_set_disable_offset_correction (mag3110_handle_t *handle, mag3110_bool_t enable)
 enable or disable offset correction
uint8_t mag3110_get_disable_offset_correction (mag3110_handle_t *handle, mag3110_bool_t *enable)
 get offset correction status
uint8_t mag3110_offset_convert_to_register (mag3110_handle_t *handle, float ut, uint16_t *reg)
 convert the offset to the register raw data
uint8_t mag3110_offset_convert_to_data (mag3110_handle_t *handle, uint16_t reg, float *ut)
 convert the register raw data to the offset threshold

Detailed Description

mag3110 base driver modules

Typedef Documentation

◆ mag3110_handle_t

mag3110 handle structure definition

◆ mag3110_info_t

mag3110 information structure definition

Enumeration Type Documentation

◆ mag3110_bool_t

mag3110 bool enumeration definition

Enumerator
MAG3110_BOOL_FALSE 

false

MAG3110_BOOL_TRUE 

true

Definition at line 62 of file driver_mag3110.h.

◆ mag3110_mode_status_t

mag3110 mode status enumeration definition

Enumerator
MAG3110_MODE_STATUS_STANDBY 

standby mode

MAG3110_MODE_STATUS_ACTIVE_RAW 

active mode, raw data mode

MAG3110_MODE_STATUS_ACTIVE_NON_RAW 

active mode, non-raw user-corrected data

Definition at line 86 of file driver_mag3110.h.

◆ mag3110_mode_t

mag3110 mode enumeration definition

Enumerator
MAG3110_MODE_STANDBY 

standby mode

MAG3110_MODE_ACTIVE 

active mode

Definition at line 96 of file driver_mag3110.h.

◆ mag3110_rate_over_sample_t

mag3110 rate over sample enumeration definition

Enumerator
MAG3110_RATE_80HZ_OVER_SAMPLE_16 

80hz, 16 over sample

MAG3110_RATE_40HZ_OVER_SAMPLE_32 

40hz, 32 over sample

MAG3110_RATE_20HZ_OVER_SAMPLE_64 

20hz, 64 over sample

MAG3110_RATE_10HZ_OVER_SAMPLE_128 

10hz, 128 over sample

MAG3110_RATE_40HZ_OVER_SAMPLE_16 

40hz, 16 over sample

MAG3110_RATE_20HZ_OVER_SAMPLE_32 

20hz, 32 over sample

MAG3110_RATE_10HZ_OVER_SAMPLE_64 

10hz, 64 over sample

MAG3110_RATE_5HZ_OVER_SAMPLE_128 

5hz, 128 over sample

MAG3110_RATE_20HZ_OVER_SAMPLE_16 

20hz, 16 over sample

MAG3110_RATE_10HZ_OVER_SAMPLE_32 

10hz, 32 over sample

MAG3110_RATE_5HZ_OVER_SAMPLE_64 

5hz, 64 over sample

MAG3110_RATE_2P5HZ_OVER_SAMPLE_128 

2.5hz, 128 over sample

MAG3110_RATE_10HZ_OVER_SAMPLE_16 

10hz, 16 over sample

MAG3110_RATE_5HZ_OVER_SAMPLE_32 

5hz, 32 over sample

MAG3110_RATE_2P5HZ_OVER_SAMPLE_64 

2.5hz, 64 over sample

MAG3110_RATE_1P25HZ_OVER_SAMPLE_128 

1.25hz, 128 over sample

MAG3110_RATE_5HZ_OVER_SAMPLE_16 

5hz, 16 over sample

MAG3110_RATE_2P5HZ_OVER_SAMPLE_32 

2.5hz, 32 over sample

MAG3110_RATE_1P25HZ_OVER_SAMPLE_64 

1.25hz, 64 over sample

MAG3110_RATE_0P63HZ_OVER_SAMPLE_128 

0.63hz, 128 over sample

MAG3110_RATE_2P5HZ_OVER_SAMPLE_16 

2.5hz, 16 over sample

MAG3110_RATE_1P25HZ_OVER_SAMPLE_32 

1.25hz, 32 over sample

MAG3110_RATE_0P63HZ_OVER_SAMPLE_64 

0.63hz, 64 over sample

MAG3110_RATE_0P31HZ_OVER_SAMPLE_128 

0.31hz, 128 over sample

MAG3110_RATE_1P25HZ_OVER_SAMPLE_16 

1.25hz, 16 over sample

MAG3110_RATE_0P63HZ_OVER_SAMPLE_32 

0.63hz, 32 over sample

MAG3110_RATE_0P31HZ_OVER_SAMPLE_64 

0.31hz, 64 over sample

MAG3110_RATE_0P16HZ_OVER_SAMPLE_128 

0.16hz, 128 over sample

MAG3110_RATE_0P63HZ_OVER_SAMPLE_16 

0.63hz, 16 over sample

MAG3110_RATE_0P31HZ_OVER_SAMPLE_32 

0.31hz, 32 over sample

MAG3110_RATE_0P16HZ_OVER_SAMPLE_64 

0.16hz, 64 over sample

MAG3110_RATE_0P08HZ_OVER_SAMPLE_128 

0.08hz, 128 over sample

Definition at line 105 of file driver_mag3110.h.

◆ mag3110_status_t

mag3110 status enumeration definition

Enumerator
MAG3110_STATUS_ZYX_OVERWRITE 

x, y, z axis data overwrite

MAG3110_STATUS_Z_OVERWRITE 

z axis data overwrite

MAG3110_STATUS_Y_OVERWRITE 

y axis data overwrite

MAG3110_STATUS_X_OVERWRITE 

x axis data overwrite

MAG3110_STATUS_ZYX_READY 

x, y, z axis data ready

MAG3110_STATUS_Z_READY 

z axis data ready

MAG3110_STATUS_Y_READY 

y axis data ready

MAG3110_STATUS_X_READY 

x axis data ready

Definition at line 71 of file driver_mag3110.h.

Function Documentation

◆ mag3110_deinit()

uint8_t mag3110_deinit ( mag3110_handle_t * handle)

close the chip

Parameters
[in]*handlepointer to a mag3110 handle structure
Returns
status code
  • 0 success
  • 1 iic deinit failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 power down failed
Note
none

Definition at line 1213 of file driver_mag3110.c.

◆ mag3110_get_data_ready_status()

uint8_t mag3110_get_data_ready_status ( mag3110_handle_t * handle,
uint8_t * status )

get data ready status

Parameters
[in]*handlepointer to a mag3110 handle structure
[out]*statuspointer to a status buffer
Returns
status code
  • 0 success
  • 1 get data ready status failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 131 of file driver_mag3110.c.

◆ mag3110_get_disable_offset_correction()

uint8_t mag3110_get_disable_offset_correction ( mag3110_handle_t * handle,
mag3110_bool_t * enable )

get offset correction status

Parameters
[in]*handlepointer to a mag3110 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get disable offset correction failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 983 of file driver_mag3110.c.

◆ mag3110_get_fast_read_mode()

uint8_t mag3110_get_fast_read_mode ( mag3110_handle_t * handle,
mag3110_bool_t * enable )

get fast read mode status

Parameters
[in]*handlepointer to a mag3110 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get fast read mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 692 of file driver_mag3110.c.

◆ mag3110_get_mode()

uint8_t mag3110_get_mode ( mag3110_handle_t * handle,
mag3110_mode_t * mode )

get mode

Parameters
[in]*handlepointer to a mag3110 handle structure
[out]*modepointer to a chip mode buffer
Returns
status code
  • 0 success
  • 1 get mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 856 of file driver_mag3110.c.

◆ mag3110_get_mode_status()

uint8_t mag3110_get_mode_status ( mag3110_handle_t * handle,
mag3110_mode_status_t * mode )

get mode status

Parameters
[in]*handlepointer to a mag3110 handle structure
[out]*modepointer to a mode buffer
Returns
status code
  • 0 success
  • 1 get mode status failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 166 of file driver_mag3110.c.

◆ mag3110_get_offset_x()

uint8_t mag3110_get_offset_x ( mag3110_handle_t * handle,
uint16_t * offset )

get offset x

Parameters
[in]*handlepointer to a mag3110 handle structure
[out]*offsetpointer to an offset buffer
Returns
status code
  • 0 success
  • 1 get offset x failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 315 of file driver_mag3110.c.

◆ mag3110_get_offset_y()

uint8_t mag3110_get_offset_y ( mag3110_handle_t * handle,
uint16_t * offset )

get offset y

Parameters
[in]*handlepointer to a mag3110 handle structure
[out]*offsetpointer to an offset buffer
Returns
status code
  • 0 success
  • 1 get offset y failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 401 of file driver_mag3110.c.

◆ mag3110_get_offset_z()

uint8_t mag3110_get_offset_z ( mag3110_handle_t * handle,
uint16_t * offset )

get offset z

Parameters
[in]*handlepointer to a mag3110 handle structure
[out]*offsetpointer to an offset buffer
Returns
status code
  • 0 success
  • 1 get offset z failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 487 of file driver_mag3110.c.

◆ mag3110_get_rate_over_sample()

uint8_t mag3110_get_rate_over_sample ( mag3110_handle_t * handle,
mag3110_rate_over_sample_t * rate_over_sample )

get rate over sample

Parameters
[in]*handlepointer to a mag3110 handle structure
[out]*rate_over_samplepointer to a rate over sample buffer
Returns
status code
  • 0 success
  • 1 get rate over sample failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 610 of file driver_mag3110.c.

◆ mag3110_get_trigger_mode()

uint8_t mag3110_get_trigger_mode ( mag3110_handle_t * handle,
mag3110_bool_t * enable )

get trigger mode status

Parameters
[in]*handlepointer to a mag3110 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get trigger mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 774 of file driver_mag3110.c.

◆ mag3110_info()

uint8_t mag3110_info ( mag3110_info_t * info)

get chip's information

Parameters
[out]*infopointer to a mag3110 info structure
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 1413 of file driver_mag3110.c.

◆ mag3110_init()

uint8_t mag3110_init ( mag3110_handle_t * handle)

initialize the chip

Parameters
[in]*handlepointer to a mag3110 handle structure
Returns
status code
  • 0 success
  • 1 iic initialization failed
  • 2 handle is NULL
  • 3 linked functions is NULL
  • 4 id is invalid
  • 5 reset timeout
Note
none

Definition at line 1084 of file driver_mag3110.c.

◆ mag3110_offset_convert_to_data()

uint8_t mag3110_offset_convert_to_data ( mag3110_handle_t * handle,
uint16_t reg,
float * ut )

convert the register raw data to the offset threshold

Parameters
[in]*handlepointer to a mag3110 handle structure
[in]regregister raw data
[out]*utpointer to an offset threshold buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 234 of file driver_mag3110.c.

◆ mag3110_offset_convert_to_register()

uint8_t mag3110_offset_convert_to_register ( mag3110_handle_t * handle,
float ut,
uint16_t * reg )

convert the offset to the register raw data

Parameters
[in]*handlepointer to a mag3110 handle structure
[in]utoffset threshold
[out]*regpointer to a register raw buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 203 of file driver_mag3110.c.

◆ mag3110_read()

uint8_t mag3110_read ( mag3110_handle_t * handle,
int16_t raw[3],
float ut[3] )

read data

Parameters
[in]*handlepointer to a mag3110 handle structure
[out]*rawpointer to a raw data buffer
[out]*utpointer to a converted data buffer
Returns
status code
  • 0 success
  • 1 read failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 read timeout
Note
none

Definition at line 1266 of file driver_mag3110.c.

◆ mag3110_read_die_temperature()

uint8_t mag3110_read_die_temperature ( mag3110_handle_t * handle,
int8_t * raw,
float * degree )

read die temperature

Parameters
[in]*handlepointer to a mag3110 handle structure
[out]*rawpointer to a raw buffer
[out]*degreepointer to a converted degree buffer
Returns
status code
  • 0 success
  • 1 read die temperature failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 527 of file driver_mag3110.c.

◆ mag3110_reset()

uint8_t mag3110_reset ( mag3110_handle_t * handle)

reset

Parameters
[in]*handlepointer to a mag3110 handle structure
Returns
status code
  • 0 success
  • 1 reset failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 reset timeout
Note
none

Definition at line 1020 of file driver_mag3110.c.

◆ mag3110_set_automatic_magnetic_sensor_reset()

uint8_t mag3110_set_automatic_magnetic_sensor_reset ( mag3110_handle_t * handle,
mag3110_bool_t enable )

enable or disable automatic magnetic sensor reset

Parameters
[in]*handlepointer to a mag3110 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set automatic magnetic sensor reset failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 893 of file driver_mag3110.c.

◆ mag3110_set_disable_offset_correction()

uint8_t mag3110_set_disable_offset_correction ( mag3110_handle_t * handle,
mag3110_bool_t enable )

enable or disable offset correction

Parameters
[in]*handlepointer to a mag3110 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set disable offset correction failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 938 of file driver_mag3110.c.

◆ mag3110_set_fast_read_mode()

uint8_t mag3110_set_fast_read_mode ( mag3110_handle_t * handle,
mag3110_bool_t enable )

enable or disable fast read mode

Parameters
[in]*handlepointer to a mag3110 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set fast read mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 647 of file driver_mag3110.c.

◆ mag3110_set_mode()

uint8_t mag3110_set_mode ( mag3110_handle_t * handle,
mag3110_mode_t mode )

set mode

Parameters
[in]*handlepointer to a mag3110 handle structure
[in]modechip mode
Returns
status code
  • 0 success
  • 1 set mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 811 of file driver_mag3110.c.

◆ mag3110_set_offset_x()

uint8_t mag3110_set_offset_x ( mag3110_handle_t * handle,
uint16_t offset )

set offset x

Parameters
[in]*handlepointer to a mag3110 handle structure
[in]offsetset offset
Returns
status code
  • 0 success
  • 1 set offset x failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 offset > 0x8000
Note
none

Definition at line 269 of file driver_mag3110.c.

◆ mag3110_set_offset_y()

uint8_t mag3110_set_offset_y ( mag3110_handle_t * handle,
uint16_t offset )

set offset y

Parameters
[in]*handlepointer to a mag3110 handle structure
[in]offsetset offset
Returns
status code
  • 0 success
  • 1 set offset y failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 offset > 0x8000
Note
none

Definition at line 355 of file driver_mag3110.c.

◆ mag3110_set_offset_z()

uint8_t mag3110_set_offset_z ( mag3110_handle_t * handle,
uint16_t offset )

set offset z

Parameters
[in]*handlepointer to a mag3110 handle structure
[in]offsetset offset
Returns
status code
  • 0 success
  • 1 set offset z failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 offset > 0x8000
Note
none

Definition at line 441 of file driver_mag3110.c.

◆ mag3110_set_rate_over_sample()

uint8_t mag3110_set_rate_over_sample ( mag3110_handle_t * handle,
mag3110_rate_over_sample_t rate_over_sample )

set rate over sample

Parameters
[in]*handlepointer to a mag3110 handle structure
[in]rate_over_samplerate over sample
Returns
status code
  • 0 success
  • 1 set rate over sample failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 565 of file driver_mag3110.c.

◆ mag3110_set_trigger_mode()

uint8_t mag3110_set_trigger_mode ( mag3110_handle_t * handle,
mag3110_bool_t enable )

enable or disable trigger mode

Parameters
[in]*handlepointer to a mag3110 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set trigger mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 729 of file driver_mag3110.c.