fgeneric_timer.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright : (C) 2022 Phytium Information Technology, Inc.
  3. * All Rights Reserved.
  4. *
  5. * This program is OPEN SOURCE software: you can redistribute it and/or modify it
  6. * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd,
  7. * either version 1.0 of the License, or (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY;
  10. * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. * See the Phytium Public License for more details.
  12. *
  13. *
  14. * FilePath: fgeneric_timer.h
  15. * Date: 2022-02-10 14:53:41
  16. * LastEditTime: 2022-02-17 17:30:13
  17. * Description:  This files is for
  18. *
  19. * Modify History:
  20. * Ver   Who        Date         Changes
  21. * ----- ------     --------    --------------------------------------
  22. */
  23. #ifndef BSP_ARCH_ARMV8_AARCH32_GENERIC_TIMER_H
  24. #define BSP_ARCH_ARMV8_AARCH32_GENERIC_TIMER_H
  25. #ifdef __cplusplus
  26. extern "C"
  27. {
  28. #endif
  29. #include "ftypes.h"
  30. typedef void (* GenericTimerTickHandler)();
  31. void GenericTimerStart(void);
  32. void GenericTimerStop(void);
  33. void GenericTimerInterruptEnable(void);
  34. void GenericTimerInterruptDisable(void);
  35. u32 GenericTimerFrequecy(void);
  36. u64 GenericTimerRead(void);
  37. void GenericTimerCompare(u32 interval);
  38. void GenericTimerSetupSystick(u32 tickRateHz, GenericTimerTickHandler tickHandler, u32 intrPrority);
  39. u32 GenericGetTick(void);
  40. #ifdef __cplusplus
  41. }
  42. #endif
  43. #endif // !