Extended MaximInterface
Dependents: mbed_DS28EC20_GPIO
Diff: Links/LoggingI2CMaster.hpp
- Revision:
- 8:211d1b8f730c
- Parent:
- 6:a8c83a2e6fa4
diff -r 3523abdda8ed -r 211d1b8f730c Links/LoggingI2CMaster.hpp --- a/Links/LoggingI2CMaster.hpp Tue Jul 24 08:33:31 2018 +0000 +++ b/Links/LoggingI2CMaster.hpp Wed Apr 03 12:33:10 2019 +0000 @@ -51,23 +51,27 @@ } MaximInterface_EXPORT virtual error_code start(uint_least8_t address); + MaximInterface_EXPORT virtual error_code stop(); + MaximInterface_EXPORT virtual error_code writeByte(uint_least8_t data); + MaximInterface_EXPORT virtual error_code - writeBlock(const uint_least8_t * data, size_t dataLen); + writeBlock(span<const uint_least8_t> data); + MaximInterface_EXPORT virtual error_code readByte(AckStatus status, uint_least8_t & data); MaximInterface_EXPORT virtual error_code - readBlock(AckStatus status, uint_least8_t * data, size_t dataLen); + readBlock(AckStatus status, span<uint_least8_t> data); protected: MaximInterface_EXPORT virtual error_code - writePacketImpl(uint_least8_t address, const uint_least8_t * data, - size_t dataLen, bool sendStop); - MaximInterface_EXPORT virtual error_code readPacketImpl(uint_least8_t address, - uint_least8_t * data, - size_t dataLen, - bool sendStop); + writePacketImpl(uint_least8_t address, span<const uint_least8_t> data, + bool sendStop); + + MaximInterface_EXPORT virtual error_code + readPacketImpl(uint_least8_t address, span<uint_least8_t> data, + bool sendStop); private: void tryWriteMessage(); @@ -78,4 +82,4 @@ } // namespace MaximInterface -#endif \ No newline at end of file +#endif