keep pulling the SPI pins even when sleeping.

Without this, the power usage of the AVR when used in combination with RFM69 instead of RF12 seems to skyrocket while idling
parent db380148
......@@ -95,13 +95,9 @@ void rfm12_setsleep(uint8_t s) {
#else /* Normal RFM12 */
rfm12_spi16(0x8205);
#endif /* Normal RFM12 */
RFMDDR &= (uint8_t)~_BV(RFMPIN_MOSI);
RFMDDR &= (uint8_t)~_BV(RFMPIN_SCK);
PRR |= _BV(PRUSI);
} else {
PRR &= (uint8_t)~_BV(PRUSI);
RFMDDR |= _BV(RFMPIN_MOSI);
RFMDDR |= _BV(RFMPIN_SCK);
USICR = _BV(USIWM0);
#ifdef USERFM69INSTEAD
rfm69_writereg(0x01, (rfm69_readreg(0x01) & 0xE3) | 0x04);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment