Prusa MINI Firmware overview
TwoWire Class Reference

#include <Wire.h>

Inheritance diagram for TwoWire:
Collaboration diagram for TwoWire:

Public Member Functions

 TwoWire (void)
 
void begin (void)
 
void beginTransmission (uint8_t)
 
uint8_t endTransmission (void)
 
uint8_t requestFrom (uint8_t, uint8_t)
 
virtual size_t write (uint8_t)
 
virtual size_t write (const uint8_t *, size_t)
 
virtual int available (void)
 
virtual int read (void)
 
virtual int peek (void)
 
virtual void flush (void)
 
- Public Member Functions inherited from Stream
 Stream ()
 
void setTimeout (unsigned long timeout)
 
unsigned long getTimeout (void)
 
bool find (const char *target)
 
bool find (const uint8_t *target)
 
bool find (const char *target, size_t length)
 
bool find (const uint8_t *target, size_t length)
 
bool find (char target)
 
bool findUntil (const char *target, const char *terminator)
 
bool findUntil (const uint8_t *target, const char *terminator)
 
bool findUntil (const char *target, size_t targetLen, const char *terminate, size_t termLen)
 
bool findUntil (const uint8_t *target, size_t targetLen, const char *terminate, size_t termLen)
 
long parseInt (LookaheadMode lookahead=SKIP_ALL, char ignore=NO_IGNORE_CHAR)
 
float parseFloat (LookaheadMode lookahead=SKIP_ALL, char ignore=NO_IGNORE_CHAR)
 
virtual size_t readBytes (char *buffer, size_t length)
 
size_t readBytes (uint8_t *buffer, size_t length)
 
virtual size_t readBytesUntil (char terminator, char *buffer, size_t length)
 
size_t readBytesUntil (char terminator, uint8_t *buffer, size_t length)
 
String readString ()
 
String readStringUntil (char terminator)
 
- Public Member Functions inherited from Print
 Print ()
 
int getWriteError ()
 
void clearWriteError ()
 
size_t write (const char *str)
 
size_t write (const char *buffer, size_t size)
 
size_t print (const __FlashStringHelper *)
 
size_t print (const String &)
 
size_t print (const char[])
 
size_t print (char)
 
size_t print (unsigned char, int=DEC)
 
size_t print (int, int=DEC)
 
size_t print (unsigned int, int=DEC)
 
size_t print (long, int=DEC)
 
size_t print (unsigned long, int=DEC)
 
size_t print (double, int=2)
 
size_t print (const Printable &)
 
size_t println (const __FlashStringHelper *)
 
size_t println (const String &s)
 
size_t println (const char[])
 
size_t println (char)
 
size_t println (unsigned char, int=DEC)
 
size_t println (int, int=DEC)
 
size_t println (unsigned int, int=DEC)
 
size_t println (long, int=DEC)
 
size_t println (unsigned long, int=DEC)
 
size_t println (double, int=2)
 
size_t println (const Printable &)
 
size_t println (void)
 
void println (int64_t, uint8_t=DEC)
 
void print (int64_t, uint8_t=DEC)
 
void println (uint64_t, uint8_t=DEC)
 
void print (uint64_t, uint8_t=DEC)
 

Additional Inherited Members

- Protected Member Functions inherited from Stream
int timedRead ()
 
int timedPeek ()
 
int peekNextDigit (LookaheadMode lookahead, bool detectDecimal)
 
long parseInt (char ignore)
 
float parseFloat (char ignore)
 
int findMulti (struct MultiTarget *targets, int tCount)
 
- Protected Member Functions inherited from Print
void setWriteError (int err=1)
 
- Protected Attributes inherited from Stream
unsigned long _timeout
 
unsigned long _startMillis
 

Constructor & Destructor Documentation

◆ TwoWire()

TwoWire::TwoWire ( void  )
10  {
11 }

Member Function Documentation

◆ begin()

void TwoWire::begin ( void  )
13  {
14 }

◆ beginTransmission()

void TwoWire::beginTransmission ( uint8_t  address)
16  {
17  i2c_dev_address = address << 1;
18 }

◆ endTransmission()

uint8_t TwoWire::endTransmission ( void  )
20  {
21  return 0;
22 }

◆ requestFrom()

uint8_t TwoWire::requestFrom ( uint8_t  address,
uint8_t  quantity 
)
24  {
25  return 0;
26 }

◆ write() [1/2]

size_t TwoWire::write ( uint8_t  data)
virtual

Implements Print.

32  {
33 #ifdef LCDSIM
35 #endif // LCDSIM
36 
37  //HAL_StatusTypeDef ret = HAL_I2C_Master_Transmit(&hi2c1, i2c_dev_address, &data, 1, 100);
38  return 1;
39 }
Here is the call graph for this function:

◆ write() [2/2]

size_t TwoWire::write ( const uint8_t data,
size_t  quantity 
)
virtual

Reimplemented from Print.

41  {
42  return 0;
43 }

◆ available()

int TwoWire::available ( void  )
virtual

Implements Stream.

45  {
46  return 0;
47 }

◆ read()

int TwoWire::read ( void  )
virtual

Implements Stream.

49  {
50  return 0;
51 }

◆ peek()

int TwoWire::peek ( void  )
virtual

Implements Stream.

53  {
54  return 0;
55 }

◆ flush()

void TwoWire::flush ( void  )
virtual

Implements Stream.

57  {
58 }
i2c_dev_address
uint16_t i2c_dev_address
Definition: Wire.cpp:8
data
uint8_t data[8]
Definition: masstorage.h:49
address
UsbDeviceAddress address
Definition: address.h:202
lcdsim_expander_write
void lcdsim_expander_write(uint8_t data)
Definition: lcdsim.c:204