Skip to content

Commit cdc21a6

Browse files
committed
Wire implementation, very simple
1 parent e23f2e9 commit cdc21a6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Wire.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,16 @@
99
// STL headers
1010
// C headers
1111
// Framework headers
12+
#include <WireQueue.h>
1213
// Library headers
1314
// Project headers
1415
// This component's header
1516
#include <Wire.h>
1617

1718
TwoWire Wire;
1819

20+
extern WireQueue theWireQueue;
21+
1922
/****************************************************************************/
2023
TwoWire::TwoWire()
2124
{
@@ -47,8 +50,9 @@ uint8_t TwoWire::requestFrom(int, int)
4750
{
4851
return 0;
4952
}
50-
void TwoWire::send(uint8_t)
53+
void TwoWire::send(uint8_t val)
5154
{
55+
theWireQueue.send(val);
5256
}
5357
void TwoWire::send(uint8_t*, uint8_t)
5458
{
@@ -65,7 +69,7 @@ uint8_t TwoWire::available(void)
6569
}
6670
uint8_t TwoWire::receive(void)
6771
{
68-
return 0;
72+
return theWireQueue.receive();
6973
}
7074
void TwoWire::onReceive( void (*)(int) )
7175
{

0 commit comments

Comments
 (0)