solidswitch 2.0.0.0
|
API for configuring and manipulating SolidSwitch Click driver. More...
Topics | |
SolidSwitch Registers Settings | |
Settings for registers of SolidSwitch Click driver. | |
SolidSwitch MikroBUS Map | |
MikroBUS pin mapping of SolidSwitch Click driver. | |
Functions | |
void | solidswitch_cfg_setup (solidswitch_cfg_t *cfg) |
SolidSwitch configuration object setup function. | |
err_t | solidswitch_init (solidswitch_t *ctx, solidswitch_cfg_t *cfg) |
SolidSwitch initialization function. | |
err_t | solidswitch_default_cfg (solidswitch_t *ctx) |
SolidSwitch default configuration function. | |
err_t | solidswitch_write_single (solidswitch_t *ctx, uint8_t logic_state) |
SolidSwitch I2C writing logic state function. | |
err_t | solidswitch_write_two_bytes (solidswitch_t *ctx, uint8_t logic_state, uint8_t int_mask) |
SolidSwitch I2C writing logic state and interrupt mask function. | |
err_t | solidswitch_read_single (solidswitch_t *ctx, uint8_t *logic_state) |
SolidSwitch I2C reading logic state function. | |
err_t | solidswitch_read_two_bytes (solidswitch_t *ctx, uint8_t *logic_state, uint8_t *transition_flags) |
SolidSwitch I2C reading logic state and transition flags function. | |
void | solidswitch_reset (solidswitch_t *ctx) |
SolidSwitch reset function. | |
uint8_t | solidswitch_get_int_state (solidswitch_t *ctx) |
SolidSwitch get int pin state function. | |
API for configuring and manipulating SolidSwitch Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void solidswitch_cfg_setup | ( | solidswitch_cfg_t * | cfg | ) |
SolidSwitch configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See solidswitch_cfg_t object definition for detailed explanation. |
err_t solidswitch_default_cfg | ( | solidswitch_t * | ctx | ) |
SolidSwitch default configuration function.
This function executes a default configuration of SolidSwitch click board.
[in] | ctx | : Click context object. See solidswitch_t object definition for detailed explanation. |
0
- Success, -1
- Error.uint8_t solidswitch_get_int_state | ( | solidswitch_t * | ctx | ) |
SolidSwitch get int pin state function.
This function reads the state of int pin.
[in] | ctx | : Click context object. See solidswitch_t object definition for detailed explanation. |
err_t solidswitch_init | ( | solidswitch_t * | ctx, |
solidswitch_cfg_t * | cfg ) |
SolidSwitch initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See solidswitch_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See solidswitch_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t solidswitch_read_single | ( | solidswitch_t * | ctx, |
uint8_t * | logic_state ) |
SolidSwitch I2C reading logic state function.
This function reads a single byte by using I2C serial interface.
[in] | ctx | : Click context object. See solidswitch_t object definition for detailed explanation. |
[out] | logic_state | : Logic state output. |
0
- Success, -1
- Error.err_t solidswitch_read_two_bytes | ( | solidswitch_t * | ctx, |
uint8_t * | logic_state, | ||
uint8_t * | transition_flags ) |
SolidSwitch I2C reading logic state and transition flags function.
This function reads two bytes by using I2C serial interface.
[in] | ctx | : Click context object. See solidswitch_t object definition for detailed explanation. |
[out] | logic_state | : Logic state output. |
[out] | transition_flags | : Transition flags output. |
0
- Success, -1
- Error.void solidswitch_reset | ( | solidswitch_t * | ctx | ) |
SolidSwitch reset function.
This function resets the device via rst pin.
[in] | ctx | : Click context object. See solidswitch_t object definition for detailed explanation. |
err_t solidswitch_write_single | ( | solidswitch_t * | ctx, |
uint8_t | logic_state ) |
SolidSwitch I2C writing logic state function.
This function writes a single byte by using I2C serial interface.
[in] | ctx | : Click context object. See solidswitch_t object definition for detailed explanation. |
[in] | logic_state | : Logic state mask. |
0
- Success, -1
- Error.err_t solidswitch_write_two_bytes | ( | solidswitch_t * | ctx, |
uint8_t | logic_state, | ||
uint8_t | int_mask ) |
SolidSwitch I2C writing logic state and interrupt mask function.
This function writes two bytes by using I2C serial interface.
[in] | ctx | : Click context object. See solidswitch_t object definition for detailed explanation. |
[in] | logic_state | : Logic state mask. |
[in] | int_mask | : Interrupt mask. |
0
- Success, -1
- Error.