Skip to content

Commit 794cc86

Browse files
committed
fix #108
make sure all bits in OUTSET is set up on reset.
1 parent 6664ebf commit 794cc86

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
@@ -54,6 +54,9 @@ void init( void )
5454
NRF_RTC1->INTENCLR = RTC_INTENSET_COMPARE0_Msk;
5555
NRF_RTC1->TASKS_STOP = 1;
5656
NRF_RTC1->TASKS_CLEAR = 1;
57+
58+
// Make sure all pin is set HIGH when pinmode() is called
59+
NRF_GPIO->OUTSET = UINT32_MAX;
5760
}
5861

5962
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)