expand14
2.0.0.0
|
API for configuring and manipulating Expand 14 Click driver. More...
Modules | |
Expand 14 Registers List | |
List of registers of Expand 14 Click driver. | |
Expand 14 Registers Settings | |
Settings for registers of Expand 14 Click driver. | |
Expand 14 MikroBUS Map | |
MikroBUS pin mapping of Expand 14 Click driver. | |
Functions | |
void | expand14_cfg_setup (expand14_cfg_t *cfg) |
Expand 14 configuration object setup function. More... | |
err_t | expand14_init (expand14_t *ctx, expand14_cfg_t *cfg) |
Expand 14 initialization function. More... | |
err_t | expand14_default_cfg (expand14_t *ctx) |
Expand 14 default configuration function. More... | |
err_t | expand14_generic_write (expand14_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Expand 14 I2C writing function. More... | |
err_t | expand14_generic_read (expand14_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Expand 14 I2C reading function. More... | |
err_t | expand14_write_register (expand14_t *ctx, uint8_t reg, uint8_t data_in) |
Expand 14 write register function. More... | |
err_t | expand14_read_register (expand14_t *ctx, uint8_t reg, uint8_t *data_out) |
Expand 14 read register function. More... | |
err_t | expand14_set_pin_direction (expand14_t *ctx, uint8_t direction, uint8_t port, uint8_t pin_mask) |
Expand 14 set pin direction function. More... | |
err_t | expand14_set_all_pins_direction (expand14_t *ctx, uint8_t direction) |
Expand 14 set all pins direction function. More... | |
err_t | expand14_set_all_pins_value (expand14_t *ctx, uint8_t set_mask) |
Expand 14 set all pins value function. More... | |
err_t | expand14_set_pin_value (expand14_t *ctx, uint8_t port, uint8_t clr_mask, uint8_t set_mask) |
Expand 14 set pin value function. More... | |
err_t | expand14_read_port_value (expand14_t *ctx, uint8_t port, uint8_t *data_out) |
Expand 14 read port value function. More... | |
uint8_t | expand14_get_int_pin (expand14_t *ctx) |
Expand 14 get INT pin function. More... | |
API for configuring and manipulating Expand 14 Click driver.
void expand14_cfg_setup | ( | expand14_cfg_t * | cfg | ) |
Expand 14 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See expand14_cfg_t object definition for detailed explanation. |
err_t expand14_default_cfg | ( | expand14_t * | ctx | ) |
Expand 14 default configuration function.
This function executes a default configuration of Expand 14 click board.
[in] | ctx | : Click context object. See expand14_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand14_generic_read | ( | expand14_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
Expand 14 I2C reading function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See expand14_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand14_generic_write | ( | expand14_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
Expand 14 I2C writing function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See expand14_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. uint8_t expand14_get_int_pin | ( | expand14_t * | ctx | ) |
Expand 14 get INT pin function.
This function returns the logic level of the INT pin.
[in] | ctx | : Click context object. See expand14_t object definition for detailed explanation. |
err_t expand14_init | ( | expand14_t * | ctx, |
expand14_cfg_t * | cfg | ||
) |
Expand 14 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See expand14_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See expand14_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand14_read_port_value | ( | expand14_t * | ctx, |
uint8_t | port, | ||
uint8_t * | data_out | ||
) |
Expand 14 read port value function.
This function reads the value of the selected port input pins.
[in] | ctx | : Click context object. See expand14_t object definition for detailed explanation. |
[in] | port | :
|
[out] | data_out | : Port value. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand14_read_register | ( | expand14_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out | ||
) |
Expand 14 read register function.
This function reads a data byte from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See expand14_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand14_set_all_pins_direction | ( | expand14_t * | ctx, |
uint8_t | direction | ||
) |
Expand 14 set all pins direction function.
This function sets the direction of all pins.
[in] | ctx | : Click context object. See expand14_t object definition for detailed explanation. |
[in] | direction | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand14_set_all_pins_value | ( | expand14_t * | ctx, |
uint8_t | set_mask | ||
) |
Expand 14 set all pins value function.
This function sets the value of all output pins.
[in] | ctx | : Click context object. See expand14_t object definition for detailed explanation. |
[in] | set_mask | : Pin set mask. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand14_set_pin_direction | ( | expand14_t * | ctx, |
uint8_t | direction, | ||
uint8_t | port, | ||
uint8_t | pin_mask | ||
) |
Expand 14 set pin direction function.
This function sets the direction of the selected pins.
[in] | ctx | : Click context object. See expand14_t object definition for detailed explanation. |
[in] | direction | :
|
[in] | port | :
|
[in] | pin_mask | : Pin mask. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand14_set_pin_value | ( | expand14_t * | ctx, |
uint8_t | port, | ||
uint8_t | clr_mask, | ||
uint8_t | set_mask | ||
) |
Expand 14 set pin value function.
This function sets the value of the selected pins.
[in] | ctx | : Click context object. See expand14_t object definition for detailed explanation. |
[in] | port | :
|
[in] | clr_mask | : Pin clear mask. |
[in] | set_mask | : Pin set mask. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand14_write_register | ( | expand14_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in | ||
) |
Expand 14 write register function.
This function writes a data byte to the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See expand14_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.