diff --git a/driver/adcdriver.c b/driver/adc.c similarity index 86% rename from driver/adcdriver.c rename to driver/adc.c index 4c6320d..366b286 100644 --- a/driver/adcdriver.c +++ b/driver/adc.c @@ -1,6 +1,6 @@ -#include "adcdriver.h" +#include "adc.h" -void (* pFncADC) (void); /* déclaration d’un pointeur de fonction */ +void (* pFncADC) (void); /* d�claration d�un pointeur de fonction */ void MyADC_Init_Periph (void (* ptrFonction)(void)) { @@ -11,7 +11,7 @@ void MyADC_Init(MyADC_Struct_TypeDef * ADCStructPtr) { RCC->CFGR |= RCC_CFGR_ADCPRE_1; // ADC Prescaler : divided by 6 -> 72MHz to 12MHz RCC->APB2ENR |= RCC_APB2ENR_ADC1EN; //We activate the clock first - if(ADCStructPtr->channel < 10) //Cycle and channel selection -> permet de regler en fonction de la résistance donnée + if(ADCStructPtr->channel < 10) //Cycle and channel selection -> permet de regler en fonction de la r�sistance donn�e { ADCStructPtr->ADC->SMPR2 |= (ADCStructPtr->cycle<<(ADCStructPtr->channel*3)); //Channel < 10 @@ -20,7 +20,7 @@ void MyADC_Init(MyADC_Struct_TypeDef * ADCStructPtr) ADCStructPtr->ADC->SMPR1 |= (ADCStructPtr->cycle<<((ADCStructPtr->channel-10)*3)); //Channel > 10 } ADCStructPtr->ADC->SQR1 &= ADC_SQR1_L; //Channel sequence length -> 1 conversion (0000) - ADCStructPtr->ADC->SQR3 |= ADCStructPtr->channel; //Sequence Reader, seulement le SQ1 est lu dans notre cas, nous associons un channel à ce dernier. + ADCStructPtr->ADC->SQR3 |= ADCStructPtr->channel; //Sequence Reader, seulement le SQ1 est lu dans notre cas, nous associons un channel � ce dernier. ADCStructPtr->ADC->CR2 |= ADC_CR2_EXTTRIG; //Activation du trigger externe ADCStructPtr->ADC->CR2 |= ADC_CR2_EXTSEL; //Event externe choisie : SWSTART MyADC_ActiveIT(ADCStructPtr->ADC,0); @@ -40,5 +40,5 @@ void ADC1_2_IRQHandler(void) if (pFncADC != 0) (*pFncADC) (); /* appel indirect de la fonction */ MyADC_Base_Start(ADC1); - ADC1->SR &= ~ADC_SR_EOC; //Prochaine lecture pouvant être effectuée. + ADC1->SR &= ~ADC_SR_EOC; //Prochaine lecture pouvant �tre effectu�e. } \ No newline at end of file diff --git a/driver/adcdriver.h b/driver/adc.h similarity index 96% rename from driver/adcdriver.h rename to driver/adc.h index 98fb2e2..849c0d7 100644 --- a/driver/adcdriver.h +++ b/driver/adc.h @@ -1,7 +1,7 @@ #ifndef ADCDRIVER_H #define ADCDRIVER_H #include "stm32f10x.h" -#include "gpiodriver.h" +#include "gpio.h" typedef enum{ cycles1d5 = 0b000, diff --git a/driver/gpiodriver.c b/driver/gpio.c similarity index 98% rename from driver/gpiodriver.c rename to driver/gpio.c index 3228fc7..c27295a 100644 --- a/driver/gpiodriver.c +++ b/driver/gpio.c @@ -1,4 +1,4 @@ -#include "gpiodriver.h" +#include "gpio.h" void MyGPIO_Init(MyGPIO_Struct_TypeDef * GPIOStructPtr) { diff --git a/driver/gpiodriver.h b/driver/gpio.h similarity index 100% rename from driver/gpiodriver.h rename to driver/gpio.h diff --git a/driver/UART.c b/driver/uart.c similarity index 95% rename from driver/UART.c rename to driver/uart.c index bf073e0..84df976 100644 --- a/driver/UART.c +++ b/driver/uart.c @@ -1,4 +1,4 @@ -#include "UART.h" +#include "uart.h" #include "gpio.h" //faire GPIO @@ -84,7 +84,7 @@ char MyUART_Read(MyUART_Struct_Typedef * UARTStructPtr) UART1.UART = USART1; // choix UART (USART1, USART2, USART3) UART1.BaudRate = 9600; // Vitesse de communication MAX 118200 UART1.Wlengh = Wlengh8; // longeur du mot (Wlengh8 ,Wlengh9) - UART1.Wparity = parity_even; // parité (parity_even, parity_odd, parity_none) + UART1.Wparity = parity_even; // parit� (parity_even, parity_odd, parity_none) UART1.Wstop = stop1b; // nombre bit de stop (stop1b, stop2b) MyUART_Init(&UART1); // initialisation */ diff --git a/driver/UART.h b/driver/uart.h similarity index 100% rename from driver/UART.h rename to driver/uart.h