rs4852 2.0.0.0
rs4852.h File Reference

This file contains API for RS485 2 Click driver. More...

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

Go to the source code of this file.

Data Structures

struct  rs4852_t
 Click ctx object definition. More...
 
struct  rs4852_cfg_t
 Click configuration structure definition. More...
 

Macros

#define RS4852_MAP_MIKROBUS(cfg, mikrobus)
 
#define RS4852_RETVAL   uint8_t
 
#define RS4852_OK   0x00
 
#define RS4852_INIT_ERROR   0xFF
 
#define DRV_RX_BUFFER_SIZE   500
 
#define RS4852_ENABLE_DE   0x01
 
#define RS4852_DISABLE_DE   0x00
 
#define RS4852_ENABLE_RE   0x00
 
#define RS4852_DISABLE_RE   0x01
 

Typedefs

typedef uint8_t rs4852_error_t
 Error type.
 

Functions

void rs4852_cfg_setup (rs4852_cfg_t *cfg)
 Config Object Initialization function.
 
RS4852_RETVAL rs4852_init (rs4852_t *ctx, rs4852_cfg_t *cfg)
 Initialization function.
 
void rs4852_generic_write (rs4852_t *ctx, char *data_buf, uint16_t len)
 Generic write function.
 
int32_t rs4852_generic_read (rs4852_t *ctx, char *data_buf, uint16_t max_len)
 Generic read function.
 
void rs4852_set_de_pin (rs4852_t *ctx, uint8_t state)
 Set DE ( cs ) pin state.
 
void rs4852_set_re_pin (rs4852_t *ctx, uint8_t state)
 Set RE ( reset ) pin state.
 

Detailed Description

This file contains API for RS485 2 Click driver.