Fixed ISerialBus interface and added device and register address fields so that future i2c and SPI devices can be addressed, to. Added i2c HAL. Tested, working.

The update on the interface required FunctionStatus and the logger to be updated, too
This commit is contained in:
Matthias Mitscherlich
2024-03-11 17:00:07 +01:00
parent a0d13f08c1
commit d5e389f1bd
11 changed files with 137 additions and 530 deletions
+2 -2
View File
@@ -67,9 +67,9 @@ class uart : public ISerialBus<uint8_t>
uart(uart_port_t* uartPort);
~uart();
FunctionStatus read(uint8_t* buffer, uint32_t length, uint32_t* actualLength);
FunctionStatus read(uint8_t deviceAddress, uint8_t registerAddress, uint8_t* buffer, uint32_t length, uint32_t* actualLength);
FunctionStatus write(uint8_t* buffer, uint32_t length);
FunctionStatus write(uint8_t deviceAddress, uint8_t registerAddress, uint8_t* buffer, uint32_t length);
// -----------------------------------------------------------------------------------------------------------------
// Protected Section