expand17
2.1.0.0
|
API for configuring and manipulating Expand 17 Click driver. More...
Modules | |
Expand 17 Registers List | |
List of registers of Expand 17 Click driver. | |
Expand 17 Registers Settings | |
Settings for registers of Expand 17 Click driver. | |
Expand 17 MikroBUS Map | |
MikroBUS pin mapping of Expand 17 Click driver. | |
Functions | |
void | expand17_cfg_setup (expand17_cfg_t *cfg) |
Expand 17 configuration object setup function. More... | |
err_t | expand17_init (expand17_t *ctx, expand17_cfg_t *cfg) |
Expand 17 initialization function. More... | |
err_t | expand17_default_cfg (expand17_t *ctx) |
Expand 17 default configuration function. More... | |
err_t | expand17_generic_write (expand17_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Expand 17 I2C writing function. More... | |
err_t | expand17_generic_read (expand17_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Expand 17 I2C reading function. More... | |
void | expand17_set_rst_pin (expand17_t *ctx, uint8_t pin_state) |
Expand 17 set reset pin state function. More... | |
uint8_t | expand17_get_int_pin (expand17_t *ctx) |
Expand 17 get interrupt pin state function. More... | |
void | expand17_hw_reset (expand17_t *ctx) |
Expand 17 hardware reset function. More... | |
err_t | expand17_set_io_dir (expand17_t *ctx, uint8_t input_pins, uint8_t output_pins) |
Expand 17 set pin input or output direction function. More... | |
err_t | expand17_set_output_state (expand17_t *ctx, uint8_t clr_mask, uint8_t set_mask) |
Expand 17 set output pins state function. More... | |
err_t | expand17_get_input_state (expand17_t *ctx, uint8_t *input_state) |
Expand 17 get input pins state function. More... | |
API for configuring and manipulating Expand 17 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void expand17_cfg_setup | ( | expand17_cfg_t * | cfg | ) |
Expand 17 configuration object setup function.
This function initializes Click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See expand17_cfg_t object definition for detailed explanation. |
err_t expand17_default_cfg | ( | expand17_t * | ctx | ) |
Expand 17 default configuration function.
This function executes a default configuration of Expand 17 Click board.
[in] | ctx | : Click context object. See expand17_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand17_generic_read | ( | expand17_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
Expand 17 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 expand17_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 expand17_generic_write | ( | expand17_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
Expand 17 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 expand17_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 expand17_get_input_state | ( | expand17_t * | ctx, |
uint8_t * | input_state | ||
) |
Expand 17 get input pins state function.
This function is used to get state of the input pins.
[in] | ctx | : Click context object. See expand17_t object definition for detailed explanation. |
[out] | input_state | : Input pins state. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t expand17_get_int_pin | ( | expand17_t * | ctx | ) |
Expand 17 get interrupt pin state function.
This function is used to get state of the interrupt pin of Expand 17 Click board.
[in] | ctx | : Click context object. See expand17_t object definition for detailed explanation. |
void expand17_hw_reset | ( | expand17_t * | ctx | ) |
Expand 17 hardware reset function.
This function is used to perform the hardware reset of Expand 17 Click board.
[in] | ctx | : Click context object. See expand17_t object definition for detailed explanation. |
err_t expand17_init | ( | expand17_t * | ctx, |
expand17_cfg_t * | cfg | ||
) |
Expand 17 initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
[out] | ctx | : Click context object. See expand17_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See expand17_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand17_set_io_dir | ( | expand17_t * | ctx, |
uint8_t | input_pins, | ||
uint8_t | output_pins | ||
) |
Expand 17 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 expand17_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 expand17_set_output_state | ( | expand17_t * | ctx, |
uint8_t | clr_mask, | ||
uint8_t | set_mask | ||
) |
Expand 17 set output pins state function.
This function is used to set output state of the pins.
[in] | ctx | : Click context object. See expand17_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 expand17_set_rst_pin | ( | expand17_t * | ctx, |
uint8_t | pin_state | ||
) |
Expand 17 set reset pin state function.
This function is used to set state of the reset pin of Expand 17 Click board.
[in] | ctx | : Click context object. See expand17_t object definition for detailed explanation. |
[in] | pin_state | : State of the reset pin. |