rs4857 2.1.0.0
|
API for configuring and manipulating RS485 7 Click driver. More...
Topics | |
RS485 7 Device Settings | |
Settings for registers of RS485 7 Click driver. | |
RS485 7 MikroBUS Map | |
MikroBUS pin mapping of RS485 7 Click driver. | |
Functions | |
void | rs4857_cfg_setup (rs4857_cfg_t *cfg) |
RS485 7 configuration object setup function. | |
err_t | rs4857_init (rs4857_t *ctx, rs4857_cfg_t *cfg) |
RS485 7 initialization function. | |
err_t | rs4857_generic_write (rs4857_t *ctx, char *data_in, uint16_t len) |
RS485 7 data writing function. | |
err_t | rs4857_generic_read (rs4857_t *ctx, char *data_out, uint16_t len) |
RS485 7 data reading function. | |
void | rs4857_receiver_enable (rs4857_t *ctx) |
RS485 7 enables the receiver function. | |
void | rs4857_receiver_disable (rs4857_t *ctx) |
RS485 7 disable the receiver function. | |
void | rs4857_driver_enable (rs4857_t *ctx) |
RS485 7 enables the driver function. | |
void | rs4857_driver_disable (rs4857_t *ctx) |
RS485 7 disable the driver function. | |
void | rs4857_termination_xy_enable (rs4857_t *ctx) |
RS485 7 Y-Z termination enable function. | |
void | rs4857_termination_xy_disable (rs4857_t *ctx) |
RS485 7 Y-Z termination disable function. | |
void | rs4857_termination_ab_enable (rs4857_t *ctx) |
RS485 7 A-B termination enable function. | |
void | rs4857_termination_ab_disable (rs4857_t *ctx) |
RS485 7 A-B termination disable function. | |
API for configuring and manipulating RS485 7 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void rs4857_cfg_setup | ( | rs4857_cfg_t * | cfg | ) |
RS485 7 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See rs4857_cfg_t object definition for detailed explanation. |
void rs4857_driver_disable | ( | rs4857_t * | ctx | ) |
RS485 7 disable the driver function.
This function disable the driver of the THVD1424, RS-485 Transceiver With Slew Rate Control on the RS485 7 Click board™.
[in] | ctx | : Click context object. See rs4857_t object definition for detailed explanation. |
void rs4857_driver_enable | ( | rs4857_t * | ctx | ) |
RS485 7 enables the driver function.
This function enables the driver of the THVD1424, RS-485 Transceiver With Slew Rate Control on the RS485 7 Click board™.
[in] | ctx | : Click context object. See rs4857_t object definition for detailed explanation. |
err_t rs4857_generic_read | ( | rs4857_t * | ctx, |
char * | data_out, | ||
uint16_t | len ) |
RS485 7 data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See rs4857_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 rs4857_generic_write | ( | rs4857_t * | ctx, |
char * | data_in, | ||
uint16_t | len ) |
RS485 7 data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See rs4857_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 rs4857_init | ( | rs4857_t * | ctx, |
rs4857_cfg_t * | cfg ) |
RS485 7 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See rs4857_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See rs4857_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void rs4857_receiver_disable | ( | rs4857_t * | ctx | ) |
RS485 7 disable the receiver function.
This function disable the receiver of the THVD1424, RS-485 Transceiver With Slew Rate Control on the RS485 7 Click board™.
[in] | ctx | : Click context object. See rs4857_t object definition for detailed explanation. |
void rs4857_receiver_enable | ( | rs4857_t * | ctx | ) |
RS485 7 enables the receiver function.
This function enables the receiver of the THVD1424, RS-485 Transceiver With Slew Rate Control on the RS485 7 Click board™.
[in] | ctx | : Click context object. See rs4857_t object definition for detailed explanation. |
void rs4857_termination_ab_disable | ( | rs4857_t * | ctx | ) |
RS485 7 A-B termination disable function.
This function disable A-B termination of the THVD1424, RS-485 Transceiver With Slew Rate Control on the RS485 7 Click board™.
[in] | ctx | : Click context object. See rs4857_t object definition for detailed explanation. |
void rs4857_termination_ab_enable | ( | rs4857_t * | ctx | ) |
RS485 7 A-B termination enable function.
This function enable A-B termination of the THVD1424, RS-485 Transceiver With Slew Rate Control on the RS485 7 Click board™.
[in] | ctx | : Click context object. See rs4857_t object definition for detailed explanation. |
void rs4857_termination_xy_disable | ( | rs4857_t * | ctx | ) |
RS485 7 Y-Z termination disable function.
This function disable Y-Z termination of the THVD1424, RS-485 Transceiver With Slew Rate Control on the RS485 7 Click board™.
[in] | ctx | : Click context object. See rs4857_t object definition for detailed explanation. |
void rs4857_termination_xy_enable | ( | rs4857_t * | ctx | ) |
RS485 7 Y-Z termination enable function.
This function enable Y-Z termination of the THVD1424, RS-485 Transceiver With Slew Rate Control on the RS485 7 Click board™.
[in] | ctx | : Click context object. See rs4857_t object definition for detailed explanation. |