![]() |
eBoard ๐
โ โงโจ
Written for SIA 2017/2018
|
This is used to avoid path resolving issues and defines the common known Arduino Wire-Interface
Don't use manually
More...
#include <eBoard.h>
Public Member Functions | |
TwoWire () | |
The constructor of the TwoWire class. More... | |
void | begin () |
begin the TwoWire communcation without any data set More... | |
void | begin (uint8_t address) |
begin the TwoWire communication with a special address More... | |
void | begin (int address) |
begin the TwoWire communication with a special address More... | |
void | beginTransmission (uint8_t address) |
this will start a new transmission to a specific address => master mode More... | |
void | beginTransmission (int address) |
this will start a new transmission to a specific address => master mode More... | |
uint8_t | endTransmission (void) |
this will end the transmission and send the STOP-sequence More... | |
uint8_t | endTransmission (uint8_t sendStop) |
this will end the transmission and send the STOP-sequence dependent on sendStop More... | |
uint8_t | requestFrom (uint8_t address, uint8_t quantity) |
this will read a specific quantity of bytes from a specific address More... | |
uint8_t | requestFrom (uint8_t address, uint8_t quantity, uint8_t sendStop) |
this will read a specific quantity of bytes from a specific address More... | |
uint8_t | requestFrom (int address, int quantity) |
this will read a specific quantity of bytes from a specific address More... | |
uint8_t | requestFrom (int address, int quantity, int sendStop) |
this will read a specific quantity of bytes from a specific address More... | |
virtual size_t | write (uint8_t data) |
this will write a single unsigned 8-bit value to address More... | |
virtual size_t | write (const uint8_t *data, size_t quantity) |
this will write an array of unsigned 8-bit values to address More... | |
virtual int | available (void) |
this will return the amount of rxBuffer left More... | |
virtual int | read (void) |
this will read a single byte from rxBuffer and increment the Index More... | |
virtual int | peek (void) |
this will read a single byte from rxBuffer without increment the Index More... | |
virtual void | flush (void) |
as this isn't implemented in the offical Wire library, this does nothing xD More... | |
void | onReceive (void(*function)(int)) |
this will set the user_onReceive method More... | |
void | onRequest (void(*function)(void)) |
this will set the user_onRequest method More... | |
Static Private Member Functions | |
static void | onRequestService (void) |
twi slave [Tx]transmitting-event handler More... | |
static void | onReceiveService (uint8_t *inBytes, int numBytes) |
twi slave [Rx]receive-event handler More... | |
Static Private Attributes | |
static uint8_t | rxBuffer [] |
this defines the rxBuffer used to enable delayed read More... | |
static uint8_t | rxBufferIndex |
this defines the rxBuffer Index - current position in rxBuffer array More... | |
static uint8_t | rxBufferLength |
this defines the length of rxBuffer More... | |
static uint8_t | txAddress |
this defines the txAddress the transmitting Dta More... | |
static uint8_t | txBuffer [] |
this defines the txBuffer used to enable delayed read More... | |
static uint8_t | txBufferIndex |
this defines the txBuffer Index - current position in txBuffer array More... | |
static uint8_t | txBufferLength |
this defines the length of txBuffer More... | |
static uint8_t | transmitting |
'boolean' value. Set to 1 if transmitting => in master write mode More... | |
static void(* | user_onRequest )(void) |
twi slave [Tx]transmitting-event user def handler More... | |
static void(* | user_onReceive )(int numBytes) |
twi slave [Rx]receive-event user def handler More... | |
This is used to avoid path resolving issues and defines the common known Arduino Wire-Interface
Don't use manually
eagle_impl::TwoWire::TwoWire | ( | ) |
The constructor of the TwoWire class.
|
virtual |
this will return the amount of rxBuffer left
void eagle_impl::TwoWire::begin | ( | ) |
begin the TwoWire communcation without any data set
void eagle_impl::TwoWire::begin | ( | uint8_t | address | ) |
|
inline |
begin the TwoWire communication with a special address
address | the address the TwoWire Interface should use |
void eagle_impl::TwoWire::beginTransmission | ( | uint8_t | address | ) |
this will start a new transmission to a specific address => master mode
address | the address to talk to |
|
inline |
this will start a new transmission to a specific address => master mode
address | the address to talk to |
|
inline |
this will end the transmission and send the STOP-sequence
uint8_t eagle_impl::TwoWire::endTransmission | ( | uint8_t | sendStop | ) |
this will end the transmission and send the STOP-sequence dependent on sendStop
sendStop | set this to true (0x1) if STOP should be send. Some devices will behave oddly if you set this to false (0x0)! |
|
virtual |
as this isn't implemented in the offical Wire library, this does nothing xD
void eagle_impl::TwoWire::onReceive | ( | void(*)(int) | function | ) |
this will set the user_onReceive method
function | the function to link |
For further uses see TwoWire::user_onReceive()
|
staticprivate |
twi slave [Rx]receive-event handler
inBytes | array of receive Bytes |
numBytes | length of inBytes array |
void eagle_impl::TwoWire::onRequest | ( | void(*)(void) | function | ) |
this will set the user_onRequest method
function | the function to link |
For further uses see TwoWire::user_onRequest()
|
staticprivate |
twi slave [Tx]transmitting-event handler
|
virtual |
this will read a single byte from rxBuffer without increment the Index
|
virtual |
this will read a single byte from rxBuffer and increment the Index
|
inline |
this will read a specific quantity of bytes from a specific address
address | the address to read from |
quantity | the amount if bytes to read |
uint8_t eagle_impl::TwoWire::requestFrom | ( | uint8_t | address, |
uint8_t | quantity, | ||
uint8_t | sendStop | ||
) |
this will read a specific quantity of bytes from a specific address
address | the address to read from |
quantity | the amount if bytes to read |
sendStop | set this to true (0x1) if STOP should be send. Some devices will behave oddly if you set this to false (0x0)! |
|
inline |
this will read a specific quantity of bytes from a specific address
address | the address to read from |
quantity | the amount if bytes to read |
|
inline |
this will read a specific quantity of bytes from a specific address
address | the address to read from |
quantity | the amount if bytes to read |
sendStop | set this to true (0x1) if STOP should be send. Some devices will behave oddly if you set this to false (0x0)! |
|
virtual |
this will write a single unsigned 8-bit value to address
data | the data that should be send if in master-mode it will be stored in buffer! |
|
virtual |
this will write an array of unsigned 8-bit values to address
data | the data array that should be send if in master-mode it will be stored in buffer! |
quantity | the length of the array |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |