Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-dev by
Diff: hal/i2c_api.h
- Revision:
- 173:7d866c31b3c5
- Parent:
- 153:fa9ff456f731
--- a/hal/i2c_api.h Wed Aug 16 18:27:13 2017 +0100 +++ b/hal/i2c_api.h Thu Aug 31 17:27:04 2017 +0100 @@ -156,6 +156,7 @@ /** Configure I2C as slave or master. * @param obj The I2C object + * @param enable_slave Enable i2c hardware so you can receive events with ::i2c_slave_receive * @return non-zero if a value is available */ void i2c_slave_mode(i2c_t *obj, int enable_slave); @@ -169,12 +170,16 @@ /** Configure I2C as slave or master. * @param obj The I2C object + * @param data The buffer for receiving + * @param length Number of bytes to read * @return non-zero if a value is available */ int i2c_slave_read(i2c_t *obj, char *data, int length); /** Configure I2C as slave or master. * @param obj The I2C object + * @param data The buffer for sending + * @param length Number of bytes to write * @return non-zero if a value is available */ int i2c_slave_write(i2c_t *obj, const char *data, int length); @@ -208,6 +213,7 @@ * @param address The address to be set - 7bit or 9bit * @param stop If true, stop will be generated after the transfer is done * @param handler The I2C IRQ handler to be set + * @param event Event mask for the transfer. See \ref hal_I2CEvents * @param hint DMA hint usage */ void i2c_transfer_asynch(i2c_t *obj, const void *tx, size_t tx_length, void *rx, size_t rx_length, uint32_t address, uint32_t stop, uint32_t handler, uint32_t event, DMAUsage hint);