summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2022-02-26 18:05:35 +0700
committerGitHub <[email protected]>2022-02-26 18:05:35 +0700
commitf392054e7057ba0f7df83f102fd7e508c3036725 (patch)
tree465b5f166d33654c7db2a9886671d591a789bedf
parent244154e08760dcdcc469bde03df63a898c55ec8b (diff)
parentc06ecbef0ce7cb286dce85d2329a02c513e2c61b (diff)
Merge pull request #1353 from ETCLabs/iar-compiler-error-on-src-host-usbh.c
The IAR compilier does not resolve references to fields in the anonym…
-rw-r--r--src/host/usbh.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/host/usbh.c b/src/host/usbh.c
index ce0ccc3cb..130aba40e 100644
--- a/src/host/usbh.c
+++ b/src/host/usbh.c
@@ -62,12 +62,12 @@ typedef struct
uint8_t hub_port;
uint8_t speed;
- volatile struct TU_ATTR_PACKED
+ struct TU_ATTR_PACKED
{
- uint8_t connected : 1;
- uint8_t addressed : 1;
- uint8_t configured : 1;
- uint8_t suspended : 1;
+ volatile uint8_t connected : 1;
+ volatile uint8_t addressed : 1;
+ volatile uint8_t configured : 1;
+ volatile uint8_t suspended : 1;
};
} usbh_dev0_t;
@@ -78,12 +78,12 @@ typedef struct {
uint8_t hub_port;
uint8_t speed;
- volatile struct TU_ATTR_PACKED
+ struct TU_ATTR_PACKED
{
- uint8_t connected : 1;
- uint8_t addressed : 1;
- uint8_t configured : 1;
- uint8_t suspended : 1;
+ volatile uint8_t connected : 1;
+ volatile uint8_t addressed : 1;
+ volatile uint8_t configured : 1;
+ volatile uint8_t suspended : 1;
};
//------------- device descriptor -------------//