Deuxième version plateau

This commit is contained in:
leo 2025-11-15 16:34:21 +01:00
commit 8f4a6d8c6c
9 changed files with 10 additions and 19 deletions

6
.gitignore vendored
View file

@ -23,8 +23,4 @@
*.iex *.iex
**/Objects/ **/Objects/
**/Listings/ **/Listings/
**/Debug/ **/Debug/

View file

@ -28,5 +28,4 @@ void Plateau_Init (void){
Mytimer_PWM(TIM3, 3); Mytimer_PWM(TIM3, 3);
My_USART_Init(USART1); My_USART_Init(USART1);
MyUSART_ActiveIT(USART1, 6, &handler_USART1); MyUSART_ActiveIT(USART1, 6, &handler_USART1);
} }

View file

@ -40,4 +40,3 @@ void ADC1_2_IRQHandler(void){
// ts = 9.010913347*(Rain +1000.00)*0.000000000008; // ts = 9.010913347*(Rain +1000.00)*0.000000000008;
// cycle = ts*12/0.000001; // cycle = ts*12/0.000001;
// ADC->SMPR1 |= // ADC->SMPR1 |=
//}

View file

@ -1,5 +1,5 @@
#include "stm32f10x.h" #include <stm32f10x.h>
#include "GPIO.h" #include <GPIO.h>
void MyGPIO_Init(GPIO_TypeDef *GPIO, char pin, char conf){ void MyGPIO_Init(GPIO_TypeDef *GPIO, char pin, char conf){
if (GPIO == GPIOA) {RCC->APB2ENR |= (RCC_APB2ENR_IOPAEN);} if (GPIO == GPIOA) {RCC->APB2ENR |= (RCC_APB2ENR_IOPAEN);}
@ -54,5 +54,4 @@ void MyGPIO_Reset(GPIO_TypeDef *GPIO, char GPIO_Pin){
void MyGPIO_Toggle(GPIO_TypeDef *GPIO, char GPIO_Pin){ void MyGPIO_Toggle(GPIO_TypeDef *GPIO, char GPIO_Pin){
if (((GPIO->ODR>>GPIO_Pin)&1) == 1) MyGPIO_Reset(GPIO, GPIO_Pin); if (((GPIO->ODR>>GPIO_Pin)&1) == 1) MyGPIO_Reset(GPIO, GPIO_Pin);
else MyGPIO_Set(GPIO, GPIO_Pin); else MyGPIO_Set(GPIO, GPIO_Pin);
}

View file

@ -1,6 +1,6 @@
#ifndef MYGPIO_H #ifndef MYGPIO_H
#define MYGPIO_H #define MYGPIO_H
#include "stm32f10x.h" #include <stm32f10x.h>
#define In_Floating 0x4 #define In_Floating 0x4
#define In_PullDown 0x8 #define In_PullDown 0x8

View file

@ -87,5 +87,4 @@ void TIM3_IRQHandler(void){
void TIM4_IRQHandler(void){ void TIM4_IRQHandler(void){
TIM4->SR&=~TIM_SR_UIF; TIM4->SR&=~TIM_SR_UIF;
Ptr_fct_t4(); Ptr_fct_t4();
}

View file

@ -1,6 +1,6 @@
#ifndef MYTIMER_H #ifndef MYTIMER_H
#define MYTIMER_H #define MYTIMER_H
#include "stm32f10x.h" #include <stm32f10x.h>
#define MyTimer_Base_Start(Timer) Timer->CR1|=TIM_CR1_CEN; #define MyTimer_Base_Start(Timer) Timer->CR1|=TIM_CR1_CEN;
#define MyTimer_Base_Stop(Timer) Timer->CR1&=~TIM_CR1_CEN; #define MyTimer_Base_Stop(Timer) Timer->CR1&=~TIM_CR1_CEN;

View file

@ -74,5 +74,4 @@ void USART1_IRQHandler(void){
void USART3_IRQHandler(void){ void USART3_IRQHandler(void){
USART3->SR&=~USART_SR_RXNE; USART3->SR&=~USART_SR_RXNE;
ptr_fct_u3(); ptr_fct_u3();
}

View file

@ -1 +1 @@
hey hey