thingstream 2.0.0.0
thingstream.h File Reference

This file contains API for Thingstream 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  thingstream_t
 Click ctx object definition. More...
 
struct  thingstream_cfg_t
 Click configuration structure definition. More...
 

Macros

#define THINGSTREAM_MAP_MIKROBUS(cfg, mikrobus)
 
#define THINGSTREAM_OK   0
 
#define THINGSTREAM_ERROR   -1
 
#define THINGSTREAM_DRV_RX_BUFFER_SIZE   600
 
#define THINGSTREAM_DRV_TX_BUFFER_SIZE   100
 
#define THINGSTREAM_NEMA_CGNSINF   1
 
#define THINGSTREAM_NEMA_GPGLL   3
 
#define THINGSTREAM_NEMA_CGNSINF_NUM_ELEMENT   20
 
#define THINGSTREAM_NEMA_GPGLL_NUM_ELEMENT   5
 
#define THINGSTREAM_GPGGA_TIME   1
 
#define THINGSTREAM_GPGGA_LATITUDE   2
 
#define THINGSTREAM_GPGGA_LATITUDE_SIDE   3
 
#define THINGSTREAM_GPGGA_LONGITUDE   4
 
#define THINGSTREAM_GPGGA_LONGITUDE_SIDE   5
 
#define THINGSTREAM_GPGGA_QUALITY_INDICATOR   6
 
#define THINGSTREAM_GPGGA_NUMBER_OF_SATELLITES   7
 
#define THINGSTREAM_GPGGA_H_DILUTION_OF_POS   8
 
#define THINGSTREAM_GPGGA_ALTITUDE   9
 
#define THINGSTREAM_GPGGA_ALTITUDE_UNIT   10
 
#define THINGSTREAM_GPGGA_GEOIDAL_SEPARATION   11
 
#define THINGSTREAM_GPGGA_GEOIDAL_SEPARATION_UNIT   12
 
#define THINGSTREAM_GPGGA_TIME_SINCE_LAST_DGPS   13
 
#define THINGSTREAM_GPGGA_DGPS_REFERENCE_STATION_ID   14
 
#define THINGSTREAM_GPGLL_LATITUDE   1
 
#define THINGSTREAM_GPGLL_LATITUDE_SIDE   2
 
#define THINGSTREAM_GPGLL_LONGITUDE   3
 
#define THINGSTREAM_GPGLL_LONGITUDE_SIDE   4
 
#define THINGSTREAM_ERROR_COMMAND_OR_ELEMENT   0xFF
 
#define THINGSTREAM_ERROR_START_OR_END_COMMAND   0x8F
 
#define THINGSTREAM_ERROR_NEXT_ELEMENT   0x4F
 
#define THINGSTREAM_ERROR_CURRENT_ELEMENT   0x2F
 
#define THINGSTREAM_NO_ERROR   0x00
 
#define THINGSTREAM_CGNSINF_RUN_STAT   1
 
#define THINGSTREAM_CGNSINF_FIX_STAT   2
 
#define THINGSTREAM_CGNSINF_DATE_TIME   3
 
#define THINGSTREAM_CGNSINF_LATITUDE   4
 
#define THINGSTREAM_CGNSINF_LONGITUDE   5
 
#define THINGSTREAM_CGNSINF_ALTITUDE   6
 
#define THINGSTREAM_CGNSINF_SPEED   7
 
#define THINGSTREAM_CGNSINF_COURSE   8
 
#define THINGSTREAM_CGNSINF_FIX_MODE   9
 
#define THINGSTREAM_CGNSINF_RESERVED1   10
 
#define THINGSTREAM_CGNSINF_HDOP   11
 
#define THINGSTREAM_CGNSINF_PDOP   12
 
#define THINGSTREAM_CGNSINF_VDOP   13
 
#define THINGSTREAM_CGNSINF_RESERVED2   14
 
#define THINGSTREAM_CGNSINF_SAT_VIEW   15
 
#define THINGSTREAM_CGNSINF_SAT_USED   16
 
#define THINGSTREAM_CGNSINF_GLONASS_VIEW   17
 
#define THINGSTREAM_CGNSINF_RESERVED3   18
 
#define THINGSTREAM_CGNSINF_C_N0   19
 
#define THINGSTREAM_CGNSINF_HPA   20
 
#define THINGSTREAM_CGNSINF_VPA   21
 

Typedefs

typedef uint8_t thingstream_actuator_sw_t
 Error type.
 
typedef int16_t thingstream_actuator_cnt_t
 
typedef char thingstream_actuator_str_t
 
typedef uint8_t thingstream_error_t
 

Functions

void thingstream_cfg_setup (thingstream_cfg_t *cfg)
 Config Object Initialization function.
 
err_t thingstream_init (thingstream_t *ctx, thingstream_cfg_t *cfg)
 Initialization function.
 
void thingstream_module_power (thingstream_t *ctx, uint8_t power_state)
 Power module.
 
void thingstream_reset_pin_state (thingstream_t *ctx, uint8_t state)
 Set RST pin state.
 
void thingstream_generic_write (thingstream_t *ctx, char *data_buf, uint16_t len)
 Generic write function.
 
int32_t thingstream_generic_read (thingstream_t *ctx, char *data_buf, uint16_t max_len)
 Generic read function.
 
void thingstream_send_command (thingstream_t *ctx, char *command)
 Send command.
 
thingstream_error_t thingstream_generic_parser (char *rsp, uint8_t command, uint8_t element, char *parser_buf)
 Generic parser function.
 

Detailed Description

This file contains API for Thingstream Click driver.