21 #include <libopencm3/stm32/rcc.h>
22 #include <libopencm3/stm32/gpio.h>
23 #include <libopencm3/stm32/usart.h>
24 #include <libopencm3/cm3/nvic.h>
25 #include <libopencm3/cm3/systick.h>
30 int _write(
int file,
char *ptr,
int len);
32 static uint8_t logbuf[1024];
42 static void logchar(
char ch)
51 }
while (discard != -1 && discard !=
'\n');
56 int _write(
int file,
char *ptr,
int len)
58 if (file == 1 || file == 2) {
59 for (
int i=0; i<len; i++)
#define RINGBUF_VAR_INIT(bufp, buf_len)
Static initializer for a ring buffer descriptor.
void console_hwinit(console_t *c)
Platform dependant function that will be called during console_init().
int ringbuf_get(ringbuf_t *rb)
Extract a byte from the ring buffer.
int _write(int file, char *ptr, int len)
bool ringbuf_put(ringbuf_t *rb, uint8_t d)
Insert a byte into the ring buffer.