]> granicus.if.org Git - esp-idf/commitdiff
use uint8_t for fifo struct in uart and i2c
authorWangjialin <wangjialin@espressif.com>
Thu, 22 Sep 2016 01:05:39 +0000 (09:05 +0800)
committerWangjialin <wangjialin@espressif.com>
Thu, 22 Sep 2016 01:05:39 +0000 (09:05 +0800)
components/esp32/include/soc/i2c_struct.h
components/esp32/include/soc/uart_struct.h

index d6917e7fdcd0c2206d90ebb6da77931a911804cb..8111b2cba0cc875e5a1d379284bce6fd5028f2f2 100644 (file)
@@ -97,8 +97,8 @@ typedef volatile struct {
     }fifo_conf;
     union {
         struct {
-            uint32_t data:       8;                 /*The register represent the byte  data read from rx_fifo when use apb fifo access*/
-            uint32_t reserved8: 24;
+            uint8_t data;                           /*The register represent the byte  data read from rx_fifo when use apb fifo access*/
+            uint8_t reserved[3];
         };
         uint32_t val;
     }fifo_data;
index 54baf4f0e53aeb01b6dcd3a4e12f823ca86aba73..78331e7035109f7f9a22f40432b902db6e8b4020 100644 (file)
@@ -16,8 +16,8 @@
 typedef volatile struct {
     union {
         struct {
-            uint32_t rw_byte:    8;                 /*This register stores one byte data  read by rx fifo.*/
-            uint32_t reserved8: 24;
+            uint8_t rw_byte;                 /*This register stores one byte data  read by rx fifo.*/
+            uint8_t reserved[3];
         };
         uint32_t val;
     }fifo;