Skip to content

Commit 7661fe5

Browse files
author
andreas.larsson
committed
Replaced GCC specific __packed__ with generic MBED_PACKED
1 parent eacccdd commit 7661fe5

File tree

1 file changed

+4
-3
lines changed
  • features/net/FEATURE_IPV4/lwip-interface/lwip-eth/arch/TARGET_STM/TARGET_STM32F4/TARGET_UBLOX_C029

1 file changed

+4
-3
lines changed

features/net/FEATURE_IPV4/lwip-interface/lwip-eth/arch/TARGET_STM/TARGET_STM32F4/TARGET_UBLOX_C029/stm32f4_eth_init.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
#include <string.h>
22
#include "stm32f4xx_hal.h"
3+
#include "toolchain.h"
34

45
#define C029_OTP_START_ADDRESS (0x1FFF7800U)
56
#define C029_OTP_END_ADDRESS (C029_OTP_START_ADDRESS + (16*32))
67
#define C029_MAC_ETHERNET_ID (3)
78

8-
typedef struct C029_OTP_Header {
9+
typedef MBED_PACKED(struct) C029_OTP_Header {
910
uint8_t id;
1011
uint8_t len;
1112
uint8_t data[];
12-
} __attribute__((__packed__)) C029_OTP_Header;
13+
} C029_OTP_Header;
1314

1415
static int _macRetrieved = 0;
1516
static char _macAddr[6] = { 0x02, 0x02, 0xF7, 0xF0, 0x00, 0x00 };
@@ -139,4 +140,4 @@ void mbed_mac_address(char *mac)
139140
}
140141
}
141142
memcpy(mac, _macAddr, 6);
142-
}
143+
}

0 commit comments

Comments
 (0)