diff --git a/features/nfc/stack/transceiver/pn512/pn512.h b/features/nfc/stack/transceiver/pn512/pn512.h index 122f0db5eb..9af06b2172 100644 --- a/features/nfc/stack/transceiver/pn512/pn512.h +++ b/features/nfc/stack/transceiver/pn512/pn512.h @@ -30,10 +30,8 @@ extern "C" { #include "stack/nfc_common.h" #include "transceiver/transceiver.h" -typedef struct __pn512 pn512_t; - -#include "pn512_callback.h" #include "pn512_types.h" +#include "pn512_callback.h" typedef enum __pn512_state { pn512_state_ready, diff --git a/features/nfc/stack/transceiver/pn512/pn512_callback.h b/features/nfc/stack/transceiver/pn512/pn512_callback.h index 9fdc155692..2ab8c3d16a 100644 --- a/features/nfc/stack/transceiver/pn512/pn512_callback.h +++ b/features/nfc/stack/transceiver/pn512/pn512_callback.h @@ -24,12 +24,12 @@ #define PN512_CALLBACK_H_ #include "stack/nfc_common.h" +#include "pn512_types.h" #ifdef __cplusplus extern "C" { #endif -typedef struct __pn512 pn512_t; typedef void (*pn512_cb_t)(pn512_t *pPN512, nfc_err_t ret); #ifdef __cplusplus diff --git a/features/nfc/stack/transceiver/pn512/pn512_rf.h b/features/nfc/stack/transceiver/pn512/pn512_rf.h index 93043e9981..34d965adfe 100644 --- a/features/nfc/stack/transceiver/pn512/pn512_rf.h +++ b/features/nfc/stack/transceiver/pn512/pn512_rf.h @@ -28,11 +28,10 @@ extern "C" { #endif #include "stack/nfc_common.h" +#include "pn512_types.h" #include "pn512_callback.h" #include "pn512.h" -typedef struct __pn512 pn512_t; - nfc_err_t pn512_framing_set(pn512_t *pPN512, nfc_framing_t framing); nfc_err_t pn512_framing_crc_set(pn512_t *pPN512, bool out, bool in); diff --git a/features/nfc/stack/transceiver/pn512/pn512_timer.h b/features/nfc/stack/transceiver/pn512/pn512_timer.h index a779aeefff..ae85edd874 100644 --- a/features/nfc/stack/transceiver/pn512/pn512_timer.h +++ b/features/nfc/stack/transceiver/pn512/pn512_timer.h @@ -28,8 +28,7 @@ extern "C" { #endif #include "stack/nfc_common.h" - -typedef struct __pn512 pn512_t; +#include "pn512_types.h" void pn512_timer_config(pn512_t *pPN512, bool autostart, uint16_t prescaler, uint16_t countdown_value); diff --git a/features/nfc/stack/transceiver/pn512/pn512_types.h b/features/nfc/stack/transceiver/pn512/pn512_types.h index cbc4bce238..efefefde80 100644 --- a/features/nfc/stack/transceiver/pn512/pn512_types.h +++ b/features/nfc/stack/transceiver/pn512/pn512_types.h @@ -29,10 +29,14 @@ extern "C" { #include "stack/nfc_common.h" +typedef struct __pn512 pn512_t; + typedef struct __pn512_registers { int8_t registers_page; } pn512_registers_t; + + #ifdef __cplusplus } #endif