USB mode ok on ersky9x REVB

This commit is contained in:
bsongis
2012-04-03 07:22:02 +00:00
parent d0cb3bb51c
commit 0a3f3d6c6b
2 changed files with 7 additions and 6 deletions
+6 -5
View File
@@ -96,16 +96,18 @@ uint32_t check_soft_power()
uint32_t check_power()
{
if ( PIOC->PIO_PDSR & 0x02000000 )
{
return e_power_usb ; // Detected USB
}
#ifdef REVB
if ( check_soft_power() == 0 ) // power now off
{
return e_power_off ;
}
#endif
if ( PIOC->PIO_PDSR & 0x02000000 )
{
return e_power_usb ; // Detected USB
}
return e_power_on;
}
@@ -1130,7 +1132,6 @@ void usb_mode()
// Any interrupts that have been enabled must be disabled here
// BEFORE calling sam_boot()
endPdcUsartReceive() ; // Terminate any serial reception
// TODO in ersky9x soft_power_off() ; is called before endPdcUsartReceive
end_ppm_capture() ;
end_spi() ;
end_sound() ;
+1 -1
View File
@@ -710,7 +710,7 @@ void doSplash()
#endif
uint16_t tsum = stickMoveValue();
if(keyDown() || (tsum!=inacSum)) return; //wait for key release
if(keyDown() || (tsum!=inacSum)) return; //wait for key release
if (check_power()) return; // Usb on or power off