Go to the documentation of this file.
38 #include "drv_digital_out.h"
39 #include "drv_digital_in.h"
53 #define RS4855_MAP_MIKROBUS( cfg, mikrobus ) \
54 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
55 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
56 cfg.de = MIKROBUS( mikrobus, MIKROBUS_RST ); \
57 cfg.re = MIKROBUS( mikrobus, MIKROBUS_CS )
64 #define RS4855_RETVAL uint8_t
66 #define RS4855_OK 0x00
67 #define RS4855_INIT_ERROR 0xFF
74 #define RS4855_NEMA_GPGGA 1
75 #define RS4855_NEMA_GPGLL 3
76 #define RS4855_NEMA_GPGGA_NUM_ELEMENT 15
77 #define RS4855_NEMA_GPGLL_NUM_ELEMENT 5
84 #define RS4855_GPGGA_TIME 1
85 #define RS4855_GPGGA_LATITUDE 2
86 #define RS4855_GPGGA_LATITUDE_SIDE 3
87 #define RS4855_GPGGA_LONGITUDE 4
88 #define RS4855_GPGGA_LONGITUDE_SIDE 5
89 #define RS4855_GPGGA_QUALITY_INDICATOR 6
90 #define RS4855_GPGGA_NUMBER_OF_SATELLITES 7
91 #define RS4855_GPGGA_H_DILUTION_OF_POS 8
92 #define RS4855_GPGGA_ALTITUDE 9
93 #define RS4855_GPGGA_ALTITUDE_UNIT 10
94 #define RS4855_GPGGA_GEOIDAL_SEPARATION 11
95 #define RS4855_GPGGA_GEOIDAL_SEPARATION_UNIT 12
96 #define RS4855_GPGGA_TIME_SINCE_LAST_DGPS 13
97 #define RS4855_GPGGA_DGPS_REFERENCE_STATION_ID 14
104 #define RS4855_GPGLL_LATITUDE 1
105 #define RS4855_GPGLL_LATITUDE_SIDE 2
106 #define RS4855_GPGLL_LONGITUDE 3
107 #define RS4855_GPGLL_LONGITUDE_SIDE 4
114 #define RS4855_ERROR_COMMAND_OR_ELEMENT 0xFF
115 #define RS4855_ERROR_START_OR_END_COMMAND 0x8F
116 #define RS4855_ERROR_NEXT_ELEMENT 0x4F
117 #define RS4855_ERROR_CURRENT_ELEMENT 0x2F
118 #define RS4855_NO_ERROR 0x00
125 #define DRV_RX_BUFFER_SIZE 500
128 #define RS4855_PIN_STATE_HIGH 1
129 #define RS4855_PIN_STATE_LOW 0
#define DRV_RX_BUFFER_SIZE
Definition: rs4855.h:125
pin_name_t re
Definition: rs4855.h:169
pin_name_t de
Definition: rs4855.h:168
void rs4855_cfg_setup(rs4855_cfg_t *cfg)
Config Object Initialization function.
void rs4855_send_byte_by_byte(rs4855_t *ctx, char *command)
Function for sending byte by byte.
uart_parity_t parity_bit
Definition: rs4855.h:176
pin_name_t tx_pin
Definition: rs4855.h:164
uart_data_bits_t data_bit
Definition: rs4855.h:175
bool uart_blocking
Definition: rs4855.h:174
void rs4855_generic_write(rs4855_t *ctx, char *data_buf, uint16_t len)
Generic write function.
pin_name_t rx_pin
Definition: rs4855.h:163
uint32_t baud_rate
Definition: rs4855.h:173
Click ctx object definition.
Definition: rs4855.h:140
void rs4855_set_re_state(rs4855_t *ctx, uint8_t state)
Sets RE pin to high or low state.
uart_t uart
Definition: rs4855.h:149
Click configuration structure definition.
Definition: rs4855.h:159
int32_t rs4855_generic_read(rs4855_t *ctx, char *data_buf, uint16_t max_len)
Generic read function.
#define RS4855_RETVAL
Definition: rs4855.h:64
uint8_t rs4855_error_t
Error type.
Definition: rs4855.h:184
uart_stop_bits_t stop_bit
Definition: rs4855.h:177
digital_out_t de
Definition: rs4855.h:144
RS4855_RETVAL rs4855_init(rs4855_t *ctx, rs4855_cfg_t *cfg)
Initialization function.
digital_out_t re
Definition: rs4855.h:145
void rs4855_set_de_state(rs4855_t *ctx, uint8_t state)
Sets DE pin to high or low state.