Skip to content

Commit 5f100db

Browse files
authored
Change write function to return 1 instead of 0
Arduino documentation points out that the write() functions should return the number of bytes written, rather than a return code.
1 parent d5a8d97 commit 5f100db

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cores/portduino/linux/LinuxHardwareI2C.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ namespace arduino {
7373
size_t LinuxHardwareI2C::write(uint8_t toWrite) {
7474
TXbuf[requestedBytes] = toWrite;
7575
requestedBytes++;
76-
return 0;
76+
return 1;
7777
}
7878
size_t LinuxHardwareI2C::write(const uint8_t *buffer, size_t size) {
7979
for (int i = 0; i < size; i++) {

0 commit comments

Comments
 (0)