class USI_TWI : public Stream
More...
#include <TinyWireM.h>
class USI_TWI : public Stream
◆ beginTransmission()
void USI_TWI::beginTransmission |
( |
uint8_t |
slaveAddr | ) |
|
Setup address & write bit.
- Parameters
-
slaveAddr | Secondary device address |
◆ write() [1/6]
size_t USI_TWI::write |
( |
uint8_t |
data | ) |
|
Buffers up data to send.
- Parameters
-
- Returns
- Returns 1 when successful
◆ write() [2/6]
size_t USI_TWI::write |
( |
uint8_t * |
d, |
|
|
uint8_t |
n |
|
) |
| |
|
inline |
Sends data.
- Parameters
-
d | Data buffer |
n | How much data to send |
- Returns
- Returns 1 when successful
◆ write() [3/6]
size_t USI_TWI::write |
( |
unsigned long |
n | ) |
|
|
inline |
Sends data.
- Parameters
-
- Returns
- Returns 1 when successful
◆ write() [4/6]
size_t USI_TWI::write |
( |
long |
n | ) |
|
|
inline |
Sends data.
- Parameters
-
- Returns
- Returns 1 when successful
◆ write() [5/6]
size_t USI_TWI::write |
( |
unsigned int |
n | ) |
|
|
inline |
Sends data.
- Parameters
-
- Returns
- Returns 1 when successful
◆ write() [6/6]
size_t USI_TWI::write |
( |
int |
n | ) |
|
|
inline |
Sends data.
- Parameters
-
- Returns
- Returns 1 when successful
◆ send() [1/3]
void USI_TWI::send |
( |
uint8_t |
b | ) |
|
|
inline |
Buffers up data to send.
- Parameters
-
- Returns
- Returns 1 when successful
◆ send() [2/3]
void USI_TWI::send |
( |
uint8_t * |
d, |
|
|
uint8_t |
n |
|
) |
| |
|
inline |
Sends data.
- Parameters
-
d | Buffer to send from |
n | How much to send from buffer |
- Returns
- Returns 1 when successful
◆ send() [3/3]
void USI_TWI::send |
( |
int |
n | ) |
|
|
inline |
Sends data.
- Parameters
-
- Returns
- Returns 1 when successful
◆ endTransmission() [1/2]
uint8_t USI_TWI::endTransmission |
( |
| ) |
|
Ends the transmission.
- Returns
- Returns the error code if there was one
◆ endTransmission() [2/2]
uint8_t USI_TWI::endTransmission |
( |
uint8_t |
stop | ) |
|
Ends the transmission.
- Parameters
-
stop | Buffer to send to end the transmission |
- Returns
- Returns the error code if there was one
◆ requestFrom()
uint8_t USI_TWI::requestFrom |
( |
uint8_t |
slaveAddr, |
|
|
uint8_t |
numBytes |
|
) |
| |
Setup for receiving from secondary.
- Parameters
-
slaveAddr | Secondary device address |
numBytes | How many bytes to request |
- Returns
- Returns 0, if there was an error, returns the error code
◆ read()
Returns the bytes received one at a time.
- Returns
- Returns the bytes received one at a time
◆ available()
int USI_TWI::available |
( |
| ) |
|
The bytes available htat haven't been read yet.
- Returns
- Returns how many bytes are available
◆ peek()
int USI_TWI::peek |
( |
void |
| ) |
|
Returns the top value.
- Returns
- Returns the top value
◆ receive()
uint8_t USI_TWI::receive |
( |
void |
| ) |
|
|
inline |
Receives data from the device.
- Returns
- Returns the data
The documentation for this class was generated from the following files: