CR95F X-Nucleo NFC03A1 Shield STM
Dependents: Nucleo_NFC03A1_Demo
CR95HF.h@3:12c871b2412d, 2018-09-03 (annotated)
- Committer:
- duchonic
- Date:
- Mon Sep 03 15:09:39 2018 +0000
- Revision:
- 3:12c871b2412d
- Parent:
- 2:c7006765c441
- Child:
- 4:8fce71523e13
working version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
duchonic | 1:549e63ac990c | 1 | /** |
duchonic | 1:549e63ac990c | 2 | * @file CR95HF.h |
duchonic | 1:549e63ac990c | 3 | * @brief Driver for CR95HF |
duchonic | 1:549e63ac990c | 4 | * |
duchonic | 1:549e63ac990c | 5 | */ |
duchonic | 0:57769c77d24e | 6 | #include <mbed.h> |
duchonic | 1:549e63ac990c | 7 | |
duchonic | 0:57769c77d24e | 8 | |
duchonic | 1:549e63ac990c | 9 | /** |
duchonic | 1:549e63ac990c | 10 | * My CR95HF class. |
duchonic | 1:549e63ac990c | 11 | * |
duchonic | 1:549e63ac990c | 12 | * Example: |
duchonic | 1:549e63ac990c | 13 | * @code |
duchonic | 1:549e63ac990c | 14 | * #include <CR95HF.h> |
duchonic | 1:549e63ac990c | 15 | * |
duchonic | 1:549e63ac990c | 16 | * CR95HF nfcChip(UART_TX, UART_RX); |
duchonic | 1:549e63ac990c | 17 | * |
duchonic | 1:549e63ac990c | 18 | * nfcChip.Init(); |
duchonic | 1:549e63ac990c | 19 | * |
duchonic | 1:549e63ac990c | 20 | * while(true) { |
duchonic | 1:549e63ac990c | 21 | * nfcChip.ConfigManagerTagHunting(); |
duchonic | 1:549e63ac990c | 22 | * } |
duchonic | 1:549e63ac990c | 23 | * |
duchonic | 2:c7006765c441 | 24 | * @endcode |
duchonic | 1:549e63ac990c | 25 | */ |
duchonic | 0:57769c77d24e | 26 | class CR95HF |
duchonic | 0:57769c77d24e | 27 | { |
duchonic | 0:57769c77d24e | 28 | public: |
duchonic | 3:12c871b2412d | 29 | /** Constructor */ |
duchonic | 0:57769c77d24e | 30 | CR95HF(PinName tx, PinName rx); |
duchonic | 0:57769c77d24e | 31 | ~CR95HF(); |
duchonic | 1:549e63ac990c | 32 | uint8_t Init(); |
duchonic | 1:549e63ac990c | 33 | uint8_t ConfigManagerTagHunting(); |
duchonic | 0:57769c77d24e | 34 | |
duchonic | 0:57769c77d24e | 35 | private: |
duchonic | 1:549e63ac990c | 36 | Serial nfcDevice; |
duchonic | 1:549e63ac990c | 37 | void nfcWrite(uint8_t cmd[], uint8_t len); |
duchonic | 3:12c871b2412d | 38 | bool rxMsgComplete; |
duchonic | 3:12c871b2412d | 39 | uint8_t rxData[256]; |
duchonic | 3:12c871b2412d | 40 | uint8_t rxBufPos; |
duchonic | 3:12c871b2412d | 41 | uint8_t blub; |
duchonic | 3:12c871b2412d | 42 | uint8_t len; |
duchonic | 1:549e63ac990c | 43 | void rxCallbackNFC(); |
duchonic | 3:12c871b2412d | 44 | }; |