tilt4  2.1.0.0
Modules | Functions
Tilt 4 Click Driver

API for configuring and manipulating Tilt 4 Click driver. More...

Modules

 Tilt 4 MikroBUS Map
 MikroBUS pin mapping of Tilt 4 Click driver.
 
 Tilt4_set
 

Functions

void tilt4_cfg_setup (tilt4_cfg_t *cfg)
 Tilt 4 configuration object setup function. More...
 
err_t tilt4_init (tilt4_t *ctx, tilt4_cfg_t *cfg)
 Tilt 4 initialization function. More...
 
uint8_t tilt4_read_int_state (tilt4_t *ctx)
 Tilt 4 Interrupt pin reading function. More...
 
void tilt4_set_led_state (tilt4_t *ctx, uint8_t pin_state)
 Tilt 4 LED pin setting function. More...
 

Detailed Description

API for configuring and manipulating Tilt 4 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ tilt4_cfg_setup()

void tilt4_cfg_setup ( tilt4_cfg_t cfg)

Tilt 4 configuration object setup function.

This function initializes Click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See tilt4_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ tilt4_init()

err_t tilt4_init ( tilt4_t ctx,
tilt4_cfg_t cfg 
)

Tilt 4 initialization function.

This function initializes all necessary pins and peripherals used for this Click board.

Parameters
[out]ctx: Click context object. See tilt4_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See tilt4_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ tilt4_read_int_state()

uint8_t tilt4_read_int_state ( tilt4_t ctx)

Tilt 4 Interrupt pin reading function.

This function reads the state of the interrupt pin of Tilt 4 Click board.

Parameters
[in]ctx: Click context object. See tilt4_t object definition for detailed explanation.
Returns
  • 0 - Low pin state,
  • 1 - High pin state.
Note
None.

◆ tilt4_set_led_state()

void tilt4_set_led_state ( tilt4_t ctx,
uint8_t  pin_state 
)

Tilt 4 LED pin setting function.

This function sets the LED pin on the selected level level of Tilt 4 Click board.

Parameters
[in]ctx: Click context object. See tilt4_t object definition for detailed explanation.
[in]pin_state: State of the LED pin.
Returns
Nothing.
Note
None.