aa
Dependencies: mbed
Revision 1:486ccde79dc6, committed 2015-11-14
- Comitter:
- kantapon501
- Date:
- Sat Nov 14 08:28:43 2015 +0000
- Parent:
- 0:3d4bd1fdeb2e
- Commit message:
- Digi
Changed in this revision
MFRC522.h | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/MFRC522.h Fri Oct 23 11:01:44 2015 +0000 +++ b/MFRC522.h Sat Nov 14 08:28:43 2015 +0000 @@ -307,6 +307,7 @@ typedef struct { uint8_t size; // Number of bytes in the UID. 4, 7 or 10. uint8_t uidByte[10]; + char uidcheck[100]; uint8_t sak; // The SAK (Select acknowledge) byte returned from the PICC after successful selection. } Uid; @@ -763,7 +764,7 @@ // ************************************************************************************ //@} - + private: SPI m_SPI;
--- a/main.cpp Fri Oct 23 11:01:44 2015 +0000 +++ b/main.cpp Sat Nov 14 08:28:43 2015 +0000 @@ -27,6 +27,7 @@ MFRC522 RfChip (SPI_MOSI, SPI_MISO, SPI_SCK, SPI_CS, MF_RESET); int main(void) { + char uidcheck[ 100 ]; pc.printf("starting...\n"); // Init. RC522 Chip @@ -52,10 +53,12 @@ LedGreen = 0; // Print Card UID + pc.printf("Card UID: "); for (uint8_t i = 0; i < RfChip.uid.size; i++) { pc.printf(" %X02", RfChip.uid.uidByte[i]); + uidcheck[i] = RfChip.uid.uidByte[i]; } pc.printf("\n\r"); @@ -64,4 +67,5 @@ pc.printf("PICC Type: %s \n\r", RfChip.PICC_GetTypeName(piccType)); wait_ms(1000); } + } \ No newline at end of file