diff --git a/ProjetsKEIL/Drivers/timerdriver.c b/ProjetsKEIL/Drivers/timerdriver.c index 33c75bd..c87aa10 100644 --- a/ProjetsKEIL/Drivers/timerdriver.c +++ b/ProjetsKEIL/Drivers/timerdriver.c @@ -1,6 +1,13 @@ #include "timerdriver.h" #include "gpiodriver.h" +void (* pFnc) (void); /* déclaration d’un pointeur de fonction */ + +void Init_Periph (void (* ptrFonction)(void)) +{ + pFnc = ptrFonction; /* affectation du pointeur */ +} + void MyTimer_Base_Init(MyTimer_Struct_TypeDef * Timer) { //TIM1 uses the APB2ENR register from RCC. The others uses the APB1ENR, so we check this value. @@ -22,13 +29,6 @@ void MyTimer_ActiveIT(TIM_TypeDef * TimerX, uint8_t Prio) NVIC->ISER[0] |= (0x1<SR &= ~(0x1<SR &= ~(0x1<CR1 |= (0x01<CR1 &= ~(0x01< 1 0 - 1 + 0 18 @@ -125,7 +125,7 @@ 0 DLGDARM - (1010=895,198,1271,755,1)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(1011=-1,-1,-1,-1,0)(180=-1,-1,-1,-1,0)(120=486,94,907,521,1)(121=464,533,885,960,1)(122=875,109,1296,536,0)(123=-1,-1,-1,-1,0)(140=-1,-1,-1,-1,0)(240=-1,-1,-1,-1,0)(190=-1,-1,-1,-1,0)(200=-1,-1,-1,-1,0)(170=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=1326,229,1920,980,1)(132=-1,-1,-1,-1,0)(133=-1,-1,-1,-1,0)(160=-1,-1,-1,-1,0)(161=-1,-1,-1,-1,0)(162=-1,-1,-1,-1,0)(210=-1,-1,-1,-1,0)(211=-1,-1,-1,-1,0)(220=-1,-1,-1,-1,0)(221=-1,-1,-1,-1,0)(230=-1,-1,-1,-1,0)(234=-1,-1,-1,-1,0)(231=-1,-1,-1,-1,0)(232=-1,-1,-1,-1,0)(233=-1,-1,-1,-1,0)(150=-1,-1,-1,-1,0)(151=-1,-1,-1,-1,0) + (1010=895,198,1271,755,1)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(1011=-1,-1,-1,-1,0)(180=-1,-1,-1,-1,0)(120=486,94,907,521,1)(121=464,533,885,960,1)(122=875,109,1296,536,0)(123=-1,-1,-1,-1,0)(140=-1,-1,-1,-1,0)(240=-1,-1,-1,-1,0)(190=-1,-1,-1,-1,0)(200=-1,-1,-1,-1,0)(170=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=1326,229,1920,980,1)(132=150,186,744,937,0)(133=-1,-1,-1,-1,0)(160=-1,-1,-1,-1,0)(161=-1,-1,-1,-1,0)(162=-1,-1,-1,-1,0)(210=-1,-1,-1,-1,0)(211=-1,-1,-1,-1,0)(220=-1,-1,-1,-1,0)(221=-1,-1,-1,-1,0)(230=-1,-1,-1,-1,0)(234=-1,-1,-1,-1,0)(231=-1,-1,-1,-1,0)(232=-1,-1,-1,-1,0)(233=-1,-1,-1,-1,0)(150=-1,-1,-1,-1,0)(151=-1,-1,-1,-1,0) 0 @@ -257,7 +257,7 @@ 1 0 - 0 + 1 18