gps6 2.0.0.0
|
API for configuring and manipulating GPS 6 Click driver. More...
Topics | |
GPS 6 Device Settings | |
Settings for registers of GPS 6 Click driver. | |
GPS 6 MikroBUS Map | |
MikroBUS pin mapping of GPS 6 Click driver. | |
Functions | |
void | gps6_cfg_setup (gps6_cfg_t *cfg) |
GPS 6 configuration object setup function. | |
err_t | gps6_init (gps6_t *ctx, gps6_cfg_t *cfg) |
GPS 6 initialization function. | |
err_t | gps6_generic_write (gps6_t *ctx, char *data_buf, uint16_t len) |
GPS 6 data writing function. | |
err_t | gps6_generic_read (gps6_t *ctx, char *data_buf, uint16_t max_len) |
GPS 6 data reading function. | |
void | gps6_enable_device (gps6_t *ctx) |
GPS 6 enable device function. | |
void | gps6_disable_device (gps6_t *ctx) |
GPS 6 disable device function. | |
err_t | gps6_parse_gpgga (char *rsp_buf, uint8_t gpgga_element, char *element_data) |
GPS 6 parse GPGGA function. | |
API for configuring and manipulating GPS 6 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void gps6_cfg_setup | ( | gps6_cfg_t * | cfg | ) |
GPS 6 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See gps6_cfg_t object definition for detailed explanation. |
void gps6_disable_device | ( | gps6_t * | ctx | ) |
GPS 6 disable device function.
This function disables device by setting the RST pin to HIGH logic state.
[in] | ctx | : Click context object. See gps6_t object definition for detailed explanation. |
void gps6_enable_device | ( | gps6_t * | ctx | ) |
GPS 6 enable device function.
This function enables device by setting the RST pin to LOW logic state.
[in] | ctx | : Click context object. See gps6_t object definition for detailed explanation. |
err_t gps6_generic_read | ( | gps6_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len ) |
GPS 6 data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See gps6_t object definition for detailed explanation. |
[out] | data_buf | : Output read data. |
[in] | max_len | : Number of bytes to be read. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer.err_t gps6_generic_write | ( | gps6_t * | ctx, |
char * | data_buf, | ||
uint16_t | len ) |
GPS 6 data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See gps6_t object definition for detailed explanation. |
[in] | data_buf | : Data buffer for sending. |
[in] | len | : Number of bytes for sending. |
>=0
- Success, <0
- Error.err_t gps6_init | ( | gps6_t * | ctx, |
gps6_cfg_t * | cfg ) |
GPS 6 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See gps6_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See gps6_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t gps6_parse_gpgga | ( | char * | rsp_buf, |
uint8_t | gpgga_element, | ||
char * | element_data ) |
GPS 6 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.