driver.txt 834 B

12345678910111213141516171819202122232425
  1. All drivers in this fold are stm32f429 oem driver, which base stm32 libirary.
  2. ioctol cmd:
  3. All driver should use the same rule to generate cmd,
  4. #define xx_MAJOR
  5. #define xx_IOCTL_MAGIC 'x'
  6. #define GENERATE_CMD(__MAGIC__, __MAJOR__, __CMD__) \
  7. ((0x3<<30) | (__MAJOR__<<16) | (__MAGIC__<<8) | __CMD__)
  8. #define CMD0 GENERATE_CMD(xx_IOCTL_MAGIC, xx_MAJOR, 0)
  9. #define CMD1 GENERATE_CMD(xx_IOCTL_MAGIC, xx_MAJOR, 1)
  10. ... ...
  11. #define CMDn GENERATE_CMD(xx_IOCTL_MAGIC, xx_MAJOR, n)
  12. interrupt:
  13. Interrupt group is NVIC_PRIORITYGROUP_4, 4 bits for pre-emption priority, 0 bits for subpriority. (set in platform module).
  14. i2c1,i2c2,i2c3 event interrupt pre-emption priority is 2, subpriority is 0.
  15. i2c1,i2c2,i2c3 error interrupt pre-emption priority is 15, subpriority is 0.
  16. gpio exti interrupt pre-emption priority is 3.