mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #2218 from thomaseichinger/openwsn-ng
pkg/openwsn: update to current openwsn version
This commit is contained in:
commit
d3a88013f7
@ -114,6 +114,10 @@ extern "C" {
|
||||
#define LED_GREEN_ON (LED_GREEN_PORT->ODR &= ~(1<<LED_GREEN_PIN))
|
||||
#define LED_GREEN_OFF (LED_GREEN_PORT->ODR |= (1<<LED_GREEN_PIN))
|
||||
#define LED_GREEN_TOGGLE (LED_GREEN_PORT->ODR ^= (1<<LED_GREEN_PIN))
|
||||
|
||||
#define LED_ORANGE_ON
|
||||
#define LED_ORANGE_OFF
|
||||
#define LED_ORANGE_TOGGLE
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
@ -68,7 +68,7 @@ extern "C" {
|
||||
#define TIMER_1_DEV_0 TIM4
|
||||
#define TIMER_1_DEV_1 TIM5
|
||||
#define TIMER_1_CHANNELS 4
|
||||
#define TIMER_1_PRESCALER (36000U)
|
||||
#define TIMER_1_PRESCALER (72U)
|
||||
#define TIMER_1_MAX_VALUE (0xffff)
|
||||
#define TIMER_1_CLKEN() (RCC->APB1ENR |= (RCC_APB1ENR_TIM4EN | RCC_APB1ENR_TIM5EN))
|
||||
#define TIMER_1_ISR_0 isr_tim4
|
||||
|
@ -165,8 +165,14 @@ void at86rf231_switch_to_rx(void)
|
||||
}
|
||||
} while (at86rf231_get_status() != AT86RF231_TRX_STATUS__PLL_ON);
|
||||
|
||||
#ifndef MODULE_OPENWSN
|
||||
/* Reset IRQ to TRX END only */
|
||||
at86rf231_reg_write(AT86RF231_REG__IRQ_MASK, AT86RF231_IRQ_STATUS_MASK__TRX_END);
|
||||
#else
|
||||
/* OpenWSN also needs RX_START IRQ */
|
||||
at86rf231_reg_write(AT86RF231_REG__IRQ_MASK, ( AT86RF231_IRQ_STATUS_MASK__RX_START | AT86RF231_IRQ_STATUS_MASK__TRX_END));
|
||||
#endif
|
||||
|
||||
|
||||
/* Read IRQ to clear it */
|
||||
at86rf231_reg_read(AT86RF231_REG__IRQ_STATUS);
|
||||
@ -191,6 +197,7 @@ void at86rf231_rxoverflow_irq(void)
|
||||
/* TODO */
|
||||
}
|
||||
|
||||
#ifndef MODULE_OPENWSN
|
||||
void at86rf231_rx_irq(void)
|
||||
{
|
||||
/* check if we are in sending state */
|
||||
@ -207,6 +214,7 @@ void at86rf231_rx_irq(void)
|
||||
at86rf231_rx_handler();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
int at86rf231_add_raw_recv_callback(netdev_t *dev,
|
||||
netdev_802154_raw_packet_cb_t recv_cb)
|
||||
|
3
pkg/openwsn/.gitignore
vendored
3
pkg/openwsn/.gitignore
vendored
@ -1,2 +1 @@
|
||||
RB-1.4.zip
|
||||
RB-1.4
|
||||
openwsn
|
BIN
pkg/openwsn/0001-Add-RIOT-Makefiles.patch
Normal file
BIN
pkg/openwsn/0001-Add-RIOT-Makefiles.patch
Normal file
Binary file not shown.
BIN
pkg/openwsn/0002-Add-RIOT-adaption.patch
Normal file
BIN
pkg/openwsn/0002-Add-RIOT-adaption.patch
Normal file
Binary file not shown.
BIN
pkg/openwsn/0003-Fix-old-style-definitions.patch
Normal file
BIN
pkg/openwsn/0003-Fix-old-style-definitions.patch
Normal file
Binary file not shown.
BIN
pkg/openwsn/0004-provide-openserial-dummies.patch
Normal file
BIN
pkg/openwsn/0004-provide-openserial-dummies.patch
Normal file
Binary file not shown.
BIN
pkg/openwsn/0005-fixes-to-RIOT-adaption.patch
Normal file
BIN
pkg/openwsn/0005-fixes-to-RIOT-adaption.patch
Normal file
Binary file not shown.
@ -1,26 +1,36 @@
|
||||
PKG_NAME=RB
|
||||
PKG_URL=https://codeload.github.com/openwsn-berkeley/openwsn-fw
|
||||
PKG_VERSION=1.4
|
||||
PKG_EXT=zip
|
||||
PKG_NAME=openwsn
|
||||
PKG_URL=https://github.com/openwsn-berkeley/openwsn-fw.git
|
||||
PKG_VERSION=ff25e5d0ae5d344ed793a724d60532fb917bf1f8
|
||||
PKG_DIR=$(CURDIR)/$(PKG_NAME)
|
||||
|
||||
.PHONY: all clean
|
||||
ifneq ($(RIOTBOARD),)
|
||||
include $(RIOTBOARD)/$(BOARD)/Makefile.include
|
||||
endif
|
||||
|
||||
all: $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION)/
|
||||
$(info *INFO* Building OpenWSN pkg)
|
||||
make -C $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
.PHONY: all clean patch reset
|
||||
|
||||
$(CURDIR)/$(PKG_NAME)-$(PKG_VERSION)/: $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION).$(PKG_EXT)
|
||||
$(AD)rm -rf $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
$(AD)$(UNZIP_HERE) $< -d $(PKG_NAME)-$(PKG_VERSION)
|
||||
$(AD)cd $@ && sh $(CURDIR)/structure_changes.sh
|
||||
$(AD)cd $@ && sh $(CURDIR)/apply_patches.sh
|
||||
all: patch
|
||||
"$(MAKE)" -C $(PKG_DIR)
|
||||
|
||||
$(CURDIR)/$(PKG_NAME)-$(PKG_VERSION).$(PKG_EXT):
|
||||
# Get PKG_VERSION of package from PKG_URL
|
||||
$(AD)$(DOWNLOAD_TO_FILE) $@ $(PKG_URL)/$(PKG_EXT)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
patch: $(PKG_DIR)/Makefile
|
||||
|
||||
$(PKG_DIR)/Makefile: $(PKG_DIR)/.git/config
|
||||
cd "$(PKG_DIR)" && git am --ignore-whitespace $(CURDIR)/*.patch
|
||||
|
||||
$(PKG_DIR)/.git/config:
|
||||
test -d "$(PKG_DIR)" || git clone "$(PKG_URL)" "$(PKG_DIR)"; \
|
||||
cd "$(PKG_DIR)" && git checkout -f "$(PKG_VERSION)"
|
||||
|
||||
clean::
|
||||
rm -rf $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
@echo "Cleaning up OpenWSN package..."
|
||||
@cd "$(PKG_DIR)" 2> /dev/null > /dev/null && \
|
||||
git clean -x -f && \
|
||||
git am --abort ; \
|
||||
git reset --hard "$(PKG_VERSION)" && \
|
||||
$(MAKE) patch || true
|
||||
|
||||
distclean::
|
||||
rm -f $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION).$(PKG_EXT)
|
||||
rm -rf "$(PKG_DIR)"
|
||||
|
||||
Makefile.include:
|
||||
@true
|
@ -1,9 +0,0 @@
|
||||
DIRS =
|
||||
DIRS += openwsn
|
||||
|
||||
all::
|
||||
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
|
||||
|
||||
# remove compilation products
|
||||
clean::
|
||||
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;
|
@ -1 +0,0 @@
|
||||
export INCLUDES += -I${RIOTBASE}/drivers/include/
|
@ -1,25 +1,19 @@
|
||||
# OpenWSN on RIOT
|
||||
|
||||
This port of OpenWSN to RIOT is based on release RB-1.4 with backported support
|
||||
for the iot-lab_M3 board from the develop branch.
|
||||
|
||||
# Compatibility
|
||||
|
||||
This port of the openwsn stack is compatible with the iot-lab_M3 board only for now.
|
||||
The TelosB board support was temporarily dropped but will return soon again.
|
||||
The hardware dependency will be reduced in the future and thous running on more
|
||||
hardware platforms.
|
||||
This port of OpenWSN to RIOT is based on current OpenWSN upstream providing a
|
||||
BSP with RIOT's interfaces. Currently supported are iot-lab_M3 and fox. More
|
||||
boards will follow through improvements in netdev radio driver interface.
|
||||
|
||||
# Usage
|
||||
|
||||
A test can be found in the [projects repository](https://github.com/RIOT-OS/projects/)
|
||||
named ```test_openwsn_pkg``` with an example ```Makefile```.
|
||||
A test can be found in tests/openwsn providing a shell command to initialise
|
||||
as root or listening node. And providing a sample Makefile.
|
||||
|
||||
Build using
|
||||
```Bash
|
||||
$> export BOARD=iot-lab_M3
|
||||
$> export PORT=/dev/ttyTHEPORTOFYOURIOTLAB
|
||||
$> make -B clean flash
|
||||
$> make -B clean flash term
|
||||
```
|
||||
|
||||
To use OpenWSN with RIOT it has to be added to the used packages variable
|
||||
|
@ -1,14 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
set -o nounset # Treat unset variables as an error
|
||||
|
||||
if [[ $QUIET == "1" ]]; then
|
||||
for i in `ls ../patches`; do
|
||||
patch -p1 -N -i ../patches/$i > /dev/null
|
||||
done
|
||||
else
|
||||
for i in `ls ../patches`; do
|
||||
patch -p1 -N -i ../patches/$i
|
||||
done
|
||||
fi
|
||||
exit 0
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user