Support Complementary PWM mode

This commit is contained in:
murphy
2022-08-24 15:08:08 +08:00
parent dce9c6229e
commit 5573ead3af
36 changed files with 4251 additions and 1196 deletions
+3 -3
View File
@@ -669,7 +669,7 @@ void ACMP_Init() {
}
int ShutdownCnt, pShutdown=-1, Shutdown = 0;
int CHECK_SHUTDOWN() {
int SHUTDOWN_MODE_CHANGED() {
int V = ADC_GET_CONVERSION_DATA(ADC, 0);
if(V >= SHUTDOWN_VOLT) {
@@ -687,11 +687,11 @@ int CHECK_SHUTDOWN() {
if(++ShutdownCnt == SHUTDOWN_TIME) {
if(Shutdown != pShutdown) {
Shutdown = pShutdown;
return Shutdown;
return 1;
}
}
}
return -1;
return 0;
}
/*** (C) COPYRIGHT 2016 Nuvoton Technology Corp. ***/