TwoWire¶
詳細情報¶
メンバー¶
TwoWire()¶
TwoWire::TwoWire(uint8_t bus_num)
引数
- uint8_t
bus_num
~TwoWire()¶
TwoWire::~TwoWire()
begin()¶
bool TwoWire::begin(int sda=-1, int scl=-1, uint32_t frequency=0)
引数
- int
sda
- int
scl
- uint32_t
frequency
戻り値
bool
setClock()¶
void TwoWire::setClock(uint32_t frequency)
引数
- uint32_t
frequency
getClock()¶
size_t TwoWire::getClock()
戻り値
size_t
setTimeOut()¶
void TwoWire::setTimeOut(uint16_t timeOutMillis)
引数
- uint16_t
timeOutMillis
getTimeOut()¶
uint16_t TwoWire::getTimeOut()
戻り値
uint16_t
lastError()¶
uint8_t TwoWire::lastError()
戻り値
uint8_t
getErrorText()¶
char * TwoWire::getErrorText(uint8_t err)
引数
- uint8_t
err
戻り値
char *
writeTransmission()¶
i2c_err_t TwoWire::writeTransmission(uint16_t address, uint8_t *buff, uint16_t size, bool sendStop=true)
引数
- uint16_t
address
- uint8_t*
buff
- uint16_t
size
- bool
sendStop
戻り値
i2c_err_t
readTransmission()¶
i2c_err_t TwoWire::readTransmission(uint16_t address, uint8_t *buff, uint16_t size, bool sendStop=true, uint32_t *readCount=NULL)
引数
- uint16_t
address
- uint8_t*
buff
- uint16_t
size
- bool
sendStop
- uint32_t*
readCount
戻り値
i2c_err_t
beginTransmission()¶
void TwoWire::beginTransmission(uint16_t address)
引数
- uint16_t
address
beginTransmission()¶
void TwoWire::beginTransmission(uint8_t address)
引数
- uint8_t
address
beginTransmission()¶
void TwoWire::beginTransmission(int address)
引数
- int
address
endTransmission()¶
uint8_t TwoWire::endTransmission(bool sendStop)
引数
- bool
sendStop
戻り値
uint8_t
endTransmission()¶
uint8_t TwoWire::endTransmission(void)
戻り値
uint8_t
requestFrom()¶
uint8_t TwoWire::requestFrom(uint16_t address, uint8_t size, bool sendStop)
引数
- uint16_t
address
- uint8_t
size
- bool
sendStop
戻り値
uint8_t
requestFrom()¶
uint8_t TwoWire::requestFrom(uint16_t address, uint8_t size, uint8_t sendStop)
引数
- uint16_t
address
- uint8_t
size
- uint8_t
sendStop
戻り値
uint8_t
requestFrom()¶
uint8_t TwoWire::requestFrom(uint16_t address, uint8_t size)
引数
- uint16_t
address
- uint8_t
size
戻り値
uint8_t
requestFrom()¶
uint8_t TwoWire::requestFrom(uint8_t address, uint8_t size, uint8_t sendStop)
引数
- uint8_t
address
- uint8_t
size
- uint8_t
sendStop
戻り値
uint8_t
requestFrom()¶
uint8_t TwoWire::requestFrom(uint8_t address, uint8_t size)
引数
- uint8_t
address
- uint8_t
size
戻り値
uint8_t
requestFrom()¶
uint8_t TwoWire::requestFrom(int address, int size, int sendStop)
引数
- int
address
- int
size
- int
sendStop
戻り値
uint8_t
requestFrom()¶
uint8_t TwoWire::requestFrom(int address, int size)
引数
- int
address
- int
size
戻り値
uint8_t
write()¶
size_t TwoWire::write(uint8_t)
引数
- uint8_t ``
戻り値
size_t
write()¶
size_t TwoWire::write(const uint8_t *, size_t)
引数
- size_t ``
戻り値
size_t
available()¶
int TwoWire::available(void)
戻り値
int
read()¶
int TwoWire::read(void)
戻り値
int
peek()¶
int TwoWire::peek(void)
戻り値
int
flush()¶
void TwoWire::flush(void)
write()¶
size_t TwoWire::write(const char *s)
引数
- constchar *
s
戻り値
size_t
write()¶
size_t TwoWire::write(unsigned long n)
引数
- unsigned long
n
戻り値
size_t
write()¶
size_t TwoWire::write(long n)
引数
- long
n
戻り値
size_t
write()¶
size_t TwoWire::write(unsigned int n)
引数
- unsigned int
n
戻り値
size_t
write()¶
size_t TwoWire::write(int n)
引数
- int
n
戻り値
size_t
onReceive()¶
void TwoWire::onReceive(void(*)(int))
引数
- void(*)(int) ``
onRequest()¶
void TwoWire::onRequest(void(*)(void))
引数
- void(*)(void) ``
setDebugFlags()¶
uint32_t TwoWire::setDebugFlags(uint32_t setBits, uint32_t resetBits)
引数
- uint32_t
setBits
- uint32_t
resetBits
戻り値
uint32_t
busy()¶
bool TwoWire::busy()
戻り値
bool