mbed library sources. Supersedes mbed-src.
Dependents: Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more
Diff: drivers/I2C.h
- Revision:
- 187:0387e8f68319
- Parent:
- 184:08ed48f1de7f
- Child:
- 188:bcfe06ba3d64
--- a/drivers/I2C.h Fri Jun 22 16:45:37 2018 +0100 +++ b/drivers/I2C.h Thu Sep 06 13:40:20 2018 +0100 @@ -151,7 +151,8 @@ */ virtual void unlock(void); - virtual ~I2C() { + virtual ~I2C() + { // Do nothing } @@ -160,7 +161,7 @@ /** Start non-blocking I2C transfer. * * This function locks the deep sleep until any event has occurred - * + * * @param address 8/10 bit I2C slave address * @param tx_buffer The TX buffer with data to be transfered * @param tx_length The length of TX buffer in bytes @@ -171,13 +172,13 @@ * @param repeated Repeated start, true - do not send stop at end * @return Zero if the transfer has started, or -1 if I2C peripheral is busy */ - int transfer(int address, const char *tx_buffer, int tx_length, char *rx_buffer, int rx_length, const event_callback_t& callback, int event = I2C_EVENT_TRANSFER_COMPLETE, bool repeated = false); + int transfer(int address, const char *tx_buffer, int tx_length, char *rx_buffer, int rx_length, const event_callback_t &callback, int event = I2C_EVENT_TRANSFER_COMPLETE, bool repeated = false); /** Abort the on-going I2C transfer */ void abort_transfer(); - protected: +protected: /** Lock deep sleep only if it is not yet locked */ void lock_deep_sleep();