Skip to content

Commit 40ba986

Browse files
tekka007mfalkvidd
authored andcommitted
Cumulative update (#1347)
1 parent 18fee01 commit 40ba986

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

core/MySigningAtsha204.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ bool signerAtsha204SignMsg(MyMessage &msg)
171171
msg.setSigned(true); // make sure signing flag is set before signature is calculated
172172
signerCalculateSignature(msg, true);
173173

174+
#if defined(MY_SIGNING_NODE_WHITELISTING)
174175
if (DO_WHITELIST(msg.destination)) {
175176
// Salt the signature with the senders nodeId and the unique serial of the ATSHA device
176177
// We can reuse the nonce buffer now since it is no longer needed
@@ -185,6 +186,7 @@ bool signerAtsha204SignMsg(MyMessage &msg)
185186
SIGN_DEBUG(PSTR("SGN:BND:SIG WHI,SERIAL=%s\n"), hwDebugPrintStr);
186187
#endif
187188
}
189+
#endif
188190

189191
// Put device back to sleep
190192
atsha204_sleep();

core/MySigningAtsha204Soft.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ bool signerAtsha204SoftSignMsg(MyMessage &msg)
186186
// Calculate signature of message
187187
msg.setSigned(true); // make sure signing flag is set before signature is calculated
188188
signerCalculateSignature(msg, true);
189-
189+
#if defined(MY_SIGNING_NODE_WHITELISTING)
190190
if (DO_WHITELIST(msg.getDestination())) {
191191
// Salt the signature with the senders nodeId and the (hopefully) unique serial The Creator has
192192
// provided. We can reuse the nonce buffer now since it is no longer needed
@@ -200,6 +200,7 @@ bool signerAtsha204SoftSignMsg(MyMessage &msg)
200200
SIGN_DEBUG(PSTR("SGN:BND:SIG WHI,SERIAL=%s\n"), hwDebugPrintStr);
201201
#endif
202202
}
203+
#endif
203204

204205
// Overwrite the first byte in the signature with the signing identifier
205206
_signing_hmac[0] = SIGNING_IDENTIFIER;

drivers/SPIFlash/SPIFlash.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ void SPIFlash::command(uint8_t cmd, bool isWrite)
199199
// that is because some chips can take several seconds to carry out a chip erase or other similar multi block or entire-chip operations
200200
// a recommended alternative to such situations where chip can be or not be present is to add a 10k or similar weak pulldown on the
201201
// open drain MISO input which can read noise/static and hence return a non 0 status byte, causing the while() to hang when a flash chip is not present
202-
while(busy());
202+
if (cmd != SPIFLASH_WAKE) while(busy());
203203
select();
204204
SPI.transfer(cmd);
205205
}

0 commit comments

Comments
 (0)