es_conf_info_hwtimer.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*
  2. * Change Logs:
  3. * Date Author Notes
  4. * 2021-04-20 liuhy the first version
  5. *
  6. * Copyright (C) 2021 Shanghai Eastsoft Microelectronics Co., Ltd. All rights reserved.
  7. *
  8. * SPDX-License-Identifier: Apache-2.0
  9. *
  10. * Licensed under the Apache License, Version 2.0 (the License); you may
  11. * not use this file except in compliance with the License.
  12. * You may obtain a copy of the License at
  13. *
  14. * www.apache.org/licenses/LICENSE-2.0
  15. *
  16. * Unless required by applicable law or agreed to in writing, software
  17. * distributed under the License is distributed on an AS IS BASIS, WITHOUT
  18. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  19. * See the License for the specific language governing permissions and
  20. * limitations under the License.
  21. *
  22. */
  23. #ifndef __ES_CONF_INFO_HWTIMER_H__
  24. #define __ES_CONF_INFO_HWTIMER_H__
  25. #include <ald_cmu.h>
  26. #include <ald_timer.h>
  27. #define ES_C_HWTIMER_MODE_UP HWTIMER_CNTMODE_UP
  28. #define ES_C_HWTIMER_MODE_DOWN HWTIMER_CNTMODE_DW
  29. /* HWTIMER 配置 */
  30. /* codes_main */
  31. #ifndef ES_AD16C4T0_HWTIMER_MODE
  32. #define ES_AD16C4T0_HWTIMER_MODE ES_C_HWTIMER_MODE_UP
  33. #endif
  34. #ifndef ES_AD16C4T1_HWTIMER_MODE
  35. #define ES_AD16C4T1_HWTIMER_MODE ES_C_HWTIMER_MODE_UP
  36. #endif
  37. #ifndef ES_GP32C4T0_HWTIMER_MODE
  38. #define ES_GP32C4T0_HWTIMER_MODE ES_C_HWTIMER_MODE_UP
  39. #endif
  40. #ifndef ES_GP32C4T1_HWTIMER_MODE
  41. #define ES_GP32C4T1_HWTIMER_MODE ES_C_HWTIMER_MODE_UP
  42. #endif
  43. #ifndef ES_GP16C4T0_HWTIMER_MODE
  44. #define ES_GP16C4T0_HWTIMER_MODE ES_C_HWTIMER_MODE_UP
  45. #endif
  46. #ifndef ES_GP16C4T1_HWTIMER_MODE
  47. #define ES_GP16C4T1_HWTIMER_MODE ES_C_HWTIMER_MODE_UP
  48. #endif
  49. #ifndef ES_BS16T0_HWTIMER_MODE
  50. #define ES_BS16T0_HWTIMER_MODE ES_C_HWTIMER_MODE_UP
  51. #endif
  52. #ifndef ES_BS16T1_HWTIMER_MODE
  53. #define ES_BS16T1_HWTIMER_MODE ES_C_HWTIMER_MODE_UP
  54. #endif
  55. #define ES_AD16C4T0_HWTIMER_PRES 1
  56. #define ES_AD16C4T1_HWTIMER_PRES 1
  57. #define ES_GP16C4T0_HWTIMER_PRES 1
  58. #define ES_GP16C4T1_HWTIMER_PRES 1
  59. #define ES_GP32C4T0_HWTIMER_PRES 1
  60. #define ES_GP32C4T1_HWTIMER_PRES 1
  61. #define ES_BS16T0_HWTIMER_PRES 1
  62. #define ES_BS16T1_HWTIMER_PRES 1
  63. #ifndef ES_DEVICE_NAME_AD16C4T0_HWTIMER
  64. #define ES_DEVICE_NAME_AD16C4T0_HWTIMER "timer0"
  65. #endif
  66. #ifndef ES_DEVICE_NAME_AD16C4T1_HWTIMER
  67. #define ES_DEVICE_NAME_AD16C4T1_HWTIMER "timer1"
  68. #endif
  69. #ifndef ES_DEVICE_NAME_GP32C4T0_HWTIMER
  70. #define ES_DEVICE_NAME_GP32C4T0_HWTIMER "timer2"
  71. #endif
  72. #ifndef ES_DEVICE_NAME_GP32C4T1_HWTIMER
  73. #define ES_DEVICE_NAME_GP32C4T1_HWTIMER "timer3"
  74. #endif
  75. #ifndef ES_DEVICE_NAME_GP16C4T0_HWTIMER
  76. #define ES_DEVICE_NAME_GP16C4T0_HWTIMER "timer4"
  77. #endif
  78. #ifndef ES_DEVICE_NAME_GP16C4T1_HWTIMER
  79. #define ES_DEVICE_NAME_GP16C4T1_HWTIMER "timer5"
  80. #endif
  81. #ifndef ES_DEVICE_NAME_BS16T0_HWTIMER
  82. #define ES_DEVICE_NAME_BS16T0_HWTIMER "timer6"
  83. #endif
  84. #ifndef ES_DEVICE_NAME_BS16T1_HWTIMER
  85. #define ES_DEVICE_NAME_BS16T1_HWTIMER "timer7"
  86. #endif
  87. #endif