CR95F X-Nucleo NFC03A1 Shield STM
Dependents: Nucleo_NFC03A1_Demo
CR95HF.h@1:549e63ac990c, 2018-08-30 (annotated)
- Committer:
- duchonic
- Date:
- Thu Aug 30 11:43:43 2018 +0000
- Revision:
- 1:549e63ac990c
- Parent:
- 0:57769c77d24e
- Child:
- 2:c7006765c441
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 | 1:549e63ac990c | 24 | */ |
duchonic | 0:57769c77d24e | 25 | class CR95HF |
duchonic | 0:57769c77d24e | 26 | { |
duchonic | 0:57769c77d24e | 27 | public: |
duchonic | 0:57769c77d24e | 28 | /** |
duchonic | 0:57769c77d24e | 29 | * Constructor |
duchonic | 0:57769c77d24e | 30 | */ |
duchonic | 0:57769c77d24e | 31 | CR95HF(PinName tx, PinName rx); |
duchonic | 0:57769c77d24e | 32 | ~CR95HF(); |
duchonic | 1:549e63ac990c | 33 | uint8_t Init(); |
duchonic | 1:549e63ac990c | 34 | uint8_t ConfigManagerTagHunting(); |
duchonic | 0:57769c77d24e | 35 | |
duchonic | 0:57769c77d24e | 36 | private: |
duchonic | 1:549e63ac990c | 37 | Serial nfcDevice; |
duchonic | 1:549e63ac990c | 38 | void nfcWrite(uint8_t cmd[], uint8_t len); |
duchonic | 1:549e63ac990c | 39 | void rxCallbackNFC(); |
duchonic | 0:57769c77d24e | 40 | }; |