Improvements to Olieman's MODI2C library. Supports calls from IRQ.
Dependents: FreeIMU FreeIMU_external_magnetometer FreeIMU
Fork of MODI2C by
Diff: MODI2C.h
- Revision:
- 4:52d01d39ab28
- Parent:
- 3:eb8120aa14fd
diff -r eb8120aa14fd -r 52d01d39ab28 MODI2C.h --- a/MODI2C.h Mon Dec 23 08:37:28 2013 +0000 +++ b/MODI2C.h Sun Feb 09 14:05:04 2014 +0000 @@ -96,6 +96,8 @@ * @param address - I2C address of the slave (7 bit address << 1). * @param data - pointer to byte array that holds the data * @param length - amount of bytes that need to be sent + * @param function - pointer to a callback function of the form "uint32_t func(uint32_t)" + * @param pass_to_irq - what to pass to the callback function as parameter * @param repeated - determines if it should end with a stop condition (default false) * @param status - (optional) pointer to integer where the final status code of the I2C transmission is placed. (0x28 is success) * @param return - returns zero @@ -113,6 +115,8 @@ * @param address - I2C address of the slave (7 bit address << 1). * @param data - pointer to byte array where the data will be stored * @param length - amount of bytes that need to be received + * @param function - pointer to a callback function of the form "uint32_t func(uint32_t)" + * @param pass_to_irq - what to pass to the callback function as parameter * @param repeated - determines if it should end with a stop condition * @param status - (optional) pointer to integer where the final status code of the I2C transmission is placed. (0x58 is success) * @param return - returns zero