pin_map.h 719 B

1234567891011121314151617181920212223242526272829
  1. #ifndef __PIN_MAP_H__
  2. #define __PIN_MAP_H__
  3. #include <stdint.h>
  4. #include "user_config.h"
  5. #include "gpio.h"
  6. #define GPIO_PIN_NUM 13
  7. #define GPIO_PIN_NUM_INV 17
  8. extern uint32_t pin_mux[GPIO_PIN_NUM];
  9. extern uint8_t pin_num[GPIO_PIN_NUM];
  10. extern uint8_t pin_func[GPIO_PIN_NUM];
  11. #ifdef GPIO_INTERRUPT_ENABLE
  12. extern uint8_t pin_num_inv[GPIO_PIN_NUM_INV];
  13. extern uint8_t pin_int_type[GPIO_PIN_NUM];
  14. typedef struct {
  15. // These values have 15 bits of count, and the top bit
  16. // in 'seen' is set if we are missing a task post
  17. volatile uint16_t seen;
  18. volatile uint16_t reported;
  19. } GPIO_INT_COUNTER;
  20. extern GPIO_INT_COUNTER pin_counter[GPIO_PIN_NUM];
  21. #endif
  22. void get_pin_map(void);
  23. #endif // #ifndef __PIN_MAP_H__