console: separate driver for USART

tags/0.1.0
S.J.R. van Schaik 8 years ago
parent b6d216255f
commit 81632df5e9
  1. 1
      Makefile
  2. 0
      include/console.h
  3. 1
      scripts/Makefile.stm32f0
  4. 2
      source/drivers/usart_console.c
  5. 4
      source/main.c

@ -19,7 +19,6 @@ CFLAGS += -fno-common --function-sections -fdata-sections
obj-y += source/main.o
obj-y += source/shell.o
obj-y += source/usart.o
obj-y += source/core/flash.o

@ -19,6 +19,7 @@ STLINK_PORT ?= :4242
obj-y += source/core/spi.o
obj-y += source/drivers/spi_flash.o
obj-y += source/drivers/stm32f0_spi.o
obj-y += source/drivers/usart_console.o
$(OPENCM3_DIR)/lib/lib$(OPENCM3_LIBNAME).a:
@if [ ! -e libopencm3/.git ]; then \

@ -12,7 +12,7 @@
#include <limits.h>
#include <sys/types.h>
#include "usart.h"
#include <console.h>
static ssize_t usart_read(void *cookie, char *buf, size_t n)
{

@ -1,7 +1,7 @@
#include <stdio.h>
#include "shell.h"
#include "usart.h"
#include <console.h>
#include <shell.h>
int main(void)
{

Loading…
Cancel
Save