MCPcopy Create free account
hub / github.com/SmingHub/Sming / systemDebugOutput

Method systemDebugOutput

Sming/Core/HardwareSerial.cpp:75–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75void HardwareSerial::systemDebugOutput(bool enabled)
76{
77 if(!uart) {
78 return;
79 }
80
81 if(enabled) {
82 if(smg_uart_tx_enabled(uart)) {
83 smg_uart_set_debug(uartNr);
84 m_setPuts(std::bind(&smg_uart_write, uart, _1, _2));
85 } else {
86 smg_uart_set_debug(UART_NO);
87 }
88 } else if(smg_uart_get_debug() == uartNr) {
89 // Disable system debug messages on this interface
90 smg_uart_set_debug(UART_NO);
91 // and don't print debugf() data at all
92 m_setPuts(nullptr);
93 }
94}
95
96void HardwareSerial::invokeCallbacks()
97{

Callers 15

initFunction · 0.80
initFunction · 0.80
initFunction · 0.80
initFunction · 0.80
initFunction · 0.80
initFunction · 0.80
initFunction · 0.80
initFunction · 0.80
initFunction · 0.80
initFunction · 0.80
initFunction · 0.80
initFunction · 0.80

Calls 4

smg_uart_tx_enabledFunction · 0.85
m_setPutsFunction · 0.85
smg_uart_set_debugFunction · 0.50
smg_uart_get_debugFunction · 0.50

Tested by 1

initFunction · 0.64