native/include/board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013 Ludwig Knüpfer <ludwig.knuepfer@fu-berlin.de>
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
24 #ifndef BOARD_H
25 #define BOARD_H
26 
27 #include <stdint.h>
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 #ifdef MODULE_MTD
34 #include "mtd_native.h"
35 #endif
36 
41 void _native_LED_GREEN_OFF(void);
42 void _native_LED_GREEN_ON(void);
43 void _native_LED_GREEN_TOGGLE(void);
44 void _native_LED_RED_OFF(void);
45 void _native_LED_RED_ON(void);
46 void _native_LED_RED_TOGGLE(void);
47 
48 #define LED0_ON (_native_LED_RED_ON())
49 #define LED0_OFF (_native_LED_RED_OFF())
50 #define LED0_TOGGLE (_native_LED_RED_TOGGLE())
51 #define LED1_ON (_native_LED_GREEN_ON())
52 #define LED1_OFF (_native_LED_GREEN_OFF())
53 #define LED1_TOGGLE (_native_LED_GREEN_TOGGLE())
54 
56 #ifdef MODULE_MTD
57 #define MTD_0 mtd0
58 
60 extern mtd_dev_t *mtd0;
61 #endif
62 
63 #ifdef MODULE_SPIFFS
64 #define SPIFFS_READ_ONLY 0
65 #define SPIFFS_SINGLETON 0
66 
67 #define SPIFFS_HAL_CALLBACK_EXTRA 1
68 
69 #define SPIFFS_CACHE 1
70 
71 #if SPIFFS_SINGLETON == 1
72 #define SPIFFS_CFG_PHYS_SZ(ignore) (0x800000)
73 
74 #define SPIFFS_CFG_PHYS_ERASE_SZ(ignore) (4096)
75 
76 #define SPIFFS_CFG_PHYS_ADDR(ignore) (0)
77 
78 #define SPIFFS_CFG_LOG_PAGE_SZ(ignore) (256)
79 
80 #define SPIFFS_CFG_LOG_BLOCK_SZ(ignore) (4096)
81 #endif
82 
83 #if SPIFFS_HAL_CALLBACK_EXTRA == 0
84 #define SPIFFS_MTD_DEV (MTD_0)
85 #endif
86 #endif
87 
88 #ifdef __cplusplus
89 }
90 #endif
91 
93 #endif /* BOARD_H */
MTD device descriptor.
Definition: mtd.h:58