void
ao_button_clear(void) __critical;
+/* console I/O funcs */
+#define ao_getchar getchar
+#define ao_putchar putchar
+
/* ao_string.c */
void
#endif
void
-putchar(char c)
+ao_putchar(char c)
{
#if LOW_LEVEL_DEBUG
if (!ao_cur_task) {
__xdata uint8_t ao_stdin_ready;
char
-getchar(void) __reentrant
+ao_getchar(void) __reentrant
{
int c;
int8_t stdio;
ao_arch_task_members /* any architecture-specific fields */
uint8_t task_id; /* unique id */
__code char *name; /* task name */
+#ifdef NEWLIB
+ int __errno; /* storage for errno in newlib libc */
+#endif
#if HAS_TASK_QUEUE
struct ao_list queue;
struct ao_list alarm_queue;
NEWLIB=/local/newlib-mini
MAPFILE=-Wl,-M=$(MAP)
LDFLAGS=-L../stmf0 -L$(NEWLIB)/arm-none-eabi/lib/thumb/v6-m/ -Wl,-Tlambda.ld $(MAPFILE) -nostartfiles
-AO_CFLAGS=-I. -I../stmf0 -I../kernel -I../drivers -I.. -I../scheme -isystem $(NEWLIB)/arm-none-eabi/include
+AO_CFLAGS=-I. -I../stmf0 -I../kernel -I../drivers -I.. -I../scheme -isystem $(NEWLIB)/arm-none-eabi/include -DNEWLIB
PROGNAME=lambdakey-v1.0
PROG=$(PROGNAME)-$(VERSION).elf
#endif
static void
-_ao_usart_rx(struct ao_stm_usart *usart, int stdin)
+_ao_usart_rx(struct ao_stm_usart *usart, int is_stdin)
{
if (usart->reg->sr & (1 << STM_USART_SR_RXNE)) {
if (!ao_fifo_full(usart->rx_fifo)) {
ao_fifo_insert(usart->rx_fifo, usart->reg->dr);
ao_wakeup(&usart->rx_fifo);
- if (stdin)
+ if (is_stdin)
ao_wakeup(&ao_stdin_ready);
#if HAS_SERIAL_SW_FLOW
/* If the fifo is nearly full, turn off RTS and wait
}
static void
-ao_usart_isr(struct ao_stm_usart *usart, int stdin)
+ao_usart_isr(struct ao_stm_usart *usart, int is_stdin)
{
- _ao_usart_rx(usart, stdin);
+ _ao_usart_rx(usart, is_stdin);
if (!_ao_usart_tx_start(usart))
usart->reg->cr1 &= ~(1<< STM_USART_CR1_TXEIE);
include $(TOPDIR)/Makedefs
-vpath % $(TOPDIR)/stmf0:$(TOPDIR)/product:$(TOPDIR)/drivers:$(TOPDIR)/kernel:$(TOPDIR)/util:$(TOPDIR)/kalman:$(TOPDIR)/aes:$(TOPDIR):$(TOPDIR)/math:$(TOPDIR)/lisp
+vpath % $(TOPDIR)/stmf0:$(TOPDIR)/product:$(TOPDIR)/drivers:$(TOPDIR)/kernel:$(TOPDIR)/util:$(TOPDIR)/kalman:$(TOPDIR)/aes:$(TOPDIR):$(TOPDIR)/math:$(TOPDIR)/scheme
vpath make-altitude $(TOPDIR)/util
vpath make-kalman $(TOPDIR)/util
vpath kalman.5c $(TOPDIR)/kalman