1
0

dev_keys.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (c) 2006-2022, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2011-12-29 onelife Initial creation for EFM32GG_DK3750 board
  9. */
  10. #ifndef __DEV_KEYS_H__
  11. #define __DEV_KEYS_H__
  12. /* Includes ------------------------------------------------------------------*/
  13. /* Exported defines ----------------------------------------------------------*/
  14. #define KEYS_INT_PORT (gpioPortE)
  15. #define KEYS_INT_PIN (0)
  16. #define KEYS_POLL_TIME (RT_TICK_PER_SECOND / 10)
  17. /* Exported types ------------------------------------------------------------*/
  18. struct efm32_joy_device
  19. {
  20. rt_int16_t x, y;
  21. rt_uint16_t min_x, max_x;
  22. rt_uint16_t min_y, max_y;
  23. struct rt_timer timer;
  24. };
  25. /* Exported constants --------------------------------------------------------*/
  26. /* Exported macro ------------------------------------------------------------*/
  27. /* Exported functions ------------------------------------------------------- */
  28. void efm32_hw_keys_init(void);
  29. #endif /* __DEV_KEYS_H__ */