File tree Expand file tree Collapse file tree 3 files changed +32
-3
lines changed Expand file tree Collapse file tree 3 files changed +32
-3
lines changed Original file line number Diff line number Diff line change 1
- CONTIKI_TARGET_DIRS = . apps net loader arduino arduino/variants/standard
1
+ CONTIKI_TARGET_DIRS = . arduino arduino/variants/standard dev
2
2
CONTIKI_CORE = contiki-arduino-main
3
3
CONTIKI_TARGET_MAIN = ${CONTIKI_CORE}.o
4
4
5
5
CONTIKI_TARGET_SOURCEFILES += rs232.c cfs-eeprom.c eeprom.c random.c \
6
6
mmem.c contiki-arduino-main.c slip.c \
7
- wiring_digital.c
7
+ wiring_digital.c \
8
+ leds-arch.c
8
9
9
10
CONTIKIAVR = $(CONTIKI)/cpu/avr
10
11
CONTIKIBOARD = .
Original file line number Diff line number Diff line change
1
+ #include <dev/leds.h>
2
+ #include "Arduino.h"
3
+
4
+ #define YELLOW_PIN 13
5
+
6
+ void
7
+ leds_arch_init (void )
8
+ {
9
+ pinMode (YELLOW_PIN , OUTPUT );
10
+ }
11
+
12
+ unsigned char
13
+ leds_arch_get (void )
14
+ {
15
+ unsigned char on = 0 ;
16
+
17
+ if (digitalRead (YELLOW_PIN )) on |= LEDS_YELLOW ;
18
+
19
+ return on ;
20
+ }
21
+
22
+ void
23
+ leds_arch_set (unsigned char leds )
24
+ {
25
+ digitalWrite (YELLOW_PIN , leds & LEDS_YELLOW );
26
+ }
Original file line number Diff line number Diff line change 63
63
#endif
64
64
65
65
/* LED ports */
66
+ #define PLATFORM_HAS_LEDS 1
67
+ #if 0
66
68
#define LEDS_PxDIR DDRA /**< port direction register */
67
69
#define LEDS_PxOUT PORTA /**< port register */
68
- #if 0
70
+
69
71
#define LEDS_CONF_RED 0x04 /**< red led */
70
72
#define LEDS_CONF_GREEN 0x02 /**< green led */
71
73
#define LEDS_CONF_YELLOW 0x01 /**< yellow led */
You can’t perform that action at this time.
0 commit comments