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.

71 lines
1.8 KiB

4 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
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
  1. #pragma once
  2. #include "system_ES8P5066.h"
  3. #include "lib_config.h"
  4. #include <stdbool.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) \
  10. (mirror(GPIO_ReadBit(GPIO_Pin_##port##pin) == 1))
  11. #define GPIO_SET(port, pin, mirror, _state) \
  12. GPIO_WriteBit(GPIO_Pin_##port##pin, mirror _state ? 1 : 0);
  13. void gpio_init(void);
  14. //����
  15. void port_debug_set(bool state);
  16. void port_led0_set(bool state);
  17. void port_led1_set(bool state);
  18. void port_led2_set(bool state);
  19. void port_led3_set(bool state);
  20. void port_led_r_set(bool state);
  21. void port_led_g_set(bool state);
  22. void port_led_b_set(bool state);
  23. void port_fan_set(bool state);
  24. bool port_gpio_get_timer_key_state(void);
  25. bool port_gpio_get_gears_key_state(void);
  26. bool port_gpio_get_interval_key_state(void);
  27. bool port_gpio_get_switch_key_state(void);
  28. bool port_led0_get_state(void);
  29. bool port_led1_get_state(void);
  30. bool port_led2_get_state(void);
  31. bool port_led3_get_state(void);
  32. /*
  33. ŷ
  34. H PA11 ʱ
  35. M PA16 ߵ͵ѡ͹رգ1ߵ2ɫ3ɫ4رգ
  36. Ъ PA13
  37. PA12
  38. LED0 PA3
  39. LED1 PB13
  40. LED2 PA5
  41. LED3 PA6
  42. LED_R PA7
  43. LED_G PA8
  44. LED_B PA9
  45. PWM PA4
  46. PB1
  47. ʱ |
  48. --------------------|------
  49. λ |
  50. --------------------|------
  51. Ӧled |
  52. --------------------|------
  53. RGB |
  54. --------------------|------
  55. PWMƵ |
  56. --------------------|------
  57. pwmռձ |
  58. --------------------|------
  59. ʱ |
  60. --------------------|------
  61. */