gps_uart.h 362 B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #include <furi_hal.h>
  3. #define GPS_BAUDRATE 9600
  4. #define RX_BUF_SIZE 1024
  5. typedef struct
  6. {
  7. float latitude;
  8. float longitude;
  9. } GpsStatus;
  10. typedef struct
  11. {
  12. FuriThread* thread;
  13. FuriStreamBuffer* rx_stream;
  14. uint8_t rx_buf[RX_BUF_SIZE];
  15. GpsStatus status;
  16. } GpsUart;
  17. GpsUart* gps_uart_enable();
  18. void gps_uart_disable(GpsUart* gps_uart);