[X9D] Peripheral freqs now as defines
This commit is contained in:
@@ -38,10 +38,6 @@ uint8_t temperature = 0; // Raw temp reading
|
||||
uint8_t maxTemperature = 0 ; // Raw temp reading
|
||||
volatile uint32_t Tenms ; // TODO to remove everywhere / use a #define
|
||||
|
||||
uint32_t Peri1_frequency = 30000000;
|
||||
uint32_t Peri2_frequency = 30000000;
|
||||
uint32_t Timer_mult = 2;
|
||||
|
||||
#define PIN_MODE_MASK 0x0003
|
||||
#define PIN_INPUT 0x0000
|
||||
#define PIN_OUTPUT 0x0001
|
||||
@@ -125,7 +121,7 @@ void init5msTimer()
|
||||
// Timer14
|
||||
RCC->APB1ENR |= RCC_APB1ENR_TIM14EN ; // Enable clock
|
||||
TIM14->ARR = 4999 ; // 5mS
|
||||
TIM14->PSC = (Peri1_frequency * Timer_mult) / 1000000 - 1 ; // 1uS from 30MHz
|
||||
TIM14->PSC = (PERI1_FREQUENCY * TIMER_MULT) / 1000000 - 1 ; // 1uS from 30MHz
|
||||
TIM14->CCER = 0 ;
|
||||
TIM14->CCMR1 = 0 ;
|
||||
TIM14->EGR = 0 ;
|
||||
|
||||
Reference in New Issue
Block a user