rs2323 2.0.0.0
|
API for configuring and manipulating RS232 3 Click driver. More...
Topics | |
RS232 3 Device Settings | |
Settings of RS232 3 Click driver. | |
RS232 3 MikroBUS Map | |
MikroBUS pin mapping of RS232 3 Click driver. | |
Functions | |
void | rs2323_cfg_setup (rs2323_cfg_t *cfg) |
RS232 3 configuration object setup function. | |
err_t | rs2323_init (rs2323_t *ctx, rs2323_cfg_t *cfg) |
RS232 3 initialization function. | |
err_t | rs2323_generic_write (rs2323_t *ctx, char *data_buf, uint16_t len) |
RS232 3 data writing function. | |
err_t | rs2323_generic_read (rs2323_t *ctx, char *data_buf, uint16_t max_len) |
RS232 3 data reading function. | |
void | rs2323_set_shutdown_pin (rs2323_t *ctx, uint8_t state) |
RS232 3 set shutdown pin function. | |
void | rs2323_set_enable_pin (rs2323_t *ctx, uint8_t state) |
RS232 3 set enable pin function. | |
void | rs2323_set_online_pin (rs2323_t *ctx, uint8_t state) |
RS232 3 set online pin function. | |
uint8_t | rs2323_get_status_pin (rs2323_t *ctx) |
RS232 3 get status pin function. | |
API for configuring and manipulating RS232 3 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void rs2323_cfg_setup | ( | rs2323_cfg_t * | cfg | ) |
RS232 3 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See rs2323_cfg_t object definition for detailed explanation. |
err_t rs2323_generic_read | ( | rs2323_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len ) |
RS232 3 data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See rs2323_t object definition for detailed explanation. |
[out] | data_buf | : Output read data. |
[in] | max_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 rs2323_generic_write | ( | rs2323_t * | ctx, |
char * | data_buf, | ||
uint16_t | len ) |
RS232 3 data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See rs2323_t object definition for detailed explanation. |
[in] | data_buf | : Data buffer for sending. |
[in] | len | : Number of bytes for sending. |
>=0
- Success, <0
- Error. See #err_t definition for detailed explanation. uint8_t rs2323_get_status_pin | ( | rs2323_t * | ctx | ) |
RS232 3 get status pin function.
This function returns the status (STA) pin logic state.
[in] | ctx | : Click context object. See rs2323_t object definition for detailed explanation. |
err_t rs2323_init | ( | rs2323_t * | ctx, |
rs2323_cfg_t * | cfg ) |
RS232 3 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See rs2323_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See rs2323_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void rs2323_set_enable_pin | ( | rs2323_t * | ctx, |
uint8_t | state ) |
RS232 3 set enable pin function.
This function sets the enable (EN) pin logic state.
[in] | ctx | : Click context object. See rs2323_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
void rs2323_set_online_pin | ( | rs2323_t * | ctx, |
uint8_t | state ) |
RS232 3 set online pin function.
This function sets the online (ON) pin logic state.
[in] | ctx | : Click context object. See rs2323_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
void rs2323_set_shutdown_pin | ( | rs2323_t * | ctx, |
uint8_t | state ) |
RS232 3 set shutdown pin function.
This function sets the shutdown (SHD) pin logic state.
[in] | ctx | : Click context object. See rs2323_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |