File tree Expand file tree Collapse file tree 6 files changed +80
-2
lines changed
boards/arm/sam34/arduino-due Expand file tree Collapse file tree 6 files changed +80
-2
lines changed Original file line number Diff line number Diff line change @@ -861,3 +861,9 @@ Configuration sub-directories
861
861
862
862
STATUS:
863
863
2013-7-2: TSC is not responding. All 0's received on SPI.
864
+
865
+ nsh-leds:
866
+ This configuration directory will build the NuttX Shell and enable the user
867
+ LEDS (/dev/userleds). It will also enable the LED example program (leds).
868
+ Running the leds command will start up an LED daemon which will light up the
869
+ L (user), TX, and RX LEDs in a binary sequence.
Original file line number Diff line number Diff line change
1
+ #
2
+ # This file is autogenerated: PLEASE DO NOT EDIT IT.
3
+ #
4
+ # You can use "make menuconfig" to make any modifications to the installed .config file.
5
+ # You can then do "make savedefconfig" to generate a new defconfig file that includes your
6
+ # modifications.
7
+ #
8
+ # CONFIG_ARCH_LEDS is not set
9
+ # CONFIG_ARCH_RAMFUNCS is not set
10
+ # CONFIG_READLINE_ECHO is not set
11
+ CONFIG_ARCH="arm"
12
+ CONFIG_ARCH_BOARD="arduino-due"
13
+ CONFIG_ARCH_BOARD_ARDUINO_DUE=y
14
+ CONFIG_ARCH_CHIP="sam34"
15
+ CONFIG_ARCH_CHIP_ATSAM3X8E=y
16
+ CONFIG_ARCH_CHIP_SAM34=y
17
+ CONFIG_ARCH_CHIP_SAM3X=y
18
+ CONFIG_ARCH_STACKDUMP=y
19
+ CONFIG_BOARD_LATE_INITIALIZE=y
20
+ CONFIG_BOARD_LOOPSPERMSEC=6965
21
+ CONFIG_BUILTIN=y
22
+ CONFIG_DEV_ZERO=y
23
+ CONFIG_EXAMPLES_LEDS=y
24
+ CONFIG_FS_PROCFS=y
25
+ CONFIG_HAVE_CXX=y
26
+ CONFIG_HAVE_CXXINITIALIZE=y
27
+ CONFIG_INIT_ENTRYPOINT="nsh_main"
28
+ CONFIG_MM_REGIONS=3
29
+ CONFIG_NSH_ARCHINIT=y
30
+ CONFIG_NSH_BUILTIN_APPS=y
31
+ CONFIG_NSH_DISABLE_IFUPDOWN=y
32
+ CONFIG_NSH_FILEIOSIZE=512
33
+ CONFIG_NSH_READLINE=y
34
+ CONFIG_PREALLOC_TIMERS=4
35
+ CONFIG_RAM_SIZE=65536
36
+ CONFIG_RAM_START=0x20000000
37
+ CONFIG_RAW_BINARY=y
38
+ CONFIG_RR_INTERVAL=200
39
+ CONFIG_SCHED_WAITPID=y
40
+ CONFIG_START_DAY=28
41
+ CONFIG_START_MONTH=6
42
+ CONFIG_START_YEAR=2013
43
+ CONFIG_SYSTEM_NSH=y
44
+ CONFIG_TASK_NAME_SIZE=32
45
+ CONFIG_UART0_SERIAL_CONSOLE=y
46
+ CONFIG_USERLED=y
47
+ CONFIG_USERLED_LOWER=y
Original file line number Diff line number Diff line change 147
147
* GPIO output to low.
148
148
*/
149
149
150
+ #define LED_DRIVER_PATH "/dev/userleds"
151
+
150
152
/* LED index values for use with board_userled() */
151
153
152
154
#define BOARD_LED_L 0
Original file line number Diff line number Diff line change @@ -74,4 +74,5 @@ void board_late_initialize(void)
74
74
75
75
sam_bringup ();
76
76
}
77
+
77
78
#endif
Original file line number Diff line number Diff line change 29
29
30
30
#include <nuttx/board.h>
31
31
#include <nuttx/fs/fs.h>
32
+ #include <nuttx/leds/userled.h>
32
33
33
34
#include "arduino-due.h"
34
35
36
+ #include <arch/board/board.h>
37
+
35
38
/****************************************************************************
36
39
* Pre-processor Definitions
37
40
****************************************************************************/
38
41
42
+ #undef HAVE_LEDS
43
+
44
+ #if !defined(CONFIG_ARCH_LEDS ) && defined(CONFIG_USERLED_LOWER )
45
+ # define HAVE_LEDS 1
46
+ #endif
47
+
39
48
#if defined(CONFIG_ARDUINO_ITHEAD_TFT ) && defined(CONFIG_SPI_BITBANG ) && \
40
49
defined(CONFIG_MMCSD_SPI )
41
50
@@ -116,6 +125,19 @@ int sam_bringup(void)
116
125
}
117
126
#endif
118
127
128
+ #ifdef HAVE_LEDS
129
+ board_userled_initialize ();
130
+
131
+ /* Register the LED driver */
132
+
133
+ ret = userled_lower_initialize (LED_DRIVER_PATH );
134
+ if (ret < 0 )
135
+ {
136
+ syslog (LOG_ERR , "ERROR: userled_lower_initialize() failed: %d\n" , ret );
137
+ return ret ;
138
+ }
139
+ #endif
140
+
119
141
UNUSED (ret );
120
142
return OK ;
121
143
}
Original file line number Diff line number Diff line change 28
28
#include <stdbool.h>
29
29
#include <debug.h>
30
30
31
- #include <arch/board/board.h>
32
-
33
31
#include "chip.h"
34
32
#include "sam_gpio.h"
35
33
#include "arduino-due.h"
36
34
35
+ #include <arch/board/board.h>
36
+
37
37
#ifndef CONFIG_ARCH_LEDS
38
38
39
39
/****************************************************************************
You can’t perform that action at this time.
0 commit comments