2013-11-28 12:57:41 +01:00
|
|
|
/*
|
2015-09-27 18:58:30 +02:00
|
|
|
* Copyright (C) 2013 Ludwig Knüpfer <ludwig.knuepfer@fu-berlin.de>
|
2013-03-06 12:19:15 +01:00
|
|
|
*
|
2014-08-27 18:47:31 +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-11-28 12:57:41 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @defgroup boards_native Native Board
|
|
|
|
* @ingroup boards
|
|
|
|
* @brief Board emulation for the native port
|
|
|
|
*
|
|
|
|
* The native board uses call level hardware simulation
|
2013-03-06 12:19:15 +01:00
|
|
|
*
|
|
|
|
* @{
|
2013-11-28 12:57:41 +01:00
|
|
|
*
|
2014-10-21 16:52:30 +02:00
|
|
|
* @file
|
2013-11-28 12:57:41 +01:00
|
|
|
* @brief Basic definitions for the native board
|
|
|
|
*
|
2015-09-27 18:58:30 +02:00
|
|
|
* @author Ludwig Knüpfer <ludwig.knuepfer@fu-berlin.de>
|
2013-03-06 12:19:15 +01:00
|
|
|
*/
|
|
|
|
|
2017-01-18 13:00:05 +01:00
|
|
|
#ifndef BOARD_H
|
|
|
|
#define BOARD_H
|
2013-11-28 12:57:41 +01:00
|
|
|
|
2013-10-28 23:01:45 +01:00
|
|
|
#include <stdint.h>
|
|
|
|
|
2014-10-13 15:25:50 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2016-07-11 09:53:13 +02:00
|
|
|
#ifdef MODULE_MTD
|
|
|
|
#include "mtd_native.h"
|
|
|
|
#endif
|
|
|
|
|
2016-03-11 16:25:43 +01:00
|
|
|
/**
|
2017-04-10 19:04:32 +02:00
|
|
|
* @name LED handlers
|
2016-03-11 16:25:43 +01:00
|
|
|
* @{
|
|
|
|
*/
|
2013-08-15 23:51:49 +02:00
|
|
|
void _native_LED_GREEN_OFF(void);
|
|
|
|
void _native_LED_GREEN_ON(void);
|
|
|
|
void _native_LED_GREEN_TOGGLE(void);
|
|
|
|
void _native_LED_RED_OFF(void);
|
|
|
|
void _native_LED_RED_ON(void);
|
|
|
|
void _native_LED_RED_TOGGLE(void);
|
2016-03-11 16:25:43 +01:00
|
|
|
|
|
|
|
#define LED0_ON (_native_LED_RED_ON())
|
|
|
|
#define LED0_OFF (_native_LED_RED_OFF())
|
|
|
|
#define LED0_TOGGLE (_native_LED_RED_TOGGLE())
|
|
|
|
#define LED1_ON (_native_LED_GREEN_ON())
|
|
|
|
#define LED1_OFF (_native_LED_GREEN_OFF())
|
|
|
|
#define LED1_TOGGLE (_native_LED_GREEN_TOGGLE())
|
|
|
|
/** @} */
|
2013-10-20 17:54:31 +02:00
|
|
|
|
2016-07-11 09:53:13 +02:00
|
|
|
#ifdef MODULE_MTD
|
|
|
|
#define MTD_0 mtd0
|
|
|
|
|
|
|
|
/** mtd flash emulation device */
|
2017-03-28 16:46:56 +02:00
|
|
|
extern mtd_dev_t *mtd0;
|
2016-07-11 09:53:13 +02:00
|
|
|
#endif
|
|
|
|
|
2016-12-07 12:12:28 +01:00
|
|
|
#ifdef MODULE_SPIFFS
|
|
|
|
#define SPIFFS_READ_ONLY 0
|
|
|
|
#define SPIFFS_SINGLETON 0
|
|
|
|
|
|
|
|
#define SPIFFS_HAL_CALLBACK_EXTRA 1
|
|
|
|
|
|
|
|
#define SPIFFS_CACHE 1
|
|
|
|
|
|
|
|
#if SPIFFS_SINGLETON == 1
|
|
|
|
#define SPIFFS_CFG_PHYS_SZ(ignore) (0x800000)
|
|
|
|
|
|
|
|
#define SPIFFS_CFG_PHYS_ERASE_SZ(ignore) (4096)
|
|
|
|
|
|
|
|
#define SPIFFS_CFG_PHYS_ADDR(ignore) (0)
|
|
|
|
|
|
|
|
#define SPIFFS_CFG_LOG_PAGE_SZ(ignore) (256)
|
|
|
|
|
|
|
|
#define SPIFFS_CFG_LOG_BLOCK_SZ(ignore) (4096)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if SPIFFS_HAL_CALLBACK_EXTRA == 0
|
|
|
|
#define SPIFFS_MTD_DEV (MTD_0)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2014-10-13 15:25:50 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2013-11-28 12:57:41 +01:00
|
|
|
/** @} */
|
2017-01-18 13:00:05 +01:00
|
|
|
#endif /* BOARD_H */
|