W60X_Arduino: TwoWire Class Reference

Arduino W60X

W60X_Arduino
TwoWire Class Reference

Inherits Stream.

Public Member Functions

void begin (int sda, int scl)
 
void pins (int sda, int scl) __attribute__((deprecated))
 
void begin ()
 
void begin (uint8_t)
 
void begin (int)
 
void setClock (uint32_t)
 
void setClockStretchLimit (uint32_t)
 
void beginTransmission (uint8_t)
 
void beginTransmission (int)
 
uint8_t endTransmission (void)
 
uint8_t endTransmission (uint8_t)
 
size_t requestFrom (uint8_t address, size_t size, bool sendStop)
 
uint8_t status ()
 
uint8_t requestFrom (uint8_t, uint8_t)
 
uint8_t requestFrom (uint8_t, uint8_t, uint8_t)
 
uint8_t requestFrom (int, int)
 
uint8_t requestFrom (int, int, int)
 
virtual size_t write (uint8_t)
 This pure virtual function is used to define the operation that writes binary data. More...
 
virtual size_t write (const uint8_t *, size_t)
 This function is used to write buffer to the interface defined by the object. More...
 
virtual int available (void)
 available() gets the number of bytes available in the stream. This is only for bytes that have already arrived. More...
 
virtual int read (void)
 read() reads characters from an incoming stream to the buffer. More...
 
virtual int peek (void)
 Read a byte from the file without advancing to the next one. That is, successive calls to peek() will return the same value, as will the next call to read(). More...
 
virtual void flush (void)
 
void onReceive (void(*)(int))
 
void onRequest (void(*)(void))
 
size_t write (unsigned long n)
 
size_t write (long n)
 
size_t write (unsigned int n)
 
size_t write (int n)
 
virtual size_t write (uint8_t)=0
 This pure virtual function is used to define the operation that writes binary data. More...
 
virtual size_t write (const uint8_t *buffer, size_t size)
 This function is used to write buffer to the interface defined by the object. More...
 
size_t write (const char *str)
 This function is used to write buffer to the interface defined by the object. More...
 
size_t write (const char *buffer, size_t size)
 This function is used to write buffer to the interface defined by the object. More...
 
- Public Member Functions inherited from Stream
void setTimeout (unsigned long timeout)
 setTimeout() sets the maximum milliseconds to wait for stream data, it defaults to 1000 milliseconds. This function is part of the Stream class, and is called by any class that inherits from it (Wire, Serial, etc). See the Stream class main page for more information. More...
 
bool find (const char *target)
 find() reads data from the stream until the target string of given length is found The function returns true if target string is found, false if timed out. More...
 
bool find (uint8_t *target)
 find() reads data from the stream until the target string of given length is found The function returns true if target string is found, false if timed out. More...
 
bool find (const char *target, size_t length)
 find() reads data from the stream until the target string of given length is found The function returns true if target string is found, false if timed out. More...
 
bool find (const uint8_t *target, size_t length)
 find() reads data from the stream until the target string of given length is found The function returns true if target string is found, false if timed out. More...
 
bool find (char target)
 find() reads data from the stream until the target string of given length is found The function returns true if target string is found, false if timed out. More...
 
bool findUntil (const char *target, const char *terminator)
 findUntil() reads data from the stream until the target string of given length or terminator string is found. More...
 
bool findUntil (const uint8_t *target, const char *terminator)
 findUntil() reads data from the stream until the target string of given length or terminator string is found. More...
 
bool findUntil (const char *target, size_t targetLen, const char *terminate, size_t termLen)
 findUntil() reads data from the stream until the target string of given length or terminator string is found. More...
 
bool findUntil (const uint8_t *target, size_t targetLen, const char *terminate, size_t termLen)
 findUntil() reads data from the stream until the target string of given length or terminator string is found. More...
 
long parseInt ()
 parseInt() returns the first valid (long) integer number from the serial buffer. Characters that are not integers (or the minus sign) are skipped. More...
 
float parseFloat ()
 parseFloat() returns the first valid floating point number from the current position. Initial characters that are not digits (or the minus sign) are skipped. parseFloat() is terminated by the first character that is not a floating point number. More...
 
virtual size_t readBytes (char *buffer, size_t length)
 readBytes() read characters from a stream into a buffer. The function terminates if the determined length has been read, or it times out (see setTimeout()). More...
 
virtual size_t readBytes (uint8_t *buffer, size_t length)
 readBytes() read characters from a stream into a buffer. The function terminates if the determined length has been read, or it times out (see setTimeout()). More...
 
size_t readBytesUntil (char terminator, char *buffer, size_t length)
 readBytesUntil() reads characters from a stream into a buffer. The function terminates if the terminator character is detected, the determined length has been read, or it times out (see setTimeout()). More...
 
size_t readBytesUntil (char terminator, uint8_t *buffer, size_t length)
 readBytesUntil() reads characters from a stream into a buffer. The function terminates if the terminator character is detected, the determined length has been read, or it times out (see setTimeout()). More...
 
String readString ()
 readString() reads characters from a stream into a string. The function terminates if it times out (see setTimeout()). More...
 
String readStringUntil (char terminator)
 readStringUntil() reads characters from a stream into a string. The function terminates if the terminator character is detected or it times out (see setTimeout()). More...
 
- Public Member Functions inherited from Print
int getWriteError ()
 This function is used to get write error number. More...
 
void clearWriteError ()
 This function is used to clear write error number. More...
 
size_t write (const char *str)
 This function is used to write buffer to the interface defined by the object. More...
 
size_t write (const char *buffer, size_t size)
 This function is used to write buffer to the interface defined by the object. More...
 
size_t print (const String &)
 This function is used to print buffer to the interface defined by the object. More...
 
size_t print (const char [])
 This function is used to print buffer to the interface defined by the object. More...
 
size_t print (char)
 This function is used to print buffer to the interface defined by the object. More...
 
size_t print (unsigned char, int=DEC)
 This function is used to print target to the interface defined by the object. More...
 
size_t print (int, int=DEC)
 This function is used to print target to the interface defined by the object. More...
 
size_t print (unsigned int, int=DEC)
 This function is used to print target to the interface defined by the object. More...
 
size_t print (long, int=DEC)
 This function is used to print target to the interface defined by the object. More...
 
size_t print (unsigned long, int=DEC)
 This function is used to print target to the interface defined by the object. More...
 
size_t print (double, int=BIN)
 This function is used to print target to the interface defined by the object. More...
 
size_t print (const Printable &)
 This function is used to print target to the interface defined by the object. More...
 
size_t println (void)
 This function is used to print target to the interface defined by the object with carriage ret ('') and new line ('
'). More...
 
size_t println (const String &s)
 This function is used to print target to the interface defined by the object with carriage ret ('') and new line ('
'). More...
 
size_t println (const char [])
 This function is used to print target to the interface defined by the object with carriage ret ('') and new line ('
'). More...
 
size_t println (char)
 This function is used to print target to the interface defined by the object with carriage ret ('') and new line ('
'). More...
 
size_t println (unsigned char, int=DEC)
 This function is used to print target to the interface defined by the object with carriage ret ('') and new line ('
'). More...
 
size_t println (int, int=DEC)
 This function is used to print target to the interface defined by the object with carriage ret ('') and new line ('
'). More...
 
size_t println (unsigned int, int=DEC)
 This function is used to print target to the interface defined by the object with carriage ret ('') and new line ('
'). More...
 
size_t println (long, int=DEC)
 This function is used to print target to the interface defined by the object with carriage ret ('') and new line ('
'). More...
 
size_t println (unsigned long, int=DEC)
 This function is used to print target to the interface defined by the object with carriage ret ('') and new line ('
'). More...
 
size_t println (double, int=BIN)
 This function is used to print target to the interface defined by the object with carriage ret ('') and new line ('
'). More...
 
size_t println (const Printable &)
 This function is used to print target to the interface defined by the object with carriage ret ('') and new line ('
'). More...
 

Additional Inherited Members

- Protected Member Functions inherited from Stream
int timedRead ()
 
int timedPeek ()
 
int peekNextDigit ()
 
long parseInt (char skipChar)
 
float parseFloat (char skipChar)
 
- Protected Member Functions inherited from Print
void setWriteError (int err=1)
 
- Protected Attributes inherited from Stream
unsigned long _timeout
 
unsigned long _startMillis
 

Member Function Documentation

◆ write() [1/4]

size_t Print::write
inline

This function is used to write buffer to the interface defined by the object.

Parameters
[in]strSpecify the buffer of string.
Returns
The length of write successfully.
Note

◆ write() [2/4]

size_t Print::write

This function is used to write buffer to the interface defined by the object.

Parameters
[in]bufferSpecify the buffer.
[in]sizeSpecify the size.
Returns
The length of write successfully.
Note
Parameters
[in]bufferSpecify the buffer.
[in]sizeSpecify the size.
Returns
The length of write successfully (1 byte).
Note

◆ write() [3/4]

virtual size_t Print::write

This pure virtual function is used to define the operation that writes binary data.

Parameters
[in]vala value to send as a single byte
Returns
The length of write successfully (1 byte).
Note

◆ write() [4/4]

size_t Print::write
inline

This function is used to write buffer to the interface defined by the object.

Parameters
[in]bufferSpecify the buffer of string.
[in]sizeSpecify the size.
Returns
The length of write successfully.
Note
Generated by   doxygen 1.8.14