From ae8822ff46526cb60f8beb7409af7797ed6e0856 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Mon, 26 Mar 2018 21:50:06 +0200 Subject: [PATCH] boards/common/atmega: initial commit of atmega shared code --- boards/common/atmega/Makefile | 3 +++ boards/common/atmega/board.c | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 boards/common/atmega/Makefile create mode 100644 boards/common/atmega/board.c diff --git a/boards/common/atmega/Makefile b/boards/common/atmega/Makefile new file mode 100644 index 0000000000..3acb699f05 --- /dev/null +++ b/boards/common/atmega/Makefile @@ -0,0 +1,3 @@ +MODULE = boards_common_atmega + +include $(RIOTBASE)/Makefile.base diff --git a/boards/common/atmega/board.c b/boards/common/atmega/board.c new file mode 100644 index 0000000000..ef349c737f --- /dev/null +++ b/boards/common/atmega/board.c @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2018 Kaspar Schleiser + * + * This file is subject to the terms and conditions of the GNU Lesser + * General Public License v2.1. See the file LICENSE in the top level + * directory for more details. + */ + +/** + * @ingroup boards_common_atmega + * @{ + * + * @file + * @brief Common implementations for Atmega boards + * + * @author Kaspar Schleiser + * + * @} + */ + +#include "board.h" +#include "cpu.h" +#include "irq.h" +#include "periph/gpio.h" + +void led_init(void); + +void board_init(void) +{ + atmega_stdio_init(); + cpu_init(); + led_init(); + irq_enable(); +}