From 2c1bf7f2e72876a21abee55f5e0195cbc87c3201 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 17 Oct 2017 15:41:16 +0700 Subject: [PATCH] fix bitfield order --- libraries/BLEHomekit/src/HAPProcedure.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/BLEHomekit/src/HAPProcedure.h b/libraries/BLEHomekit/src/HAPProcedure.h index 762f2837..2bc61f78 100644 --- a/libraries/BLEHomekit/src/HAPProcedure.h +++ b/libraries/BLEHomekit/src/HAPProcedure.h @@ -124,10 +124,10 @@ typedef struct ATTR_PACKED typedef struct ATTR_PACKED { - uint8_t fragment : 1; // 0 : first Fragment (or no fragment), 1 : Continuation of Fragment - uint8_t : 3; // reserved - uint8_t type : 3; // 0b000 : request, 0b001 : response uint8_t lenext : 1; // not used + uint8_t type : 3; // 0b000 : request, 0b001 : response + uint8_t : 3; // reserved + uint8_t fragment : 1; // 0 : first Fragment (or no fragment), 1 : Continuation of Fragment } HAPControl_t; VERIFY_STATIC(sizeof (HAPControl_t) == 1);