rtkbase 2.1.0.0
rtkbase.h File Reference

This file contains API for RTK Base 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  rtkbase_t
 RTK Base Click context object. More...
 
struct  rtkbase_cfg_t
 RTK Base Click configuration object. More...
 

Macros

#define TX_DRV_BUFFER_SIZE   100
 RTK Base driver buffer size.
 
#define RX_DRV_BUFFER_SIZE   1000
 
#define RTKBASE_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  rtkbase_return_value_t { RTKBASE_OK = 0 , RTKBASE_ERROR = -1 }
 RTK Base Click return value data. More...
 

Functions

void rtkbase_cfg_setup (rtkbase_cfg_t *cfg)
 RTK Base configuration object setup function.
 
err_t rtkbase_init (rtkbase_t *ctx, rtkbase_cfg_t *cfg)
 RTK Base initialization function.
 
err_t rtkbase_generic_write (rtkbase_t *ctx, char *data_in, uint16_t len)
 RTK Base data writing function.
 
err_t rtkbase_generic_read (rtkbase_t *ctx, char *data_out, uint16_t len)
 RTK Base data reading function.
 
void rtkbase_clear_ring_buffers (rtkbase_t *ctx)
 RTK Base clear ring buffers function.
 
err_t rtkbase_rx_bytes_available (rtkbase_t *ctx)
 RTK Base rx bytes available function.
 
void rtkbase_enable_rx_interrupt (rtkbase_t *ctx)
 RTK Base enable rx interrupt function.
 
void rtkbase_set_rst_pin (rtkbase_t *ctx, uint8_t state)
 RTK Base set RST pin function.
 
void rtkbase_set_wup_pin (rtkbase_t *ctx, uint8_t state)
 RTK Base set WUP pin function.
 
void rtkbase_set_boot_pin (rtkbase_t *ctx, uint8_t state)
 RTK Base set BOOT pin function.
 
void rtkbase_set_shd_pin (rtkbase_t *ctx, uint8_t state)
 RTK Base set SHD pin function.
 
uint8_t rtkbase_get_int_pin (rtkbase_t *ctx)
 RTK Base get INT pin function.
 
uint32_t rtkbase_calculate_crc24 (uint8_t *data_buf, uint16_t data_len)
 RTK Base calculate crc24 function.
 

Detailed Description

This file contains API for RTK Base Click Driver.

Enumeration Type Documentation

◆ rtkbase_return_value_t

RTK Base Click return value data.

Predefined enum values for driver return values.

Enumerator
RTKBASE_OK 
RTKBASE_ERROR