rstransceiver 2.1.0.0
|
API for configuring and manipulating RS Transceiver Click driver. More...
Topics | |
RS Transceiver Registers List | |
List of registers of RS Transceiver Click driver. | |
RS Transceiver Registers Settings | |
Settings for registers of RS Transceiver Click driver. | |
RS Transceiver MikroBUS Map | |
MikroBUS pin mapping of RS Transceiver Click driver. | |
Functions | |
void | rstransceiver_cfg_setup (rstransceiver_cfg_t *cfg) |
RS Transceiver configuration object setup function. | |
err_t | rstransceiver_init (rstransceiver_t *ctx, rstransceiver_cfg_t *cfg) |
RS Transceiver initialization function. | |
err_t | rstransceiver_default_cfg (rstransceiver_t *ctx) |
RS Transceiver default configuration function. | |
void | rstransceiver_device_enable (rstransceiver_t *ctx) |
RS Transceiver enables the device function. | |
void | rstransceiver_device_disable (rstransceiver_t *ctx) |
RS Transceiver disable the device function. | |
void | rstransceiver_set_slew (rstransceiver_t *ctx, uint8_t slew) |
RS Transceiver sets the slew limit function. | |
void | rstransceiver_set_rts (rstransceiver_t *ctx, uint8_t rts) |
RS Transceiver request to send function. | |
uint8_t | rstransceiver_get_cts (rstransceiver_t *ctx) |
RS Transceiver clear to send function. | |
err_t | rstransceiver_set_op_mode (rstransceiver_t *ctx, uint8_t op_mode) |
RS Transceiver sets the operating mode function. | |
err_t | rstransceiver_mode_loopback (rstransceiver_t *ctx) |
RS Transceiver sets the loopback mode function. | |
err_t | rstransceiver_mode_rs232 (rstransceiver_t *ctx, uint8_t slew) |
RS Transceiver sets the RS-232 mode function. | |
err_t | rstransceiver_mode_half_duplex (rstransceiver_t *ctx, uint8_t slew, uint8_t dir1, uint8_t term) |
RS Transceiver sets the Half-Duplex mode function. | |
err_t | rstransceiver_mode_full_duplex (rstransceiver_t *ctx, uint8_t slew, uint8_t dir1, uint8_t term) |
RS Transceiver sets the Full-Duplex mode function. | |
err_t | rstransceiver_set_dir1 (rstransceiver_t *ctx, uint8_t dir1) |
RS Transceiver sets the DIR1 pin function. | |
err_t | rstransceiver_term_enable (rstransceiver_t *ctx) |
RS Transceiver term enable function. | |
err_t | rstransceiver_term_disable (rstransceiver_t *ctx) |
RS Transceiver term disable function. | |
err_t | rstransceiver_generic_write (rstransceiver_t *ctx, char *data_in, uint16_t len) |
RS Transceiver data writing function. | |
err_t | rstransceiver_generic_read (rstransceiver_t *ctx, char *data_out, uint16_t len) |
RS Transceiver data reading function. | |
API for configuring and manipulating RS Transceiver Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void rstransceiver_cfg_setup | ( | rstransceiver_cfg_t * | cfg | ) |
RS Transceiver configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See rstransceiver_cfg_t object definition for detailed explanation. |
err_t rstransceiver_default_cfg | ( | rstransceiver_t * | ctx | ) |
RS Transceiver default configuration function.
This function executes a default configuration of RS Transceiver click board.
[in] | ctx | : Click context object. See rstransceiver_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void rstransceiver_device_disable | ( | rstransceiver_t * | ctx | ) |
RS Transceiver disable the device function.
This function performs shutdown the device by config the RST pin logic low of the XR34350, RS-232/RS-485/RS-422 Serial Transceiver with Internal Termination and Wide Output Swing on the RS Transceiver Click board™.
[in] | ctx | : Click context object. See rstransceiver_t object definition for detailed explanation. |
void rstransceiver_device_enable | ( | rstransceiver_t * | ctx | ) |
RS Transceiver enables the device function.
This function performs enables the device by config the RST pin logic high of the XR34350, RS-232/RS-485/RS-422 Serial Transceiver with Internal Termination and Wide Output Swing on the RS Transceiver Click board™.
[in] | ctx | : Click context object. See rstransceiver_t object definition for detailed explanation. |
err_t rstransceiver_generic_read | ( | rstransceiver_t * | ctx, |
char * | data_out, | ||
uint16_t | len ) |
RS Transceiver data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See rstransceiver_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 rstransceiver_generic_write | ( | rstransceiver_t * | ctx, |
char * | data_in, | ||
uint16_t | len ) |
RS Transceiver data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See rstransceiver_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. uint8_t rstransceiver_get_cts | ( | rstransceiver_t * | ctx | ) |
RS Transceiver clear to send function.
This function CTS flow control uses the check the clear to send of the XR34350, RS-232/RS-485/RS-422 Serial Transceiver with Internal Termination and Wide Output Swing on the RS Transceiver Click board™.
[in] | ctx | : Click context object. See rstransceiver_t object definition for detailed explanation. |
err_t rstransceiver_init | ( | rstransceiver_t * | ctx, |
rstransceiver_cfg_t * | cfg ) |
RS Transceiver initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See rstransceiver_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See rstransceiver_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rstransceiver_mode_full_duplex | ( | rstransceiver_t * | ctx, |
uint8_t | slew, | ||
uint8_t | dir1, | ||
uint8_t | term ) |
RS Transceiver sets the Full-Duplex mode function.
This function sets the Full-Duplex RS-485/422 operating mode of the XR34350, RS-232/RS-485/RS-422 Serial Transceiver with Internal Termination and Wide Output Swing on the RS Transceiver Click board™.
[in] | ctx | : Click context object. See rstransceiver_t object definition for detailed explanation. |
[in] | slew | :
|
[in] | dir1 | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rstransceiver_mode_half_duplex | ( | rstransceiver_t * | ctx, |
uint8_t | slew, | ||
uint8_t | dir1, | ||
uint8_t | term ) |
RS Transceiver sets the Half-Duplex mode function.
This function sets the Half-Duplex RS-485 operating mode of the XR34350, RS-232/RS-485/RS-422 Serial Transceiver with Internal Termination and Wide Output Swing on the RS Transceiver Click board™.
[in] | ctx | : Click context object. See rstransceiver_t object definition for detailed explanation. |
[in] | slew | :
|
[in] | dir1 | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rstransceiver_mode_loopback | ( | rstransceiver_t * | ctx | ) |
RS Transceiver sets the loopback mode function.
This function sets the loopback operating mode of the XR34350, RS-232/RS-485/RS-422 Serial Transceiver with Internal Termination and Wide Output Swing on the RS Transceiver Click board™.
[in] | ctx | : Click context object. See rstransceiver_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rstransceiver_mode_rs232 | ( | rstransceiver_t * | ctx, |
uint8_t | slew ) |
RS Transceiver sets the RS-232 mode function.
This function sets the RS-232 operating mode of the XR34350, RS-232/RS-485/RS-422 Serial Transceiver with Internal Termination and Wide Output Swing on the RS Transceiver Click board™.
[in] | ctx | : Click context object. See rstransceiver_t object definition for detailed explanation. |
[in] | slew | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rstransceiver_set_dir1 | ( | rstransceiver_t * | ctx, |
uint8_t | dir1 ) |
RS Transceiver sets the DIR1 pin function.
This function configures TX/RX signals of the XR34350, RS-232/RS-485/RS-422 Serial Transceiver with Internal Termination and Wide Output Swing on the RS Transceiver Click board™.
[in] | ctx | : Click context object. See rstransceiver_t object definition for detailed explanation. |
[in] | dir1 | :
|
0
- Success, -1
- Error. err_t rstransceiver_set_op_mode | ( | rstransceiver_t * | ctx, |
uint8_t | op_mode ) |
RS Transceiver sets the operating mode function.
This function sets the desired operating mode of the XR34350, RS-232/RS-485/RS-422 Serial Transceiver with Internal Termination and Wide Output Swing on the RS Transceiver Click board™.
[in] | ctx | : Click context object. See rstransceiver_t object definition for detailed explanation. |
[in] | op_mode | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void rstransceiver_set_rts | ( | rstransceiver_t * | ctx, |
uint8_t | rts ) |
RS Transceiver request to send function.
This function RTS flow control uses the Request-to-Send of the XR34350, RS-232/RS-485/RS-422 Serial Transceiver with Internal Termination and Wide Output Swing on the RS Transceiver Click board™.
[in] | ctx | : Click context object. See rstransceiver_t object definition for detailed explanation. |
[in] | rts | : Request to send. |
void rstransceiver_set_slew | ( | rstransceiver_t * | ctx, |
uint8_t | slew ) |
RS Transceiver sets the slew limit function.
This function sets the 250 kbps slew limiting of the XR34350, RS-232/RS-485/RS-422 Serial Transceiver with Internal Termination and Wide Output Swing on the RS Transceiver Click board™.
[in] | ctx | : Click context object. See rstransceiver_t object definition for detailed explanation. |
[in] | slew | :
|
err_t rstransceiver_term_disable | ( | rstransceiver_t * | ctx | ) |
RS Transceiver term disable function.
This function disable the RS485/RS422 receiver termination of the XR34350, RS-232/RS-485/RS-422 Serial Transceiver with Internal Termination and Wide Output Swing on the RS Transceiver Click board™.
[in] | ctx | : Click context object. See rstransceiver_t object definition for detailed explanation. |
0
- Success, -1
- Error. err_t rstransceiver_term_enable | ( | rstransceiver_t * | ctx | ) |
RS Transceiver term enable function.
This function enables the RS485/RS422 receiver termination of the XR34350, RS-232/RS-485/RS-422 Serial Transceiver with Internal Termination and Wide Output Swing on the RS Transceiver Click board™.
[in] | ctx | : Click context object. See rstransceiver_t object definition for detailed explanation. |
0
- Success, -1
- Error.