forked from trocache/RefKEIL
Starting to work on Driver_ADC
This commit is contained in:
parent
b34457b915
commit
b60271d253
4 changed files with 11 additions and 3 deletions
1
drivers/Driver_ADC.c
Normal file
1
drivers/Driver_ADC.c
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
#include "Driver_Timer.h"
|
||||||
9
drivers/Driver_ADC.h
Normal file
9
drivers/Driver_ADC.h
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
#ifndef MYADC_H
|
||||||
|
#define MYADC_H
|
||||||
|
|
||||||
|
#include "stm32f10x.h"
|
||||||
|
|
||||||
|
// Todo
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -12,8 +12,6 @@ void MyTimer_Base_Init(MyTimer_Struct_TypeDef * Timer)
|
||||||
RCC->APB1ENR |= RCC_APB1ENR_TIM3EN;
|
RCC->APB1ENR |= RCC_APB1ENR_TIM3EN;
|
||||||
} else if (Timer->Timer == TIM4) {
|
} else if (Timer->Timer == TIM4) {
|
||||||
RCC->APB1ENR |= RCC_APB1ENR_TIM4EN;
|
RCC->APB1ENR |= RCC_APB1ENR_TIM4EN;
|
||||||
} else if (Timer->Timer == TIM5) {
|
|
||||||
//RCC->APB1ENR |= RCC_APB1ENR_TIM5EN;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Configuration du Timer
|
// Configuration du Timer
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ void delay() {
|
||||||
for(i = 0; i < 1000000; i++);
|
for(i = 0; i < 1000000; i++);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(void) {
|
int main(void) {
|
||||||
|
|
||||||
// Configure la broche PA5 en sortie
|
// Configure la broche PA5 en sortie
|
||||||
MyGPIO_Struct_TypeDef GPIO_InitStructure;
|
MyGPIO_Struct_TypeDef GPIO_InitStructure;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue