Page 1 of 1

XSHELL - hook function upon character reception

Posted: Sun Feb 15, 2026 5:35 pm
by wolf
chibios-code-r17691-trunk

Hi all,

wouldn't it be useful to have a hook function upon actual character reception on the sequential stream?

Why? To give a visual feedback by flashing an LED for example.

The associated code must be very short for obvious reasons.

I'm aware, that you can register an event on the sequential stream for this purpose, but a hook function would be more immediate.

Regards Wolf

Re: XSHELL - hook function upon character reception

Posted: Thu Feb 19, 2026 1:34 pm
by FXCoder
Hi Wolf,
The hook has been added in trunk.
The function gets the instance pointer and the character.

Code: Select all

    XSHELL_INPUT_CHAR_HOOK(xshp, c);


--
Bob