| | |
| | | #include "SEGGER_RTT.h" |
| | | #include "SysCfg.h" |
| | | #include "gd32e23x.h" |
| | | #include "pwm.h" |
| | | #include "motor.h" |
| | | static uint32_t RttDataOutPutFlag = 0; |
| | | static void RTT_KeyValue(uint32_t key); |
| | | extern void RTT_TaskInit(void) |
| | |
| | | case 'T': |
| | | SEGGER_RTT_printf(0, "Software Compile time is :%s %s\n\r", &COMPILE_DATE, &COMPILE_TIME); |
| | | break; |
| | | |
| | | default: |
| | | case 'o': |
| | | timer_channel_output_mode_config(TIMER0, MOTOR_OUT_CH_W, TIMER_OC_MODE_PWM0); |
| | | timer_channel_output_state_config(TIMER0, MOTOR_OUT_CH_W, TIMER_CCX_ENABLE); |
| | | break; |
| | | case 's': |
| | | timer_channel_output_state_config(TIMER0, MOTOR_OUT_CH_W, TIMER_CCX_DISABLE); |
| | | break; |
| | | default: |
| | | break;` |
| | | } |
| | | } |