** 09-09-23 / 2.1.0 / J E / Added version 2.1 flags (OATH-HOTP) **
** 10-05-01 / 2.2.0 / J E / Added support for 2.2 ext. + frame **
** 11-04-15 / 2.3.0 / J E / Added support for 2.3 extensions **
+** 11-12-05 / 2.4.0 / J E / Added support for NFC and NDEF **
** **
*****************************************************************************************/
#define SLOT_CONFIG 1 /* First (default / V1) configuration */
#define SLOT_NAV 2 /* V1 only */
-#define SLOT_CONFIG2 3 /* Second (V2) configuration */
-#define SLOT_UPDATE1 4 /* Update slot 1 */
-#define SLOT_UPDATE2 5 /* Update slot 2 */
-#define SLOT_SWAP 6 /* Swap slot 1 and 2 */
+#define SLOT_CONFIG2 3 /* Second (V2) configuration */
+#define SLOT_UPDATE1 4 /* Update slot 1 */
+#define SLOT_UPDATE2 5 /* Update slot 2 */
+#define SLOT_SWAP 6 /* Swap slot 1 and 2 */
+#define SLOT_NDEF 8 /* Write NDEF record */
#define SLOT_DEVICE_SERIAL 0x10 /* Device serial number */
#define CFGFLAG_UPDATE_MASK (CFGFLAG_PACING_10MS | CFGFLAG_PACING_20MS)
#define EXTFLAG_UPDATE_MASK (EXTFLAG_SERIAL_BTN_VISIBLE | EXTFLAG_SERIAL_USB_VISIBLE | EXTFLAG_SERIAL_API_VISIBLE | EXTFLAG_USE_NUMERIC_KEYPAD | EXTFLAG_FAST_TRIG | EXTFLAG_ALLOW_UPDATE | EXTFLAG_DORMANT)
+/* NDEF structure */
+#define NDEF_DATA_SIZE 54
+
+typedef struct {
+ unsigned char len; /* Payload length */
+ unsigned char type; /* NDEF type specifier */
+ unsigned char data[NDEF_DATA_SIZE]; /* Payload size */
+ unsigned char curAccCode[ACC_CODE_SIZE]; /* Access code */
+} YKNDEF;
+
+
/* Navigation */
/* NOTE: Navigation isn't available since Yubikey 1.3.5 and is strongly