timerrelay 2.1.0.0
|
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. | |
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.
void timerrelay_activate_reset | ( | timerrelay_t * | ctx | ) |
Timer Relay reset timer function.
This function is used to reset timer of Timer Relay click board.
[in] | ctx | : Click context object. See timerrelay_t object definition for detailed explanation. |
void timerrelay_activate_trigger | ( | timerrelay_t * | ctx | ) |
Timer Relay activate trigger function.
This function is used to activate trigger of Timer Relay click board.
[in] | ctx | : Click context object. See timerrelay_t object definition for detailed explanation. |
void timerrelay_cfg_setup | ( | timerrelay_cfg_t * | cfg | ) |
Timer Relay configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See timerrelay_cfg_t object definition for detailed explanation. |
err_t timerrelay_default_cfg | ( | timerrelay_t * | ctx | ) |
Timer Relay default configuration function.
This function executes a default configuration of Timer Relay click board.
[in] | ctx | : Click context object. See timerrelay_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. 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.
[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. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. 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.
[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. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. 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.
[in] | ctx | : Click context object. See timerrelay_t object definition for detailed explanation. |
[in] | delay | : Delay to be set. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. 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.
[in] | ctx | : Click context object. See timerrelay_t object definition for detailed explanation. |
[in] | pin_state | : State of the RST 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.
[in] | ctx | : Click context object. See timerrelay_t object definition for detailed explanation. |
[in] | pin_state | : State of the TRG pin. |
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.
[in] | ctx | : Click context object. See timerrelay_t object definition for detailed explanation. |
[in] | vcc_sel | : Vcc select state. |
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.
[in] | ctx | : Click context object. See timerrelay_t object definition for detailed explanation. |
[in] | wiper_pos | : Wiper position to be set. |