mirror of https://github.com/ARMmbed/mbed-os.git
commit
1243bb3c32
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue