expand16 2.1.0.0
|
API for configuring and manipulating Expand 16 Click driver. More...
Modules | |
Expand 16 Registers List | |
List of registers of Expand 16 Click driver. | |
Expand 16 Registers Settings | |
Settings for registers of Expand 16 Click driver. | |
Expand 16 MikroBUS Map | |
MikroBUS pin mapping of Expand 16 Click driver. | |
Functions | |
void | expand16_cfg_setup (expand16_cfg_t *cfg) |
Expand 16 configuration object setup function. More... | |
err_t | expand16_init (expand16_t *ctx, expand16_cfg_t *cfg) |
Expand 16 initialization function. More... | |
err_t | expand16_default_cfg (expand16_t *ctx) |
Expand 16 default configuration function. More... | |
err_t | expand16_generic_write (expand16_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Expand 16 I2C writing function. More... | |
err_t | expand16_generic_read (expand16_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Expand 16 I2C reading function. More... | |
void | expand16_set_rst_pin (expand16_t *ctx, uint8_t pin_state) |
Expand 16 set RST pin state function. More... | |
void | expand16_hw_reset (expand16_t *ctx) |
Expand 16 Hardware reset function. More... | |
uint8_t | expand16_get_int_pin (expand16_t *ctx) |
Expand 16 get INT pin function. More... | |
err_t | expand16_write_reg (expand16_t *ctx, uint8_t reg, uint8_t data_in) |
Expand 16 register write function. More... | |
err_t | expand16_read_reg (expand16_t *ctx, uint8_t reg, uint8_t *data_out) |
Expand 16 register read function. More... | |
err_t | expand16_set_io_dir (expand16_t *ctx, uint8_t input_pins, uint8_t output_pins) |
Expand 16 set pin input or output direction function. More... | |
err_t | expand16_set_output_state (expand16_t *ctx, uint8_t clr_mask, uint8_t set_mask) |
Expand 16 set output pins state function. More... | |
API for configuring and manipulating Expand 16 Click driver.
void expand16_cfg_setup | ( | expand16_cfg_t * | cfg | ) |
Expand 16 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See expand16_cfg_t object definition for detailed explanation. |
err_t expand16_default_cfg | ( | expand16_t * | ctx | ) |
Expand 16 default configuration function.
This function executes a default configuration of Expand 16 click board.
[in] | ctx | : Click context object. See expand16_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand16_generic_read | ( | expand16_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
Expand 16 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 expand16_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 expand16_generic_write | ( | expand16_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
Expand 16 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 expand16_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 expand16_get_int_pin | ( | expand16_t * | ctx | ) |
Expand 16 get INT pin function.
This function is used to read state of the INT pin.
[in] | ctx | : Click context object. See expand16_t object definition for detailed explanation. |
void expand16_hw_reset | ( | expand16_t * | ctx | ) |
Expand 16 Hardware reset function.
This function is used to perform hardware reset.
[in] | ctx | : Click context object. See expand16_t object definition for detailed explanation. |
err_t expand16_init | ( | expand16_t * | ctx, |
expand16_cfg_t * | cfg | ||
) |
Expand 16 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See expand16_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See expand16_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand16_read_reg | ( | expand16_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out | ||
) |
Expand 16 register read function.
This function is used to read data from the selected register.
[in] | ctx | : Click context object. See expand16_t object definition for detailed explanation. |
[in] | reg | : Selected register address. |
[out] | data_out | : Read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand16_set_io_dir | ( | expand16_t * | ctx, |
uint8_t | input_pins, | ||
uint8_t | output_pins | ||
) |
Expand 16 set pin input or output direction function.
This function is used to set input or output direction of pins.
[in] | ctx | : Click context object. See expand16_t object definition for detailed explanation. |
[in] | input_pins | : Selected pins will be set as input. |
[in] | output_pins | : Selected pins will be set as output. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand16_set_output_state | ( | expand16_t * | ctx, |
uint8_t | clr_mask, | ||
uint8_t | set_mask | ||
) |
Expand 16 set output pins state function.
This function is used to set output state of the pins.
[in] | ctx | : Click context object. See expand16_t object definition for detailed explanation. |
[in] | clr_mask | : Output of the selected pins will be set as LOW. |
[in] | set_mask | : Output of the selected pins will be set as HIGH. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void expand16_set_rst_pin | ( | expand16_t * | ctx, |
uint8_t | pin_state | ||
) |
Expand 16 set RST pin state function.
This function is used to set RST pin state.
[in] | ctx | : Click context object. See expand16_t object definition for detailed explanation. |
[in] | pin_state | : RST pin state. |
err_t expand16_write_reg | ( | expand16_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in | ||
) |
Expand 16 register write function.
This function is to write data into the selected register.
[in] | ctx | : Click context object. See expand16_t object definition for detailed explanation. |
[in] | reg | : Selected register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.