rtkbase 2.1.0.0
RTK Base Click Driver

API for configuring and manipulating RTK Base Click driver. More...

Topics

 RTK Base Device Settings
 Settings for registers of RTK Base Click driver.
 
 RTK Base MikroBUS Map
 MikroBUS pin mapping of RTK Base Click driver.
 

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

API for configuring and manipulating RTK Base Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ rtkbase_calculate_crc24()

uint32_t rtkbase_calculate_crc24 ( uint8_t * data_buf,
uint16_t data_len )

RTK Base calculate crc24 function.

This function calculates and returns the CRC 24-bit of RTCM3 packet input. The CRC across the whole packet should sum to zero (remainder).

Parameters
[in]data_buf: RTCM3 packet data buffer.
[in]data_len: RTCM3 packet data length.
Returns
Calculated CRC 24-bit.
Note
None.

◆ rtkbase_cfg_setup()

void rtkbase_cfg_setup ( rtkbase_cfg_t * cfg)

RTK Base configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See rtkbase_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ rtkbase_clear_ring_buffers()

void rtkbase_clear_ring_buffers ( rtkbase_t * ctx)

RTK Base clear ring buffers function.

This function clears UART tx and rx ring buffers.

Parameters
[in]ctx: Click context object. See rtkbase_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ rtkbase_enable_rx_interrupt()

void rtkbase_enable_rx_interrupt ( rtkbase_t * ctx)

RTK Base enable rx interrupt function.

This function enables the RX interrupt by performing a dummy uart read.

Parameters
[in]ctx: Click context object. See rtkbase_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ rtkbase_generic_read()

err_t rtkbase_generic_read ( rtkbase_t * ctx,
char * data_out,
uint16_t len )

RTK Base data reading function.

This function reads a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See rtkbase_t object definition for detailed explanation.
[out]data_out: Output read data.
[in]len: Number of bytes to be read.
Returns
  • >0 - Number of data bytes read,
  • <=0 - Error/Empty Ring buffer. See #err_t definition for detailed explanation.
Note
None.

◆ rtkbase_generic_write()

err_t rtkbase_generic_write ( rtkbase_t * ctx,
char * data_in,
uint16_t len )

RTK Base data writing function.

This function writes a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See rtkbase_t object definition for detailed explanation.
[in]data_in: Data buffer for sending.
[in]len: Number of bytes for sending.
Returns
  • >=0 - Success,
  • <0 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ rtkbase_get_int_pin()

uint8_t rtkbase_get_int_pin ( rtkbase_t * ctx)

RTK Base get INT pin function.

This function returns the INT pin logic state.

Parameters
[in]ctx: Click context object. See rtkbase_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ rtkbase_init()

err_t rtkbase_init ( rtkbase_t * ctx,
rtkbase_cfg_t * cfg )

RTK Base initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See rtkbase_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See rtkbase_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ rtkbase_rx_bytes_available()

err_t rtkbase_rx_bytes_available ( rtkbase_t * ctx)

RTK Base rx bytes available function.

This function returns the number of bytes available in the RX ring buffer.

Parameters
[in]ctx: Click context object. See rtkbase_t object definition for detailed explanation.
Returns
Number of bytes available in the RX ring buffer.
Note
None.

◆ rtkbase_set_boot_pin()

void rtkbase_set_boot_pin ( rtkbase_t * ctx,
uint8_t state )

RTK Base set BOOT pin function.

This function sets the BOOT pin logic state.

Parameters
[in]ctx: Click context object. See rtkbase_t object definition for detailed explanation.
[in]state: Pin logic state.
Returns
None.
Note
None.

◆ rtkbase_set_rst_pin()

void rtkbase_set_rst_pin ( rtkbase_t * ctx,
uint8_t state )

RTK Base set RST pin function.

This function sets the RST pin logic state.

Parameters
[in]ctx: Click context object. See rtkbase_t object definition for detailed explanation.
[in]state: Pin logic state.
Returns
None.
Note
None.

◆ rtkbase_set_shd_pin()

void rtkbase_set_shd_pin ( rtkbase_t * ctx,
uint8_t state )

RTK Base set SHD pin function.

This function sets the SHD pin logic state.

Parameters
[in]ctx: Click context object. See rtkbase_t object definition for detailed explanation.
[in]state: Pin logic state.
Returns
None.
Note
None.

◆ rtkbase_set_wup_pin()

void rtkbase_set_wup_pin ( rtkbase_t * ctx,
uint8_t state )

RTK Base set WUP pin function.

This function sets the WUP pin logic state.

Parameters
[in]ctx: Click context object. See rtkbase_t object definition for detailed explanation.
[in]state: Pin logic state.
Returns
None.
Note
None.