diff options
| author | lynxeyed-atsu <lynxeyed@xj9.so-net.ne.jp> | 2012-06-07 21:01:18 +0900 |
|---|---|---|
| committer | lynxeyed-atsu <lynxeyed@xj9.so-net.ne.jp> | 2012-06-07 21:01:18 +0900 |
| commit | 5866ec963c8c90fc25febf9814c2dd218478df75 (patch) | |
| tree | 2d5e856a35b10e171aed6d4e0402cfee4730c5a6 /src/core/Wire.h | |
| parent | 1ef708d56a58f54b814e23f3e4fbc188b9a2c4cc (diff) | |
fix Wire class
Diffstat (limited to 'src/core/Wire.h')
| -rwxr-xr-x | src/core/Wire.h | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/src/core/Wire.h b/src/core/Wire.h index 67c47e5..7b42f94 100755 --- a/src/core/Wire.h +++ b/src/core/Wire.h @@ -48,24 +48,22 @@ typedef enum { class TwoWire{
private:
- uint8_t rxAddress;
- uint8_t rxBuffer[];
- uint8_t rxBufferIndex;
- uint8_t rxBufferLength;
-
- uint8_t txAddress;
- uint8_t txBuffer[];
- uint8_t txBufferIndex;
- uint8_t txBufferLength;
-
int sda,scl;
- uint8_t transmitting;
- void (*user_onRequest)(void);
- void (*user_onReceive)(int);
- void onRequestService(void);
- void onReceiveService(uint8_t*, int);
+ static uint8_t rxBuffer[];
+ static uint8_t rxBufferIndex;
+ static uint8_t rxBufferLength;
+
+ static uint8_t txAddress;
+ static uint8_t txBuffer[];
+ static uint8_t txBufferIndex;
+ static uint8_t txBufferLength;
+ static uint8_t transmitting;
+ static void (*user_onRequest)(void);
+ static void (*user_onReceive)(int);
+ static void onRequestService(void);
+ static void onReceiveService(uint8_t*, int);
public:
TwoWire();
@@ -78,9 +76,9 @@ public: uint8_t endTransmission(void);
uint8_t requestFrom(uint8_t, uint8_t);
uint8_t requestFrom(int, int);
- void send(int8_t);
+ void write(int8_t);
void send(uint8_t*, uint8_t);
- void send(int8_t*);
+ void send(int8_t *);
void send(int);
uint8_t available(void);
uint8_t receive(void);
|
