rs2322 2.0.0.0
rs2322.h File Reference

This file contains API for RS232 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  rs2322_t
 Click ctx object definition. More...
 
struct  rs2322_cfg_t
 Click configuration structure definition. More...
 

Macros

#define RS2322_MAP_MIKROBUS(cfg, mikrobus)
 
#define RS2322_RETVAL   uint8_t
 
#define RS2322_OK   0x00
 
#define RS2322_INIT_ERROR   0xFF
 
#define DRV_RX_BUFFER_SIZE   500
 

Typedefs

typedef uint8_t rs2322_error_t
 Error type.
 

Functions

void rs2322_cfg_setup (rs2322_cfg_t *cfg)
 Config Object Initialization function.
 
RS2322_RETVAL rs2322_init (rs2322_t *ctx, rs2322_cfg_t *cfg)
 Initialization function.
 
void rs2322_generic_write (rs2322_t *ctx, char *data_buf, uint16_t len)
 Generic write function.
 
int16_t rs2322_generic_read (rs2322_t *ctx, char *data_buf, uint16_t max_len)
 Generic read function.
 
void rs2322_set_dcd (rs2322_t *ctx, uint8_t state)
 This function sets DCD pin state.
 
void rs2322_set_cts (rs2322_t *ctx, uint8_t state)
 This function sets CTS pin state.
 
void rs2322_set_ri (rs2322_t *ctx, uint8_t state)
 This function sets RI pin state.
 
uint8_t rs2322_get_rts (rs2322_t *ctx)
 This function get RST pin state.
 
uint8_t rs2322_get_dtr (rs2322_t *ctx)
 This function get DTR pin state.
 
void rs2322_send_command (rs2322_t *ctx, char *command)
 Function for send command.
 

Detailed Description

This file contains API for RS232 2 Click driver.