File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -672,7 +672,8 @@ void TheThingsNode::configUSB(bool deepSleep)
672
672
673
673
bool TheThingsNode::isUSBConnected ()
674
674
{
675
- return USBSTA&(1 <<VBUS);
675
+ return true ;
676
+ // return USBSTA&(1<<VBUS);
676
677
}
677
678
678
679
/* *****************************************************************************
@@ -700,7 +701,7 @@ TheThingsNode::TheThingsNode()
700
701
setColor (TTN_BLACK);
701
702
702
703
// TODO: Can we enable/disable this at will to save memory?
703
- USBCON|=(1 <<OTGPADE);
704
+ // USBCON|=(1<<OTGPADE);
704
705
705
706
pinMode (TTN_VBAT_MEAS_EN, OUTPUT);
706
707
digitalWrite (TTN_VBAT_MEAS_EN, HIGH);
@@ -813,18 +814,18 @@ void TheThingsNode::deepSleep(void)
813
814
{
814
815
ADCSRA &= ~_BV (ADEN);
815
816
set_sleep_mode (SLEEP_MODE_PWR_DOWN);
816
- MCUCR |= (1 << JTD);
817
- USBCON |= (1 << FRZCLK);
817
+ // MCUCR |= (1 << JTD);
818
+ // USBCON |= (1 << FRZCLK);
818
819
// USBCON &= ~_BV(USBE);
819
- PLLCSR &= ~_BV (PLLE);
820
+ // PLLCSR &= ~_BV(PLLE);
820
821
sleep_enable ();
821
822
sleep_mode (); // Sweet dreams!
822
823
823
824
// wake up, after ISR we arrive here ->
824
825
sleep_disable ();
825
- PLLCSR |= (1 << PLLE);
826
+ // PLLCSR |= (1 << PLLE);
826
827
power_all_enable ();
827
828
// USBCON |= (1 << USBE);
828
- USBCON &= ~_BV (FRZCLK);
829
+ // USBCON &= ~_BV(FRZCLK);
829
830
ADCSRA |= (1 << ADEN);
830
831
}
You can’t perform that action at this time.
0 commit comments