timerrelay 2.1.0.0
Timer Relay Click Driver

API for configuring and manipulating Timer Relay Click driver. More...

Topics

 Timer Relay Registers Settings
 Settings for registers of Timer Relay Click driver.
 
 Timer Relay MikroBUS Map
 MikroBUS pin mapping of Timer Relay Click driver.
 

Functions

void timerrelay_cfg_setup (timerrelay_cfg_t *cfg)
 Timer Relay configuration object setup function.
 
err_t timerrelay_init (timerrelay_t *ctx, timerrelay_cfg_t *cfg)
 Timer Relay initialization function.
 
err_t timerrelay_default_cfg (timerrelay_t *ctx)
 Timer Relay default configuration function.
 
err_t timerrelay_generic_write (timerrelay_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 Timer Relay data writing function.
 
void timerrelay_set_vcc_sel (timerrelay_t *ctx, uint8_t vcc_sel)
 Timer Relay set Vcc select settings function.
 
err_t timerrelay_set_wiper_pos (timerrelay_t *ctx, uint8_t wiper_pos)
 Timer Relay set wiper position function.
 
err_t timerrelay_set_delay (timerrelay_t *ctx, uint8_t delay)
 Timer Relay set delay function.
 
void timerrelay_set_rst_pin (timerrelay_t *ctx, uint8_t pin_state)
 Timer Relay set RST pin state function.
 
void timerrelay_set_trg_pin (timerrelay_t *ctx, uint8_t pin_state)
 Timer Relay set TRG pin state function.
 
void timerrelay_activate_reset (timerrelay_t *ctx)
 Timer Relay reset timer function.
 
void timerrelay_activate_trigger (timerrelay_t *ctx)
 Timer Relay activate trigger function.
 

Detailed Description

API for configuring and manipulating Timer Relay 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

◆ timerrelay_activate_reset()

void timerrelay_activate_reset ( timerrelay_t * ctx)

Timer Relay reset timer function.

This function is used to reset timer of Timer Relay click board.

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

◆ timerrelay_activate_trigger()

void timerrelay_activate_trigger ( timerrelay_t * ctx)

Timer Relay activate trigger function.

This function is used to activate trigger of Timer Relay click board.

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

◆ timerrelay_cfg_setup()

void timerrelay_cfg_setup ( timerrelay_cfg_t * cfg)

Timer Relay configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ timerrelay_default_cfg()

err_t timerrelay_default_cfg ( timerrelay_t * ctx)

Timer Relay default configuration function.

This function executes a default configuration of Timer Relay click board.

Parameters
[in]ctx: Click context object. See timerrelay_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ timerrelay_generic_write()

err_t timerrelay_generic_write ( timerrelay_t * ctx,
uint8_t reg,
uint8_t * data_in,
uint8_t len )

Timer Relay data writing function.

This function writes a desired number of data bytes starting from the selected register by using SPI serial interface.

Parameters
[in]ctx: Click context object. See timerrelay_t object definition for detailed explanation.
[in]reg: Start register address.
[in]data_in: Data to be written.
[in]len: Number of bytes to be written.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ timerrelay_init()

err_t timerrelay_init ( timerrelay_t * ctx,
timerrelay_cfg_t * cfg )

Timer Relay initialization function.

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

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

◆ timerrelay_set_delay()

err_t timerrelay_set_delay ( timerrelay_t * ctx,
uint8_t delay )

Timer Relay set delay function.

This function is used to set delay in seconds up to 60 Seconds.

Parameters
[in]ctx: Click context object. See timerrelay_t object definition for detailed explanation.
[in]delay: Delay to be set.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ timerrelay_set_rst_pin()

void timerrelay_set_rst_pin ( timerrelay_t * ctx,
uint8_t pin_state )

Timer Relay set RST pin state function.

This function is used to set state of the RST pin of Timer Relay click board.

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

◆ timerrelay_set_trg_pin()

void timerrelay_set_trg_pin ( timerrelay_t * ctx,
uint8_t pin_state )

Timer Relay set TRG pin state function.

This function is used to set state of the TRG pin of Timer Relay click board.

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

◆ timerrelay_set_vcc_sel()

void timerrelay_set_vcc_sel ( timerrelay_t * ctx,
uint8_t vcc_sel )

Timer Relay set Vcc select settings function.

This function is used to set appropriate Vcc selection settings in order to determine the delay time.

Parameters
[in]ctx: Click context object. See timerrelay_t object definition for detailed explanation.
[in]vcc_sel: Vcc select state.
Returns
Nothing.
Note
If a wrong setting is set delays will not work properly.

◆ timerrelay_set_wiper_pos()

err_t timerrelay_set_wiper_pos ( timerrelay_t * ctx,
uint8_t wiper_pos )

Timer Relay set wiper position function.

This function is used to set wiper position of Timer Relay click board.

Parameters
[in]ctx: Click context object. See timerrelay_t object definition for detailed explanation.
[in]wiper_pos: Wiper position to be set.
Returns
Nothing.
Note
None.