bt_views.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #pragma once
  2. #include "bt_i.h"
  3. #include "bt_types.h"
  4. #include <stdint.h>
  5. #include <stdbool.h>
  6. #include <gui/canvas.h>
  7. #include <furi.h>
  8. #include <gui/view_dispatcher.h>
  9. #include <gui/view.h>
  10. typedef enum {
  11. BtViewTestCarrier,
  12. BtViewTestPacketTx,
  13. BtViewTestPacketRx,
  14. BtViewStartApp,
  15. } BtView;
  16. typedef struct {
  17. BtStateType type;
  18. BtTestChannel channel;
  19. BtTestPower power;
  20. float rssi;
  21. } BtViewTestCarrierModel;
  22. typedef struct {
  23. BtStateType type;
  24. BtTestChannel channel;
  25. BtTestDataRate datarate;
  26. uint16_t packets_sent;
  27. } BtViewTestPacketTxModel;
  28. typedef struct {
  29. BtStateType type;
  30. BtTestChannel channel;
  31. BtTestDataRate datarate;
  32. float rssi;
  33. uint16_t packets_received;
  34. } BtViewTestPacketRxModel;
  35. void bt_view_test_carrier_draw(Canvas* canvas, void* model);
  36. bool bt_view_test_carrier_input(InputEvent* event, void* context);
  37. void bt_view_test_packet_tx_draw(Canvas* canvas, void* model);
  38. bool bt_view_test_packet_tx_input(InputEvent* event, void* context);
  39. void bt_view_test_packet_rx_draw(Canvas* canvas, void* model);
  40. bool bt_view_test_packet_rx_input(InputEvent* event, void* context);
  41. void bt_view_app_draw(Canvas* canvas, void* model);