For development purposes I want to write to console via UART from a callback function. As I came to understand and experienced the following is not allowed:
Code: Select all
static void icuwidthcb(ICUDriver *icup) {
last_width = icuGetWidthX(icup);
chprintf((BaseSequentialStream*)&SD2, "Callback icuwidth: %d\r\n", last_width);
}
What is the simpest way of doing this? And what is the best practice when doing "work" using callbacks?
A simple example code would be much appreciated as I'm relative new to chibios and using threads.
BR enmas