rtkbase 2.1.0.0
|
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. | |
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.
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).
[in] | data_buf | : RTCM3 packet data buffer. |
[in] | data_len | : RTCM3 packet data length. |
void rtkbase_cfg_setup | ( | rtkbase_cfg_t * | cfg | ) |
RTK Base configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See rtkbase_cfg_t object definition for detailed explanation. |
void rtkbase_clear_ring_buffers | ( | rtkbase_t * | ctx | ) |
RTK Base clear ring buffers function.
This function clears UART tx and rx ring buffers.
[in] | ctx | : Click context object. See rtkbase_t object definition for detailed explanation. |
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.
[in] | ctx | : Click context object. See rtkbase_t object definition for detailed explanation. |
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.
[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. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer. See #err_t definition for detailed explanation. 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.
[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. |
>=0
- Success, <0
- Error. See #err_t definition for detailed explanation. uint8_t rtkbase_get_int_pin | ( | rtkbase_t * | ctx | ) |
RTK Base get INT pin function.
This function returns the INT pin logic state.
[in] | ctx | : Click context object. See rtkbase_t object definition for detailed explanation. |
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.
[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. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. 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.
[in] | ctx | : Click context object. See rtkbase_t object definition for detailed explanation. |
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.
[in] | ctx | : Click context object. See rtkbase_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
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.
[in] | ctx | : Click context object. See rtkbase_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
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.
[in] | ctx | : Click context object. See rtkbase_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |