[X9D] Peripheral freqs now as defines

This commit is contained in:
bernet.andre@gmail.com
2013-01-09 14:46:59 +00:00
parent 8abf660e2b
commit b431f2e5bf
3 changed files with 5 additions and 10 deletions
+1 -5
View File
@@ -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 ;