瀏覽代碼

Drop HAL_timer_set_count

Scott Lahteine 6 年之前
父節點
當前提交
a810e585db

+ 0
- 1
Marlin/src/HAL/HAL_AVR/HAL_AVR.h 查看文件

@@ -149,7 +149,6 @@ extern "C" {
149 149
 #define _CAT(a, ...) a ## __VA_ARGS__
150 150
 #define HAL_timer_set_compare(timer, compare) (_CAT(TIMER_OCR_, timer) = compare)
151 151
 #define HAL_timer_get_compare(timer) _CAT(TIMER_OCR_, timer)
152
-#define HAL_timer_set_count(timer, count) (_CAT(TIMER_COUNTER_, timer) = count)
153 152
 #define HAL_timer_get_count(timer) _CAT(TIMER_COUNTER_, timer)
154 153
 
155 154
 #define HAL_timer_isr_prologue(timer_num)

+ 0
- 5
Marlin/src/HAL/HAL_DUE/HAL_timers_Due.h 查看文件

@@ -101,11 +101,6 @@ FORCE_INLINE static hal_timer_t HAL_timer_get_compare(const uint8_t timer_num) {
101 101
   return pConfig->pTimerRegs->TC_CHANNEL[pConfig->channel].TC_RC;
102 102
 }
103 103
 
104
-FORCE_INLINE static void HAL_timer_set_count(const uint8_t timer_num, const hal_timer_t count) {
105
-  const tTimerConfig * const pConfig = &TimerConfig[timer_num];
106
-  pConfig->pTimerRegs->TC_CHANNEL[pConfig->channel].TC_CV = count;
107
-}
108
-
109 104
 FORCE_INLINE static hal_timer_t HAL_timer_get_count(const uint8_t timer_num) {
110 105
   const tTimerConfig * const pConfig = &TimerConfig[timer_num];
111 106
   return pConfig->pTimerRegs->TC_CHANNEL[pConfig->channel].TC_CV;

+ 0
- 7
Marlin/src/HAL/HAL_LPC1768/HAL_timers.h 查看文件

@@ -110,13 +110,6 @@ FORCE_INLINE static hal_timer_t HAL_timer_get_compare(const uint8_t timer_num) {
110 110
   return 0;
111 111
 }
112 112
 
113
-FORCE_INLINE static void HAL_timer_set_count(const uint8_t timer_num, const hal_timer_t count) {
114
-  switch (timer_num) {
115
-    case 0: LPC_TIM0->TC = count; break;
116
-    case 1: LPC_TIM1->TC = count; break;
117
-  }
118
-}
119
-
120 113
 FORCE_INLINE static hal_timer_t HAL_timer_get_count(const uint8_t timer_num) {
121 114
   switch (timer_num) {
122 115
     case 0: return LPC_TIM0->TC;

+ 0
- 1
Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.h 查看文件

@@ -83,7 +83,6 @@ typedef uint16_t hal_timer_t;
83 83
 #define DISABLE_TEMPERATURE_INTERRUPT() timer_disable_irq(TEMP_TIMER_DEV, TEMP_TIMER_CHAN)
84 84
 
85 85
 #define HAL_timer_get_count(timer_num) timer_get_count(TIMER_DEV(timer_num))
86
-#define HAL_timer_set_count(timer_num, count) timer_set_count(TIMER_DEV(timer_num), (uint16)count)
87 86
 
88 87
 
89 88
 #define HAL_ENABLE_ISRs() do { if (thermalManager.in_temp_isr)DISABLE_TEMPERATURE_INTERRUPT(); else ENABLE_TEMPERATURE_INTERRUPT(); ENABLE_STEPPER_DRIVER_INTERRUPT(); } while(0)

+ 0
- 4
Marlin/src/HAL/HAL_STM32F7/HAL_timers_STM32F7.cpp 查看文件

@@ -121,10 +121,6 @@ void HAL_timer_set_compare(const uint8_t timer_num, const uint32_t compare) {
121 121
   __HAL_TIM_SetAutoreload(&timerConfig[timer_num].timerdef, compare);
122 122
 }
123 123
 
124
-void HAL_timer_set_count(const uint8_t timer_num, const uint32_t count) {
125
-  __HAL_TIM_SetAutoreload(&timerConfig[timer_num].timerdef, count);
126
-}
127
-
128 124
 void HAL_timer_enable_interrupt(const uint8_t timer_num) {
129 125
   HAL_NVIC_EnableIRQ(timerConfig[timer_num].IRQ_Id);
130 126
 }

+ 0
- 5
Marlin/src/HAL/HAL_STM32F7/HAL_timers_STM32F7.h 查看文件

@@ -95,11 +95,6 @@ void HAL_timer_set_compare(const uint8_t timer_num, const uint32_t compare);
95 95
 hal_timer_t HAL_timer_get_compare(const uint8_t timer_num);
96 96
 uint32_t HAL_timer_get_count(const uint8_t timer_num);
97 97
 
98
-void HAL_timer_set_count(const uint8_t timer_num, const uint32_t count); // New
99
-/*FORCE_INLINE static void HAL_timer_set_count(const uint8_t timer_num, const hal_timer_t count) {
100
-  // To do ??
101
-}*/
102
-
103 98
 void HAL_timer_isr_prologue(const uint8_t timer_num);
104 99
 
105 100
 #endif // _HAL_TIMERS_STM32F7_H

+ 0
- 7
Marlin/src/HAL/HAL_TEENSY35_36/HAL_timers_Teensy.h 查看文件

@@ -95,13 +95,6 @@ FORCE_INLINE static hal_timer_t HAL_timer_get_compare(const uint8_t timer_num) {
95 95
   return 0;
96 96
 }
97 97
 
98
-FORCE_INLINE static void HAL_timer_set_count(const uint8_t timer_num, const hal_timer_t count) {
99
-  switch (timer_num) {
100
-    case 0: FTM0_CNT = count;
101
-    case 1: FTM1_CNT = count;
102
-  }
103
-}
104
-
105 98
 FORCE_INLINE static hal_timer_t HAL_timer_get_count(const uint8_t timer_num) {
106 99
   switch (timer_num) {
107 100
     case 0: return FTM0_CNT;

Loading…
取消
儲存