소스 검색

Merge pull request #9733 from thinkyhead/bf2_random_fixup_branch

[2.0.x] Drop HAL_timer_set_count
Scott Lahteine 7 년 전
부모
커밋
eb182c08af
No account linked to committer's email address

+ 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;

+ 1
- 1
Marlin/src/core/macros.h 파일 보기

@@ -46,7 +46,7 @@
46 46
 #define _O3          __attribute__((optimize("O3")))
47 47
 
48 48
 // Clock speed factors
49
-#ifndef CYCLES_PER_MICROSECOND
49
+#if !defined(CYCLES_PER_MICROSECOND) && !defined(__STM32F1__)
50 50
   #define CYCLES_PER_MICROSECOND (F_CPU / 1000000L) // 16 or 20 on AVR
51 51
 #endif
52 52
 

+ 1
- 1
Marlin/src/pins/pins_STM32F1R.h 파일 보기

@@ -20,7 +20,7 @@
20 20
  *
21 21
  */
22 22
 
23
-#if !defined(__STM32F1__)
23
+#ifndef __STM32F1__
24 24
     #error "Oops!  Make sure you have an STM32F1 board selected from the 'Tools -> Boards' menu."
25 25
 #endif
26 26
 

Loading…
취소
저장