Skip to content

Commit d9c51b9

Browse files
committed
rtl8195am - fix excessive compiler warnings
Fix hundreds of excessive compiler warnings due to out of enum type range Examples shown as follows: mbed-os.lib/targets/TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/fwlib/hal_i2c.h", Line: 329, Col: 34 mbed-os.lib/targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/PinNames.h", Line: 172, Col: 11 Signed-off-by: Tony Wu <[email protected]>
1 parent 68ebbb0 commit d9c51b9

File tree

2 files changed

+4
-5
lines changed
  • targets/TARGET_Realtek/TARGET_AMEBA

2 files changed

+4
-5
lines changed

targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/PinNames.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ typedef enum {
169169
DA_1 = (PORT_U<<4|1),
170170

171171
// Not connected
172-
NC = (uint32_t)0xFFFFFFFF,
172+
NC = (int)0xFFFFFFFF,
173173

174174
// Generic signals namings
175175
/* LED1~4 are defined as alias of GPIO pins, they are not the LEDs on board*/

targets/TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/fwlib/hal_i2c.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,10 +324,9 @@ typedef uint32_t I2C_ERR_TYPE;
324324
typedef uint32_t *PI2C_ERR_TYPE;
325325

326326
// I2C Time Out type
327-
enum _I2C_TIMEOUT_TYPE_ {
328-
I2C_TIMEOOUT_DISABLE = 0x00,
329-
I2C_TIMEOOUT_ENDLESS = 0xFFFFFFFF,
330-
};
327+
#define I2C_TIMEOOUT_DISABLE 0x00
328+
#define I2C_TIMEOOUT_ENDLESS 0xFFFFFFFF
329+
331330
typedef uint32_t I2C_TIMEOUT_TYPE;
332331
typedef uint32_t *PI2C_TIMEOUT_TYPE;
333332

0 commit comments

Comments
 (0)