rs4855  2.0.0.0
Data Structures | Macros | Typedefs | Functions
rs4855.h File Reference

This file contains API for RS485 5 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  rs4855_t
 Click ctx object definition. More...
 
struct  rs4855_cfg_t
 Click configuration structure definition. More...
 

Macros

#define RS4855_MAP_MIKROBUS(cfg, mikrobus)
 
#define RS4855_RETVAL   uint8_t
 
#define RS4855_OK   0x00
 
#define RS4855_INIT_ERROR   0xFF
 
#define RS4855_NEMA_GPGGA   1
 
#define RS4855_NEMA_GPGLL   3
 
#define RS4855_NEMA_GPGGA_NUM_ELEMENT   15
 
#define RS4855_NEMA_GPGLL_NUM_ELEMENT   5
 
#define RS4855_GPGGA_TIME   1
 
#define RS4855_GPGGA_LATITUDE   2
 
#define RS4855_GPGGA_LATITUDE_SIDE   3
 
#define RS4855_GPGGA_LONGITUDE   4
 
#define RS4855_GPGGA_LONGITUDE_SIDE   5
 
#define RS4855_GPGGA_QUALITY_INDICATOR   6
 
#define RS4855_GPGGA_NUMBER_OF_SATELLITES   7
 
#define RS4855_GPGGA_H_DILUTION_OF_POS   8
 
#define RS4855_GPGGA_ALTITUDE   9
 
#define RS4855_GPGGA_ALTITUDE_UNIT   10
 
#define RS4855_GPGGA_GEOIDAL_SEPARATION   11
 
#define RS4855_GPGGA_GEOIDAL_SEPARATION_UNIT   12
 
#define RS4855_GPGGA_TIME_SINCE_LAST_DGPS   13
 
#define RS4855_GPGGA_DGPS_REFERENCE_STATION_ID   14
 
#define RS4855_GPGLL_LATITUDE   1
 
#define RS4855_GPGLL_LATITUDE_SIDE   2
 
#define RS4855_GPGLL_LONGITUDE   3
 
#define RS4855_GPGLL_LONGITUDE_SIDE   4
 
#define RS4855_ERROR_COMMAND_OR_ELEMENT   0xFF
 
#define RS4855_ERROR_START_OR_END_COMMAND   0x8F
 
#define RS4855_ERROR_NEXT_ELEMENT   0x4F
 
#define RS4855_ERROR_CURRENT_ELEMENT   0x2F
 
#define RS4855_NO_ERROR   0x00
 
#define DRV_RX_BUFFER_SIZE   500
 
#define RS4855_PIN_STATE_HIGH   1
 
#define RS4855_PIN_STATE_LOW   0
 

Typedefs

typedef uint8_t rs4855_error_t
 Error type. More...
 

Functions

void rs4855_cfg_setup (rs4855_cfg_t *cfg)
 Config Object Initialization function. More...
 
RS4855_RETVAL rs4855_init (rs4855_t *ctx, rs4855_cfg_t *cfg)
 Initialization function. More...
 
void rs4855_generic_write (rs4855_t *ctx, char *data_buf, uint16_t len)
 Generic write function. More...
 
int32_t rs4855_generic_read (rs4855_t *ctx, char *data_buf, uint16_t max_len)
 Generic read function. More...
 
void rs4855_set_de_state (rs4855_t *ctx, uint8_t state)
 Sets DE pin to high or low state. More...
 
void rs4855_set_re_state (rs4855_t *ctx, uint8_t state)
 Sets RE pin to high or low state. More...
 
void rs4855_send_byte_by_byte (rs4855_t *ctx, char *command)
 Function for sending byte by byte. More...
 

Detailed Description

This file contains API for RS485 5 Click driver.