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

l3gd20h interrupt driver modules More...

Collaboration diagram for l3gd20h interrupt driver function:

Enumerations

enum  l3gd20h_interrupt_active_level_t { L3GD20H_INTERRUPT_ACTIVE_LEVEL_HIGH = 0x00 , L3GD20H_INTERRUPT_ACTIVE_LEVEL_LOW = 0x01 }
 l3gd20h interrupt active level enumeration definition More...
enum  l3gd20h_pin_type_t { L3GD20H_PIN_PUSH_PULL = 0x00 , L3GD20H_PIN_OPEN_DRAIN = 0x01 }
 l3gd20h interrupt pin type enumeration definition More...
enum  l3gd20h_counter_mode_t { L3GD20H_COUNTER_MODE_RESET = 0x00 , L3GD20H_COUNTER_MODE_DECREMENT = 0x01 }
 l3gd20h counter mode enumeration definition More...
enum  l3gd20h_interrupt_event_t {
  L3GD20H_INTERRUPT_EVENT_AND_OR_COMBINATION = 0x07 , L3GD20H_INTERRUPT_EVENT_LATCH = 0x06 , L3GD20H_INTERRUPT_EVENT_Z_HIGH_EVENT = 0x05 , L3GD20H_INTERRUPT_EVENT_Z_LOW_EVENT = 0x04 ,
  L3GD20H_INTERRUPT_EVENT_Y_HIGH_EVENT = 0x03 , L3GD20H_INTERRUPT_EVENT_Y_LOW_EVENT = 0x02 , L3GD20H_INTERRUPT_EVENT_X_HIGH_EVENT = 0x01 , L3GD20H_INTERRUPT_EVENT_X_LOW_EVENT = 0x00
}
 l3gd20h interrupt event enumeration definition More...
enum  l3gd20h_interrupt_t {
  L3GD20H_INTERRUPT1_INTERRUPT_ACTIVE = 0x10 | (1 << 6) , L3GD20H_INTERRUPT1_Z_HIGH = 0x10 | (1 << 5) , L3GD20H_INTERRUPT1_Z_LOW = 0x10 | (1 << 4) , L3GD20H_INTERRUPT1_Y_HIGH = 0x10 | (1 << 3) ,
  L3GD20H_INTERRUPT1_Y_LOW = 0x10 | (1 << 2) , L3GD20H_INTERRUPT1_X_HIGH = 0x10 | (1 << 1) , L3GD20H_INTERRUPT1_X_LOW = 0x10 | (1 << 0) , L3GD20H_INTERRUPT2_XYZ_OVERRUN = 0x20 | L3GD20H_STATUS_XYZ_OVERRUN ,
  L3GD20H_INTERRUPT2_Z_OVERRUN = 0x20 | L3GD20H_STATUS_Z_OVERRUN , L3GD20H_INTERRUPT2_Y_OVERRUN = 0x20 | L3GD20H_STATUS_Y_OVERRUN , L3GD20H_INTERRUPT2_X_OVERRUN = 0x20 | L3GD20H_STATUS_X_OVERRUN , L3GD20H_INTERRUPT2_XYZ_DATA_READY = 0x20 | L3GD20H_STATUS_XYZ_DATA_READY ,
  L3GD20H_INTERRUPT2_Z_DATA_READY = 0x20 | L3GD20H_STATUS_Z_DATA_READY , L3GD20H_INTERRUPT2_Y_DATA_READY = 0x20 | L3GD20H_STATUS_Y_DATA_READY , L3GD20H_INTERRUPT2_X_DATA_READY = 0x20 | L3GD20H_STATUS_X_DATA_READY , L3GD20H_INTERRUPT2_FIFO_THRESHOLD = 0x41 ,
  L3GD20H_INTERRUPT2_FIFO_OVERRRUN = 0x42 , L3GD20H_INTERRUPT2_FIFO_EMPTY = 0x43
}
 l3gd20h interrupt enumeration definition More...

Functions

uint8_t l3gd20h_set_interrupt1 (l3gd20h_handle_t *handle, l3gd20h_bool_t enable)
 enable or disable the interrupt1
uint8_t l3gd20h_get_interrupt1 (l3gd20h_handle_t *handle, l3gd20h_bool_t *enable)
 get the interrupt1 status
uint8_t l3gd20h_set_boot_on_interrupt1 (l3gd20h_handle_t *handle, l3gd20h_bool_t enable)
 enable or disable boot on the interrupt1
uint8_t l3gd20h_get_boot_on_interrupt1 (l3gd20h_handle_t *handle, l3gd20h_bool_t *enable)
 get the boot on the interrupt1 status
uint8_t l3gd20h_set_interrupt_active_level (l3gd20h_handle_t *handle, l3gd20h_interrupt_active_level_t level)
 set the interrupt active level
uint8_t l3gd20h_get_interrupt_active_level (l3gd20h_handle_t *handle, l3gd20h_interrupt_active_level_t *level)
 get the interrupt active level
uint8_t l3gd20h_set_interrupt_pin_type (l3gd20h_handle_t *handle, l3gd20h_pin_type_t pin_type)
 set the interrupt pin type
uint8_t l3gd20h_get_interrupt_pin_type (l3gd20h_handle_t *handle, l3gd20h_pin_type_t *pin_type)
 get the interrupt pin type
uint8_t l3gd20h_set_data_ready_on_interrupt2 (l3gd20h_handle_t *handle, l3gd20h_bool_t enable)
 enable or disable the data ready on interrupt2
uint8_t l3gd20h_get_data_ready_on_interrupt2 (l3gd20h_handle_t *handle, l3gd20h_bool_t *enable)
 get the data ready on interrupt2 status
uint8_t l3gd20h_set_fifo_threshold_on_interrupt2 (l3gd20h_handle_t *handle, l3gd20h_bool_t enable)
 enable or disable the fifo threshold on interrupt2
uint8_t l3gd20h_get_fifo_threshold_on_interrupt2 (l3gd20h_handle_t *handle, l3gd20h_bool_t *enable)
 get the fifo threshold on interrupt2 status
uint8_t l3gd20h_set_fifo_overrun_on_interrupt2 (l3gd20h_handle_t *handle, l3gd20h_bool_t enable)
 enable or disable the fifo overrun on interrupt2
uint8_t l3gd20h_get_fifo_overrun_on_interrupt2 (l3gd20h_handle_t *handle, l3gd20h_bool_t *enable)
 get the fifo overrun on interrupt2 status
uint8_t l3gd20h_set_fifo_empty_on_interrupt2 (l3gd20h_handle_t *handle, l3gd20h_bool_t enable)
 enable or disable the fifo empty on interrupt2
uint8_t l3gd20h_get_fifo_empty_on_interrupt2 (l3gd20h_handle_t *handle, l3gd20h_bool_t *enable)
 get the fifo empty on interrupt2 status
uint8_t l3gd20h_set_interrupt_selection (l3gd20h_handle_t *handle, l3gd20h_selection_t selection)
 set the interrupt selection
uint8_t l3gd20h_get_interrupt_selection (l3gd20h_handle_t *handle, l3gd20h_selection_t *selection)
 get the interrupt selection
uint8_t l3gd20h_set_interrupt_event (l3gd20h_handle_t *handle, l3gd20h_interrupt_event_t interrupt_event, l3gd20h_bool_t enable)
 set the interrupt event
uint8_t l3gd20h_get_interrupt_event (l3gd20h_handle_t *handle, l3gd20h_interrupt_event_t interrupt_event, l3gd20h_bool_t *enable)
 get the interrupt event
uint8_t l3gd20h_get_interrupt_source (l3gd20h_handle_t *handle, uint8_t *src)
 get the interrupt source
uint8_t l3gd20h_set_x_interrupt_threshold (l3gd20h_handle_t *handle, uint16_t threshold)
 set the x interrupt threshold
uint8_t l3gd20h_get_x_interrupt_threshold (l3gd20h_handle_t *handle, uint16_t *threshold)
 get the x interrupt threshold
uint8_t l3gd20h_set_y_interrupt_threshold (l3gd20h_handle_t *handle, uint16_t threshold)
 set the y interrupt threshold
uint8_t l3gd20h_get_y_interrupt_threshold (l3gd20h_handle_t *handle, uint16_t *threshold)
 get the y interrupt threshold
uint8_t l3gd20h_set_z_interrupt_threshold (l3gd20h_handle_t *handle, uint16_t threshold)
 set the z interrupt threshold
uint8_t l3gd20h_get_z_interrupt_threshold (l3gd20h_handle_t *handle, uint16_t *threshold)
 get the z interrupt threshold
uint8_t l3gd20h_interrupt_threshold_convert_to_register (l3gd20h_handle_t *handle, float dps, uint16_t *reg)
 convert the interrupt threshold real data to the register raw data
uint8_t l3gd20h_interrupt_threshold_convert_to_data (l3gd20h_handle_t *handle, uint16_t reg, float *dps)
 convert the interrupt threshold register raw data to the real data
uint8_t l3gd20h_set_counter_mode (l3gd20h_handle_t *handle, l3gd20h_counter_mode_t counter_mode)
 set the counter mode
uint8_t l3gd20h_get_counter_mode (l3gd20h_handle_t *handle, l3gd20h_counter_mode_t *counter_mode)
 get the counter mode
uint8_t l3gd20h_set_wait (l3gd20h_handle_t *handle, l3gd20h_bool_t enable)
 enable or disable the wait
uint8_t l3gd20h_get_wait (l3gd20h_handle_t *handle, l3gd20h_bool_t *enable)
 get the wait status
uint8_t l3gd20h_set_duration (l3gd20h_handle_t *handle, uint8_t duration)
 set the wait duration
uint8_t l3gd20h_get_duration (l3gd20h_handle_t *handle, uint8_t *duration)
 get the wait duration
uint8_t l3gd20h_set_data_ready_active_level (l3gd20h_handle_t *handle, l3gd20h_interrupt_active_level_t level)
 set the data ready active level
uint8_t l3gd20h_get_data_ready_active_level (l3gd20h_handle_t *handle, l3gd20h_interrupt_active_level_t *level)
 get the data ready active level

Detailed Description

l3gd20h interrupt driver modules

Enumeration Type Documentation

◆ l3gd20h_counter_mode_t

l3gd20h counter mode enumeration definition

Enumerator
L3GD20H_COUNTER_MODE_RESET 

reset mode

L3GD20H_COUNTER_MODE_DECREMENT 

decrement mode

Definition at line 284 of file driver_l3gd20h.h.

◆ l3gd20h_interrupt_active_level_t

l3gd20h interrupt active level enumeration definition

Enumerator
L3GD20H_INTERRUPT_ACTIVE_LEVEL_HIGH 

active level high

L3GD20H_INTERRUPT_ACTIVE_LEVEL_LOW 

active level low

Definition at line 266 of file driver_l3gd20h.h.

◆ l3gd20h_interrupt_event_t

l3gd20h interrupt event enumeration definition

Enumerator
L3GD20H_INTERRUPT_EVENT_AND_OR_COMBINATION 

and or combination

L3GD20H_INTERRUPT_EVENT_LATCH 

latch

L3GD20H_INTERRUPT_EVENT_Z_HIGH_EVENT 

z high event

L3GD20H_INTERRUPT_EVENT_Z_LOW_EVENT 

z low event

L3GD20H_INTERRUPT_EVENT_Y_HIGH_EVENT 

y high event

L3GD20H_INTERRUPT_EVENT_Y_LOW_EVENT 

y low event

L3GD20H_INTERRUPT_EVENT_X_HIGH_EVENT 

x high event

L3GD20H_INTERRUPT_EVENT_X_LOW_EVENT 

x low event

Definition at line 293 of file driver_l3gd20h.h.

◆ l3gd20h_interrupt_t

l3gd20h interrupt enumeration definition

Enumerator
L3GD20H_INTERRUPT1_INTERRUPT_ACTIVE 

active

L3GD20H_INTERRUPT1_Z_HIGH 

z high

L3GD20H_INTERRUPT1_Z_LOW 

z low

L3GD20H_INTERRUPT1_Y_HIGH 

y high

L3GD20H_INTERRUPT1_Y_LOW 

y low

L3GD20H_INTERRUPT1_X_HIGH 

x high

L3GD20H_INTERRUPT1_X_LOW 

x low

L3GD20H_INTERRUPT2_XYZ_OVERRUN 

xyz overrun

L3GD20H_INTERRUPT2_Z_OVERRUN 

z overrun

L3GD20H_INTERRUPT2_Y_OVERRUN 

y overrun

L3GD20H_INTERRUPT2_X_OVERRUN 

x overrun

L3GD20H_INTERRUPT2_XYZ_DATA_READY 

xyz data ready

L3GD20H_INTERRUPT2_Z_DATA_READY 

z data ready

L3GD20H_INTERRUPT2_Y_DATA_READY 

y data ready

L3GD20H_INTERRUPT2_X_DATA_READY 

x data ready

L3GD20H_INTERRUPT2_FIFO_THRESHOLD 

fifo threshold

L3GD20H_INTERRUPT2_FIFO_OVERRRUN 

fifo overrun

L3GD20H_INTERRUPT2_FIFO_EMPTY 

fifo empty

Definition at line 308 of file driver_l3gd20h.h.

◆ l3gd20h_pin_type_t

l3gd20h interrupt pin type enumeration definition

Enumerator
L3GD20H_PIN_PUSH_PULL 

push pull

L3GD20H_PIN_OPEN_DRAIN 

open drain

Definition at line 275 of file driver_l3gd20h.h.

Function Documentation

◆ l3gd20h_get_boot_on_interrupt1()

uint8_t l3gd20h_get_boot_on_interrupt1 ( l3gd20h_handle_t * handle,
l3gd20h_bool_t * enable )

get the boot on the interrupt1 status

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

Definition at line 955 of file driver_l3gd20h.c.

◆ l3gd20h_get_counter_mode()

uint8_t l3gd20h_get_counter_mode ( l3gd20h_handle_t * handle,
l3gd20h_counter_mode_t * counter_mode )

get the counter mode

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

Definition at line 3069 of file driver_l3gd20h.c.

◆ l3gd20h_get_data_ready_active_level()

uint8_t l3gd20h_get_data_ready_active_level ( l3gd20h_handle_t * handle,
l3gd20h_interrupt_active_level_t * level )

get the data ready active level

Parameters
[in]*handlepointer to an l3gd20h handle structure
[out]*levelpointer to an interrupt active level buffer
Returns
status code
  • 0 success
  • 1 get data ready active level failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3296 of file driver_l3gd20h.c.

◆ l3gd20h_get_data_ready_on_interrupt2()

uint8_t l3gd20h_get_data_ready_on_interrupt2 ( l3gd20h_handle_t * handle,
l3gd20h_bool_t * enable )

get the data ready on interrupt2 status

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

Definition at line 1177 of file driver_l3gd20h.c.

◆ l3gd20h_get_duration()

uint8_t l3gd20h_get_duration ( l3gd20h_handle_t * handle,
uint8_t * duration )

get the wait duration

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

Definition at line 3222 of file driver_l3gd20h.c.

◆ l3gd20h_get_fifo_empty_on_interrupt2()

uint8_t l3gd20h_get_fifo_empty_on_interrupt2 ( l3gd20h_handle_t * handle,
l3gd20h_bool_t * enable )

get the fifo empty on interrupt2 status

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

Definition at line 1399 of file driver_l3gd20h.c.

◆ l3gd20h_get_fifo_overrun_on_interrupt2()

uint8_t l3gd20h_get_fifo_overrun_on_interrupt2 ( l3gd20h_handle_t * handle,
l3gd20h_bool_t * enable )

get the fifo overrun on interrupt2 status

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

Definition at line 1325 of file driver_l3gd20h.c.

◆ l3gd20h_get_fifo_threshold_on_interrupt2()

uint8_t l3gd20h_get_fifo_threshold_on_interrupt2 ( l3gd20h_handle_t * handle,
l3gd20h_bool_t * enable )

get the fifo threshold on interrupt2 status

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

Definition at line 1251 of file driver_l3gd20h.c.

◆ l3gd20h_get_interrupt1()

uint8_t l3gd20h_get_interrupt1 ( l3gd20h_handle_t * handle,
l3gd20h_bool_t * enable )

get the interrupt1 status

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

Definition at line 881 of file driver_l3gd20h.c.

◆ l3gd20h_get_interrupt_active_level()

uint8_t l3gd20h_get_interrupt_active_level ( l3gd20h_handle_t * handle,
l3gd20h_interrupt_active_level_t * level )

get the interrupt active level

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

Definition at line 1029 of file driver_l3gd20h.c.

◆ l3gd20h_get_interrupt_event()

uint8_t l3gd20h_get_interrupt_event ( l3gd20h_handle_t * handle,
l3gd20h_interrupt_event_t interrupt_event,
l3gd20h_bool_t * enable )

get the interrupt event

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

Definition at line 2667 of file driver_l3gd20h.c.

◆ l3gd20h_get_interrupt_pin_type()

uint8_t l3gd20h_get_interrupt_pin_type ( l3gd20h_handle_t * handle,
l3gd20h_pin_type_t * pin_type )

get the interrupt pin type

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

Definition at line 1103 of file driver_l3gd20h.c.

◆ l3gd20h_get_interrupt_selection()

uint8_t l3gd20h_get_interrupt_selection ( l3gd20h_handle_t * handle,
l3gd20h_selection_t * selection )

get the interrupt selection

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

Definition at line 2213 of file driver_l3gd20h.c.

◆ l3gd20h_get_interrupt_source()

uint8_t l3gd20h_get_interrupt_source ( l3gd20h_handle_t * handle,
uint8_t * src )

get the interrupt source

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

Definition at line 2704 of file driver_l3gd20h.c.

◆ l3gd20h_get_wait()

uint8_t l3gd20h_get_wait ( l3gd20h_handle_t * handle,
l3gd20h_bool_t * enable )

get the wait status

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

Definition at line 3143 of file driver_l3gd20h.c.

◆ l3gd20h_get_x_interrupt_threshold()

uint8_t l3gd20h_get_x_interrupt_threshold ( l3gd20h_handle_t * handle,
uint16_t * threshold )

get the x interrupt threshold

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

Definition at line 2800 of file driver_l3gd20h.c.

◆ l3gd20h_get_y_interrupt_threshold()

uint8_t l3gd20h_get_y_interrupt_threshold ( l3gd20h_handle_t * handle,
uint16_t * threshold )

get the y interrupt threshold

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

Definition at line 2895 of file driver_l3gd20h.c.

◆ l3gd20h_get_z_interrupt_threshold()

uint8_t l3gd20h_get_z_interrupt_threshold ( l3gd20h_handle_t * handle,
uint16_t * threshold )

get the z interrupt threshold

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

Definition at line 2990 of file driver_l3gd20h.c.

◆ l3gd20h_interrupt_threshold_convert_to_data()

uint8_t l3gd20h_interrupt_threshold_convert_to_data ( l3gd20h_handle_t * handle,
uint16_t reg,
float * dps )

convert the interrupt threshold register raw data to the real data

Parameters
[in]*handlepointer to an l3gd20h handle structure
[in]reginterrupt threshold raw data
[out]*dpspointer to an interrupt threshold real data buffer
Returns
status code
  • 0 success
  • 1 convert to data failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3492 of file driver_l3gd20h.c.

◆ l3gd20h_interrupt_threshold_convert_to_register()

uint8_t l3gd20h_interrupt_threshold_convert_to_register ( l3gd20h_handle_t * handle,
float dps,
uint16_t * reg )

convert the interrupt threshold real data to the register raw data

Parameters
[in]*handlepointer to an l3gd20h handle structure
[in]dpsinterrupt threshold real data
[out]*regpointer to an interrupt threshold raw data buffer
Returns
status code
  • 0 success
  • 1 convert to register failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3444 of file driver_l3gd20h.c.

◆ l3gd20h_set_boot_on_interrupt1()

uint8_t l3gd20h_set_boot_on_interrupt1 ( l3gd20h_handle_t * handle,
l3gd20h_bool_t enable )

enable or disable boot on the interrupt1

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

Definition at line 918 of file driver_l3gd20h.c.

◆ l3gd20h_set_counter_mode()

uint8_t l3gd20h_set_counter_mode ( l3gd20h_handle_t * handle,
l3gd20h_counter_mode_t counter_mode )

set the counter mode

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

Definition at line 3032 of file driver_l3gd20h.c.

◆ l3gd20h_set_data_ready_active_level()

uint8_t l3gd20h_set_data_ready_active_level ( l3gd20h_handle_t * handle,
l3gd20h_interrupt_active_level_t level )

set the data ready active level

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

Definition at line 3259 of file driver_l3gd20h.c.

◆ l3gd20h_set_data_ready_on_interrupt2()

uint8_t l3gd20h_set_data_ready_on_interrupt2 ( l3gd20h_handle_t * handle,
l3gd20h_bool_t enable )

enable or disable the data ready on interrupt2

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

Definition at line 1140 of file driver_l3gd20h.c.

◆ l3gd20h_set_duration()

uint8_t l3gd20h_set_duration ( l3gd20h_handle_t * handle,
uint8_t duration )

set the wait duration

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

Definition at line 3180 of file driver_l3gd20h.c.

◆ l3gd20h_set_fifo_empty_on_interrupt2()

uint8_t l3gd20h_set_fifo_empty_on_interrupt2 ( l3gd20h_handle_t * handle,
l3gd20h_bool_t enable )

enable or disable the fifo empty on interrupt2

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

Definition at line 1362 of file driver_l3gd20h.c.

◆ l3gd20h_set_fifo_overrun_on_interrupt2()

uint8_t l3gd20h_set_fifo_overrun_on_interrupt2 ( l3gd20h_handle_t * handle,
l3gd20h_bool_t enable )

enable or disable the fifo overrun on interrupt2

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

Definition at line 1288 of file driver_l3gd20h.c.

◆ l3gd20h_set_fifo_threshold_on_interrupt2()

uint8_t l3gd20h_set_fifo_threshold_on_interrupt2 ( l3gd20h_handle_t * handle,
l3gd20h_bool_t enable )

enable or disable the fifo threshold on interrupt2

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

Definition at line 1214 of file driver_l3gd20h.c.

◆ l3gd20h_set_interrupt1()

uint8_t l3gd20h_set_interrupt1 ( l3gd20h_handle_t * handle,
l3gd20h_bool_t enable )

enable or disable the interrupt1

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

Definition at line 844 of file driver_l3gd20h.c.

◆ l3gd20h_set_interrupt_active_level()

uint8_t l3gd20h_set_interrupt_active_level ( l3gd20h_handle_t * handle,
l3gd20h_interrupt_active_level_t level )

set the interrupt active level

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

Definition at line 992 of file driver_l3gd20h.c.

◆ l3gd20h_set_interrupt_event()

uint8_t l3gd20h_set_interrupt_event ( l3gd20h_handle_t * handle,
l3gd20h_interrupt_event_t interrupt_event,
l3gd20h_bool_t enable )

set the interrupt event

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

Definition at line 2629 of file driver_l3gd20h.c.

◆ l3gd20h_set_interrupt_pin_type()

uint8_t l3gd20h_set_interrupt_pin_type ( l3gd20h_handle_t * handle,
l3gd20h_pin_type_t pin_type )

set the interrupt pin type

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

Definition at line 1066 of file driver_l3gd20h.c.

◆ l3gd20h_set_interrupt_selection()

uint8_t l3gd20h_set_interrupt_selection ( l3gd20h_handle_t * handle,
l3gd20h_selection_t selection )

set the interrupt selection

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

Definition at line 2176 of file driver_l3gd20h.c.

◆ l3gd20h_set_wait()

uint8_t l3gd20h_set_wait ( l3gd20h_handle_t * handle,
l3gd20h_bool_t enable )

enable or disable the wait

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

Definition at line 3106 of file driver_l3gd20h.c.

◆ l3gd20h_set_x_interrupt_threshold()

uint8_t l3gd20h_set_x_interrupt_threshold ( l3gd20h_handle_t * handle,
uint16_t threshold )

set the x interrupt threshold

Parameters
[in]*handlepointer to an l3gd20h handle structure
[in]thresholdinterrupt threshold
Returns
status code
  • 0 success
  • 1 set x interrupt threshold failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 threshold is invalid
Note
none

Definition at line 2740 of file driver_l3gd20h.c.

◆ l3gd20h_set_y_interrupt_threshold()

uint8_t l3gd20h_set_y_interrupt_threshold ( l3gd20h_handle_t * handle,
uint16_t threshold )

set the y interrupt threshold

Parameters
[in]*handlepointer to an l3gd20h handle structure
[in]thresholdinterrupt threshold
Returns
status code
  • 0 success
  • 1 set y interrupt threshold failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 threshold is invalid
Note
none

Definition at line 2843 of file driver_l3gd20h.c.

◆ l3gd20h_set_z_interrupt_threshold()

uint8_t l3gd20h_set_z_interrupt_threshold ( l3gd20h_handle_t * handle,
uint16_t threshold )

set the z interrupt threshold

Parameters
[in]*handlepointer to an l3gd20h handle structure
[in]thresholdinterrupt threshold
Returns
status code
  • 0 success
  • 1 set z interrupt threshold failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 threshold is invalid
Note
none

Definition at line 2938 of file driver_l3gd20h.c.