expand15
2.1.0.0
|
API for configuring and manipulating Expand 15 Click driver. More...
Modules | |
Expand 15 Registers List | |
List of registers of Expand 15 Click driver. | |
Expand 15 Registers Settings | |
Settings for registers of Expand 15 Click driver. | |
Expand 15 MikroBUS Map | |
MikroBUS pin mapping of Expand 15 Click driver. | |
Functions | |
void | expand15_cfg_setup (expand15_cfg_t *cfg) |
Expand 15 configuration object setup function. More... | |
err_t | expand15_init (expand15_t *ctx, expand15_cfg_t *cfg) |
Expand 15 initialization function. More... | |
err_t | expand15_default_cfg (expand15_t *ctx) |
Expand 15 default configuration function. More... | |
err_t | expand15_generic_write (expand15_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Expand 15 I2C writing function. More... | |
err_t | expand15_generic_read (expand15_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Expand 15 I2C reading function. More... | |
uint8_t | expand15_get_int_pin_state (expand15_t *ctx) |
Expand 15 get interrupt function. More... | |
void | expand15_hw_reset (expand15_t *ctx) |
Expand 15 hardware reset function. More... | |
err_t | expand15_get_in_pin_state (expand15_t *ctx, uint8_t port, uint8_t *pin_state) |
Expand 15 get input pin state function. More... | |
err_t | expand15_get_out_pin_state (expand15_t *ctx, uint8_t port, uint8_t *pin_state) |
Expand 15 get output pin state function. More... | |
err_t | expand15_set_out_pin_state (expand15_t *ctx, uint8_t port, uint8_t pin_state) |
Expand 15 set output pin state function. More... | |
err_t | expand15_get_in_pin_polarity (expand15_t *ctx, uint8_t port, uint8_t *pin_polarity) |
Expand 15 get input pin polarity function. More... | |
err_t | expand15_set_in_pin_polarity (expand15_t *ctx, uint8_t port, uint8_t pin_polarity) |
Expand 15 set input pin polarity function. More... | |
err_t | expand15_get_pin_config (expand15_t *ctx, uint8_t port, uint8_t *pin_config) |
Expand 15 get pin configuration function. More... | |
err_t | expand15_set_pin_as_in (expand15_t *ctx, uint8_t port, uint8_t pin_config) |
Expand 15 set pin as input function. More... | |
err_t | expand15_set_pin_as_out (expand15_t *ctx, uint8_t port, uint8_t pin_config) |
Expand 15 set pin as output function. More... | |
err_t | expand15_get_out_level (expand15_t *ctx, uint8_t port, uint16_t *pin_output_level) |
Expand 15 get output level function. More... | |
err_t | expand15_set_out_level (expand15_t *ctx, uint8_t port, uint16_t pin_output_level) |
Expand 15 set output level function. More... | |
err_t | expand15_set_out_pin_strength (expand15_t *ctx, uint8_t port, uint8_t pin, uint8_t strength) |
Expand 15 set pin output strength function. More... | |
err_t | expand15_set_en_pull_up_down (expand15_t *ctx, uint8_t port, uint8_t port_config) |
Expand 15 set enable pull up/down function. More... | |
err_t | expand15_get_en_pull_up_down (expand15_t *ctx, uint8_t port, uint8_t *port_config) |
Expand 15 get enable pull up/down function. More... | |
err_t | expand15_set_pull_up_down (expand15_t *ctx, uint8_t port, uint8_t pin_config) |
Expand 15 set pull up/down function. More... | |
err_t | expand15_get_pull_up_down (expand15_t *ctx, uint8_t port, uint8_t *pin_config) |
Expand 15 get pull up/down function. More... | |
err_t | expand15_set_int_mask (expand15_t *ctx, uint8_t port, uint8_t int_config) |
Expand 15 set interrupt mask function. More... | |
err_t | expand15_get_int_mask (expand15_t *ctx, uint8_t port, uint8_t *int_config) |
Expand 15 get interrupt mask function. More... | |
err_t | expand15_get_int_status (expand15_t *ctx, uint8_t port, uint8_t *int_status) |
Expand 15 get interrupt status function. More... | |
err_t | expand15_get_out_port_config (expand15_t *ctx, uint8_t *port0_cfg, uint8_t *port1_cfg) |
Expand 15 get output port configuration function. More... | |
err_t | expand15_set_out_port_config (expand15_t *ctx, uint8_t port0_cfg, uint8_t port1_cfg) |
Expand 15 set output port configuration function. More... | |
API for configuring and manipulating Expand 15 Click driver.
void expand15_cfg_setup | ( | expand15_cfg_t * | cfg | ) |
Expand 15 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See expand15_cfg_t object definition for detailed explanation. |
err_t expand15_default_cfg | ( | expand15_t * | ctx | ) |
Expand 15 default configuration function.
This function executes a default configuration of Expand 15 click board.
[in] | ctx | : Click context object. See expand15_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand15_generic_read | ( | expand15_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
Expand 15 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 expand15_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 expand15_generic_write | ( | expand15_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
Expand 15 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 expand15_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 expand15_get_en_pull_up_down | ( | expand15_t * | ctx, |
uint8_t | port, | ||
uint8_t * | port_config | ||
) |
Expand 15 get enable pull up/down function.
This function reads pull up/down enables of selected port.
[in] | ctx | : Click context object. See expand15_t object definition for detailed explanation. |
[in] | port | : Selected port. |
[out] | port_config | : Port config to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand15_get_in_pin_polarity | ( | expand15_t * | ctx, |
uint8_t | port, | ||
uint8_t * | pin_polarity | ||
) |
Expand 15 get input pin polarity function.
This function reads a polarity of the pins defined as input.
[in] | ctx | : Click context object. See expand15_t object definition for detailed explanation. |
[in] | port | : Selected port. |
[out] | pin_polarity | : Pin polarity of the selected port. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand15_get_in_pin_state | ( | expand15_t * | ctx, |
uint8_t | port, | ||
uint8_t * | pin_state | ||
) |
Expand 15 get input pin state function.
This function reads a state of the pins defined as input.
[in] | ctx | : Click context object. See expand15_t object definition for detailed explanation. |
[in] | port | : Selected port. |
[out] | pin_state | : Pin state of the selected port. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand15_get_int_mask | ( | expand15_t * | ctx, |
uint8_t | port, | ||
uint8_t * | int_config | ||
) |
Expand 15 get interrupt mask function.
This function read interrupt mask value of selected port.
[in] | ctx | : Click context object. See expand15_t object definition for detailed explanation. |
[in] | port | : Selected port. |
[out] | int_config | : Pin interrupt mask of selected port. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t expand15_get_int_pin_state | ( | expand15_t * | ctx | ) |
Expand 15 get interrupt function.
This function reads a state of the interrupt pin.
[in] | ctx | : Click context object. See expand15_t object definition for detailed explanation. |
err_t expand15_get_int_status | ( | expand15_t * | ctx, |
uint8_t | port, | ||
uint8_t * | int_status | ||
) |
Expand 15 get interrupt status function.
This function read interrupt status value of selected port.
[in] | ctx | : Click context object. See expand15_t object definition for detailed explanation. |
[in] | port | : Selected port. |
[out] | int_status | : Pin interrupt status of selected port. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand15_get_out_level | ( | expand15_t * | ctx, |
uint8_t | port, | ||
uint16_t * | pin_output_level | ||
) |
Expand 15 get output level function.
This function reads a output level of pins of selected port.
[in] | ctx | : Click context object. See expand15_t object definition for detailed explanation. |
[in] | port | : Selected port. |
[out] | pin_output_level | : Pin output level of the selected port. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand15_get_out_pin_state | ( | expand15_t * | ctx, |
uint8_t | port, | ||
uint8_t * | pin_state | ||
) |
Expand 15 get output pin state function.
This function reads a state of the pins defined as output.
[in] | ctx | : Click context object. See expand15_t object definition for detailed explanation. |
[in] | port | : Selected port. |
[out] | pin_state | : Pin state of the selected port. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand15_get_out_port_config | ( | expand15_t * | ctx, |
uint8_t * | port0_cfg, | ||
uint8_t * | port1_cfg | ||
) |
Expand 15 get output port configuration function.
This function reads port output configuration value of selected port.
[in] | ctx | : Click context object. See expand15_t object definition for detailed explanation. |
[out] | port0_cfg | : Port 0 configuration. |
[out] | port1_cfg | : Port 1 configuration. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand15_get_pin_config | ( | expand15_t * | ctx, |
uint8_t | port, | ||
uint8_t * | pin_config | ||
) |
Expand 15 get pin configuration function.
This function reads a configuration of pins of selected port.
[in] | ctx | : Click context object. See expand15_t object definition for detailed explanation. |
[in] | port | : Selected port. |
[out] | pin_config | : Pin configuration of the selected port. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand15_get_pull_up_down | ( | expand15_t * | ctx, |
uint8_t | port, | ||
uint8_t * | pin_config | ||
) |
Expand 15 get pull up/down function.
This function reads pull up/down pin state of selected port.
[in] | ctx | : Click context object. See expand15_t object definition for detailed explanation. |
[in] | port | : Selected port. |
[out] | pin_config | : Pins where pull up/down is active. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void expand15_hw_reset | ( | expand15_t * | ctx | ) |
Expand 15 hardware reset function.
This function is used to perform hardware reset of the click board.
[in] | ctx | : Click context object. See expand15_t object definition for detailed explanation. |
err_t expand15_init | ( | expand15_t * | ctx, |
expand15_cfg_t * | cfg | ||
) |
Expand 15 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See expand15_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See expand15_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand15_set_en_pull_up_down | ( | expand15_t * | ctx, |
uint8_t | port, | ||
uint8_t | port_config | ||
) |
Expand 15 set enable pull up/down function.
This function enables pull up/down of selected port.
[in] | ctx | : Click context object. See expand15_t object definition for detailed explanation. |
[in] | port | : Selected port. |
[in] | port_config | : Port config to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand15_set_in_pin_polarity | ( | expand15_t * | ctx, |
uint8_t | port, | ||
uint8_t | pin_polarity | ||
) |
Expand 15 set input pin polarity function.
This function write a polarity of the pins defined as input.
[in] | ctx | : Click context object. See expand15_t object definition for detailed explanation. |
[in] | port | : Selected port. |
[in] | pin_polarity | : Pin polarity of the selected port. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand15_set_int_mask | ( | expand15_t * | ctx, |
uint8_t | port, | ||
uint8_t | int_config | ||
) |
Expand 15 set interrupt mask function.
This function writes interrupt mask value of selected port.
[in] | ctx | : Click context object. See expand15_t object definition for detailed explanation. |
[in] | port | : Selected port. |
[in] | int_config | : Pin interrupt mask of selected port. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand15_set_out_level | ( | expand15_t * | ctx, |
uint8_t | port, | ||
uint16_t | pin_output_level | ||
) |
Expand 15 set output level function.
This function writes a output level of pins of selected port.
[in] | ctx | : Click context object. See expand15_t object definition for detailed explanation. |
[in] | port | : Selected port. |
[in] | pin_output_level | : Pin output level of the selected port. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand15_set_out_pin_state | ( | expand15_t * | ctx, |
uint8_t | port, | ||
uint8_t | pin_state | ||
) |
Expand 15 set output pin state function.
This function writes a state of the pins defined as output.
[in] | ctx | : Click context object. See expand15_t object definition for detailed explanation. |
[in] | port | : Selected port. |
[in] | pin_state | : Pin state of the selected port. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand15_set_out_pin_strength | ( | expand15_t * | ctx, |
uint8_t | port, | ||
uint8_t | pin, | ||
uint8_t | strength | ||
) |
Expand 15 set pin output strength function.
This function writes a set pin output strength of selected port.
[in] | ctx | : Click context object. See expand15_t object definition for detailed explanation. |
[in] | port | : Selected port. |
[in] | pin | : Selected pin. |
[in] | strength | : Strength of pin output. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand15_set_out_port_config | ( | expand15_t * | ctx, |
uint8_t | port0_cfg, | ||
uint8_t | port1_cfg | ||
) |
Expand 15 set output port configuration function.
This function writes port output configuration value of selected port.
[in] | ctx | : Click context object. See expand15_t object definition for detailed explanation. |
[in] | port0_cfg | : Port 0 configuration. |
[in] | port1_cfg | : Port 1 configuration. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand15_set_pin_as_in | ( | expand15_t * | ctx, |
uint8_t | port, | ||
uint8_t | pin_config | ||
) |
Expand 15 set pin as input function.
This function writes a input pin configuration of pins of selected port.
[in] | ctx | : Click context object. See expand15_t object definition for detailed explanation. |
[in] | port | : Selected port. |
[in] | pin_config | : Pin configuration of the selected port. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand15_set_pin_as_out | ( | expand15_t * | ctx, |
uint8_t | port, | ||
uint8_t | pin_config | ||
) |
Expand 15 set pin as output function.
This function writes a output pin configuration of pins of selected port.
[in] | ctx | : Click context object. See expand15_t object definition for detailed explanation. |
[in] | port | : Selected port. |
[in] | pin_config | : Pin configuration of the selected port. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t expand15_set_pull_up_down | ( | expand15_t * | ctx, |
uint8_t | port, | ||
uint8_t | pin_config | ||
) |
Expand 15 set pull up/down function.
This function writes pull up/down pin state of selected port.
[in] | ctx | : Click context object. See expand15_t object definition for detailed explanation. |
[in] | port | : Selected port. |
[in] | pin_config | : Pins where pull up/down is active. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.