Merge pull request #1 from sigvef/master

Fix erroneous boolean expression conversions
pull/401/head
tkuyucu 2014-07-15 16:20:52 +02:00
commit 1243bb3c32
2 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ void spi_init(spi_t *obj, PinName mosi, PinName miso, PinName sclk, PinName ssel
obj->spi = (NRF_SPI_Type*)NC;
obj->spis = (NRF_SPIS_Type*)spi;
}
MBED_ASSERT((int)obj->spi != NC && (int)obj->spis != NC);
MBED_ASSERT((int)obj->spi != NC || (int)obj->spis != NC);
// pin out the spi pins
if (ssel != NC) {//slave

View File

@ -41,7 +41,7 @@ static inline void i2c_interface_enable(i2c_t *obj) {
}
void i2c_init(i2c_t *obj, PinName sda, PinName scl) {
MBED_ASSERT((sda == P0_23) || (scl == P0_22));
MBED_ASSERT((sda == P0_23) && (scl == P0_22));
// Enables clock for I2C0
LPC_SYSCON->SYSAHBCLKCTRL1 |= (1 << 13);