van_BSP_Scanner.h 988 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * uart_rcv.h
  3. *
  4. * Created on: 2022年4月20日
  5. * Author: dell
  6. */
  7. #ifndef VAN_BAP_SCANNER_H_
  8. #define VAN_BAP_SCANNER_H_
  9. enum QR_CHECH_STATE
  10. {
  11. QR_CHECH_STATE_FIRST = 0,
  12. QR_CHECH_STATE_TRYAGAIN = 1,
  13. QR_CHECH_STATE_WAITING= 3,
  14. QR_CHECH_STATE_SEND= 4,
  15. };
  16. enum QR_REC_STATE
  17. {
  18. QR_REC_STATE_EMPTY = 0,
  19. QR_REC_STATE_HEADER ,
  20. QR_REC_STATE_SENDPRAM,
  21. QR_REC_STATE_SENDQR,
  22. QR_REC_STATE_END,
  23. };
  24. typedef struct str_hole_info
  25. {
  26. uint8_t item;
  27. uint8_t TtMax[2];
  28. uint8_t TtMin[2];
  29. } str_hole_info_t;
  30. typedef struct str_card_param_info
  31. {
  32. char pid[10];
  33. uint8_t temp[2];
  34. struct str_hole_info hole_info[10];
  35. } str_card_param_info_t;
  36. int parse_qrcode_info(struct str_card_param_info *info, char *qrcode_str);
  37. void QRparam_upload(str_card_param_info_t *p_str_card_param_info);
  38. void svanner_receive_Rec_IDLE(UART_HandleTypeDef *huart);
  39. void svanner_receive_Rec_Start(UART_HandleTypeDef *huart);
  40. void svanner_receive_analysis(void);
  41. #endif /* UART_RCV_H_ */