tilt 2.0.0.0
Public function

Functions

void tilt_cfg_setup (tilt_cfg_t *cfg)
 Config Object Initialization function.
 
TILT_RETVAL tilt_init (tilt_t *ctx, tilt_cfg_t *cfg)
 Initialization function.
 
uint8_t tilt_left (tilt_t *ctx)
 Check the tilt left movement's direction function.
 
uint8_t tilt_right (tilt_t *ctx)
 Check the tilt right movement's direction function.
 
uint8_t tilt_up (tilt_t *ctx)
 Check the tilt up movement's direction function.
 
uint8_t tilt_down (tilt_t *ctx)
 Check the tilt down movement's direction function.
 
uint8_t tilt_direction (tilt_t *ctx)
 Check the tilt movement's direction function.
 

Detailed Description

Function Documentation

◆ tilt_cfg_setup()

void tilt_cfg_setup ( tilt_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ tilt_direction()

uint8_t tilt_direction ( tilt_t * ctx)

Check the tilt movement's direction function.

Parameters
ctxClick object.
Returns
  • 2 : left movement direction;
  • 3 : right movement direction;
  • 4 : up movement direction;
  • 5 : down movement direction;

@description This function check the tilt movement's direction: left, right, up or down, of RPI-1035 Surface Mount Type 4-Direction Detector on Tilt click board.

◆ tilt_down()

uint8_t tilt_down ( tilt_t * ctx)

Check the tilt down movement's direction function.

Parameters
ctxClick object.
Returns
  • 0 : other movement direction;
  • 1 : down movement direction;

@description This function check the tilt down movement's direction of RPI-1035 Surface Mount Type 4-Direction Detector on Tilt click board.

◆ tilt_init()

TILT_RETVAL tilt_init ( tilt_t * ctx,
tilt_cfg_t * cfg )

Initialization function.

Parameters
tiltClick object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.

◆ tilt_left()

uint8_t tilt_left ( tilt_t * ctx)

Check the tilt left movement's direction function.

Parameters
ctxClick object.
Returns
  • 0 : other movement direction;
  • 1 : left movement direction;

@description This function check the tilt left movement's direction of RPI-1035 Surface Mount Type 4-Direction Detector on Tilt click board.

◆ tilt_right()

uint8_t tilt_right ( tilt_t * ctx)

Check the tilt right movement's direction function.

Parameters
ctxClick object.
Returns
  • 0 : other movement direction;
  • 1 : right movement direction;

@description This function check the tilt right movement's direction of RPI-1035 Surface Mount Type 4-Direction Detector on Tilt click board.

◆ tilt_up()

uint8_t tilt_up ( tilt_t * ctx)

Check the tilt up movement's direction function.

Parameters
ctxClick object.
Returns
  • 0 : other movement direction;
  • 1 : up movement direction;

@description This function check the tilt up movement's direction of RPI-1035 Surface Mount Type 4-Direction Detector on Tilt click board.