ezocarrierorp 2.1.0.0
|
API for configuring and manipulating EZO Carrier ORP Click driver. More...
Topics | |
EZO Carrier ORP Device Settings | |
Settings for registers of EZO Carrier ORP Click driver. | |
EZO Carrier ORP MikroBUS Map | |
MikroBUS pin mapping of EZO Carrier ORP Click driver. | |
Macros | |
#define | EZOCARRIERORP_DEVICE_ADDRESS 0x61 |
EZO Carrier ORP device address setting. | |
Functions | |
void | ezocarrierorp_cfg_setup (ezocarrierorp_cfg_t *cfg) |
EZO Carrier ORP configuration object setup function. | |
void | ezocarrierorp_drv_interface_sel (ezocarrierorp_cfg_t *cfg, ezocarrierorp_drv_t drv_sel) |
EZO Carrier EC driver interface setup function. | |
err_t | ezocarrierorp_init (ezocarrierorp_t *ctx, ezocarrierorp_cfg_t *cfg) |
EZO Carrier ORP initialization function. | |
err_t | ezocarrierorp_generic_write (ezocarrierorp_t *ctx, uint8_t *data_in, uint16_t len) |
EZO Carrier ORP data writing function. | |
err_t | ezocarrierorp_generic_read (ezocarrierorp_t *ctx, uint8_t *data_out, uint16_t len) |
EZO Carrier ORP data reading function. | |
void | ezocarrierorp_send_cmd (ezocarrierorp_t *ctx, uint8_t *cmd) |
Send command function. | |
void | ezocarrierorp_send_cmd_with_par (ezocarrierorp_t *ctx, uint8_t *cmd, uint8_t *param_buf) |
Send command function with parameter. | |
void | ezocarrierorp_send_cmd_check (ezocarrierorp_t *ctx, uint8_t *cmd) |
Check the sent command. | |
API for configuring and manipulating EZO Carrier ORP Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
#define EZOCARRIERORP_DEVICE_ADDRESS 0x61 |
EZO Carrier ORP device address setting.
Specified setting for device slave address selection of EZO Carrier ORP Click driver.
void ezocarrierorp_cfg_setup | ( | ezocarrierorp_cfg_t * | cfg | ) |
EZO Carrier ORP configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See ezocarrierorp_cfg_t object definition for detailed explanation. |
void ezocarrierorp_drv_interface_sel | ( | ezocarrierorp_cfg_t * | cfg, |
ezocarrierorp_drv_t | drv_sel ) |
EZO Carrier EC driver interface setup function.
This function sets a serial driver interface which will be used further in the click driver.
[out] | cfg | : Click configuration structure. See ezocarrierorp_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See ezocarrierorp_drv_t object definition for detailed explanation. |
err_t ezocarrierorp_generic_read | ( | ezocarrierorp_t * | ctx, |
uint8_t * | data_out, | ||
uint16_t | len ) |
EZO Carrier ORP data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See ezocarrierorp_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 ezocarrierorp_generic_write | ( | ezocarrierorp_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | len ) |
EZO Carrier ORP data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See ezocarrierorp_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 ezocarrierorp_init | ( | ezocarrierorp_t * | ctx, |
ezocarrierorp_cfg_t * | cfg ) |
EZO Carrier ORP initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See ezocarrierorp_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See ezocarrierorp_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void ezocarrierorp_send_cmd | ( | ezocarrierorp_t * | ctx, |
uint8_t * | cmd ) |
Send command function.
This function sends a specified command to the click module.
[in] | ctx | : Click context object. See ezocarrierorp_t object definition for detailed explanation. |
[in] | cmd | : Command buffer. |
void ezocarrierorp_send_cmd_check | ( | ezocarrierorp_t * | ctx, |
uint8_t * | cmd ) |
Check the sent command.
This function checks the command that is sent.
[in] | ctx | : Click context object. See ezocarrierorp_t object definition for detailed explanation. |
[in] | cmd | : Command buffer. |
void ezocarrierorp_send_cmd_with_par | ( | ezocarrierorp_t * | ctx, |
uint8_t * | cmd, | ||
uint8_t * | param_buf ) |
Send command function with parameter.
This function sends a command with specified parameter to the click module.
[in] | ctx | : Click context object. See ezocarrierorp_t object definition for detailed explanation. |
[in] | cmd | : Command buffer. |
[in] | param_buf | : Parameter buffer. |