Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 1:d1848b96870f, committed 2022-01-23
- Comitter:
- anyela
- Date:
- Sun Jan 23 05:02:23 2022 +0000
- Parent:
- 0:c735c66e37d3
- Commit message:
- .
Changed in this revision
| MFRC522.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/MFRC522.cpp Tue Dec 08 20:48:53 2015 +0000
+++ b/MFRC522.cpp Sun Jan 23 05:02:23 2022 +0000
@@ -248,11 +248,15 @@
{
/* Reset MFRC522 */
m_RESET = 0;
- wait_ms(10);
+ //wait_ms(10);
+ ThisThread::sleep_for(10ms);
m_RESET = 1;
// Section 8.8.2 in the datasheet says the oscillator start-up time is the start up time of the crystal + 37,74us. Let us be generous: 50ms.
- wait_ms(50);
+
+
+ //wait_ms(50);
+ ThisThread::sleep_for(50ms);
// When communicating with a PICC we need a timeout if something goes wrong.
// f_timer = 13.56 MHz / (2*TPreScaler+1) where TPreScaler = [TPrescaler_Hi:TPrescaler_Lo].
@@ -279,7 +283,8 @@
// The datasheet does not mention how long the SoftRest command takes to complete.
// But the MFRC522 might have been in soft power-down mode (triggered by bit 4 of CommandReg)
// Section 8.8.2 in the datasheet says the oscillator start-up time is the start up time of the crystal + 37,74us. Let us be generous: 50ms.
- wait_ms(50);
+ //wait_ms(50);
+ ThisThread::sleep_for(50ms);
// Wait for the PowerDown bit in CommandReg to be cleared
while (PCD_ReadRegister(CommandReg) & (1<<4))