Changeset 106600 in vbox
- Timestamp:
- Oct 23, 2024 12:54:42 AM (5 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Gpio/DevPL061.cpp
r106061 r106600 255 255 * to be read as 0, regardless of their value. 256 256 */ 257 if ( off >= PL061_REG_GPIODATA_INDEX258 &&off < PL061_REG_GPIODATA_INDEX_END + sizeof(uint32_t))257 AssertCompile(PL061_REG_GPIODATA_INDEX == 0); /* Skip 'off >= PL061_REG_GPIODATA_INDEX' check and avoid C4267 */ 258 if (off < PL061_REG_GPIODATA_INDEX_END + sizeof(uint32_t)) 259 259 { 260 260 *(uint32_t *)pv = pThis->u8RegData & (uint8_t)(off >> 2); … … 343 343 * must be HIGH. Otherwise the bit values remain unchanged by the write. 344 344 */ 345 if ( off >= PL061_REG_GPIODATA_INDEX346 &&off < PL061_REG_GPIODATA_INDEX_END + sizeof(uint32_t))345 AssertCompile(PL061_REG_GPIODATA_INDEX == 0); /* Skip 'off >= PL061_REG_GPIODATA_INDEX' check and avoid C4267 */ 346 if (off < PL061_REG_GPIODATA_INDEX_END + sizeof(uint32_t)) 347 347 { 348 348 uint8_t uMask = (uint8_t)(off >> 2); … … 459 459 PDEVPL061 pThis = PDMDEVINS_2_DATA(pDevIns, PDEVPL061); 460 460 461 AssertReturn(idGpio < PL061_GPIO_NUM, VERR_INVALID_PARAMETER);462 463 return ! RT_BOOL(pThis->u8RegDir & RT_BIT(idGpio)); /* Bit cleared means input. */461 AssertReturn(idGpio < PL061_GPIO_NUM, false); 462 463 return !(pThis->u8RegDir & RT_BIT(idGpio)); /* Bit cleared means input. */ 464 464 } 465 465
Note:
See TracChangeset
for help on using the changeset viewer.