Compare commits
6 commits
Author | SHA1 | Date | |
---|---|---|---|
|
74f6bbb45d | ||
|
88a360b32c | ||
|
77671a4832 | ||
|
f1a335d6ca | ||
|
d242464fce | ||
|
1e3e3203d4 |
4
LICENSE
4
LICENSE
|
@ -1,4 +1,4 @@
|
||||||
Contiki is licensed under the 3-clause BSD license. This license gives
|
OSD-Contiki is licensed under the 3-clause BSD license. This license gives
|
||||||
everyone the right to use and distribute the code, either in binary or
|
everyone the right to use and distribute the code, either in binary or
|
||||||
source code format, as long as the copyright license is retained in
|
source code format, as long as the copyright license is retained in
|
||||||
the source code.
|
the source code.
|
||||||
|
@ -7,7 +7,7 @@ The copyright for different parts of the code is held by different
|
||||||
people and organizations, but the code is licensed under the same type
|
people and organizations, but the code is licensed under the same type
|
||||||
of license. The license text is:
|
of license. The license text is:
|
||||||
|
|
||||||
* Copyright (c) (Year), (Name of copyright holder)
|
* Copyright (c) 2011, IoT-Austria and Alan Dunkels and contributors
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
|
|
@ -71,7 +71,7 @@ extern resource_t
|
||||||
res_event,
|
res_event,
|
||||||
res_sub;
|
res_sub;
|
||||||
#if PLATFORM_HAS_LEDS
|
#if PLATFORM_HAS_LEDS
|
||||||
#include "dev/leds.h"
|
#include "dev/leds-arch.h"
|
||||||
extern resource_t res_leds, res_toggle;
|
extern resource_t res_leds, res_toggle;
|
||||||
#endif
|
#endif
|
||||||
#if PLATFORM_HAS_LIGHT
|
#if PLATFORM_HAS_LIGHT
|
||||||
|
@ -89,11 +89,13 @@ extern resource_t res_radio;
|
||||||
#endif
|
#endif
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
hw_init()
|
hw_init()
|
||||||
{
|
{
|
||||||
#if defined (PLATFORM_HAS_LEDS)
|
#if defined (PLATFORM_HAS_LEDS)
|
||||||
leds_off(LEDS_RED);
|
leds_arch_init();
|
||||||
|
LEDS_OFF();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,13 +43,13 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "contiki.h"
|
#include "contiki.h"
|
||||||
#include "rest-engine.h"
|
#include "rest-engine.h"
|
||||||
#include "dev/leds.h"
|
#include "dev/leds-arch.h"
|
||||||
|
|
||||||
static void res_post_handler(void *request, void *response, uint8_t *buffer, uint16_t preferred_size, int32_t *offset);
|
static void res_post_handler(void *request, void *response, uint8_t *buffer, uint16_t preferred_size, int32_t *offset);
|
||||||
|
|
||||||
/* A simple actuator example. Toggles the red led */
|
/* A simple actuator example. Toggles the led */
|
||||||
RESOURCE(res_toggle,
|
RESOURCE(res_toggle,
|
||||||
"title=\"Red LED\";rt=\"Control\"",
|
"title=\"LED\";rt=\"Control\"",
|
||||||
NULL,
|
NULL,
|
||||||
res_post_handler,
|
res_post_handler,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -58,6 +58,6 @@ RESOURCE(res_toggle,
|
||||||
static void
|
static void
|
||||||
res_post_handler(void *request, void *response, uint8_t *buffer, uint16_t preferred_size, int32_t *offset)
|
res_post_handler(void *request, void *response, uint8_t *buffer, uint16_t preferred_size, int32_t *offset)
|
||||||
{
|
{
|
||||||
leds_toggle(LEDS_RED);
|
LED_GREEN_TOGGLE ();
|
||||||
}
|
}
|
||||||
#endif /* PLATFORM_HAS_LEDS */
|
#endif /* PLATFORM_HAS_LEDS */
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
OSDOMOTIS
|
OSDOMOTICS
|
||||||
|
|
||||||
www.osdomotics.com
|
www.osdomotics.com
|
||||||
|
|
||||||
|
@ -9,4 +9,4 @@ sudo ./flash.sh
|
||||||
|
|
||||||
or:
|
or:
|
||||||
|
|
||||||
sudo avrdude -pm128rfa1 -c arduino -P/dev/ttyUSB0 -b57600 -e -U flash:w:border-router.osd-er-lp24.hex:a -U eeprom:w:border-router.osd-er-lp24.eep:a
|
sudo avrdude -pm128rfa1 -c arduino -P/dev/ttyUSB0 -b57600 -e -U flash:w:border-router.osd-merkur-128.hex:a -U eeprom:w:border-router.osd-merkur-128.eep:a
|
||||||
|
|
|
@ -77,8 +77,10 @@ AVRDUDE_MCU=m256rfr2
|
||||||
# For newer bootloaders we have a jump table at the end of the bootloader
|
# For newer bootloaders we have a jump table at the end of the bootloader
|
||||||
# section: guhRF Bootloader MAC Address
|
# section: guhRF Bootloader MAC Address
|
||||||
BOOTLOADER_GET_MAC=0x0003ff80
|
BOOTLOADER_GET_MAC=0x0003ff80
|
||||||
|
BOOTLOADER_WRITE_PAGE_TO_FLASH=0x0003ff84
|
||||||
|
|
||||||
LDFLAGS += -Wl,--defsym,bootloader_get_mac=$(BOOTLOADER_GET_MAC)
|
LDFLAGS += -Wl,--defsym,bootloader_get_mac=$(BOOTLOADER_GET_MAC) \
|
||||||
|
-Wl,--defsym,bootloader_write_page_to_flash=$(BOOTLOADER_WRITE_PAGE_TO_FLASH)
|
||||||
|
|
||||||
|
|
||||||
include $(CONTIKIAVR)/Makefile.avr
|
include $(CONTIKIAVR)/Makefile.avr
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
|
|
||||||
#define LED_GREEN_TOGGLE() LED_OUT ^= BIT_GREEN
|
#define LED_GREEN_TOGGLE() LED_OUT ^= BIT_GREEN
|
||||||
|
|
||||||
#define LEDS_OFF() LED_OUT &= ~BIT_GREEN
|
#define LEDS_ON() LED_OUT &= ~BIT_GREEN
|
||||||
#define LEDS_ON() LED_OUT |= BIT_GREEN
|
#define LEDS_OFF() LED_OUT |= BIT_GREEN
|
||||||
|
|
||||||
|
|
||||||
void leds_arch_init(void);
|
void leds_arch_init(void);
|
||||||
|
|
Loading…
Reference in a new issue