1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/boards/native/board_init.c

50 lines
1.0 KiB
C
Raw Normal View History

2013-03-06 10:48:14 +01:00
/**
* Native Board board_init implementation
*
* Copyright (C) 2014 Ludwig Knüpfer <ludwig.knuepfer@fu-berlin.de>
2013-03-06 10:48:14 +01:00
*
* 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.
2013-03-06 10:48:14 +01:00
*
2018-06-01 12:09:16 +02:00
* @ingroup boards_native
2013-03-06 10:48:14 +01:00
* @{
* @file
* @author Ludwig Knüpfer <ludwig.knuepfer@fu-berlin.de>
2013-03-06 10:48:14 +01:00
* @}
*/
2013-06-02 12:42:10 +02:00
#include <stdio.h>
2013-03-06 12:27:25 +01:00
#include "board.h"
#include "board_internal.h"
#ifdef MODULE_MTD
#include "mtd_native.h"
#endif
2013-03-13 21:45:28 +01:00
/**
* Nothing to initialize at the moment.
* Turns the red LED on and the green LED off.
*/
void board_init(void)
2013-03-06 01:10:50 +01:00
{
2016-03-11 16:25:43 +01:00
LED0_OFF;
LED1_ON;
2013-03-06 01:10:50 +01:00
puts("RIOT native board initialized.");
}
#ifdef MODULE_MTD
2017-03-28 16:46:56 +02:00
static mtd_native_dev_t mtd0_dev = {
.dev = {
.driver = &native_flash_driver,
2017-12-11 18:03:01 +01:00
.sector_count = MTD_SECTOR_NUM,
.pages_per_sector = MTD_SECTOR_SIZE / MTD_PAGE_SIZE,
.page_size = MTD_PAGE_SIZE,
},
.fname = MTD_NATIVE_FILENAME,
};
2017-03-28 16:46:56 +02:00
mtd_dev_t *mtd0 = (mtd_dev_t *)&mtd0_dev;
#endif