lbandrtk
2.1.0.0
|
API for configuring and manipulating LBAND RTK Click driver. More...
Modules | |
LBAND RTK Registers Settings | |
Settings for registers of LBAND RTK Click driver. | |
LBAND RTK MikroBUS Map | |
MikroBUS pin mapping of LBAND RTK Click driver. | |
Functions | |
void | lbandrtk_cfg_setup (lbandrtk_cfg_t *cfg) |
LBAND RTK configuration object setup function. More... | |
void | lbandrtk_drv_interface_selection (lbandrtk_cfg_t *cfg, lbandrtk_drv_t drv_sel) |
LBAND RTK driver interface setup function. More... | |
err_t | lbandrtk_init (lbandrtk_t *ctx, lbandrtk_cfg_t *cfg) |
LBAND RTK initialization function. More... | |
err_t | lbandrtk_generic_write (lbandrtk_t *ctx, uint8_t *data_in, uint16_t len) |
LBAND RTK data writing function. More... | |
err_t | lbandrtk_generic_read (lbandrtk_t *ctx, uint8_t *data_out, uint16_t len) |
LBAND RTK data reading function. More... | |
err_t | lbandrtk_write_ubx_frame (lbandrtk_t *ctx, lbandrtk_ubx_frame_t *frame) |
LBAND RTK write ubx frame function. More... | |
err_t | lbandrtk_read_ubx_frame (lbandrtk_t *ctx, lbandrtk_ubx_frame_t *frame) |
LBAND RTK read ubx frame function. More... | |
void | lbandrtk_set_rst_pin (lbandrtk_t *ctx, uint8_t state) |
LBAND RTK set rst pin function. More... | |
void | lbandrtk_set_ein_pin (lbandrtk_t *ctx, uint8_t state) |
LBAND RTK set ein pin function. More... | |
void | lbandrtk_reset_device (lbandrtk_t *ctx) |
LBAND RTK reset device function. More... | |
err_t | lbandrtk_check_ack (lbandrtk_t *ctx, uint8_t class_id, uint8_t msg_id) |
LBAND RTK check ack function. More... | |
err_t | lbandrtk_set_val_8 (lbandrtk_t *ctx, uint32_t key_id, uint8_t layer, uint8_t value) |
LBAND RTK set val 8 function. More... | |
err_t | lbandrtk_set_val_16 (lbandrtk_t *ctx, uint32_t key_id, uint8_t layer, uint16_t value) |
LBAND RTK set val 16 function. More... | |
err_t | lbandrtk_set_val_32 (lbandrtk_t *ctx, uint32_t key_id, uint8_t layer, uint32_t value) |
LBAND RTK set val 32 function. More... | |
err_t | lbandrtk_set_val_64 (lbandrtk_t *ctx, uint32_t key_id, uint8_t layer, uint32_t value_high, uint32_t value_low) |
LBAND RTK set val 64 function. More... | |
err_t | lbandrtk_get_val_8 (lbandrtk_t *ctx, uint32_t key_id, uint8_t layer, uint8_t *value) |
LBAND RTK get val 8 function. More... | |
err_t | lbandrtk_get_val_16 (lbandrtk_t *ctx, uint32_t key_id, uint8_t layer, uint16_t *value) |
LBAND RTK get val 16 function. More... | |
err_t | lbandrtk_get_val_32 (lbandrtk_t *ctx, uint32_t key_id, uint8_t layer, uint32_t *value) |
LBAND RTK get val 32 function. More... | |
err_t | lbandrtk_get_val_64 (lbandrtk_t *ctx, uint32_t key_id, uint8_t layer, uint32_t *value_high, uint32_t *value_low) |
LBAND RTK get val 64 function. More... | |
err_t | lbandrtk_set_default_pmp_cfg (lbandrtk_t *ctx) |
LBAND RTK set default pmp cfg function. More... | |
err_t | lbandrtk_set_pmp_cfg (lbandrtk_t *ctx, lbandrtk_pmp_cfg_t pmp_cfg) |
LBAND RTK set pmp cfg function. More... | |
err_t | lbandrtk_get_pmp_cfg (lbandrtk_t *ctx, lbandrtk_pmp_cfg_t *pmp_cfg) |
LBAND RTK get pmp cfg function. More... | |
API for configuring and manipulating LBAND RTK Click driver.
void lbandrtk_cfg_setup | ( | lbandrtk_cfg_t * | cfg | ) |
LBAND RTK configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See lbandrtk_cfg_t object definition for detailed explanation. |
err_t lbandrtk_check_ack | ( | lbandrtk_t * | ctx, |
uint8_t | class_id, | ||
uint8_t | msg_id | ||
) |
LBAND RTK check ack function.
This function waits for an acknowledge UBX frame for the specifies message ID to arrive and checks it.
[in] | ctx | : Click context object. See lbandrtk_t object definition for detailed explanation. |
[in] | class_id | : Class of message to check the acknowledge for. |
[in] | msg_id | : ID of message to check the acknowledge for. |
0
- Success, -1
- Error or timeout. See #err_t definition for detailed explanation. void lbandrtk_drv_interface_selection | ( | lbandrtk_cfg_t * | cfg, |
lbandrtk_drv_t | drv_sel | ||
) |
LBAND RTK driver interface setup function.
This function sets a serial driver interface which will be used further in the click driver.
[out] | cfg | : Click configuration structure. See lbandrtk_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See lbandrtk_drv_t object definition for detailed explanation. |
err_t lbandrtk_generic_read | ( | lbandrtk_t * | ctx, |
uint8_t * | data_out, | ||
uint16_t | len | ||
) |
LBAND RTK data reading function.
This function reads a desired number of data bytes from the module.
[in] | ctx | : Click context object. See lbandrtk_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. -1
- Error. See #err_t definition for detailed explanation. err_t lbandrtk_generic_write | ( | lbandrtk_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | len | ||
) |
LBAND RTK data writing function.
This function writes a desired number of data bytes to the module.
[in] | ctx | : Click context object. See lbandrtk_t object definition for detailed explanation. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
>=0
- Success, or number of data bytes written in the case of UART, -1
- Error. See #err_t definition for detailed explanation. err_t lbandrtk_get_pmp_cfg | ( | lbandrtk_t * | ctx, |
lbandrtk_pmp_cfg_t * | pmp_cfg | ||
) |
LBAND RTK get pmp cfg function.
This function reads the Point to multipoint (PMP) configuration from RAM layer.
[in] | ctx | : Click context object. See lbandrtk_t object definition for detailed explanation. |
[out] | pmp_cfg | : Point to multipoint (PMP) configuration structure read. See lbandrtk_pmp_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error or timeout. See #err_t definition for detailed explanation. err_t lbandrtk_get_val_16 | ( | lbandrtk_t * | ctx, |
uint32_t | key_id, | ||
uint8_t | layer, | ||
uint16_t * | value | ||
) |
LBAND RTK get val 16 function.
This function reads the UBX-CFG 2-bytes value from the selected key ID.
[in] | ctx | : Click context object. See lbandrtk_t object definition for detailed explanation. |
[in] | key_id | : Configuration key ID to read. |
[in] | layer | : Memory layer where the value will be read from (Only one layer could be selected).
|
[out] | value | : Output value read. |
0
- Success, -1
- Error or timeout. See #err_t definition for detailed explanation. err_t lbandrtk_get_val_32 | ( | lbandrtk_t * | ctx, |
uint32_t | key_id, | ||
uint8_t | layer, | ||
uint32_t * | value | ||
) |
LBAND RTK get val 32 function.
This function reads the UBX-CFG 4-bytes value from the selected key ID.
[in] | ctx | : Click context object. See lbandrtk_t object definition for detailed explanation. |
[in] | key_id | : Configuration key ID to read. |
[in] | layer | : Memory layer where the value will be read from (Only one layer could be selected).
|
[out] | value | : Output value read. |
0
- Success, -1
- Error or timeout. See #err_t definition for detailed explanation. err_t lbandrtk_get_val_64 | ( | lbandrtk_t * | ctx, |
uint32_t | key_id, | ||
uint8_t | layer, | ||
uint32_t * | value_high, | ||
uint32_t * | value_low | ||
) |
LBAND RTK get val 64 function.
This function reads the UBX-CFG 8-bytes value from the selected key ID.
[in] | ctx | : Click context object. See lbandrtk_t object definition for detailed explanation. |
[in] | key_id | : Configuration key ID to read. |
[in] | layer | : Memory layer where the value will be read from (Only one layer could be selected).
|
[out] | value_high | : 4 higher bytes of value read. |
[out] | value_low | : 4 lower bytes of value read. |
0
- Success, -1
- Error or timeout. See #err_t definition for detailed explanation. err_t lbandrtk_get_val_8 | ( | lbandrtk_t * | ctx, |
uint32_t | key_id, | ||
uint8_t | layer, | ||
uint8_t * | value | ||
) |
LBAND RTK get val 8 function.
This function reads the UBX-CFG 1-bit or 1-byte value from the selected key ID.
[in] | ctx | : Click context object. See lbandrtk_t object definition for detailed explanation. |
[in] | key_id | : Configuration key ID to read. |
[in] | layer | : Memory layer where the value will be read from (Only one layer could be selected).
|
[out] | value | : Output value read. |
0
- Success, -1
- Error or timeout. See #err_t definition for detailed explanation. err_t lbandrtk_init | ( | lbandrtk_t * | ctx, |
lbandrtk_cfg_t * | cfg | ||
) |
LBAND RTK initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See lbandrtk_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See lbandrtk_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t lbandrtk_read_ubx_frame | ( | lbandrtk_t * | ctx, |
lbandrtk_ubx_frame_t * | frame | ||
) |
LBAND RTK read ubx frame function.
This function waits for an UBX frame message to arrive and reads it.
[in] | ctx | : Click context object. See lbandrtk_t object definition for detailed explanation. |
[out] | frame | : UBX frame message read. See lbandrtk_ubx_frame_t object definition for detailed explanation. |
0
- Success, -1
- Error or timeout. See #err_t definition for detailed explanation. void lbandrtk_reset_device | ( | lbandrtk_t * | ctx | ) |
LBAND RTK reset device function.
This function resets the device by toggling the RST pin.
[in] | ctx | : Click context object. See lbandrtk_t object definition for detailed explanation. |
err_t lbandrtk_set_default_pmp_cfg | ( | lbandrtk_t * | ctx | ) |
LBAND RTK set default pmp cfg function.
This function sets the Point to multipoint (PMP) to default configuration to RAM layer.
[in] | ctx | : Click context object. See lbandrtk_t object definition for detailed explanation. |
0
- Success, -1
- Error or timeout. See #err_t definition for detailed explanation. void lbandrtk_set_ein_pin | ( | lbandrtk_t * | ctx, |
uint8_t | state | ||
) |
LBAND RTK set ein pin function.
This function sets the EXTINT pin logic state.
[in] | ctx | : Click context object. See lbandrtk_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
err_t lbandrtk_set_pmp_cfg | ( | lbandrtk_t * | ctx, |
lbandrtk_pmp_cfg_t | pmp_cfg | ||
) |
LBAND RTK set pmp cfg function.
This function sets the specified Point to multipoint (PMP) configuration to RAM layer.
[in] | ctx | : Click context object. See lbandrtk_t object definition for detailed explanation. |
[in] | pmp_cfg | : Point to multipoint (PMP) configuration structure to be set. See lbandrtk_pmp_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error or timeout. See #err_t definition for detailed explanation. void lbandrtk_set_rst_pin | ( | lbandrtk_t * | ctx, |
uint8_t | state | ||
) |
LBAND RTK set rst pin function.
This function sets the RST pin logic state.
[in] | ctx | : Click context object. See lbandrtk_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
err_t lbandrtk_set_val_16 | ( | lbandrtk_t * | ctx, |
uint32_t | key_id, | ||
uint8_t | layer, | ||
uint16_t | value | ||
) |
LBAND RTK set val 16 function.
This function sets the UBX-CFG 2-bytes value to the selected key ID.
[in] | ctx | : Click context object. See lbandrtk_t object definition for detailed explanation. |
[in] | key_id | : Configuration key ID to set. |
[in] | layer | : Bit mask for memory layer where the value will be set.
|
[in] | value | : Value to be set. |
0
- Success, -1
- Error or timeout. See #err_t definition for detailed explanation. err_t lbandrtk_set_val_32 | ( | lbandrtk_t * | ctx, |
uint32_t | key_id, | ||
uint8_t | layer, | ||
uint32_t | value | ||
) |
LBAND RTK set val 32 function.
This function sets the UBX-CFG 4-bytes value to the selected key ID.
[in] | ctx | : Click context object. See lbandrtk_t object definition for detailed explanation. |
[in] | key_id | : Configuration key ID to set. |
[in] | layer | : Bit mask for memory layer where the value will be set.
|
[in] | value | : Value to be set. |
0
- Success, -1
- Error or timeout. See #err_t definition for detailed explanation. err_t lbandrtk_set_val_64 | ( | lbandrtk_t * | ctx, |
uint32_t | key_id, | ||
uint8_t | layer, | ||
uint32_t | value_high, | ||
uint32_t | value_low | ||
) |
LBAND RTK set val 64 function.
This function sets the UBX-CFG 8-bytes value to the selected key ID.
[in] | ctx | : Click context object. See lbandrtk_t object definition for detailed explanation. |
[in] | key_id | : Configuration key ID to set. |
[in] | layer | : Bit mask for memory layer where the value will be set.
|
[in] | value_high | : 4 higher bytes of value to be set. |
[in] | value_low | : 4 lower bytes of value to be set. |
0
- Success, -1
- Error or timeout. See #err_t definition for detailed explanation. err_t lbandrtk_set_val_8 | ( | lbandrtk_t * | ctx, |
uint32_t | key_id, | ||
uint8_t | layer, | ||
uint8_t | value | ||
) |
LBAND RTK set val 8 function.
This function sets the UBX-CFG 1-bit or 1-byte value to the selected key ID.
[in] | ctx | : Click context object. See lbandrtk_t object definition for detailed explanation. |
[in] | key_id | : Configuration key ID to set. |
[in] | layer | : Bit mask for memory layer where the value will be set.
|
[in] | value | : Value to be set. |
0
- Success, -1
- Error or timeout. See #err_t definition for detailed explanation. err_t lbandrtk_write_ubx_frame | ( | lbandrtk_t * | ctx, |
lbandrtk_ubx_frame_t * | frame | ||
) |
LBAND RTK write ubx frame function.
This function sends the provided UBX frame to the module.
[in] | ctx | : Click context object. See lbandrtk_t object definition for detailed explanation. |
[in,out] | frame | : UBX frame to send (No need for the header and checksum bytes to be set). See lbandrtk_ubx_frame_t object definition for detailed explanation. |
>=0
- Success, or number of data bytes written in the case of UART, -1
- Error. See #err_t definition for detailed explanation.