tilt3  2.0.0.0
Modules | Functions
Tilt 3 Click Driver

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

Modules

 Tilt 3 Settings
 Settings of Tilt 3 Click driver.
 
 Tilt 3 MikroBUS Map
 MikroBUS pin mapping of Tilt 3 Click driver.
 

Functions

void tilt3_cfg_setup (tilt3_cfg_t *cfg)
 Tilt 3 configuration object setup function. More...
 
err_t tilt3_init (tilt3_t *ctx, tilt3_cfg_t *cfg)
 Tilt 3 initialization function. More...
 
void tilt3_enable_switch (tilt3_t *ctx)
 Tilt 3 enable switch function. More...
 
void tilt3_disable_switch (tilt3_t *ctx)
 Tilt 3 disable switch function. More...
 
uint8_t tilt3_get_switch_state (tilt3_t *ctx)
 Tilt 3 get switch state function. More...
 

Detailed Description

API for configuring and manipulating Tilt 3 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

◆ tilt3_cfg_setup()

void tilt3_cfg_setup ( tilt3_cfg_t cfg)

Tilt 3 configuration object setup function.

This function initializes Click configuration structure to initial values.

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

◆ tilt3_disable_switch()

void tilt3_disable_switch ( tilt3_t ctx)

Tilt 3 disable switch function.

This function disables the tilt switch by setting the EN pin to the low logic state.

Parameters
[in]ctx: Click context object. See tilt3_t object definition for detailed explanation.
Returns
Nothing.
Note
None.

◆ tilt3_enable_switch()

void tilt3_enable_switch ( tilt3_t ctx)

Tilt 3 enable switch function.

This function enables the tilt switch by setting the EN pin to the high logic state.

Parameters
[in]ctx: Click context object. See tilt3_t object definition for detailed explanation.
Returns
Nothing.
Note
None.

◆ tilt3_get_switch_state()

uint8_t tilt3_get_switch_state ( tilt3_t ctx)

Tilt 3 get switch state function.

This function returns the INT pin logic state which indicates the tilt switch state.

Parameters
[in]ctx: Click context object. See tilt3_t object definition for detailed explanation.
Returns
  • 0 - Switch OFF,
  • 1 - Switch ON.
Note
None.

◆ tilt3_init()

err_t tilt3_init ( tilt3_t ctx,
tilt3_cfg_t cfg 
)

Tilt 3 initialization function.

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

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