From d2420b667c0074dc2183bd0c572cafaea42e6410 Mon Sep 17 00:00:00 2001 From: Wangjialin Date: Thu, 22 Sep 2016 09:05:39 +0800 Subject: [PATCH] use uint8_t for fifo struct in uart and i2c --- components/esp32/include/soc/i2c_struct.h | 4 ++-- components/esp32/include/soc/uart_struct.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/esp32/include/soc/i2c_struct.h b/components/esp32/include/soc/i2c_struct.h index d6917e7fdc..8111b2cba0 100644 --- a/components/esp32/include/soc/i2c_struct.h +++ b/components/esp32/include/soc/i2c_struct.h @@ -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; diff --git a/components/esp32/include/soc/uart_struct.h b/components/esp32/include/soc/uart_struct.h index 54baf4f0e5..78331e7035 100644 --- a/components/esp32/include/soc/uart_struct.h +++ b/components/esp32/include/soc/uart_struct.h @@ -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;