gps_uart.h 404 B

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