LibDriver L3GD20H
Loading...
Searching...
No Matches
l3gd20h basic driver function

l3gd20h basic driver modules More...

Collaboration diagram for l3gd20h basic driver function:

Data Structures

struct  l3gd20h_handle_s
 l3gd20h handle structure definition More...
struct  l3gd20h_info_s
 l3gd20h information structure definition More...

Typedefs

typedef struct l3gd20h_handle_s l3gd20h_handle_t
 l3gd20h handle structure definition
typedef struct l3gd20h_info_s l3gd20h_info_t
 l3gd20h information structure definition

Enumerations

enum  l3gd20h_interface_t { L3GD20H_INTERFACE_IIC = 0x00 , L3GD20H_INTERFACE_SPI = 0x01 }
 l3gd20h interface enumeration definition More...
enum  l3gd20h_address_t { L3GD20H_ADDRESS_SDO_0 = 0xD4 , L3GD20H_ADDRESS_SDO_1 = 0xD6 }
 l3gd20h address enumeration definition More...
enum  l3gd20h_bool_t { L3GD20H_BOOL_FALSE = 0x00 , L3GD20H_BOOL_TRUE = 0x01 }
 l3gd20h bool enumeration definition More...
enum  l3gd20h_axis_t { L3GD20H_AXIS_X = 0x01 , L3GD20H_AXIS_Y = 0x00 , L3GD20H_AXIS_Z = 0x02 }
 l3gd20h axis enumeration definition More...
enum  l3gd20h_mode_t { L3GD20H_MODE_POWER_DOWN = 0x00 , L3GD20H_MODE_NORMAL = 0x01 , L3GD20H_MODE_SLEEP = 0x02 }
 l3gd20h mode enumeration definition More...
enum  l3gd20h_high_pass_filter_mode_t { L3GD20H_HIGH_PASS_FILTER_MODE_NORMAL_RESET = 0x00 , L3GD20H_HIGH_PASS_FILTER_MODE_REFERENCE_SIGNAL = 0x01 , L3GD20H_HIGH_PASS_FILTER_MODE_NORMAL = 0x02 , L3GD20H_HIGH_PASS_FILTER_MODE_AUTORESET_ON_INT = 0x03 }
 l3gd20h high pass filter mode enumeration definition More...
enum  l3gd20h_high_pass_filter_cut_off_frequency_t {
  L3GD20H_HIGH_PASS_FILTER_CUT_OFF_FREQUENCY_0 = 0x00 , L3GD20H_HIGH_PASS_FILTER_CUT_OFF_FREQUENCY_1 = 0x01 , L3GD20H_HIGH_PASS_FILTER_CUT_OFF_FREQUENCY_2 = 0x02 , L3GD20H_HIGH_PASS_FILTER_CUT_OFF_FREQUENCY_3 = 0x03 ,
  L3GD20H_HIGH_PASS_FILTER_CUT_OFF_FREQUENCY_4 = 0x04 , L3GD20H_HIGH_PASS_FILTER_CUT_OFF_FREQUENCY_5 = 0x05 , L3GD20H_HIGH_PASS_FILTER_CUT_OFF_FREQUENCY_6 = 0x06 , L3GD20H_HIGH_PASS_FILTER_CUT_OFF_FREQUENCY_7 = 0x07 ,
  L3GD20H_HIGH_PASS_FILTER_CUT_OFF_FREQUENCY_8 = 0x08 , L3GD20H_HIGH_PASS_FILTER_CUT_OFF_FREQUENCY_9 = 0x09
}
 l3gd20h high pass filter cut off frequency enumeration definition More...
enum  l3gd20h_lodr_odr_bw_t {
  L3GD20H_LOW_ODR_0_ODR_100HZ_BW_0_12P5HZ = 0x00 , L3GD20H_LOW_ODR_0_ODR_100HZ_BW_1_25HZ = 0x01 , L3GD20H_LOW_ODR_0_ODR_100HZ_BW_2_25HZ = 0x02 , L3GD20H_LOW_ODR_0_ODR_100HZ_BW_3_25HZ = 0x03 ,
  L3GD20H_LOW_ODR_0_ODR_200HZ_BW_0_12P5HZ = 0x04 , L3GD20H_LOW_ODR_0_ODR_200HZ_BW_1_NA = 0x05 , L3GD20H_LOW_ODR_0_ODR_200HZ_BW_2_NA = 0x06 , L3GD20H_LOW_ODR_0_ODR_200HZ_BW_3_70HZ = 0x07 ,
  L3GD20H_LOW_ODR_0_ODR_400HZ_BW_0_20HZ = 0x08 , L3GD20H_LOW_ODR_0_ODR_400HZ_BW_1_25HZ = 0x09 , L3GD20H_LOW_ODR_0_ODR_400HZ_BW_2_50HZ = 0x0A , L3GD20H_LOW_ODR_0_ODR_400HZ_BW_3_110HZ = 0x0B ,
  L3GD20H_LOW_ODR_0_ODR_800HZ_BW_0_30HZ = 0x0C , L3GD20H_LOW_ODR_0_ODR_800HZ_BW_1_35HZ = 0x0D , L3GD20H_LOW_ODR_0_ODR_800HZ_BW_2_NA = 0x0E , L3GD20H_LOW_ODR_0_ODR_800HZ_BW_3_100HZ = 0x0F ,
  L3GD20H_LOW_ODR_1_ODR_12P5HZ_BW_0_NA = 0x10 , L3GD20H_LOW_ODR_1_ODR_12P5HZ_BW_1_NA = 0x11 , L3GD20H_LOW_ODR_1_ODR_12P5HZ_BW_2_NA = 0x12 , L3GD20H_LOW_ODR_1_ODR_12P5HZ_BW_3_NA = 0x13 ,
  L3GD20H_LOW_ODR_1_ODR_25HZ_BW_0_NA = 0x14 , L3GD20H_LOW_ODR_1_ODR_25HZ_BW_1_NA = 0x15 , L3GD20H_LOW_ODR_1_ODR_25HZ_BW_2_NA = 0x16 , L3GD20H_LOW_ODR_1_ODR_25HZ_BW_3_NA = 0x17 ,
  L3GD20H_LOW_ODR_1_ODR_50HZ_BW_0_16P6HZ = 0x18 , L3GD20H_LOW_ODR_1_ODR_50HZ_BW_1_16P6HZ = 0x19 , L3GD20H_LOW_ODR_1_ODR_50HZ_BW_2_16P6HZ = 0x1A , L3GD20H_LOW_ODR_1_ODR_50HZ_BW_3_16P6HZ = 0x1B
}
 l3gd20h low odr odr bw enumeration definition More...
enum  l3gd20h_data_format_t { L3GD20H_DATA_FORMAT_BIG_ENDIAN = 0x00 , L3GD20H_DATA_FORMAT_LITTLE_ENDIAN = 0x01 }
 l3gd20h data format enumeration definition More...
enum  l3gd20h_full_scale_t { L3GD20H_FULL_SCALE_245_DPS = 0x00 , L3GD20H_FULL_SCALE_500_DPS = 0x01 , L3GD20H_FULL_SCALE_2000_DPS = 0x02 }
 l3gd20h full scale type enumeration definition More...
enum  l3gd20h_self_test_t { L3GD20H_SELF_TEST_NORMAL = 0x00 , L3GD20H_SELF_TEST_0 = 0x01 , L3GD20H_SELF_TEST_1 = 0x03 }
 l3gd20h self test type enumeration definition More...
enum  l3gd20h_spi_wire_t { L3GD20H_SPI_WIRE_4 = 0x00 , L3GD20H_SPI_WIRE_3 = 0x01 }
 l3gd20h spi wire enumeration definition More...
enum  l3gd20h_boot_t { L3GD20H_BOOT_NORMAL = 0x00 , L3GD20H_BOOT_REBOOT = 0x01 }
 l3gd20h boot enumeration definition More...
enum  l3gd20h_selection_t { L3GD20H_SELECTION_LPF1 = 0x00 , L3GD20H_SELECTION_LPF1_HPF = 0x01 , L3GD20H_SELECTION_LPF1_HPF_LPF2 = 0x02 }
 l3gd20h selection enumeration definition More...
enum  l3gd20h_status_t {
  L3GD20H_STATUS_XYZ_OVERRUN = 0x07 , L3GD20H_STATUS_Z_OVERRUN = 0x06 , L3GD20H_STATUS_Y_OVERRUN = 0x05 , L3GD20H_STATUS_X_OVERRUN = 0x04 ,
  L3GD20H_STATUS_XYZ_DATA_READY = 0x03 , L3GD20H_STATUS_Z_DATA_READY = 0x02 , L3GD20H_STATUS_Y_DATA_READY = 0x01 , L3GD20H_STATUS_X_DATA_READY = 0x00
}
 l3gd20h status enumeration definition More...

Functions

uint8_t l3gd20h_info (l3gd20h_info_t *info)
 get chip's information
uint8_t l3gd20h_set_interface (l3gd20h_handle_t *handle, l3gd20h_interface_t interface)
 set the chip interface
uint8_t l3gd20h_get_interface (l3gd20h_handle_t *handle, l3gd20h_interface_t *interface)
 get the chip interface
uint8_t l3gd20h_set_addr_pin (l3gd20h_handle_t *handle, l3gd20h_address_t addr_pin)
 set the iic address pin
uint8_t l3gd20h_get_addr_pin (l3gd20h_handle_t *handle, l3gd20h_address_t *addr_pin)
 get the iic address pin
uint8_t l3gd20h_init (l3gd20h_handle_t *handle)
 initialize the chip
uint8_t l3gd20h_deinit (l3gd20h_handle_t *handle)
 close the chip
uint8_t l3gd20h_read (l3gd20h_handle_t *handle, int16_t(*raw)[3], float(*dps)[3], uint16_t *len)
 read the data
uint8_t l3gd20h_irq_handler (l3gd20h_handle_t *handle, uint8_t num)
 interrupt handler
uint8_t l3gd20h_read_temperature (l3gd20h_handle_t *handle, int8_t *raw, float *temp)
 read the temperature
uint8_t l3gd20h_set_mode (l3gd20h_handle_t *handle, l3gd20h_mode_t mode)
 set the chip mode
uint8_t l3gd20h_get_mode (l3gd20h_handle_t *handle, l3gd20h_mode_t *mode)
 get the chip mode
uint8_t l3gd20h_set_axis (l3gd20h_handle_t *handle, l3gd20h_axis_t axis, l3gd20h_bool_t enable)
 set the axis
uint8_t l3gd20h_get_axis (l3gd20h_handle_t *handle, l3gd20h_axis_t axis, l3gd20h_bool_t *enable)
 get the axis
uint8_t l3gd20h_set_rate_bandwidth (l3gd20h_handle_t *handle, l3gd20h_lodr_odr_bw_t rate_bandwidth)
 set the rate bandwidth
uint8_t l3gd20h_get_rate_bandwidth (l3gd20h_handle_t *handle, l3gd20h_lodr_odr_bw_t *rate_bandwidth)
 get the rate bandwidth
uint8_t l3gd20h_set_edge_trigger (l3gd20h_handle_t *handle, l3gd20h_bool_t enable)
 enable or disable the edge trigger
uint8_t l3gd20h_get_edge_trigger (l3gd20h_handle_t *handle, l3gd20h_bool_t *enable)
 get the edge trigger status
uint8_t l3gd20h_set_level_trigger (l3gd20h_handle_t *handle, l3gd20h_bool_t enable)
 enable or disable the level trigger
uint8_t l3gd20h_get_level_trigger (l3gd20h_handle_t *handle, l3gd20h_bool_t *enable)
 get the level trigger status
uint8_t l3gd20h_set_high_pass_filter_mode (l3gd20h_handle_t *handle, l3gd20h_high_pass_filter_mode_t mode)
 set the high pass filter mode
uint8_t l3gd20h_get_high_pass_filter_mode (l3gd20h_handle_t *handle, l3gd20h_high_pass_filter_mode_t *mode)
 get the high pass filter mode
uint8_t l3gd20h_set_high_pass_filter_cut_off_frequency (l3gd20h_handle_t *handle, l3gd20h_high_pass_filter_cut_off_frequency_t frequency)
 set the high pass filter cut off frequency
uint8_t l3gd20h_get_high_pass_filter_cut_off_frequency (l3gd20h_handle_t *handle, l3gd20h_high_pass_filter_cut_off_frequency_t *frequency)
 get the high pass filter cut off frequency
uint8_t l3gd20h_set_block_data_update (l3gd20h_handle_t *handle, l3gd20h_bool_t enable)
 enable or disable the block data update
uint8_t l3gd20h_get_block_data_update (l3gd20h_handle_t *handle, l3gd20h_bool_t *enable)
 get the block data update status
uint8_t l3gd20h_set_data_format (l3gd20h_handle_t *handle, l3gd20h_data_format_t data_format)
 set the data format
uint8_t l3gd20h_get_data_format (l3gd20h_handle_t *handle, l3gd20h_data_format_t *data_format)
 get the data format
uint8_t l3gd20h_set_full_scale (l3gd20h_handle_t *handle, l3gd20h_full_scale_t full_scale)
 set the full scale
uint8_t l3gd20h_get_full_scale (l3gd20h_handle_t *handle, l3gd20h_full_scale_t *full_scale)
 get the full scale
uint8_t l3gd20h_set_level_sensitive_latched (l3gd20h_handle_t *handle, l3gd20h_bool_t enable)
 enable or disable the level sensitive latched
uint8_t l3gd20h_get_level_sensitive_latched (l3gd20h_handle_t *handle, l3gd20h_bool_t *enable)
 get the level sensitive latched status
uint8_t l3gd20h_set_self_test (l3gd20h_handle_t *handle, l3gd20h_self_test_t self_test)
 set the self test
uint8_t l3gd20h_get_self_test (l3gd20h_handle_t *handle, l3gd20h_self_test_t *self_test)
 get the self test
uint8_t l3gd20h_set_spi_wire (l3gd20h_handle_t *handle, l3gd20h_spi_wire_t spi_wire)
 set the spi wire
uint8_t l3gd20h_get_spi_wire (l3gd20h_handle_t *handle, l3gd20h_spi_wire_t *spi_wire)
 get the spi wire
uint8_t l3gd20h_set_boot (l3gd20h_handle_t *handle, l3gd20h_boot_t boot)
 set the boot
uint8_t l3gd20h_get_boot (l3gd20h_handle_t *handle, l3gd20h_boot_t *boot)
 get the boot
uint8_t l3gd20h_set_high_pass_filter (l3gd20h_handle_t *handle, l3gd20h_bool_t enable)
 enable or disable high pass filter
uint8_t l3gd20h_get_high_pass_filter (l3gd20h_handle_t *handle, l3gd20h_bool_t *enable)
 get high pass filter status
uint8_t l3gd20h_set_out_selection (l3gd20h_handle_t *handle, l3gd20h_selection_t selection)
 set the out selection
uint8_t l3gd20h_get_out_selection (l3gd20h_handle_t *handle, l3gd20h_selection_t *selection)
 get the out selection
uint8_t l3gd20h_set_high_pass_filter_reference (l3gd20h_handle_t *handle, uint8_t value)
 set the high pass filter reference
uint8_t l3gd20h_get_high_pass_filter_reference (l3gd20h_handle_t *handle, uint8_t *value)
 get the high pass filter reference
uint8_t l3gd20h_get_status (l3gd20h_handle_t *handle, uint8_t *status)
 get the chip status
uint8_t l3gd20h_set_iic (l3gd20h_handle_t *handle, l3gd20h_bool_t enable)
 enable or disable the iic interface
uint8_t l3gd20h_get_iic (l3gd20h_handle_t *handle, l3gd20h_bool_t *enable)
 get the iic interface status
uint8_t l3gd20h_soft_reset (l3gd20h_handle_t *handle)
 soft reset the device

Detailed Description

l3gd20h basic driver modules

Typedef Documentation

◆ l3gd20h_handle_t

l3gd20h handle structure definition

◆ l3gd20h_info_t

l3gd20h information structure definition

Enumeration Type Documentation

◆ l3gd20h_address_t

l3gd20h address enumeration definition

Enumerator
L3GD20H_ADDRESS_SDO_0 

addr pin connected to the GND

L3GD20H_ADDRESS_SDO_1 

addr pin connected to the VCC

Definition at line 72 of file driver_l3gd20h.h.

◆ l3gd20h_axis_t

l3gd20h axis enumeration definition

Enumerator
L3GD20H_AXIS_X 

axis x

L3GD20H_AXIS_Y 

axis y

L3GD20H_AXIS_Z 

axis z

Definition at line 90 of file driver_l3gd20h.h.

◆ l3gd20h_bool_t

l3gd20h bool enumeration definition

Enumerator
L3GD20H_BOOL_FALSE 

false

L3GD20H_BOOL_TRUE 

true

Definition at line 81 of file driver_l3gd20h.h.

◆ l3gd20h_boot_t

l3gd20h boot enumeration definition

Enumerator
L3GD20H_BOOT_NORMAL 

boot normal

L3GD20H_BOOT_REBOOT 

boot reboot

Definition at line 223 of file driver_l3gd20h.h.

◆ l3gd20h_data_format_t

l3gd20h data format enumeration definition

Enumerator
L3GD20H_DATA_FORMAT_BIG_ENDIAN 

big endian

L3GD20H_DATA_FORMAT_LITTLE_ENDIAN 

little endian

Definition at line 185 of file driver_l3gd20h.h.

◆ l3gd20h_full_scale_t

l3gd20h full scale type enumeration definition

Enumerator
L3GD20H_FULL_SCALE_245_DPS 

±245 dps

L3GD20H_FULL_SCALE_500_DPS 

±500 dps

L3GD20H_FULL_SCALE_2000_DPS 

±2000 dps

Definition at line 194 of file driver_l3gd20h.h.

◆ l3gd20h_high_pass_filter_cut_off_frequency_t

l3gd20h high pass filter cut off frequency enumeration definition

  ODR=12.5  ODR=25  ODR=50  ODR=100 ODR=200 ODR=400 ODR=800

0x0 1Hz 2Hz 4Hz 8Hz 15Hz 30Hz 56Hz 0x1 0.5Hz 1Hz 2Hz 4Hz 8Hz 15Hz 30Hz 0x2 0.2Hz 0.5Hz 1Hz 2Hz 4Hz 8Hz 15Hz 0x3 0.1Hz 0.2Hz 0.5Hz 1Hz 2Hz 4Hz 8Hz 0x4 0.05Hz 0.1Hz 0.2Hz 0.5Hz 1Hz 2Hz 4Hz 0x5 0.02Hz 0.05Hz 0.1Hz 0.2Hz 0.5Hz 1Hz 2Hz 0x6 0.01Hz 0.02Hz 0.05Hz 0.1Hz 0.2Hz 0.5Hz 1Hz 0x7 0.005Hz 0.01Hz 0.02Hz 0.05Hz 0.1Hz 0.2Hz 0.5Hz 0x8 0.002Hz 0.005Hz 0.01Hz 0.02Hz 0.05Hz 0.1Hz 0.2Hz 0x9 0.001Hz 0.002Hz 0.005Hz 0.01Hz 0.02Hz 0.05Hz 0.1Hz

Enumerator
L3GD20H_HIGH_PASS_FILTER_CUT_OFF_FREQUENCY_0 

frequency 0

L3GD20H_HIGH_PASS_FILTER_CUT_OFF_FREQUENCY_1 

frequency 1

L3GD20H_HIGH_PASS_FILTER_CUT_OFF_FREQUENCY_2 

frequency 2

L3GD20H_HIGH_PASS_FILTER_CUT_OFF_FREQUENCY_3 

frequency 3

L3GD20H_HIGH_PASS_FILTER_CUT_OFF_FREQUENCY_4 

frequency 4

L3GD20H_HIGH_PASS_FILTER_CUT_OFF_FREQUENCY_5 

frequency 5

L3GD20H_HIGH_PASS_FILTER_CUT_OFF_FREQUENCY_6 

frequency 6

L3GD20H_HIGH_PASS_FILTER_CUT_OFF_FREQUENCY_7 

frequency 7

L3GD20H_HIGH_PASS_FILTER_CUT_OFF_FREQUENCY_8 

frequency 8

L3GD20H_HIGH_PASS_FILTER_CUT_OFF_FREQUENCY_9 

frequency 9

Definition at line 133 of file driver_l3gd20h.h.

◆ l3gd20h_high_pass_filter_mode_t

l3gd20h high pass filter mode enumeration definition

Enumerator
L3GD20H_HIGH_PASS_FILTER_MODE_NORMAL_RESET 

normal reset mode

L3GD20H_HIGH_PASS_FILTER_MODE_REFERENCE_SIGNAL 

reference signal mode

L3GD20H_HIGH_PASS_FILTER_MODE_NORMAL 

normal mode

L3GD20H_HIGH_PASS_FILTER_MODE_AUTORESET_ON_INT 

auto reset on int mode

Definition at line 110 of file driver_l3gd20h.h.

◆ l3gd20h_interface_t

l3gd20h interface enumeration definition

Enumerator
L3GD20H_INTERFACE_IIC 

iic interface function

L3GD20H_INTERFACE_SPI 

spi interface function

Definition at line 63 of file driver_l3gd20h.h.

◆ l3gd20h_lodr_odr_bw_t

l3gd20h low odr odr bw enumeration definition

Enumerator
L3GD20H_LOW_ODR_0_ODR_100HZ_BW_0_12P5HZ 

100Hz bandwidth 12.5 Hz

L3GD20H_LOW_ODR_0_ODR_100HZ_BW_1_25HZ 

100Hz bandwidth 25 Hz

L3GD20H_LOW_ODR_0_ODR_100HZ_BW_2_25HZ 

100Hz bandwidth 25 Hz

L3GD20H_LOW_ODR_0_ODR_100HZ_BW_3_25HZ 

100Hz bandwidth 25 Hz

L3GD20H_LOW_ODR_0_ODR_200HZ_BW_0_12P5HZ 

200Hz bandwidth 12.5 Hz

L3GD20H_LOW_ODR_0_ODR_200HZ_BW_1_NA 

200Hz bandwidth NA

L3GD20H_LOW_ODR_0_ODR_200HZ_BW_2_NA 

200Hz bandwidth NA

L3GD20H_LOW_ODR_0_ODR_200HZ_BW_3_70HZ 

200Hz bandwidth 70 Hz

L3GD20H_LOW_ODR_0_ODR_400HZ_BW_0_20HZ 

400Hz bandwidth 20 Hz

L3GD20H_LOW_ODR_0_ODR_400HZ_BW_1_25HZ 

400Hz bandwidth 25 Hz

L3GD20H_LOW_ODR_0_ODR_400HZ_BW_2_50HZ 

400Hz bandwidth 50 Hz

L3GD20H_LOW_ODR_0_ODR_400HZ_BW_3_110HZ 

400Hz bandwidth 110 Hz

L3GD20H_LOW_ODR_0_ODR_800HZ_BW_0_30HZ 

800Hz bandwidth 30 Hz

L3GD20H_LOW_ODR_0_ODR_800HZ_BW_1_35HZ 

800Hz bandwidth 35 Hz

L3GD20H_LOW_ODR_0_ODR_800HZ_BW_2_NA 

800Hz bandwidth NA

L3GD20H_LOW_ODR_0_ODR_800HZ_BW_3_100HZ 

800Hz bandwidth 100 Hz

L3GD20H_LOW_ODR_1_ODR_12P5HZ_BW_0_NA 

low power 12.5 Hz bandwidth NA

L3GD20H_LOW_ODR_1_ODR_12P5HZ_BW_1_NA 

low power 12.5 Hz bandwidth NA

L3GD20H_LOW_ODR_1_ODR_12P5HZ_BW_2_NA 

low power 12.5 Hz bandwidth NA

L3GD20H_LOW_ODR_1_ODR_12P5HZ_BW_3_NA 

low power 12.5 Hz bandwidth NA

L3GD20H_LOW_ODR_1_ODR_25HZ_BW_0_NA 

low power 25 Hz bandwidth NA

L3GD20H_LOW_ODR_1_ODR_25HZ_BW_1_NA 

low power 25 Hz bandwidth NA

L3GD20H_LOW_ODR_1_ODR_25HZ_BW_2_NA 

low power 25 Hz bandwidth NA

L3GD20H_LOW_ODR_1_ODR_25HZ_BW_3_NA 

low power 25 Hz bandwidth NA

L3GD20H_LOW_ODR_1_ODR_50HZ_BW_0_16P6HZ 

low power 50 Hz bandwidth 16.6 Hz

L3GD20H_LOW_ODR_1_ODR_50HZ_BW_1_16P6HZ 

low power 50 Hz bandwidth 16.6 Hz

L3GD20H_LOW_ODR_1_ODR_50HZ_BW_2_16P6HZ 

low power 50 Hz bandwidth 16.6 Hz

L3GD20H_LOW_ODR_1_ODR_50HZ_BW_3_16P6HZ 

low power 50 Hz bandwidth 16.6 Hz

Definition at line 150 of file driver_l3gd20h.h.

◆ l3gd20h_mode_t

l3gd20h mode enumeration definition

Enumerator
L3GD20H_MODE_POWER_DOWN 

power down mode

L3GD20H_MODE_NORMAL 

normal mode

L3GD20H_MODE_SLEEP 

sleep mode

Definition at line 100 of file driver_l3gd20h.h.

◆ l3gd20h_selection_t

l3gd20h selection enumeration definition

Enumerator
L3GD20H_SELECTION_LPF1 

LPF1

L3GD20H_SELECTION_LPF1_HPF 

LPF1->HPF

L3GD20H_SELECTION_LPF1_HPF_LPF2 

LPF1->HPF->LPF2

Definition at line 232 of file driver_l3gd20h.h.

◆ l3gd20h_self_test_t

l3gd20h self test type enumeration definition

Enumerator
L3GD20H_SELF_TEST_NORMAL 

normal mode

L3GD20H_SELF_TEST_0 

test 0 mode

L3GD20H_SELF_TEST_1 

test 1 mode

Definition at line 204 of file driver_l3gd20h.h.

◆ l3gd20h_spi_wire_t

l3gd20h spi wire enumeration definition

Enumerator
L3GD20H_SPI_WIRE_4 

spi 4 wire

L3GD20H_SPI_WIRE_3 

spi 3 wire

Definition at line 214 of file driver_l3gd20h.h.

◆ l3gd20h_status_t

l3gd20h status enumeration definition

Enumerator
L3GD20H_STATUS_XYZ_OVERRUN 

xyz overrun

L3GD20H_STATUS_Z_OVERRUN 

z overrun

L3GD20H_STATUS_Y_OVERRUN 

y overrun

L3GD20H_STATUS_X_OVERRUN 

x overrun

L3GD20H_STATUS_XYZ_DATA_READY 

xyz data ready

L3GD20H_STATUS_Z_DATA_READY 

reset mode

L3GD20H_STATUS_Y_DATA_READY 

reset mode

L3GD20H_STATUS_X_DATA_READY 

reset mode

Definition at line 242 of file driver_l3gd20h.h.

Function Documentation

◆ l3gd20h_deinit()

uint8_t l3gd20h_deinit ( l3gd20h_handle_t * handle)

close the chip

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

Definition at line 3923 of file driver_l3gd20h.c.

◆ l3gd20h_get_addr_pin()

uint8_t l3gd20h_get_addr_pin ( l3gd20h_handle_t * handle,
l3gd20h_address_t * addr_pin )

get the iic address pin

Parameters
[in]*handlepointer to an l3gd20h handle structure
[out]*addr_pinpointer to an address pin buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 246 of file driver_l3gd20h.c.

◆ l3gd20h_get_axis()

uint8_t l3gd20h_get_axis ( l3gd20h_handle_t * handle,
l3gd20h_axis_t axis,
l3gd20h_bool_t * enable )

get the axis

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

Definition at line 408 of file driver_l3gd20h.c.

◆ l3gd20h_get_block_data_update()

uint8_t l3gd20h_get_block_data_update ( l3gd20h_handle_t * handle,
l3gd20h_bool_t * enable )

get the block data update status

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

Definition at line 1473 of file driver_l3gd20h.c.

◆ l3gd20h_get_boot()

uint8_t l3gd20h_get_boot ( l3gd20h_handle_t * handle,
l3gd20h_boot_t * boot )

get the boot

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

Definition at line 1917 of file driver_l3gd20h.c.

◆ l3gd20h_get_data_format()

uint8_t l3gd20h_get_data_format ( l3gd20h_handle_t * handle,
l3gd20h_data_format_t * data_format )

get the data format

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

Definition at line 1547 of file driver_l3gd20h.c.

◆ l3gd20h_get_edge_trigger()

uint8_t l3gd20h_get_edge_trigger ( l3gd20h_handle_t * handle,
l3gd20h_bool_t * enable )

get the edge trigger status

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

Definition at line 584 of file driver_l3gd20h.c.

◆ l3gd20h_get_full_scale()

uint8_t l3gd20h_get_full_scale ( l3gd20h_handle_t * handle,
l3gd20h_full_scale_t * full_scale )

get the full scale

Parameters
[in]*handlepointer to an l3gd20h handle structure
[out]*full_scalepointer to a full scale buffer
Returns
status code
  • 0 success
  • 1 get full scale failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1621 of file driver_l3gd20h.c.

◆ l3gd20h_get_high_pass_filter()

uint8_t l3gd20h_get_high_pass_filter ( l3gd20h_handle_t * handle,
l3gd20h_bool_t * enable )

get high pass filter status

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

Definition at line 2139 of file driver_l3gd20h.c.

◆ l3gd20h_get_high_pass_filter_cut_off_frequency()

uint8_t l3gd20h_get_high_pass_filter_cut_off_frequency ( l3gd20h_handle_t * handle,
l3gd20h_high_pass_filter_cut_off_frequency_t * frequency )

get the high pass filter cut off frequency

Parameters
[in]*handlepointer to an l3gd20h handle structure
[out]*frequencypointer to a high pass filter cut off frequency buffer
Returns
status code
  • 0 success
  • 1 get high pass filter cut off frequency failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 807 of file driver_l3gd20h.c.

◆ l3gd20h_get_high_pass_filter_mode()

uint8_t l3gd20h_get_high_pass_filter_mode ( l3gd20h_handle_t * handle,
l3gd20h_high_pass_filter_mode_t * mode )

get the high pass filter mode

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

Definition at line 733 of file driver_l3gd20h.c.

◆ l3gd20h_get_high_pass_filter_reference()

uint8_t l3gd20h_get_high_pass_filter_reference ( l3gd20h_handle_t * handle,
uint8_t * value )

get the high pass filter reference

Parameters
[in]*handlepointer to an l3gd20h handle structure
[out]*valuepointer to a high pass filter reference value buffer
Returns
status code
  • 0 success
  • 1 get high pass filter reference failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2349 of file driver_l3gd20h.c.

◆ l3gd20h_get_iic()

uint8_t l3gd20h_get_iic ( l3gd20h_handle_t * handle,
l3gd20h_bool_t * enable )

get the iic interface status

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

Definition at line 3370 of file driver_l3gd20h.c.

◆ l3gd20h_get_interface()

uint8_t l3gd20h_get_interface ( l3gd20h_handle_t * handle,
l3gd20h_interface_t * interface )

get the chip interface

Parameters
[in]*handlepointer to an l3gd20h handle structure
[out]*interfacepointer to a chip interface buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 204 of file driver_l3gd20h.c.

◆ l3gd20h_get_level_sensitive_latched()

uint8_t l3gd20h_get_level_sensitive_latched ( l3gd20h_handle_t * handle,
l3gd20h_bool_t * enable )

get the level sensitive latched status

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

Definition at line 1695 of file driver_l3gd20h.c.

◆ l3gd20h_get_level_trigger()

uint8_t l3gd20h_get_level_trigger ( l3gd20h_handle_t * handle,
l3gd20h_bool_t * enable )

get the level trigger status

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

Definition at line 659 of file driver_l3gd20h.c.

◆ l3gd20h_get_mode()

uint8_t l3gd20h_get_mode ( l3gd20h_handle_t * handle,
l3gd20h_mode_t * mode )

get the chip mode

Parameters
[in]*handlepointer to an l3gd20h 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 317 of file driver_l3gd20h.c.

◆ l3gd20h_get_out_selection()

uint8_t l3gd20h_get_out_selection ( l3gd20h_handle_t * handle,
l3gd20h_selection_t * selection )

get the out selection

Parameters
[in]*handlepointer to an l3gd20h handle structure
[out]*selectionpointer to an out selection buffer
Returns
status code
  • 0 success
  • 1 get out selection failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2287 of file driver_l3gd20h.c.

◆ l3gd20h_get_rate_bandwidth()

uint8_t l3gd20h_get_rate_bandwidth ( l3gd20h_handle_t * handle,
l3gd20h_lodr_odr_bw_t * rate_bandwidth )

get the rate bandwidth

Parameters
[in]*handlepointer to an l3gd20h handle structure
[out]*rate_bandwidthpointer to a rate bandwidth buffer
Returns
status code
  • 0 success
  • 1 get rate bandwidth failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 504 of file driver_l3gd20h.c.

◆ l3gd20h_get_self_test()

uint8_t l3gd20h_get_self_test ( l3gd20h_handle_t * handle,
l3gd20h_self_test_t * self_test )

get the self test

Parameters
[in]*handlepointer to an l3gd20h handle structure
[out]*self_testpointer to a self test buffer
Returns
status code
  • 0 success
  • 1 get self test failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1769 of file driver_l3gd20h.c.

◆ l3gd20h_get_spi_wire()

uint8_t l3gd20h_get_spi_wire ( l3gd20h_handle_t * handle,
l3gd20h_spi_wire_t * spi_wire )

get the spi wire

Parameters
[in]*handlepointer to an l3gd20h handle structure
[out]*spi_wirepointer to a spi wire buffer
Returns
status code
  • 0 success
  • 1 get spi wire failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1843 of file driver_l3gd20h.c.

◆ l3gd20h_get_status()

uint8_t l3gd20h_get_status ( l3gd20h_handle_t * handle,
uint8_t * status )

get the chip status

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

Definition at line 2411 of file driver_l3gd20h.c.

◆ l3gd20h_info()

uint8_t l3gd20h_info ( l3gd20h_info_t * info)

get chip's information

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

Definition at line 4173 of file driver_l3gd20h.c.

◆ l3gd20h_init()

uint8_t l3gd20h_init ( l3gd20h_handle_t * handle)

initialize the chip

Parameters
[in]*handlepointer to an l3gd20h handle structure
Returns
status code
  • 0 success
  • 1 spi or iic initialization failed
  • 2 handle is NULL
  • 3 linked functions is NULL
  • 4 id is invalid
Note
none

Definition at line 3729 of file driver_l3gd20h.c.

◆ l3gd20h_irq_handler()

uint8_t l3gd20h_irq_handler ( l3gd20h_handle_t * handle,
uint8_t num )

interrupt handler

Parameters
[in]*handlepointer to an l3gd20h handle structure
[in]numinterrupt number
Returns
status code
  • 0 success
  • 1 run failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3539 of file driver_l3gd20h.c.

◆ l3gd20h_read()

uint8_t l3gd20h_read ( l3gd20h_handle_t * handle,
int16_t(*) raw[3],
float(*) dps[3],
uint16_t * len )

read the data

Parameters
[in]*handlepointer to an l3gd20h handle structure
[out]**rawpointer to a raw data buffer
[out]**dpspointer to a converted data buffer
[in,out]*lenpointer to a date length buffer
Returns
status code
  • 0 success
  • 1 read failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 len is invalid
Note
none

Definition at line 3970 of file driver_l3gd20h.c.

◆ l3gd20h_read_temperature()

uint8_t l3gd20h_read_temperature ( l3gd20h_handle_t * handle,
int8_t * raw,
float * temp )

read the temperature

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

Definition at line 2375 of file driver_l3gd20h.c.

◆ l3gd20h_set_addr_pin()

uint8_t l3gd20h_set_addr_pin ( l3gd20h_handle_t * handle,
l3gd20h_address_t addr_pin )

set the iic address pin

Parameters
[in]*handlepointer to an l3gd20h handle structure
[in]addr_pinaddress pin
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 225 of file driver_l3gd20h.c.

◆ l3gd20h_set_axis()

uint8_t l3gd20h_set_axis ( l3gd20h_handle_t * handle,
l3gd20h_axis_t axis,
l3gd20h_bool_t enable )

set the axis

Parameters
[in]*handlepointer to an l3gd20h handle structure
[in]axisset axis
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set axis failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 370 of file driver_l3gd20h.c.

◆ l3gd20h_set_block_data_update()

uint8_t l3gd20h_set_block_data_update ( l3gd20h_handle_t * handle,
l3gd20h_bool_t enable )

enable or disable the block data update

Parameters
[in]*handlepointer to an l3gd20h handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set block data update failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1436 of file driver_l3gd20h.c.

◆ l3gd20h_set_boot()

uint8_t l3gd20h_set_boot ( l3gd20h_handle_t * handle,
l3gd20h_boot_t boot )

set the boot

Parameters
[in]*handlepointer to an l3gd20h handle structure
[in]bootboot mode
Returns
status code
  • 0 success
  • 1 set boot failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1880 of file driver_l3gd20h.c.

◆ l3gd20h_set_data_format()

uint8_t l3gd20h_set_data_format ( l3gd20h_handle_t * handle,
l3gd20h_data_format_t data_format )

set the data format

Parameters
[in]*handlepointer to an l3gd20h handle structure
[in]data_formatdata format
Returns
status code
  • 0 success
  • 1 set data format failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1510 of file driver_l3gd20h.c.

◆ l3gd20h_set_edge_trigger()

uint8_t l3gd20h_set_edge_trigger ( l3gd20h_handle_t * handle,
l3gd20h_bool_t enable )

enable or disable the edge trigger

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

Definition at line 547 of file driver_l3gd20h.c.

◆ l3gd20h_set_full_scale()

uint8_t l3gd20h_set_full_scale ( l3gd20h_handle_t * handle,
l3gd20h_full_scale_t full_scale )

set the full scale

Parameters
[in]*handlepointer to an l3gd20h handle structure
[in]full_scalefull scale
Returns
status code
  • 0 success
  • 1 set full scale failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1584 of file driver_l3gd20h.c.

◆ l3gd20h_set_high_pass_filter()

uint8_t l3gd20h_set_high_pass_filter ( l3gd20h_handle_t * handle,
l3gd20h_bool_t enable )

enable or disable high pass filter

Parameters
[in]*handlepointer to an l3gd20h handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set high pass filter failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2102 of file driver_l3gd20h.c.

◆ l3gd20h_set_high_pass_filter_cut_off_frequency()

uint8_t l3gd20h_set_high_pass_filter_cut_off_frequency ( l3gd20h_handle_t * handle,
l3gd20h_high_pass_filter_cut_off_frequency_t frequency )

set the high pass filter cut off frequency

Parameters
[in]*handlepointer to an l3gd20h handle structure
[in]frequencyhigh pass filter cut off frequency
Returns
status code
  • 0 success
  • 1 set high pass filter cut off frequency failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 770 of file driver_l3gd20h.c.

◆ l3gd20h_set_high_pass_filter_mode()

uint8_t l3gd20h_set_high_pass_filter_mode ( l3gd20h_handle_t * handle,
l3gd20h_high_pass_filter_mode_t mode )

set the high pass filter mode

Parameters
[in]*handlepointer to an l3gd20h handle structure
[in]modehigh pass filter mode
Returns
status code
  • 0 success
  • 1 set high pass filter mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 696 of file driver_l3gd20h.c.

◆ l3gd20h_set_high_pass_filter_reference()

uint8_t l3gd20h_set_high_pass_filter_reference ( l3gd20h_handle_t * handle,
uint8_t value )

set the high pass filter reference

Parameters
[in]*handlepointer to an l3gd20h handle structure
[in]valuehigh pass filter reference value
Returns
status code
  • 0 success
  • 1 set high pass filter reference failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2324 of file driver_l3gd20h.c.

◆ l3gd20h_set_iic()

uint8_t l3gd20h_set_iic ( l3gd20h_handle_t * handle,
l3gd20h_bool_t enable )

enable or disable the iic interface

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

Definition at line 3333 of file driver_l3gd20h.c.

◆ l3gd20h_set_interface()

uint8_t l3gd20h_set_interface ( l3gd20h_handle_t * handle,
l3gd20h_interface_t interface )

set the chip interface

Parameters
[in]*handlepointer to an l3gd20h handle structure
[in]interfacechip interface
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 183 of file driver_l3gd20h.c.

◆ l3gd20h_set_level_sensitive_latched()

uint8_t l3gd20h_set_level_sensitive_latched ( l3gd20h_handle_t * handle,
l3gd20h_bool_t enable )

enable or disable the level sensitive latched

Parameters
[in]*handlepointer to an l3gd20h handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set level sensitive latched failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1658 of file driver_l3gd20h.c.

◆ l3gd20h_set_level_trigger()

uint8_t l3gd20h_set_level_trigger ( l3gd20h_handle_t * handle,
l3gd20h_bool_t enable )

enable or disable the level trigger

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

Definition at line 622 of file driver_l3gd20h.c.

◆ l3gd20h_set_mode()

uint8_t l3gd20h_set_mode ( l3gd20h_handle_t * handle,
l3gd20h_mode_t mode )

set the chip mode

Parameters
[in]*handlepointer to an l3gd20h 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 269 of file driver_l3gd20h.c.

◆ l3gd20h_set_out_selection()

uint8_t l3gd20h_set_out_selection ( l3gd20h_handle_t * handle,
l3gd20h_selection_t selection )

set the out selection

Parameters
[in]*handlepointer to an l3gd20h handle structure
[in]selectionout selection
Returns
status code
  • 0 success
  • 1 set out selection failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2250 of file driver_l3gd20h.c.

◆ l3gd20h_set_rate_bandwidth()

uint8_t l3gd20h_set_rate_bandwidth ( l3gd20h_handle_t * handle,
l3gd20h_lodr_odr_bw_t rate_bandwidth )

set the rate bandwidth

Parameters
[in]*handlepointer to an l3gd20h handle structure
[in]rate_bandwidthrate bandwidth
Returns
status code
  • 0 success
  • 1 set rate bandwidth failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 445 of file driver_l3gd20h.c.

◆ l3gd20h_set_self_test()

uint8_t l3gd20h_set_self_test ( l3gd20h_handle_t * handle,
l3gd20h_self_test_t self_test )

set the self test

Parameters
[in]*handlepointer to an l3gd20h handle structure
[in]self_testself test
Returns
status code
  • 0 success
  • 1 set self test failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1732 of file driver_l3gd20h.c.

◆ l3gd20h_set_spi_wire()

uint8_t l3gd20h_set_spi_wire ( l3gd20h_handle_t * handle,
l3gd20h_spi_wire_t spi_wire )

set the spi wire

Parameters
[in]*handlepointer to an l3gd20h handle structure
[in]spi_wirespi wire
Returns
status code
  • 0 success
  • 1 set spi wire failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1806 of file driver_l3gd20h.c.

◆ l3gd20h_soft_reset()

uint8_t l3gd20h_soft_reset ( l3gd20h_handle_t * handle)

soft reset the device

Parameters
[in]*handlepointer to an l3gd20h handle structure
Returns
status code
  • 0 success
  • 1 soft reset failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3406 of file driver_l3gd20h.c.