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.

109 lines
2.7 KiB

4 years ago
4 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
3 years ago
4 years ago
4 years ago
4 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
3 years ago
  1. #pragma once
  2. #include <stdbool.h> //���岼��
  3. #include "lib_config.h"
  4. #include "system_ES8P5066.h"
  5. // #define UART0_RXD0_PIN GPIO_Pin_A22
  6. // #define UART0_TXD0_PIN GPIO_Pin_A23
  7. #define UART0_RXD0_PIN GPIO_Pin_A24
  8. #define UART0_TXD0_PIN GPIO_Pin_A25
  9. #define GPIO_GET(port, pin, mirror) (mirror(GPIO_ReadBit(GPIO_Pin_##port##pin) == 1))
  10. #define GPIO_SET(port, pin, mirror, _state) GPIO_WriteBit(GPIO_Pin_##port##pin, mirror _state ? 1 : 0);
  11. void unused_gpio_init(void);
  12. void gpio_init(void);
  13. //����
  14. void port_debug_set(bool state);
  15. void port_led0_set(bool state);
  16. void port_led1_set(bool state);
  17. void port_led2_set(bool state);
  18. void port_led3_set(bool state);
  19. void port_led_r_set(bool state);
  20. void port_led_g_set(bool state);
  21. void port_led_b_set(bool state);
  22. void port_fan_set(bool state);
  23. bool port_gpio_get_timer_key_state(void);
  24. bool port_gpio_get_gears_key_state(void);
  25. bool port_gpio_get_interval_key_state(void);
  26. bool port_gpio_get_switch_key_state(void);
  27. bool port_led0_get_state(void);
  28. bool port_led1_get_state(void);
  29. bool port_led2_get_state(void);
  30. bool port_led3_get_state(void);
  31. /*
  32. GPIO_Pin_B0 = 0, //δʹ��
  33. GPIO_Pin_B1 = 1,//����
  34. GPIO_Pin_B8 = 8,//ADC
  35. GPIO_Pin_B9 = 9,//ADC
  36. GPIO_Pin_B10 = 10,//OSCI
  37. GPIO_Pin_B11 = 11,//OSCO
  38. GPIO_Pin_B12 = 12,//MRSTN
  39. GPIO_Pin_B13 = 13,//LED1
  40. GPIO_Pin_A1 = 15,//VCC
  41. GPIO_Pin_A2 = 16,//ADC
  42. GPIO_Pin_A3 = 17,//LED0
  43. GPIO_Pin_A4 = 18,//PWM
  44. GPIO_Pin_A5 = 19,//LED2
  45. GPIO_Pin_A6 = 20,//LED3
  46. GPIO_Pin_A7 = 21,//LED_R
  47. GPIO_Pin_A8 = 22,//LED_G
  48. GPIO_Pin_A9 = 23,//LED_B
  49. GPIO_Pin_A10 = 24, //δʹ��
  50. GPIO_Pin_A11 = 25,//KEY1
  51. GPIO_Pin_A12 = 26,//KEY2
  52. GPIO_Pin_A13 = 27,//KEY3
  53. GPIO_Pin_A14 = 28,//ISPSCK
  54. GPIO_Pin_A15 = 29,//ISPSDA
  55. GPIO_Pin_A16 = 30,//KEY4
  56. GPIO_Pin_A22 = 36,//DEBUG
  57. GPIO_Pin_A23 = 37, //δʹ��
  58. GPIO_Pin_A24 = 38,//RX0
  59. GPIO_Pin_A25 = 39,//RX1
  60. GPIO_Pin_A27 = 41, //δʹ��
  61. GPIO_Pin_A28 = 42, //δʹ��
  62. ŷ FUN0
  63. H PA11 ʱ
  64. M PA16 ߵ͵ѡ͹رգ1ߵ2ɫ3ɫ4رգ
  65. Ъ PA13
  66. PA12
  67. LED0 PA3
  68. LED1 PB13
  69. LED2 PA5
  70. LED3 PA6
  71. LED_R PA7
  72. LED_G PA8
  73. LED_B PA9
  74. PWM PA4
  75. PB1
  76. ʱ |
  77. --------------------|------
  78. λ |
  79. --------------------|------
  80. Ӧled |
  81. --------------------|------
  82. RGB |
  83. --------------------|------
  84. PWMƵ |
  85. --------------------|------
  86. pwmռձ |
  87. --------------------|------
  88. ʱ |
  89. --------------------|------
  90. */
  91. /*
  92. δʹã
  93. PA10 PA23 PA26 PA27 PB0
  94. */