Skip to content

Commit 6478ca1

Browse files
committed
fix #108
make sure all bits in OUTSET is set HIGH when reset
1 parent d718112 commit 6478ca1

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

cores/nRF5/wiring.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ void init( void )
5656
NRF_RTC1->INTENCLR = RTC_INTENSET_COMPARE0_Msk;
5757
NRF_RTC1->TASKS_STOP = 1;
5858
NRF_RTC1->TASKS_CLEAR = 1;
59+
60+
// Make sure all pin is set HIGH when pinmode() is called
61+
NRF_GPIO->OUTSET = UINT32_MAX;
5962
}
6063

6164
void enterSerialDfu(void)

libraries/SPI/SPI.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ void SPIClass::beginTransaction(SPISettings settings)
118118

119119
void SPIClass::endTransaction(void)
120120
{
121+
_p_spi->ENABLE = (SPI_ENABLE_ENABLE_Disabled << SPI_ENABLE_ENABLE_Pos);
121122
}
122123

123124
void SPIClass::setBitOrder(BitOrder order)

0 commit comments

Comments
 (0)