Skip to content

Commit f392054

Browse files
authored
Merge pull request hathach#1353 from ETCLabs/iar-compiler-error-on-src-host-usbh.c
The IAR compilier does not resolve references to fields in the anonym…
2 parents 244154e + c06ecbe commit f392054

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/host/usbh.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ typedef struct
6262
uint8_t hub_port;
6363
uint8_t speed;
6464

65-
volatile struct TU_ATTR_PACKED
65+
struct TU_ATTR_PACKED
6666
{
67-
uint8_t connected : 1;
68-
uint8_t addressed : 1;
69-
uint8_t configured : 1;
70-
uint8_t suspended : 1;
67+
volatile uint8_t connected : 1;
68+
volatile uint8_t addressed : 1;
69+
volatile uint8_t configured : 1;
70+
volatile uint8_t suspended : 1;
7171
};
7272
} usbh_dev0_t;
7373

@@ -78,12 +78,12 @@ typedef struct {
7878
uint8_t hub_port;
7979
uint8_t speed;
8080

81-
volatile struct TU_ATTR_PACKED
81+
struct TU_ATTR_PACKED
8282
{
83-
uint8_t connected : 1;
84-
uint8_t addressed : 1;
85-
uint8_t configured : 1;
86-
uint8_t suspended : 1;
83+
volatile uint8_t connected : 1;
84+
volatile uint8_t addressed : 1;
85+
volatile uint8_t configured : 1;
86+
volatile uint8_t suspended : 1;
8787
};
8888

8989
//------------- device descriptor -------------//

0 commit comments

Comments
 (0)