diff options
| author | Ha Thach <[email protected]> | 2022-02-26 18:05:35 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-02-26 18:05:35 +0700 |
| commit | f392054e7057ba0f7df83f102fd7e508c3036725 (patch) | |
| tree | 465b5f166d33654c7db2a9886671d591a789bedf /src | |
| parent | 244154e08760dcdcc469bde03df63a898c55ec8b (diff) | |
| parent | c06ecbef0ce7cb286dce85d2329a02c513e2c61b (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…
Diffstat (limited to 'src')
| -rw-r--r-- | src/host/usbh.c | 20 |
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 -------------// |
