XSHELL - hook function upon character reception Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
Post Reply
wolf
Posts: 42
Joined: Mon Dec 31, 2012 1:55 pm
Been thanked: 9 times

XSHELL - hook function upon character reception

Post 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
User avatar
FXCoder
Posts: 403
Joined: Sun Jun 12, 2016 4:10 am
Has thanked: 188 times
Been thanked: 134 times

Re: XSHELL - hook function upon character reception

Post 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
Post Reply