Support Complementary PWM mode
This commit is contained in:
@@ -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. ***/
|
||||
|
||||
Reference in New Issue
Block a user