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-RtosI2cDriver by
i2cRtos_api.h@14:352609d395c1, 2013-05-19 (annotated)
- Committer:
- humlet
- Date:
- Sun May 19 11:21:16 2013 +0000
- Revision:
- 14:352609d395c1
- Parent:
- 13:530968937ccb
almost beta?; ***refactored (removed mbed-NXP and mbed-src hacks/dependencies) ; *** bugs fixed; *** performance improved (read/write sequence now handled in ISR);
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| humlet | 14:352609d395c1 | 1 | |
| humlet | 9:65aae53a34de | 2 | #ifndef MBED_I2CRTOS_API_H |
| humlet | 9:65aae53a34de | 3 | #define MBED_I2CRTOS_API_H |
| humlet | 9:65aae53a34de | 4 | |
| humlet | 9:65aae53a34de | 5 | #include "i2c_api.h" |
| humlet | 9:65aae53a34de | 6 | |
| humlet | 9:65aae53a34de | 7 | #if DEVICE_I2C |
| humlet | 9:65aae53a34de | 8 | |
| humlet | 9:65aae53a34de | 9 | #ifdef __cplusplus |
| humlet | 9:65aae53a34de | 10 | extern "C" { |
| humlet | 9:65aae53a34de | 11 | #endif |
| humlet | 9:65aae53a34de | 12 | void i2cRtos_init(i2c_t *obj, PinName sda, PinName scl); |
| humlet | 9:65aae53a34de | 13 | |
| humlet | 9:65aae53a34de | 14 | int i2cRtos_read(i2c_t *obj, int address, char *data, int length, int stop); |
| humlet | 9:65aae53a34de | 15 | int i2cRtos_write(i2c_t *obj, int address, const char *data, int length, int stop); |
| humlet | 9:65aae53a34de | 16 | int i2cRtos_byte_read(i2c_t *obj, int last); |
| humlet | 9:65aae53a34de | 17 | int i2cRtos_byte_write(i2c_t *obj, int data); |
| humlet | 13:530968937ccb | 18 | int i2cRtos_stop(i2c_t *obj); |
| humlet | 9:65aae53a34de | 19 | |
| humlet | 9:65aae53a34de | 20 | #if DEVICE_I2CSLAVE |
| humlet | 9:65aae53a34de | 21 | int i2cRtos_slave_receive(i2c_t *obj, uint32_t tmOut); |
| humlet | 9:65aae53a34de | 22 | int i2cRtos_slave_read(i2c_t *obj, char *data, int length); |
| humlet | 9:65aae53a34de | 23 | int i2cRtos_slave_write(i2c_t *obj, const char *data, int length); |
| humlet | 9:65aae53a34de | 24 | #endif |
| humlet | 9:65aae53a34de | 25 | |
| humlet | 9:65aae53a34de | 26 | #ifdef __cplusplus |
| humlet | 9:65aae53a34de | 27 | } |
| humlet | 9:65aae53a34de | 28 | #endif |
| humlet | 9:65aae53a34de | 29 | |
| humlet | 9:65aae53a34de | 30 | #endif |
| humlet | 9:65aae53a34de | 31 | |
| humlet | 9:65aae53a34de | 32 | #endif |
