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.
Dependencies: Beta_Apper_beta ctrl
Fork of I2C by
I2CTransporter.h@4:1b723a5b64d0, 2017-09-11 (annotated)
- Committer:
- Komazawa_sun
- Date:
- Mon Sep 11 04:57:57 2017 +0000
- Revision:
- 4:1b723a5b64d0
- Parent:
- 0:45f0d9b73179
????
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Komazawa_sun | 0:45f0d9b73179 | 1 | #ifndef I2C_TRANSPORTER_H |
Komazawa_sun | 0:45f0d9b73179 | 2 | #define I2C_TRANSPORTER_H |
Komazawa_sun | 0:45f0d9b73179 | 3 | |
Komazawa_sun | 0:45f0d9b73179 | 4 | #include <mbed.h> |
Komazawa_sun | 0:45f0d9b73179 | 5 | |
Komazawa_sun | 0:45f0d9b73179 | 6 | class I2CTransporter |
Komazawa_sun | 0:45f0d9b73179 | 7 | { |
Komazawa_sun | 0:45f0d9b73179 | 8 | public: |
Komazawa_sun | 0:45f0d9b73179 | 9 | I2CTransporter(I2C *master_); |
Komazawa_sun | 0:45f0d9b73179 | 10 | |
Komazawa_sun | 0:45f0d9b73179 | 11 | void transport_begin(int addr_, char *target_array_, int data_size_); |
Komazawa_sun | 0:45f0d9b73179 | 12 | bool read(); |
Komazawa_sun | 0:45f0d9b73179 | 13 | bool write(); |
Komazawa_sun | 0:45f0d9b73179 | 14 | void transport_end(); |
Komazawa_sun | 0:45f0d9b73179 | 15 | |
Komazawa_sun | 0:45f0d9b73179 | 16 | private: |
Komazawa_sun | 0:45f0d9b73179 | 17 | I2C *_master; |
Komazawa_sun | 0:45f0d9b73179 | 18 | |
Komazawa_sun | 0:45f0d9b73179 | 19 | int address; |
Komazawa_sun | 0:45f0d9b73179 | 20 | char *target_array; |
Komazawa_sun | 0:45f0d9b73179 | 21 | int data_size; |
Komazawa_sun | 0:45f0d9b73179 | 22 | bool Transport_Began; |
Komazawa_sun | 0:45f0d9b73179 | 23 | }; |
Komazawa_sun | 0:45f0d9b73179 | 24 | |
Komazawa_sun | 0:45f0d9b73179 | 25 | #endif |