Put FORCE_INLINE before static
This commit is contained in:
@ -121,10 +121,10 @@
|
||||
FORCE_INLINE static ring_buffer_pos_t rxMaxEnqueued() { return rx_max_enqueued; }
|
||||
#endif
|
||||
|
||||
static FORCE_INLINE void write(const char* str) { while (*str) write(*str++); }
|
||||
static FORCE_INLINE void write(const uint8_t* buffer, size_t size) { while (size--) write(*buffer++); }
|
||||
static FORCE_INLINE void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
|
||||
static FORCE_INLINE void print(const char* str) { write(str); }
|
||||
FORCE_INLINE static void write(const char* str) { while (*str) write(*str++); }
|
||||
FORCE_INLINE static void write(const uint8_t* buffer, size_t size) { while (size--) write(*buffer++); }
|
||||
FORCE_INLINE static void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
|
||||
FORCE_INLINE static void print(const char* str) { write(str); }
|
||||
|
||||
static void print(char, int = BYTE);
|
||||
static void print(unsigned char, int = BYTE);
|
||||
|
@ -87,17 +87,17 @@ extern const tTimerConfig TimerConfig[];
|
||||
|
||||
void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency);
|
||||
|
||||
static FORCE_INLINE void HAL_timer_set_count(const uint8_t timer_num, const uint32_t count) {
|
||||
FORCE_INLINE static void HAL_timer_set_count(const uint8_t timer_num, const uint32_t count) {
|
||||
const tTimerConfig *pConfig = &TimerConfig[timer_num];
|
||||
pConfig->pTimerRegs->TC_CHANNEL[pConfig->channel].TC_RC = count;
|
||||
}
|
||||
|
||||
static FORCE_INLINE hal_timer_t HAL_timer_get_count(const uint8_t timer_num) {
|
||||
FORCE_INLINE static hal_timer_t HAL_timer_get_count(const uint8_t timer_num) {
|
||||
const tTimerConfig *pConfig = &TimerConfig[timer_num];
|
||||
return pConfig->pTimerRegs->TC_CHANNEL[pConfig->channel].TC_RC;
|
||||
}
|
||||
|
||||
static FORCE_INLINE uint32_t HAL_timer_get_current_count(const uint8_t timer_num) {
|
||||
FORCE_INLINE static uint32_t HAL_timer_get_current_count(const uint8_t timer_num) {
|
||||
const tTimerConfig *pConfig = &TimerConfig[timer_num];
|
||||
return pConfig->pTimerRegs->TC_CHANNEL[pConfig->channel].TC_CV;
|
||||
}
|
||||
@ -107,7 +107,7 @@ void HAL_timer_disable_interrupt(const uint8_t timer_num);
|
||||
|
||||
//void HAL_timer_isr_prologue(const uint8_t timer_num);
|
||||
|
||||
static FORCE_INLINE void HAL_timer_isr_prologue(const uint8_t timer_num) {
|
||||
FORCE_INLINE static void HAL_timer_isr_prologue(const uint8_t timer_num) {
|
||||
const tTimerConfig *pConfig = &TimerConfig[timer_num];
|
||||
// Reading the status register clears the interrupt flag
|
||||
pConfig->pTimerRegs->TC_CHANNEL[pConfig->channel].TC_SR;
|
||||
|
@ -107,10 +107,10 @@ public:
|
||||
FORCE_INLINE static ring_buffer_pos_t rxMaxEnqueued() { return rx_max_enqueued; }
|
||||
#endif
|
||||
|
||||
static FORCE_INLINE void write(const char* str) { while (*str) write(*str++); }
|
||||
static FORCE_INLINE void write(const uint8_t* buffer, size_t size) { while (size--) write(*buffer++); }
|
||||
static FORCE_INLINE void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
|
||||
static FORCE_INLINE void print(const char* str) { write(str); }
|
||||
FORCE_INLINE static void write(const char* str) { while (*str) write(*str++); }
|
||||
FORCE_INLINE static void write(const uint8_t* buffer, size_t size) { while (size--) write(*buffer++); }
|
||||
FORCE_INLINE static void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
|
||||
FORCE_INLINE static void print(const char* str) { write(str); }
|
||||
|
||||
static void print(char, int = BYTE);
|
||||
static void print(unsigned char, int = BYTE);
|
||||
|
@ -77,7 +77,7 @@ typedef uint32_t hal_timer_t;
|
||||
void HAL_timer_init(void);
|
||||
void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency);
|
||||
|
||||
static FORCE_INLINE void HAL_timer_set_count(const uint8_t timer_num, const hal_timer_t count) {
|
||||
FORCE_INLINE static void HAL_timer_set_count(const uint8_t timer_num, const hal_timer_t count) {
|
||||
switch (timer_num) {
|
||||
case 0:
|
||||
LPC_TIM0->MR0 = count;
|
||||
@ -92,7 +92,7 @@ static FORCE_INLINE void HAL_timer_set_count(const uint8_t timer_num, const hal_
|
||||
}
|
||||
}
|
||||
|
||||
static FORCE_INLINE hal_timer_t HAL_timer_get_count(const uint8_t timer_num) {
|
||||
FORCE_INLINE static hal_timer_t HAL_timer_get_count(const uint8_t timer_num) {
|
||||
switch (timer_num) {
|
||||
case 0: return LPC_TIM0->MR0;
|
||||
case 1: return LPC_TIM1->MR0;
|
||||
@ -100,7 +100,7 @@ static FORCE_INLINE hal_timer_t HAL_timer_get_count(const uint8_t timer_num) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static FORCE_INLINE hal_timer_t HAL_timer_get_current_count(const uint8_t timer_num) {
|
||||
FORCE_INLINE static hal_timer_t HAL_timer_get_current_count(const uint8_t timer_num) {
|
||||
switch (timer_num) {
|
||||
case 0: return LPC_TIM0->TC;
|
||||
case 1: return LPC_TIM1->TC;
|
||||
|
@ -107,7 +107,7 @@ void HAL_timer_disable_interrupt(uint8_t timer_num);
|
||||
* Todo: Look at that possibility later.
|
||||
*/
|
||||
|
||||
static FORCE_INLINE void HAL_timer_set_count (uint8_t timer_num, uint32_t count) {
|
||||
FORCE_INLINE static void HAL_timer_set_count (uint8_t timer_num, uint32_t count) {
|
||||
switch (timer_num) {
|
||||
case STEP_TIMER_NUM:
|
||||
StepperTimer.pause();
|
||||
@ -126,7 +126,7 @@ static FORCE_INLINE void HAL_timer_set_count (uint8_t timer_num, uint32_t count)
|
||||
}
|
||||
}
|
||||
|
||||
static FORCE_INLINE hal_timer_t HAL_timer_get_count (uint8_t timer_num) {
|
||||
FORCE_INLINE static hal_timer_t HAL_timer_get_count (uint8_t timer_num) {
|
||||
hal_timer_t temp;
|
||||
switch (timer_num) {
|
||||
case STEP_TIMER_NUM:
|
||||
@ -142,7 +142,7 @@ static FORCE_INLINE hal_timer_t HAL_timer_get_count (uint8_t timer_num) {
|
||||
return temp;
|
||||
}
|
||||
|
||||
static FORCE_INLINE hal_timer_t HAL_timer_get_current_count(uint8_t timer_num) {
|
||||
FORCE_INLINE static hal_timer_t HAL_timer_get_current_count(uint8_t timer_num) {
|
||||
hal_timer_t temp;
|
||||
switch (timer_num) {
|
||||
case STEP_TIMER_NUM:
|
||||
@ -161,7 +161,7 @@ static FORCE_INLINE hal_timer_t HAL_timer_get_current_count(uint8_t timer_num) {
|
||||
|
||||
//void HAL_timer_isr_prologue (uint8_t timer_num);
|
||||
|
||||
static FORCE_INLINE void HAL_timer_isr_prologue(uint8_t timer_num) {
|
||||
FORCE_INLINE static void HAL_timer_isr_prologue(uint8_t timer_num) {
|
||||
switch (timer_num) {
|
||||
case STEP_TIMER_NUM:
|
||||
StepperTimer.pause();
|
||||
|
@ -75,14 +75,14 @@ typedef uint32_t hal_timer_t;
|
||||
|
||||
void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency);
|
||||
|
||||
static FORCE_INLINE void HAL_timer_set_count(const uint8_t timer_num, const uint32_t count) {
|
||||
FORCE_INLINE static void HAL_timer_set_count(const uint8_t timer_num, const uint32_t count) {
|
||||
switch(timer_num) {
|
||||
case 0: FTM0_C0V = count; break;
|
||||
case 1: FTM1_C0V = count; break;
|
||||
}
|
||||
}
|
||||
|
||||
static FORCE_INLINE hal_timer_t HAL_timer_get_count(const uint8_t timer_num) {
|
||||
FORCE_INLINE static hal_timer_t HAL_timer_get_count(const uint8_t timer_num) {
|
||||
switch(timer_num) {
|
||||
case 0: return FTM0_C0V;
|
||||
case 1: return FTM1_C0V;
|
||||
@ -90,7 +90,7 @@ static FORCE_INLINE hal_timer_t HAL_timer_get_count(const uint8_t timer_num) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static FORCE_INLINE uint32_t HAL_timer_get_current_count(const uint8_t timer_num) {
|
||||
FORCE_INLINE static uint32_t HAL_timer_get_current_count(const uint8_t timer_num) {
|
||||
switch(timer_num) {
|
||||
case 0: return FTM0_CNT;
|
||||
case 1: return FTM1_CNT;
|
||||
|
Reference in New Issue
Block a user