Skip to content

Commit 1243bb3

Browse files
Merge pull request #1 from sigvef/master
Fix erroneous boolean expression conversions
2 parents 8623452 + ae4d945 commit 1243bb3

File tree

2 files changed

+2
-2
lines changed
  • libraries/mbed/targets/hal

2 files changed

+2
-2
lines changed

libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_NRF51822/spi_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void spi_init(spi_t *obj, PinName mosi, PinName miso, PinName sclk, PinName ssel
6969
obj->spi = (NRF_SPI_Type*)NC;
7070
obj->spis = (NRF_SPIS_Type*)spi;
7171
}
72-
MBED_ASSERT((int)obj->spi != NC && (int)obj->spis != NC);
72+
MBED_ASSERT((int)obj->spi != NC || (int)obj->spis != NC);
7373

7474
// pin out the spi pins
7575
if (ssel != NC) {//slave

libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/i2c_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ static inline void i2c_interface_enable(i2c_t *obj) {
4141
}
4242

4343
void i2c_init(i2c_t *obj, PinName sda, PinName scl) {
44-
MBED_ASSERT((sda == P0_23) || (scl == P0_22));
44+
MBED_ASSERT((sda == P0_23) && (scl == P0_22));
4545

4646
// Enables clock for I2C0
4747
LPC_SYSCON->SYSAHBCLKCTRL1 |= (1 << 13);

0 commit comments

Comments
 (0)