PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
|
Public Member Functions | |
I2CSlaveTester (const uint8_t address) | |
void | on_request () |
Invoked when a request for data is received from the I2C master. More... | |
void | on_receive () |
Invoked when data has been received from the I2C master. More... | |
void | run () |
Enter the loop that will watch and operate the bus. | |
size_t | available () const |
Get the amount of bytes in the receive buffer. More... | |
int | read () |
Read the next byte from the receiveBuffer. More... | |
void | write (const uint8_t data) |
Send the given byte of data on the bus during a request from the bus master. More... | |
Static Public Member Functions | |
template<class T > | |
static int8_t | invoke (T &runnable) |
Start a new cog running the given object. More... | |
Static Public Attributes | |
static const Pin::Mask | DEFAULT_SCL_MASK = Pin::Mask::P28 |
static const Pin::Mask | DEFAULT_SDA_MASK = Pin::Mask::P29 |
Definition at line 41 of file i2c_test.cpp.
|
inherited |
Get the amount of bytes in the receive buffer.
Definition at line 144 of file i2cslave.h.
|
staticinherited |
Start a new cog running the given object.
[in] | runnable | Object that should be invoked in a new cog |
Definition at line 85 of file runnable.h.
|
virtual |
Invoked when data has been received from the I2C master.
Data should be retrieved via calls to I2CSlave::read()
Implements PropWare::I2CSlave.
Definition at line 55 of file i2c_test.cpp.
|
virtual |
Invoked when a request for data is received from the I2C master.
Data should be transmitted via I2CSlave::write()
Implements PropWare::I2CSlave.
Definition at line 49 of file i2c_test.cpp.
|
inherited |
Read the next byte from the receiveBuffer.
-1
when none is available. Definition at line 153 of file i2cslave.h.
|
inherited |
Send the given byte of data on the bus during a request from the bus master.
[in] | data | Byte to send to the requesting master. |
Definition at line 167 of file i2cslave.h.