rs4856 2.0.0.0
rs4856.h File Reference

This file contains API for RS485 6 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  rs4856_t
 Click ctx object definition. More...
 
struct  rs4856_cfg_t
 Click configuration structure definition. More...
 

Macros

#define RS4856_MAP_MIKROBUS(cfg, mikrobus)
 
#define RS4856_RETVAL   uint8_t
 
#define RS4856_OK   0x00
 
#define RS4856_INIT_ERROR   0xFF
 
#define DRV_RX_BUFFER_SIZE   500
 
#define RS4856_PIN_STATE_LOW   0
 
#define RS4856_PIN_STATE_HIGH   1
 

Typedefs

typedef uint8_t rs4856_error_t
 Error type.
 

Functions

void rs4856_cfg_setup (rs4856_cfg_t *cfg)
 Config Object Initialization function.
 
RS4856_RETVAL rs4856_init (rs4856_t *ctx, rs4856_cfg_t *cfg)
 Initialization function.
 
void rs4856_generic_write (rs4856_t *ctx, char *data_buf, uint16_t len)
 Generic write function.
 
int16_t rs4856_generic_read (rs4856_t *ctx, char *data_buf, uint16_t max_len)
 Generic read function.
 
void rs4856_re_pin_set (rs4856_t *ctx, uint8_t pin_state)
 Sets RE pin to high or low state.
 
void rs4856_de_pin_set (rs4856_t *ctx, uint8_t pin_state)
 Sets DE pin to high or low state.
 
void rs4856_send_command (rs4856_t *ctx, char *command)
 

Detailed Description

This file contains API for RS485 6 Click driver.