rs4857 2.1.0.0
rs4857.h File Reference

This file contains API for RS485 7 Click Driver. More...

#include "drv_digital_out.h"
#include "drv_uart.h"

Go to the source code of this file.

Data Structures

struct  rs4857_t
 RS485 7 Click context object. More...
 
struct  rs4857_cfg_t
 RS485 7 Click configuration object. More...
 

Macros

#define RS4857_TX_DRV_BUFFER_SIZE   100
 RS485 7 driver buffer size.
 
#define RS4857_RX_DRV_BUFFER_SIZE   300
 
#define RS4857_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  rs4857_return_value_t { RS4857_OK = 0 , RS4857_ERROR = -1 }
 RS485 7 Click return value data. More...
 

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.
 

Detailed Description

This file contains API for RS485 7 Click Driver.

Enumeration Type Documentation

◆ rs4857_return_value_t

RS485 7 Click return value data.

Predefined enum values for driver return values.

Enumerator
RS4857_OK 
RS4857_ERROR