Skip to content

Commit ba863f4

Browse files
committed
Enabled I2C_ASYNCH.
1 parent 3bdbccb commit ba863f4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

hal/targets.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,7 @@
13751375
"supported_form_factors": ["ARDUINO"],
13761376
"inherits": ["MCU_NRF51_32K"],
13771377
"progen": {"target": "nrf51-dk"},
1378-
"device_has": ["ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH"]
1378+
"device_has": ["ERROR_PATTERN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH"]
13791379
},
13801380
"NRF51_DK_BOOT": {
13811381
"supported_form_factors": ["ARDUINO"],
@@ -1773,6 +1773,6 @@
17731773
"NRF52_PAN_62",
17741774
"NRF52_PAN_63"
17751775
],
1776-
"device_has": ["ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH"]
1776+
"device_has": ["ERROR_PATTERN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH"]
17771777
}
17781778
}

hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/i2c_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ void i2c_init(i2c_t *obj, PinName sda, PinName scl)
122122
}
123123

124124
// No available peripheral
125-
error("No available I2C");
125+
error("No available I2C peripheral\r\n");
126126
}
127127

128128
void i2c_reset(i2c_t *obj)
@@ -215,7 +215,7 @@ int i2c_byte_write(i2c_t *obj, int data)
215215

216216
#if DEVICE_I2C_ASYNCH
217217

218-
void i2c_transfer_asynch(i2c_t *obj, void *tx, size_t tx_length,
218+
void i2c_transfer_asynch(i2c_t *obj, const void *tx, size_t tx_length,
219219
void *rx, size_t rx_length, uint32_t address,
220220
uint32_t stop, uint32_t handler,
221221
uint32_t event, DMAUsage hint)

0 commit comments

Comments
 (0)