2013-03-06 10:48:14 +01:00
|
|
|
/**
|
|
|
|
* Native Board board_init implementation
|
|
|
|
*
|
2015-09-27 18:58:30 +02:00
|
|
|
* Copyright (C) 2014 Ludwig Knüpfer <ludwig.knuepfer@fu-berlin.de>
|
2013-03-06 10:48:14 +01:00
|
|
|
*
|
2014-07-31 19:45:27 +02: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
|
2015-09-27 18:58:30 +02:00
|
|
|
* @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"
|
|
|
|
|
2013-07-15 20:57:12 +02:00
|
|
|
#include "board_internal.h"
|
|
|
|
|
2016-07-11 09:53:13 +02:00
|
|
|
#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.
|
|
|
|
*/
|
2014-05-07 12:36:32 +02:00
|
|
|
void board_init(void)
|
2013-03-06 01:10:50 +01:00
|
|
|
{
|
2016-03-11 16:25:43 +01:00
|
|
|
LED0_OFF;
|
|
|
|
LED1_ON;
|
2018-03-15 23:26:01 +01:00
|
|
|
|
2013-03-06 01:10:50 +01:00
|
|
|
puts("RIOT native board initialized.");
|
|
|
|
}
|
2016-07-11 09:53:13 +02:00
|
|
|
|
|
|
|
#ifdef MODULE_MTD
|
2017-03-28 16:46:56 +02:00
|
|
|
static mtd_native_dev_t mtd0_dev = {
|
2016-07-11 09:53:13 +02:00
|
|
|
.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,
|
2016-07-11 09:53:13 +02:00
|
|
|
},
|
|
|
|
.fname = MTD_NATIVE_FILENAME,
|
|
|
|
};
|
2017-03-28 16:46:56 +02:00
|
|
|
|
|
|
|
mtd_dev_t *mtd0 = (mtd_dev_t *)&mtd0_dev;
|
2016-07-11 09:53:13 +02:00
|
|
|
#endif
|