drv_gpio.h 718 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright (c) 2006-2019, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2019-07-29 zdzn first version
  9. */
  10. #ifndef __DRV_GPIO_H__
  11. #define __DRV_GPIO_H__
  12. #include <rthw.h>
  13. #include <rtthread.h>
  14. #include <rtdevice.h>
  15. #include <rtdebug.h>
  16. #include <rtdbg.h>
  17. #include "interrupt.h"
  18. #include "bcm283x.h"
  19. #include "raspi.h"
  20. #include "board.h"
  21. #define GPIO_IRQ_NUM 3
  22. struct gpio_irq_def
  23. {
  24. void *irq_arg[32];
  25. void (*irq_cb[32])(void *param);
  26. rt_uint8_t irq_type[32];
  27. };
  28. enum gpio_irq_clock
  29. {
  30. GPIO_IRQ_LOSC_32KHZ = 0,
  31. GPIO_IRQ_HOSC_24MHZ
  32. };
  33. int rt_hw_gpio_init(void);
  34. #endif /* __DRV_GPIO_H__ */