ryb080i
2.1.0.0
|
API for configuring and manipulating RYB080I Click driver. More...
Modules | |
RYB080I Device Settings | |
Settings for registers of RYB080I Click driver. | |
RYB080I MikroBUS Map | |
MikroBUS pin mapping of RYB080I Click driver. | |
Functions | |
void | ryb080i_cfg_setup (ryb080i_cfg_t *cfg) |
RYB080I configuration object setup function. More... | |
err_t | ryb080i_init (ryb080i_t *ctx, ryb080i_cfg_t *cfg) |
RYB080I initialization function. More... | |
err_t | ryb080i_generic_write (ryb080i_t *ctx, uint8_t *data_in, uint16_t len) |
RYB080I data writing function. More... | |
err_t | ryb080i_generic_read (ryb080i_t *ctx, uint8_t *data_out, uint16_t len) |
RYB080I data reading function. More... | |
void | ryb080i_set_rst_pin (ryb080i_t *ctx, uint8_t state) |
RYB080I set rst pin function. More... | |
void | ryb080i_reset_device (ryb080i_t *ctx) |
RYB080I reset device function. More... | |
void | ryb080i_cmd_run (ryb080i_t *ctx, uint8_t *cmd) |
RYB080I cmd run function. More... | |
void | ryb080i_cmd_set (ryb080i_t *ctx, uint8_t *cmd, uint8_t *param) |
RYB080I cmd set function. More... | |
void | ryb080i_cmd_get (ryb080i_t *ctx, uint8_t *cmd) |
RYB080I cmd get function. More... | |
API for configuring and manipulating RYB080I Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void ryb080i_cfg_setup | ( | ryb080i_cfg_t * | cfg | ) |
RYB080I configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See ryb080i_cfg_t object definition for detailed explanation. |
void ryb080i_cmd_get | ( | ryb080i_t * | ctx, |
uint8_t * | cmd | ||
) |
RYB080I cmd get function.
This function is used to get the value of a given command from the click module.
[in] | ctx | : Click context object. See ryb080i_t object definition for detailed explanation. |
[in] | cmd | : Command string. |
void ryb080i_cmd_run | ( | ryb080i_t * | ctx, |
uint8_t * | cmd | ||
) |
RYB080I cmd run function.
This function sends a specified command to the click module.
[in] | ctx | : Click context object. See ryb080i_t object definition for detailed explanation. |
[in] | cmd | : Command string. |
void ryb080i_cmd_set | ( | ryb080i_t * | ctx, |
uint8_t * | cmd, | ||
uint8_t * | param | ||
) |
RYB080I cmd set function.
This function sets a value to a specified command of the click module.
[in] | ctx | : Click context object. See ryb080i_t object definition for detailed explanation. |
[in] | cmd | : Command string. |
[in] | param | : Parameters string. |
err_t ryb080i_generic_read | ( | ryb080i_t * | ctx, |
uint8_t * | data_out, | ||
uint16_t | len | ||
) |
RYB080I data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See ryb080i_t object definition for detailed explanation. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer. See #err_t definition for detailed explanation. err_t ryb080i_generic_write | ( | ryb080i_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | len | ||
) |
RYB080I data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See ryb080i_t object definition for detailed explanation. |
[in] | data_in | : Data buffer for sending. |
[in] | len | : Number of bytes for sending. |
>=0
- Success, <0
- Error. See #err_t definition for detailed explanation. err_t ryb080i_init | ( | ryb080i_t * | ctx, |
ryb080i_cfg_t * | cfg | ||
) |
RYB080I initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See ryb080i_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See ryb080i_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void ryb080i_reset_device | ( | ryb080i_t * | ctx | ) |
RYB080I reset device function.
This function resets the device by toggling the RST pin state.
[in] | ctx | : Click context object. See ryb080i_t object definition for detailed explanation. |