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.

51 lines
1.3 KiB

1 year ago
  1. #pragma once
  2. #include <stdbool.h>
  3. #include <stdint.h>
  4. #include "board/board.h"
  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_cmd_event, // ��ʼ�ɼ��¼�
  13. kevent_stop_sample_cmd_event, // ֹͣ�ɼ��¼�
  14. kevent_sample_start_event, // ��ʼ�ɼ��¼�
  15. kevent_sample_stop_event, // ֹͣ�ɼ��¼�
  16. kevent_ble_connect_event, // ���������¼�
  17. kevent_ble_disconnect_event, // �����Ͽ��¼�
  18. } app_event_type_t;
  19. typedef struct {
  20. uint32_t data0;
  21. uint32_t data1;
  22. uint32_t data2;
  23. } one_frame_data_t;
  24. typedef struct {
  25. app_event_type_t eventType;
  26. union {
  27. struct {
  28. uint32_t frameIndex;
  29. one_frame_data_t data[LITTLE_DATA_BLOCK_FRAME_NUM];
  30. } little_data_block;
  31. struct {
  32. uint8_t* data; // ����֤���ݶ���
  33. int len;
  34. } block_sensor_data;
  35. struct {
  36. uint8_t drop0;
  37. uint8_t drop1;
  38. } sensor_drop;
  39. } val;
  40. } app_event_t;
  41. void app_event_process_cb(void* p_event_data, uint16_t event_size);