diff --git a/CantoOrvikPilotes/Include/GPIO.h b/CantoOrvikPilotes/Include/GPIO.h new file mode 100644 index 0000000..9565222 --- /dev/null +++ b/CantoOrvikPilotes/Include/GPIO.h @@ -0,0 +1,4 @@ +extern int ChercherEtat(GPIO_TypeDef * GPIO, int pin); +extern void ResetBroche(uint32_t GPIO, int Broche); +extern void SetBroche(uint32_t GPIO, int Broche); +extern void ConfigureBroche(uint32_t GPIO, int Broche, int IO, char Mode); diff --git a/CantoOrvikPilotes/Include/MyTimer.h b/CantoOrvikPilotes/Include/MyTimer.h new file mode 100644 index 0000000..c4f72ec --- /dev/null +++ b/CantoOrvikPilotes/Include/MyTimer.h @@ -0,0 +1,20 @@ +#include "stm32f10x.h" + +//TIMERS +extern void MyTimer_Base_Init ( TIM_TypeDef * Timer , unsigned short ValARR , unsigned short ValPSC ); +extern void EnableTimer(void); +extern void ConfigureBroches(); +extern void ConfigureTimers(); +#define MyTimer_Base_Start(Timer) (Timer->CR1 |= TIM_CR1_CEN) +#define MyTimer_Base_Stop(Timer) (Timer -> CR1 =(0x0)) +extern volatile int g_tick_count; // Declara que a variável existe em outro arquivo +extern void TIM2_IRQHandler(void); +extern void TIM3_IRQHandler(void); +extern void TIM4_IRQHandler(void); +extern void MyTimer_ActiveIT(TIM_TypeDef *Timer, char Prio,void(*IT_function)(void)); +//PWM +extern void MyTimer_PWM(TIM_TypeDef *Timer, char Channel); +extern void MyTimer_Set_DutyCycle(TIM_TypeDef *Timer, char Channel, float DutyCycle_Percent); +void Test(void); +void ConfigureIT(); +void ConfigurePWM(); \ No newline at end of file diff --git a/CantoOrvikPilotes/Include/Nucleo.h b/CantoOrvikPilotes/Include/Nucleo.h new file mode 100644 index 0000000..6eebacb --- /dev/null +++ b/CantoOrvikPilotes/Include/Nucleo.h @@ -0,0 +1,7 @@ +#include "stm32f10x.h" +extern void ConfigHorloge(void); +extern void ConfigBroche(void); +extern int BoutonAppuye(void); +extern void AllumerLED(void); +extern void EteindreLED(void); +extern void TogglePin(GPIO_TypeDef*GPIO, int Broche); \ No newline at end of file diff --git a/CantoOrvikPilotes/Include/PWM.h b/CantoOrvikPilotes/Include/PWM.h new file mode 100644 index 0000000..4c6de71 --- /dev/null +++ b/CantoOrvikPilotes/Include/PWM.h @@ -0,0 +1,3 @@ +#include "stm32f10x.h" +extern void MyTimer_PWM(TIM_TypeDef *Timer, char Channel); +extern void MyTimer_Set_DutyCycle(TIM_TypeDef *Timer, char Channel, float DutyCycle_Percent); \ No newline at end of file diff --git a/CantoOrvikPilotes/Include/test.h b/CantoOrvikPilotes/Include/test.h new file mode 100644 index 0000000..06d7405 Binary files /dev/null and b/CantoOrvikPilotes/Include/test.h differ