gps_uart.h 374 B

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