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.

65 lines
1.4KB

  1. #ifndef _DATAPROC_H
  2. #define _DATAPROC_H
  3. #include "stm32f10x.h"
  4. #include "nrf24L01.h"
  5. #include "delay.h"
  6. #include "printf.h"
  7. #include "led.h"
  8. #include "USART2.h"
  9. #include "stmflash.h"
  10. void DataProc_Nrf24l01(void);
  11. void DataProc_Nrf24l01_SPI2(void);
  12. u8 DataProc_A0_WriteNum_SPI2(void);
  13. u8 DataProc_A3_nrf(void);
  14. u8 DataProc_A4_nrf(void);
  15. void DataProc_RecNrf24L01(void);
  16. void Usart1_Process(void);
  17. void DataProc_1356(void);
  18. void DataProc_USART3(void);
  19. void Data_Init(void);
  20. void DataProc_USART1(void);
  21. #define TestFlashAddr 0x80020000
  22. enum
  23. {
  24. Reset = 0x21, //阅读器复位
  25. GetFirmversion = 0x22, //获取固件版本
  26. SetReaderID = 0x25, //设置阅读器ID
  27. GetReaderID = 0x26, //获取阅读器ID
  28. DelWhite = 0x71, //删除白名单
  29. OpenWhite = 0x73, //打开白名单
  30. CloseWhite = 0x74, //关闭白名单
  31. AddWhite = 0x75, //添加白名单
  32. GetWhite = 0x78, //获取白名单
  33. Heart = 0x82, //心跳包
  34. GetWhiteState = 0x94 //获取白名单状态
  35. };
  36. enum
  37. {
  38. WriteNum = 0xA0, //A0写号
  39. WriteNumState, //A1写号结果上报
  40. Read_1345Num, //A2再读一次卡号
  41. Read_24Num, //A3读卡号
  42. ReadCardNum, //A4读2.4G卡号
  43. UpdateFirmversion, //A5下载升级固件
  44. UpdateFirm, //A6升级固件开关
  45. UpdateFirmState, //A7升级结果上报
  46. #if APP1
  47. Config24Agreement, //A8??????
  48. #endif
  49. };
  50. #endif