You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.2 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. #pragma once
  2. #include <stdbool.h>
  3. #include <stdint.h>
  4. #define LITTLE_DATA_BLOCK_FRAME_NUM 4 // ÿ��֡�ص�һ��
  5. typedef enum {
  6. kevent_sensor_drop = 0, // ���������¼�
  7. kevent_tmr_scheduler, // ��ʱ�������¼�
  8. kevent_capture_data_block_event, // ÿ�ɼ�һ�����ݺ��ص�һ��
  9. kevent_capture_little_data_block_event, // ������С���ݿ��ص��¼�
  10. kevent_button_push_event, // ���������¼�
  11. kevent_button_release_event, // �����ͷ��¼�
  12. kevent_start_sample_event, // ��ʼ�ɼ��¼�
  13. kevent_stop_sample_event, // ֹͣ�ɼ��¼�
  14. kevent_ble_connect_event, // ���������¼�
  15. kevent_ble_disconnect_event, // �����Ͽ��¼�
  16. } app_event_type_t;
  17. typedef struct {
  18. uint32_t data0;
  19. uint32_t data1;
  20. uint32_t data2;
  21. } one_frame_data_t;
  22. typedef struct {
  23. app_event_type_t eventType;
  24. union {
  25. struct {
  26. uint32_t frameIndex;
  27. one_frame_data_t data[LITTLE_DATA_BLOCK_FRAME_NUM];
  28. } little_data_block;
  29. struct {
  30. uint8_t* data; // ����֤���ݶ���
  31. int len;
  32. } block_sensor_data;
  33. struct {
  34. uint8_t drop0;
  35. uint8_t drop1;
  36. } sensor_drop;
  37. } val;
  38. } app_event_t;
  39. void app_event_process_cb(void* p_event_data, uint16_t event_size);