This fork captures the mbed lib v125 for ease of integration into older projects.

Fork of mbed-dev by mbed official

Revision:
187:92cbb9eec47b
Parent:
172:7d866c31b3c5
diff -r 707f6e361f3e -r 92cbb9eec47b hal/i2c_api.h
--- a/hal/i2c_api.h	Fri Jun 22 16:45:37 2018 +0100
+++ b/hal/i2c_api.h	Fri Jul 20 21:24:42 2018 +0000
@@ -1,6 +1,3 @@
-
-/** \addtogroup hal */
-/** @{*/
 /* mbed Microcontroller Library
  * Copyright (c) 2006-2015 ARM Limited
  *
@@ -20,10 +17,10 @@
 #define MBED_I2C_API_H
 
 #include "device.h"
-#include "hal/buffer.h"
+#include "buffer.h"
 
 #if DEVICE_I2C_ASYNCH
-#include "hal/dma_api.h"
+#include "dma_api.h"
 #endif
 
 #if DEVICE_I2C
@@ -117,9 +114,7 @@
  *  @param data    The buffer for sending
  *  @param length  Number of bytes to write
  *  @param stop    Stop to be generated after the transfer is done
- *  @return 
- *      zero or non-zero - Number of written bytes
- *      negative - I2C_ERROR_XXX status
+ *  @return Number of written bytes
  */
 int i2c_write(i2c_t *obj, int address, const char *data, int length, int stop);
 
@@ -156,7 +151,6 @@
 
 /** 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);
@@ -170,16 +164,12 @@
 
 /** 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);
@@ -213,7 +203,6 @@
  *  @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);
@@ -250,5 +239,3 @@
 #endif
 
 #endif
-
-/** @}*/