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)
672672
673673bool TheThingsNode::isUSBConnected ()
674674{
675- return USBSTA&(1 <<VBUS);
675+ return true ;
676+ // return USBSTA&(1<<VBUS);
676677}
677678
678679/* *****************************************************************************
@@ -700,7 +701,7 @@ TheThingsNode::TheThingsNode()
700701 setColor (TTN_BLACK);
701702
702703 // TODO: Can we enable/disable this at will to save memory?
703- USBCON|=(1 <<OTGPADE);
704+ // USBCON|=(1<<OTGPADE);
704705
705706 pinMode (TTN_VBAT_MEAS_EN, OUTPUT);
706707 digitalWrite (TTN_VBAT_MEAS_EN, HIGH);
@@ -813,18 +814,18 @@ void TheThingsNode::deepSleep(void)
813814{
814815 ADCSRA &= ~_BV (ADEN);
815816 set_sleep_mode (SLEEP_MODE_PWR_DOWN);
816- MCUCR |= (1 << JTD);
817- USBCON |= (1 << FRZCLK);
817+ // MCUCR |= (1 << JTD);
818+ // USBCON |= (1 << FRZCLK);
818819 // USBCON &= ~_BV(USBE);
819- PLLCSR &= ~_BV (PLLE);
820+ // PLLCSR &= ~_BV(PLLE);
820821 sleep_enable ();
821822 sleep_mode (); // Sweet dreams!
822823
823824 // wake up, after ISR we arrive here ->
824825 sleep_disable ();
825- PLLCSR |= (1 << PLLE);
826+ // PLLCSR |= (1 << PLLE);
826827 power_all_enable ();
827828 // USBCON |= (1 << USBE);
828- USBCON &= ~_BV (FRZCLK);
829+ // USBCON &= ~_BV(FRZCLK);
829830 ADCSRA |= (1 << ADEN);
830831}
You can’t perform that action at this time.
0 commit comments