taiyou komazawa / DataPool

Dependencies:   Gamma Beta Alpha

Dependents:   2017_Bteam_I2CTransporter BETA_A ALPHA_A GAMMA_A

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers I2CTransporter.h Source File

I2CTransporter.h

00001 #ifndef I2C_TRANSPORTER_H
00002 #define I2C_TRANSPORTER_H
00003 
00004 #include <mbed.h>
00005 
00006 class I2CTransporter
00007 {
00008     public:
00009         I2CTransporter(PinName sda, PinName scl);
00010         
00011         void transport_begin(int addr_, char *target_array_, int data_size_);
00012         bool read();
00013         bool write();
00014         void transport_end();
00015         
00016     private:
00017         I2C _master;
00018         
00019         int address;
00020         char *target_array;
00021         int data_size;
00022         bool Transport_Began;  
00023 };
00024 
00025 #endif