test
This commit is contained in:
parent
8f4a6d8c6c
commit
8720083f62
4 changed files with 7 additions and 4 deletions
|
|
@ -18,7 +18,6 @@ void handler_USART1 (void) {
|
||||||
MyGPIO_Reset(GPIOA, 1);
|
MyGPIO_Reset(GPIOA, 1);
|
||||||
Mytimer_PWM_cycle(TIM3, 3, data);
|
Mytimer_PWM_cycle(TIM3, 3, data);
|
||||||
}
|
}
|
||||||
MyTimer_Base_Start(TIM3);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Plateau_Init (void){
|
void Plateau_Init (void){
|
||||||
|
|
@ -28,4 +27,5 @@ 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);
|
||||||
|
MyTimer_Base_Start(TIM3);
|
||||||
}
|
}
|
||||||
|
|
@ -54,4 +54,5 @@ 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);
|
||||||
|
}
|
||||||
|
|
@ -87,4 +87,5 @@ 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();
|
||||||
|
}
|
||||||
|
|
@ -74,4 +74,5 @@ 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();
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue