fibre: posix: Impose a 50ms upper limit on sleep times.

On a microcontroller the fibre scheduler is intended to go idle using a
wait-for-interrupt mechanism and will leave idle both at the end of the
sleep period or if there is any asynchronous activity on the device.

POSIX doesn't provide this type of mechanism but we can emulate it by
waking every 50ms and checking that there's nothing for the scheduler to
do. Note that this is just responsive for "human speed" interfacing but
impractical for most other purposes.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
console: Introduce a simple command processor.

This mostly targets microcontrollers where its protothreading and fibre
support makes most sense, however it is possible to integrate it into a
blocking thread scheduler fairly easily.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
console: libopencm3: Introduce console driver for libopencm3

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
console: Fix stupid never-go-idle bug in the ring buffer fetch

PT_YIELD() is a busy-wait (and correctly used during console_help() to
avoid other fibres being denied access to the CPU). However here we
must use PT_WAIT_UNITL() to perform a sleeping wait.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
console: Fix ISR safety bug in console_putchar().

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
protothreads: Fix minor error in the doxygen markup.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
console: Improve the documentation.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
doxygen: Remove hardcoded path.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>