Improved printable implementation; data reading with macro

This commit is contained in:
dario
2024-06-26 17:41:56 +02:00
committed by dario
parent b9ccb2d65f
commit ebb14896b8
7 changed files with 56 additions and 16 deletions

View File

@@ -170,13 +170,37 @@ namespace sta
*/
void println(const char * str, size_t length);
public:
/**
* @brief Read bytes.
*
* @param buffer Byte buffer
* @param length Buffer length
*/
virtual void read(uint8_t * buffer, size_t length) = 0;
/**
* @brief Read string.
*
* @param str String buffer
* @param length String length
*/
virtual void read(char* str, size_t length) = 0;
void read(char * str, size_t length);
/**
* @brief Read floats.
*
* @param buffer Float buffer
* @param length Buffer length
*/
void read(float * buffer, size_t length);
/**
* @brief Read doubles.
*
* @param buffer Double buffer
* @param length Buffer length
*/
void read(double * buffer, size_t length);
private:
/**