23 lines
393 B
C
23 lines
393 B
C
#include "stm32f10x.h"
|
|
#include "Driver_TIMER.h"
|
|
|
|
|
|
int main(void) {
|
|
|
|
/*typedef struct {
|
|
TIM_TypeDef * Timer ;
|
|
uint16_t ARR ;
|
|
uint16_t PSC ;
|
|
} MyTimer_Struct_TypeDef ;
|
|
*/
|
|
//activer la clock du timer
|
|
MyTimer_Struct_TypeDef MonTimer ;
|
|
MonTimer.Timer = TIM1 ;
|
|
MonTimer.ARR = 65454;
|
|
MonTimer.PSC = 550 ;
|
|
MyTimer_Base_Init(&MonTimer);
|
|
|
|
MyTimer_Base_Start(MonTimer.Timer);
|
|
|
|
return 0;
|
|
}
|