Fix name collision. timer_t => hal_timer_t
This commit is contained in:
@ -66,7 +66,7 @@
|
||||
// Types
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
typedef uint16_t timer_t;
|
||||
typedef uint16_t hal_timer_t;
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFF
|
||||
|
||||
typedef int8_t pin_t;
|
||||
|
@ -40,7 +40,7 @@
|
||||
|
||||
#define FORCE_INLINE __attribute__((always_inline)) inline
|
||||
|
||||
typedef uint32_t timer_t;
|
||||
typedef uint32_t hal_timer_t;
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFF
|
||||
|
||||
#define STEP_TIMER_NUM 3 // index of timer to use for stepper
|
||||
@ -92,7 +92,7 @@ static FORCE_INLINE void HAL_timer_set_count(const uint8_t timer_num, const uint
|
||||
pConfig->pTimerRegs->TC_CHANNEL[pConfig->channel].TC_RC = count;
|
||||
}
|
||||
|
||||
static FORCE_INLINE timer_t HAL_timer_get_count(const uint8_t timer_num) {
|
||||
static FORCE_INLINE 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;
|
||||
}
|
||||
|
@ -40,7 +40,7 @@
|
||||
|
||||
#define FORCE_INLINE __attribute__((always_inline)) inline
|
||||
|
||||
typedef uint32_t timer_t;
|
||||
typedef uint32_t hal_timer_t;
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFF
|
||||
|
||||
#define STEP_TIMER_NUM 0 // index of timer to use for stepper
|
||||
@ -77,7 +77,7 @@ typedef uint32_t 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 timer_t count) {
|
||||
static FORCE_INLINE 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 time
|
||||
}
|
||||
}
|
||||
|
||||
static FORCE_INLINE timer_t HAL_timer_get_count(const uint8_t timer_num) {
|
||||
static FORCE_INLINE 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 timer_t HAL_timer_get_count(const uint8_t timer_num) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static FORCE_INLINE timer_t HAL_timer_get_current_count(const uint8_t timer_num) {
|
||||
static FORCE_INLINE 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;
|
||||
|
@ -43,7 +43,7 @@
|
||||
*/
|
||||
#define FORCE_INLINE __attribute__((always_inline)) inline
|
||||
|
||||
typedef uint16_t timer_t;
|
||||
typedef uint16_t hal_timer_t;
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFF
|
||||
|
||||
#define STEP_TIMER_NUM 5 // index of timer to use for stepper
|
||||
@ -126,8 +126,8 @@ static FORCE_INLINE void HAL_timer_set_count (uint8_t timer_num, uint32_t count)
|
||||
}
|
||||
}
|
||||
|
||||
static FORCE_INLINE timer_t HAL_timer_get_count (uint8_t timer_num) {
|
||||
timer_t temp;
|
||||
static FORCE_INLINE hal_timer_t HAL_timer_get_count (uint8_t timer_num) {
|
||||
hal_timer_t temp;
|
||||
switch (timer_num) {
|
||||
case STEP_TIMER_NUM:
|
||||
temp = StepperTimer.getCompare(STEP_TIMER_CHAN);
|
||||
@ -142,8 +142,8 @@ static FORCE_INLINE timer_t HAL_timer_get_count (uint8_t timer_num) {
|
||||
return temp;
|
||||
}
|
||||
|
||||
static FORCE_INLINE timer_t HAL_timer_get_current_count(uint8_t timer_num) {
|
||||
timer_t temp;
|
||||
static FORCE_INLINE hal_timer_t HAL_timer_get_current_count(uint8_t timer_num) {
|
||||
hal_timer_t temp;
|
||||
switch (timer_num) {
|
||||
case STEP_TIMER_NUM:
|
||||
temp = StepperTimer.getCount();
|
||||
|
@ -40,7 +40,7 @@
|
||||
|
||||
#define FORCE_INLINE __attribute__((always_inline)) inline
|
||||
|
||||
typedef uint32_t timer_t;
|
||||
typedef uint32_t hal_timer_t;
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFF
|
||||
|
||||
#define STEP_TIMER_NUM 0
|
||||
@ -82,7 +82,7 @@ static FORCE_INLINE void HAL_timer_set_count(const uint8_t timer_num, const uint
|
||||
}
|
||||
}
|
||||
|
||||
static FORCE_INLINE timer_t HAL_timer_get_count(const uint8_t timer_num) {
|
||||
static FORCE_INLINE 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;
|
||||
|
Reference in New Issue
Block a user