Build text base interface

This commit is contained in:
AlexanderHD27
2025-01-09 03:10:03 +01:00
parent b040662551
commit 2824bdac6e
17 changed files with 53 additions and 18 deletions

View File

@@ -31,6 +31,9 @@ void GobotRPC_TI_Hardware_RP2040_I2C::i2cRxTask() {
bool read_res = readI2C(&pkg, addr);
xSemaphoreGive(i2cMutex);
if(!read_res)
continue;
pkg.addr |= (i) << 8;
if(pushPackageCB != NULL)
@@ -54,6 +57,10 @@ bool GobotRPC_TI_Hardware_RP2040_I2C::readI2C(GoRPCPackage_Transport * pkg, uint
size_t len = pkg->data[CI_RX_PACKAGE_DATA_OFFSET + 1];
if(len > 64) {
return false;
}
res = i2c_read_blocking(i2c, addr, ((uint8_t *)pkg->data) + CI_RX_PACKAGE_DATA_OFFSET, len, false);
pkg->len = len;
pkg->addr = addr;