#include "tim.h" #include "TestTimer.h" #define MAX 31250-1 #define MOY MAX/2 #define MIN 0x0 void testTim(){ TIM_OC_InitTypeDef sConfigOC = {0}; sConfigOC.Pulse = MAX; HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC,TIM_CHANNEL_1); sConfigOC.Pulse = MIN; HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC,TIM_CHANNEL_2); sConfigOC.Pulse = MOY; HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC,TIM_CHANNEL_3); HAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_1); HAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_2); HAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_3); } void testLed(){ TIM_OC_InitTypeDef sConfigOC = {0}; for(int i =MIN;i