gnss18
2.1.0.0
|
API for configuring and manipulating GNSS 18 Click driver. More...
Modules | |
GNSS 18 Device Settings | |
Settings for registers of GNSS 18 Click driver. | |
GNSS 18 MikroBUS Map | |
MikroBUS pin mapping of GNSS 18 Click driver. | |
Functions | |
void | gnss18_cfg_setup (gnss18_cfg_t *cfg) |
GNSS 18 configuration object setup function. More... | |
void | gnss18_drv_interface_selection (gnss18_cfg_t *cfg, gnss18_drv_t drv_sel) |
GNSS 18 driver interface setup function. More... | |
err_t | gnss18_init (gnss18_t *ctx, gnss18_cfg_t *cfg) |
GNSS 18 initialization function. More... | |
err_t | gnss18_generic_write (gnss18_t *ctx, uint8_t *data_in, uint8_t len) |
GNSS 18 data writing function. More... | |
err_t | gnss18_generic_read (gnss18_t *ctx, uint8_t *data_out, uint8_t len) |
GNSS 18 data reading function. More... | |
void | gnss18_set_rst_pin (gnss18_t *ctx, uint8_t state) |
GNSS 18 set RST pin function. More... | |
uint8_t | gnss18_get_int_pin (gnss18_t *ctx) |
GNSS 18 get INT pin function. More... | |
void | gnss18_reset_device (gnss18_t *ctx) |
GNSS 18 reset device function. More... | |
err_t | gnss18_parse_gpgga (uint8_t *rsp_buf, uint8_t gpgga_element, uint8_t *element_data) |
GNSS 18 parse GPGGA function. More... | |
API for configuring and manipulating GNSS 18 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void gnss18_cfg_setup | ( | gnss18_cfg_t * | cfg | ) |
GNSS 18 configuration object setup function.
This function initializes Click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See gnss18_cfg_t object definition for detailed explanation. |
void gnss18_drv_interface_selection | ( | gnss18_cfg_t * | cfg, |
gnss18_drv_t | drv_sel | ||
) |
GNSS 18 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 gnss18_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See gnss18_drv_t object definition for detailed explanation. |
err_t gnss18_generic_read | ( | gnss18_t * | ctx, |
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
GNSS 18 data reading function.
This function reads a desired number of data bytes from the module.
[in] | ctx | : Click context object. See gnss18_t object definition for detailed explanation. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
>=0
- Success, or number of data bytes read in the case of UART, -1
- Error. See #err_t definition for detailed explanation. err_t gnss18_generic_write | ( | gnss18_t * | ctx, |
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
GNSS 18 data writing function.
This function writes a desired number of data bytes to the module.
[in] | ctx | : Click context object. See gnss18_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. uint8_t gnss18_get_int_pin | ( | gnss18_t * | ctx | ) |
GNSS 18 get INT pin function.
This function returns the INT pin logic state.
[in] | ctx | : Click context object. See gnss18_t object definition for detailed explanation. |
err_t gnss18_init | ( | gnss18_t * | ctx, |
gnss18_cfg_t * | cfg | ||
) |
GNSS 18 initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
[out] | ctx | : Click context object. See gnss18_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See gnss18_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t gnss18_parse_gpgga | ( | uint8_t * | rsp_buf, |
uint8_t | gpgga_element, | ||
uint8_t * | element_data | ||
) |
GNSS 18 parse GPGGA function.
This function parses the GPGGA data from the read response buffer.
[in] | rsp_buf | : Response buffer. |
[in] | gpgga_element | : GPGGA element position [1-14]. |
[out] | element_data | : Element data parsed. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void gnss18_reset_device | ( | gnss18_t * | ctx | ) |
GNSS 18 reset device function.
This function resets the device by toggling the RST pin.
[in] | ctx | : Click context object. See gnss18_t object definition for detailed explanation. |