dev_keys.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /***************************************************************************//**
  2. * @file dev_keys.h
  3. * @brief Keys driver of RT-Thread RTOS for EFM32
  4. * COPYRIGHT (C) 2012, RT-Thread Development Team
  5. * @author onelife
  6. * @version 1.0
  7. *******************************************************************************
  8. * @section License
  9. * The license and distribution terms for this file may be found in the file
  10. * LICENSE in this distribution or at http://www.rt-thread.org/license/LICENSE
  11. *******************************************************************************
  12. * @section Change Logs
  13. * Date Author Notes
  14. * 2011-12-29 onelife Initial creation for EFM32GG_DK3750 board
  15. ******************************************************************************/
  16. #ifndef __DEV_KEYS_H__
  17. #define __DEV_KEYS_H__
  18. /* Includes ------------------------------------------------------------------*/
  19. /* Exported defines ----------------------------------------------------------*/
  20. #define KEYS_INT_PORT (gpioPortE)
  21. #define KEYS_INT_PIN (0)
  22. #define KEYS_POLL_TIME (RT_TICK_PER_SECOND / 10)
  23. /* Exported types ------------------------------------------------------------*/
  24. struct efm32_joy_device
  25. {
  26. rt_int16_t x, y;
  27. rt_uint16_t min_x, max_x;
  28. rt_uint16_t min_y, max_y;
  29. struct rt_timer timer;
  30. };
  31. /* Exported constants --------------------------------------------------------*/
  32. /* Exported macro ------------------------------------------------------------*/
  33. /* Exported functions ------------------------------------------------------- */
  34. void efm32_hw_keys_init(void);
  35. #endif /* __DEV_KEYS_H__ */