Bluetooth: Use smallest possible size for enums

Use __packed so that enums consume the smallest possible size (in our
case the same as uint8_t).

Change-Id: I0440113e88a24509f406375d99173ddb54890925
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2016-01-14 10:18:00 +02:00 committed by Anas Nashif
commit 8bf880a388
2 changed files with 2 additions and 2 deletions

View file

@ -169,7 +169,7 @@ struct bt_conn *bt_conn_create_le(const bt_addr_le_t *peer,
#endif
/** Security level. */
typedef enum {
typedef enum __packed {
BT_SECURITY_LOW, /** No encryption and no authentication. */
BT_SECURITY_MEDIUM, /** encryption and no authentication (no MITM). */
BT_SECURITY_HIGH, /** encryption and authentication (MITM). */

View file

@ -18,7 +18,7 @@
* limitations under the License.
*/
typedef enum {
typedef enum __packed {
BT_CONN_DISCONNECTED,
BT_CONN_CONNECT_SCAN,
BT_CONN_CONNECT,