Wire.available()
描述
回傳藉由 I2C 傳送過來的資料量,這些資料可以使用 read() 讀取。如果是主端應該在呼叫 requestFrom() 後才呼叫 available(),如果是從端應該在使用 onReceive() 註冊的函式裡呼叫。
available() 是從 Stream 繼承而來。
參數
無參數
回傳
int:目前可以讀取的資料量,以位元組為單位
See also
- Wire.read()
- Stream.available()
The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.
