17 m_uart.
error.connect(m_uartErrorSlot);
33 m_uart.
write(
reinterpret_cast<uint8_t*
>(&m_char), 1);
44 if (count == 0 || text.empty())
55 m_uart.
write(
reinterpret_cast<const uint8_t*
>(m_string.data()), m_string.size());
61 m_uart.
read(&m_availableChar,
sizeof(m_availableChar));
69void Printer::onCharWritten()
76 m_uart.
write(
reinterpret_cast<uint8_t*
>(&m_char), 1);
79void Printer::onStringWritten()
86 m_uart.
write(
reinterpret_cast<const uint8_t*
>(m_string.data()), m_string.size());
89void Printer::onDataAvailable()
92 dataAvailable(m_availableChar);
95void Printer::onDataWritten()
Class for representing errors. Every error should have a unique source code. As a user feel encourage...
void clear()
Disconnect all functions or methods.
void connect(SlotBase< Arguments... > &slot)
Connect a method to the signal.
void disconnect(SlotBase< Arguments... > &slot)
Disonnect a method from the signal.
Class for using UART hardware.
void write(const uint8_t data[], size_t dataSize) override
For writing data, dataWritten signal will be emitted after successful write.
void read(uint8_t buffer[], size_t bufferSize) override
For reading data, dataAvailable signal will be emitted after successful read.
void print(char character, size_t count)
Prints a single character count times.
Printer(semf::UartHardware &uart)
Constructor.
bool isBusy() const
Indicates wether the printer is busy.
void readCharacter()
Triggers a read cyle for reading a single character.