drv_eqei.h 1.0 KB

1234567891011121314151617181920212223242526272829
  1. /**************************************************************************//**
  2. *
  3. * @copyright (C) 2020 Nuvoton Technology Corp. All rights reserved.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0
  6. *
  7. * Change Logs:
  8. * Date Author Notes
  9. * 2022-04-27 Wayne First version
  10. *
  11. * Tips:
  12. * EQEI compare interrupt flag *(pulse_encoder->user_data): If compare value is
  13. * not null, after execute device init, compare interrupt will be enabled automatic.
  14. * When the interrupt occur, interrupt flag will be set 1.
  15. *
  16. ******************************************************************************/
  17. #ifndef __DRV_EQEI_H__
  18. #define __DRV_EQEI_H__
  19. #include <rtthread.h>
  20. rt_int32_t nu_eqei_get_maxval(rt_device_t pulse_encoder);
  21. rt_int32_t nu_eqei_get_cmpval(rt_device_t pulse_encoder);
  22. rt_int32_t nu_eqei_get_type(rt_device_t pulse_encoder);
  23. void nu_eqei_set_maxval_type(rt_device_t pulse_encoder, rt_uint32_t u32val, enum rt_pulse_encoder_type eType);
  24. void nu_eqei_set_cmpval(rt_device_t pulse_encoder, rt_uint32_t u32val);
  25. #endif // __DRV_EQEI_H___