diff --git a/Makefile b/Makefile
index 2c89664cf4..3047fd6fe8 100644
--- a/Makefile
+++ b/Makefile
@@ -108,7 +108,7 @@ MAVLINK_PROTOCOL_H=$(MAVLINK_DIR)protocol.h
GEN_HEADERS = $(UBX_PROTOCOL_H) $(MTK_PROTOCOL_H) $(XSENS_PROTOCOL_H) $(ABI_MESSAGES_H) $(MAVLINK_PROTOCOL_H)
-all: ground_segment ext subdirs_extra lpctools
+all: ground_segment ext subdirs_extra
_print_building:
@echo "------------------------------------------------------------"
@@ -253,11 +253,6 @@ ac_h ac fbw ap: static conf generators ext
sim: sim_static
-# stuff to build and upload the lpc bootloader ...
-include Makefile.lpctools
-lpctools: lpc21iap
-
-
#
# doxygen html documentation
#
@@ -350,6 +345,6 @@ test_sim: all
.PHONY: all print_build_version _print_building _save_build_version update_google_version init dox ground_segment ground_segment.opt \
subdirs $(SUBDIRS) conf ext libpprz libpprzlink.update libpprzlink.install cockpit cockpit.opt tmtc tmtc.opt generators\
-static sim_static lpctools opencv_bebop\
+static sim_static opencv_bebop\
clean cleanspaces ab_clean dist_clean distclean dist_clean_irreversible \
test test_examples test_math test_sim test_all_confs
diff --git a/Makefile.lpctools b/Makefile.lpctools
deleted file mode 100644
index 0a4d0a10cc..0000000000
--- a/Makefile.lpctools
+++ /dev/null
@@ -1,31 +0,0 @@
-# Hey Emacs, this is a -*- makefile -*-
-
-bl:
- cd $(AIRBORNE)/arch/lpc21/test/bootloader; $(MAKE) clean; $(MAKE)
-
-BOOTLOADER_DEV ?= /dev/ttyUSB0
-upload_bl bl.upload: bl
- lpc21isp -control $(AIRBORNE)/arch/lpc21/test/bootloader/bl.hex $(BOOTLOADER_DEV) 38400 12000
-
-JTAG_INTERFACE ?= olimex-jtag-tiny.cfg
-#JTAG_INTERFACE = olimex-arm-usb-ocd.cfg
-
-upload_jtag: bl
- openocd -f interface/$(JTAG_INTERFACE) -f board/olimex_lpc_h2148.cfg -c init -c halt -c "flash write_image erase $(AIRBORNE)/arch/lpc21/test/bootloader/bl.hex" -c reset -c shutdown
-
-
-lpc21iap:
- $(MAKE) -C sw/ground_segment/lpc21iap
-
-upgrade_bl bl.upgrade: bl lpc21iap
- $(PAPARAZZI_SRC)/sw/ground_segment/lpc21iap/lpc21iap $(AIRBORNE)/arch/lpc21/test/bootloader/bl_ram.elf
- $(PAPARAZZI_SRC)/sw/ground_segment/lpc21iap/lpc21iap $(AIRBORNE)/arch/lpc21/test/bootloader/bl.elf
-
-ms:
- $(MAKE) -C $(AIRBORNE)/arch/lpc21/lpcusb
- $(MAKE) -C $(AIRBORNE)/arch/lpc21/lpcusb/examples
-
-upload_ms ms.upload: ms
- $(PAPARAZZI_SRC)/sw/ground_segment/lpc21iap/lpc21iap $(AIRBORNE)/arch/lpc21/lpcusb/examples/msc.elf
-
-.PHONY: bl upload_bl upload_jtag ms upload_ms lpc21iap upgrade_bl
diff --git a/conf/Makefile.lpc21 b/conf/Makefile.lpc21
deleted file mode 100644
index 343f3192d0..0000000000
--- a/conf/Makefile.lpc21
+++ /dev/null
@@ -1,290 +0,0 @@
-# Hey Emacs, this is a -*- makefile -*-
-#
-# Copyright (C) 2003-2005 Pascal Brisset, Antoine Drouin
-#
-# This file is part of paparazzi.
-#
-# paparazzi is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# paparazzi is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with paparazzi; see the file COPYING. If not, write to
-# the Free Software Foundation, 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-#
-
-
-#
-# This is the common Makefile for the arm7-target.
-#
-
-#TODO: this is not needed in some cases (e.g. ap target as it is defined there already)
-# but it is needed for other targets like tunnel
-# only define here or elsewhere?
-SRC_ARCH = arch/lpc21
-
-# Launch with "make Q=''" to get full command display
-Q=@
-
-
-#
-# find compiler toolchain
-#
-include $(PAPARAZZI_SRC)/conf/Makefile.arm-embedded-toolchain
-
-#
-# if the new arm-none-eabi multilib compiler was not found try the old arm-elf one
-#
-ifeq ($(CC),)
-CC = $(shell which arm-elf-gcc)
-LD = $(shell which arm-elf-gcc)
-CP = $(shell which arm-elf-objcopy)
-DMP = $(shell which arm-elf-objdump)
-NM = $(shell which arm-elf-nm)
-SIZE = $(shell which arm-elf-size)
-endif
-
-
-# MCU name and submodel
-MCU = arm7tdmi
-THUMB = -mthumb
-THUMB_IW = -mthumb-interwork
-
-# Output format. (can be srec, ihex, binary)
-FORMAT = ihex
-
-#FLASH_MODE=ISP
-
-SRCARM = $($(TARGET).srcs)
-
-ASRCARM = crt0.S
-
-# Optimization level, can be [0, 1, 2, 3, s].
-# 0 = turn off optimization. s = optimize for size.
-OPT ?= s
-# Slightly bigger .elf files but gains the ability to decode macros
-DEBUG_FLAGS ?= -ggdb3
-
-CSTANDARD = -std=gnu99
-
-CINCS = $(INCLUDES) -I$(SRC_ARCH)/include
-
-# Compiler flags.
-CFLAGS = $(CINCS)
-CFLAGS += -O$(OPT)
-CFLAGS += $(DEBUG_FLAGS)
-
-# CFLAGS += -malignment-traps
-CFLAGS += -Wa,-adhlns=$(OBJDIR)/$(notdir $(subst $(suffix $<),.lst,$<))
-CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
-CFLAGS += -ffunction-sections -fdata-sections
-CFLAGS += -finline-limit=1200 --param inline-unit-growth=100
-
-# flags for warnings
-CFLAGS += -Wall -Wextra -Wunused
-CFLAGS += -Wcast-qual
-CFLAGS += -Wcast-align
-CFLAGS += -Wpointer-arith
-CFLAGS += -Wswitch-default
-CFLAGS += -Wredundant-decls -Wmissing-declarations
-CFLAGS += -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS += -Wshadow
-CFLAGS += -Wnested-externs
-
-CFLAGS += $(CSTANDARD)
-CFLAGS += $($(TARGET).CFLAGS) $(USER_CFLAGS) $(BOARD_CFLAGS)
-# on old lpc, avoid using double precision in some geodetic functions
-CFLAGS += -DUSE_SINGLE_PRECISION_LLA_ECEF
-
-# LPC21 doesn't support unaligned data access
-CFLAGS += -DPPRZLINK_UNALIGNED_ACCESS=0
-
-# Assembler flags.
-ASFLAGS = -Wa,-adhlns=$(OBJDIR)/$(notdir $(<:.S=.lst))
-
-#Additional libraries.
-MATH_LIB = -lm
-
-# Linker flags.
-LDFLAGS = -n -nostartfiles -Wl,-Map=$(OBJDIR)/$(TARGET).map,--cref
-LDFLAGS += -lc
-LDFLAGS += $(MATH_LIB)
-LDFLAGS += -lc -lgcc
-LDFLAGS += $(CPLUSPLUS_LIB)
-LDFLAGS += -Wl,--gc-sections
-LDFLAGS += $(BOARD_LDFLAGS)
-
-ifndef LDSCRIPT
-ifeq ($(FLASH_MODE),ISP)
-LDSCRIPT = $(SRC_ARCH)/LPC2148-ROM.ld
-else
-LDSCRIPT = $(SRC_ARCH)/LPC2148-ROM-bl.ld
-endif
-endif
-LDFLAGS +=-T$(LDSCRIPT)
-
-
-
-# ---------------------------------------------------------------------------
-# Flash-Programming support using lpc21isp by Martin Maurer
-
-# Settings and variables:
-LPC21ISP = lpc21isp
-LPC21ISP_PORT ?= /dev/ttyS0
-LPC21ISP_FLASHFILE = $(OBJDIR)/$(TARGET).hex
-# verbose output:
-#LPC21ISP_DEBUG = -debug
-# enter bootloader via RS232 DTR/RTS (only if hardware supports this
-# feature - see Philips AppNote):
-ifndef LPC21ISP_CONTROL
-LPC21ISP_CONTROL =
-# -control
-endif
-
-# ---------------------------------------------------------------------------
-# Flash-Programming support using lpc21iap by Martin Muller (usb bootloader)
-
-LPC21IAP = $(PAPARAZZI_SRC)/sw/ground_segment/lpc21iap/lpc21iap
-
-# ---------------------------------------------------------------------------
-# Flash-Programming support using openocd
-OOCD ?= openocd
-OOCD_INTERFACE = ftdi/olimex-arm-usb-ocd
-OOCD_TARGET = csc
-
-
-# Define all object files.
-COBJ = $(SRC:%.c=$(OBJDIR)/%.o)
-AOBJ = $(ASRC:%.S=$(OBJDIR)/%.o)
-COBJARM = $(SRCARM:%.c=$(OBJDIR)/%.o)
-AOBJARM = $(ASRCARM:%.S=$(OBJDIR)/%.o)
-
-# Define all listing files.
-LST = $(ASRC:.S=.lst) $(ASRCARM:.S=.lst) $(SRC:.c=.lst) $(SRCARM:.c=.lst)
-
-# Compiler flags to generate dependency files.
-GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d
-
-# Combine all necessary flags and optional flags.
-# Add target processor to flags.
-ALL_CFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. $(CFLAGS)
-ALL_ASFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. -x assembler-with-cpp $(ASFLAGS)
-
-# some common informative targets
-include $(PAPARAZZI_SRC)/conf/Makefile.arm-embedded-common
-
-# Default target.
-all: printcommands sizebefore build sizeafter
-
-# depend order only for parallel make
-sizebefore: | printcommands
-build: | printcommands sizebefore
-sizeafter: | build
-
-build: $(OBJDIR) elf hex lss sym
-
-$(OBJDIR):
- @echo CREATING object dir $(OBJDIR)
- @test -d $(OBJDIR) || mkdir -p $(OBJDIR)
-
-elf: $(OBJDIR)/$(TARGET).elf
-hex: $(OBJDIR)/$(TARGET).hex
-lss: $(OBJDIR)/$(TARGET).lss
-sym: $(OBJDIR)/$(TARGET).sym
-
-
-# Program the device.
-upload program: $(OBJDIR)/$(TARGET).hex
-ifeq ($(FLASH_MODE),IAP)
- $(SUDO) $(LPC21IAP) $(OBJDIR)/$(TARGET).elf
-else ifeq ($(FLASH_MODE),JTAG)
- @echo "Using OOCD = $(OOCD)"
- @echo -e " OOCD\t$<"
- $(Q)$(OOCD) -f interface/$(OOCD_INTERFACE).cfg \
- -f board/$(OOCD_TARGET).cfg \
- -c init \
- -c "reset halt" \
- -c "flash write_image erase $(OBJDIR)/$(TARGET).bin 0x08000000" \
- -c reset \
- -c shutdown
-else
- @echo
- $(LPC21ISP) $(LPC21ISP_CONTROL) $(LPC21ISP_DEBUG) $(LPC21ISP_FLASHFILE) $(LPC21ISP_PORT) $(LPC21ISP_BAUD) $(LPC21ISP_XTAL)
-endif
-
-# Create final output files (.hex, .eep) from ELF output file.
-# TODO: handling the .eeprom-section should be redundant
-%.hex: %.elf
- @echo OBJC $@
- $(Q)$(CP) -O $(FORMAT) $< $@
-
-
-# Create extended listing file from ELF output file.
-# testing: option -C
-%.lss: %.elf
- @echo OBJD $@
- $(Q)$(DMP) -h -S -C $< > $@
-
-
-# Create a symbol table from ELF output file.
-%.sym: %.elf
- @echo NM $@
- $(Q)$(NM) -n $< > $@
-
-
-# Link: create ELF output file from object files.
-.SECONDARY : $(OBJDIR)/$(TARGET).elf
-.PRECIOUS : $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ)
-%.elf: $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ)
- @echo LD $@
- $(Q)$(CC) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) --output $@ $(LDFLAGS) $($(TARGET).LDFLAGS)
-
-
-# Compile: create object files from C source files. ARM-only
-$(OBJDIR)/%.o : %.c $(OBJDIR)/../Makefile.ac
- @echo CC $@
- $(Q)test -d $(dir $@) || mkdir -p $(dir $@)
- $(Q)$(CC) -MMD -c $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
-
-$(OBJDIR)/%.o : $(SRC_ARCH)/lpcusb/%.c $(OBJDIR)/../Makefile.ac
- @echo CC $@
- $(Q)$(CC) -MMD -c $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
-
-
-# grab files in var/aircrafts/$(AIRCRAFT)/$(TARGET) aka $(OBJDIR)
-#$(OBJDIR)/%.o : $(OBJDIR)/%.c
-# @echo CC $@
-# $(Q)$(CC) -c $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
-
-# Assemble: create object files from assembler source files. ARM/Thumb
-$(AOBJ) : $(OBJDIR)/%.o : %.S
- @echo AS $@
- $(Q)$(CC) -c $(THUMB) $(ALL_ASFLAGS) $< -o $@
-
-
-# Assemble: create object files from assembler source files. ARM-only
-$(AOBJARM) : $(OBJDIR)/%.o : $(SRC_ARCH)/%.S
- @echo AS $@
- $(Q)$(CC) -c $(ALL_ASFLAGS) $< -o $@
-
-
-# Listing of phony targets.
-.PHONY : all build elf hex lss sym upload program
-
-
-#
-# Dependencies
-#
-
-DEPS = $(addprefix $(OBJDIR)/,$($(TARGET).srcs:.c=.d))
-
-ifneq ($(MAKECMDGOALS),clean)
--include $(DEPS)
-endif
diff --git a/conf/airframes/ENAC/conf_enac.xml b/conf/airframes/ENAC/conf_enac.xml
index d6f93006ec..93db232a27 100644
--- a/conf/airframes/ENAC/conf_enac.xml
+++ b/conf/airframes/ENAC/conf_enac.xml
@@ -76,17 +76,6 @@
settings_modules="modules/guidance_indi.xml modules/stabilization_indi.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/air_data.xml modules/imu_common.xml modules/airspeed_ms45xx_i2c.xml"
gui_color="#ffff7f7f0000"
/>
-
-
diff --git a/conf/airframes/ENAC/fixed-wing/crrcsim.xml b/conf/airframes/ENAC/fixed-wing/crrcsim.xml
index 2ddb405d4e..1120916a3a 100644
--- a/conf/airframes/ENAC/fixed-wing/crrcsim.xml
+++ b/conf/airframes/ENAC/fixed-wing/crrcsim.xml
@@ -1,8 +1,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/ENAC/fixed-wing/firestorm.xml b/conf/airframes/ENAC/fixed-wing/firestorm.xml
deleted file mode 100644
index e609d6614f..0000000000
--- a/conf/airframes/ENAC/fixed-wing/firestorm.xml
+++ /dev/null
@@ -1,223 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/ENAC/fixed-wing/twinjet2.xml b/conf/airframes/ENAC/fixed-wing/twinjet2.xml
deleted file mode 100644
index 9d37a64e6d..0000000000
--- a/conf/airframes/ENAC/fixed-wing/twinjet2.xml
+++ /dev/null
@@ -1,228 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/ENAC/fixed-wing/weasel.xml b/conf/airframes/ENAC/fixed-wing/weasel.xml
deleted file mode 100644
index 013e937dae..0000000000
--- a/conf/airframes/ENAC/fixed-wing/weasel.xml
+++ /dev/null
@@ -1,232 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/ENAC/quadrotor/booz2_g1.xml b/conf/airframes/ENAC/quadrotor/booz2_g1.xml
deleted file mode 100644
index ff1d0e2754..0000000000
--- a/conf/airframes/ENAC/quadrotor/booz2_g1.xml
+++ /dev/null
@@ -1,249 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/OPENUAS/openuas_graupner_taxi_iii.xml b/conf/airframes/OPENUAS/openuas_graupner_taxi_iii.xml
deleted file mode 100644
index 83c127c9d2..0000000000
--- a/conf/airframes/OPENUAS/openuas_graupner_taxi_iii.xml
+++ /dev/null
@@ -1,395 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/OPENUAS/openuas_moksha.xml b/conf/airframes/OPENUAS/openuas_moksha.xml
deleted file mode 100644
index 8c43cd554f..0000000000
--- a/conf/airframes/OPENUAS/openuas_moksha.xml
+++ /dev/null
@@ -1,586 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/OPENUAS/openuas_own_moksha.xml b/conf/airframes/OPENUAS/openuas_own_moksha.xml
deleted file mode 100644
index 058ddc4894..0000000000
--- a/conf/airframes/OPENUAS/openuas_own_moksha.xml
+++ /dev/null
@@ -1,585 +0,0 @@
-
-
-
- Modified Multiplex Xeno (http://www.multiplex-rc.de/)
- TWOG1 (http://paparazziuav.org/wiki/index.php/)
- With modified power routing by a cut PCB trace
-
- DEVICES:
- * CHIMU on SPI
- * XBee XSC 868/900Mhz
- * uBlox LEA5H and Sarantel helix GPS antenna flat in wing
- * Eagletree Airspeed sensor via I2C
- * Eagletree Height (Baro) sensor via I2C
- * Current sensor on analog port
- * RPM sensor for brushless measurments on ESC
- * Tilted Infrared sensor for X,Y,Z still on board for fun to compare with CHIIMU values, not for attitude in AP mode
- * OpenRXSR receiver set to CPPM out
-
-
- BUILDLINE
- make -C $PAPARAZZI_HOME -f Makefile.ac AIRCRAFT=Moksha ap.compile
-
- NOTES:
- To ins_chimu_spi.c modified a line to this one below, since somehow roll and pitch setting where not getting through correctly:
-
- EstimatorSetAtt(CHIMU_DATA.m_attitude.euler.phi+ins_roll_neutral, CHIMU_DATA.m_attitude.euler.psi, CHIMU_DATA.m_attitude.euler.theta+ins_pitch_neutral);
-
- To test the "hatch" function we use bright lights, easy to spot from the
- ground, e.g for a droptest without dropping a thing...
- Ofcourse, also the log will show where a payload would have been released
- but lights are much more fun, and good for instant human feedback without the payload retrieval walk.
-
- NOTES:
- + Using Total Energy control as control loop
- + Make sure v5.14 or master of PPRZ sourcecode is used
- + Used mac06a.xml airframe as starting point for payload release settings
-
- WIP:
- + Current sensor on battery wires going to motor
- + geo_mag module fixedwing
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/PPZUAV/fixed-wing/ppzimu_tiny.xml b/conf/airframes/PPZUAV/fixed-wing/ppzimu_tiny.xml
deleted file mode 100644
index a32938be62..0000000000
--- a/conf/airframes/PPZUAV/fixed-wing/ppzimu_tiny.xml
+++ /dev/null
@@ -1,238 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/examples/Twinstar_energyadaptive.xml b/conf/airframes/examples/Twinstar_energyadaptive.xml
deleted file mode 100644
index 4fbb378b7d..0000000000
--- a/conf/airframes/examples/Twinstar_energyadaptive.xml
+++ /dev/null
@@ -1,264 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/examples/booz2.xml b/conf/airframes/examples/booz2.xml
deleted file mode 100644
index 960af56265..0000000000
--- a/conf/airframes/examples/booz2.xml
+++ /dev/null
@@ -1,193 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/examples/easystar_ets.xml b/conf/airframes/examples/easystar_ets.xml
deleted file mode 100644
index 4df3ef533a..0000000000
--- a/conf/airframes/examples/easystar_ets.xml
+++ /dev/null
@@ -1,182 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/examples/logomatic.xml b/conf/airframes/examples/logomatic.xml
deleted file mode 100644
index 18e41ef4d8..0000000000
--- a/conf/airframes/examples/logomatic.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/examples/microjet.xml b/conf/airframes/examples/microjet.xml
deleted file mode 100644
index b06480e084..0000000000
--- a/conf/airframes/examples/microjet.xml
+++ /dev/null
@@ -1,219 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/examples/microjet_twog_aspirin.xml b/conf/airframes/examples/microjet_twog_aspirin.xml
deleted file mode 100644
index 81b36cc47c..0000000000
--- a/conf/airframes/examples/microjet_twog_aspirin.xml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/examples/quadrotor_hbmini.xml b/conf/airframes/examples/quadrotor_hbmini.xml
deleted file mode 100644
index 18d39fb254..0000000000
--- a/conf/airframes/examples/quadrotor_hbmini.xml
+++ /dev/null
@@ -1,220 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/examples/quadrotor_navgo.xml b/conf/airframes/examples/quadrotor_navgo.xml
deleted file mode 100644
index 297e3f7c0b..0000000000
--- a/conf/airframes/examples/quadrotor_navgo.xml
+++ /dev/null
@@ -1,257 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/examples/twinjet.xml b/conf/airframes/examples/twinjet.xml
deleted file mode 100644
index e6132766d0..0000000000
--- a/conf/airframes/examples/twinjet.xml
+++ /dev/null
@@ -1,184 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/examples/twog_analogimu.xml b/conf/airframes/examples/twog_analogimu.xml
deleted file mode 100644
index 6a9f48d895..0000000000
--- a/conf/airframes/examples/twog_analogimu.xml
+++ /dev/null
@@ -1,215 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/examples/umarim_lite_v2.xml b/conf/airframes/examples/umarim_lite_v2.xml
deleted file mode 100644
index 04fb978864..0000000000
--- a/conf/airframes/examples/umarim_lite_v2.xml
+++ /dev/null
@@ -1,174 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/examples/yapaChimuSpi.xml b/conf/airframes/examples/yapaChimuSpi.xml
deleted file mode 100644
index ef5cef03cd..0000000000
--- a/conf/airframes/examples/yapaChimuSpi.xml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/tudelft/yapa_xsens.xml b/conf/airframes/tudelft/yapa_xsens.xml
deleted file mode 100644
index 7fcea5fd20..0000000000
--- a/conf/airframes/tudelft/yapa_xsens.xml
+++ /dev/null
@@ -1,209 +0,0 @@
-
-
-
-
-YAPA + XSens + XBee
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/untested/delta_wing_minimal.xml b/conf/airframes/untested/delta_wing_minimal.xml
deleted file mode 100644
index 03ee569092..0000000000
--- a/conf/airframes/untested/delta_wing_minimal.xml
+++ /dev/null
@@ -1,156 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/untested/demo.xml b/conf/airframes/untested/demo.xml
deleted file mode 100644
index e8aad75698..0000000000
--- a/conf/airframes/untested/demo.xml
+++ /dev/null
@@ -1,150 +0,0 @@
-
-
-
-
-ARCH=lpc21
-
-FLASH_MODE = IAP
-
-
-#
-# simple emtpy demo
-#
-demo1.ARCHDIR = $(ARCH)
-
-demo1.CFLAGS += -DBOARD_CONFIG=\"conf_demo.h\"
-demo1.srcs = main_demo1.c
-
-#
-# hardware init ( pll ), system time and LEDs
-#
-demo2.ARCHDIR = $(ARCH)
-
-demo2.CFLAGS += -DBOARD_CONFIG=\"conf_demo.h\"
-demo2.srcs = main_demo2.c
-
-demo2.CFLAGS += -DPERIODIC_FREQUENCY='100.'
-demo2.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c
-
-demo2.CFLAGS += -DUSE_LED
-
-#
-# UART (interrupts) and formated ascii printing
-#
-demo3.ARCHDIR = $(ARCH)
-
-demo3.CFLAGS += -DBOARD_CONFIG=\"conf_demo.h\"
-demo3.srcs = main_demo3.c
-
-demo3.CFLAGS += -DPERIODIC_FREQUENCY='10.'
-demo3.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c
-
-demo3.CFLAGS += -DUSE_LED
-
-demo3.srcs += $(SRC_ARCH)/armVIC.c
-
-demo3.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B38400
-demo3.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
-
-#
-# DOWNLINK : send formated messages according to messages.xml description
-# requires "link" to run on the other side of the serial link
-#
-demo4.ARCHDIR = $(ARCH)
-
-demo4.CFLAGS += -DBOARD_CONFIG=\"conf_demo.h\"
-demo4.srcs = main_demo4.c
-
-demo4.CFLAGS += -DPERIODIC_FREQUENCY='100.'
-demo4.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c
-
-demo4.CFLAGS += -DUSE_LED
-
-demo4.srcs += $(SRC_ARCH)/armVIC.c
-
-demo4.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B38400
-demo4.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
-
-demo4.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=uart0
-demo4.srcs += modules/datalink/downlink.c modules/datalink/pprz_transport.c
-
-#
-# DATALINK : receives datalink messages. demonstrates the "settings" service
-# which lets you adjust variables described in the settings.xml file
-# IvySendMsg("1ME RAW_DATALINK 144 SETTING;0;0;%d", foo_value);
-#
-demo5.ARCHDIR = $(ARCH)
-
-demo5.CFLAGS += -DBOARD_CONFIG=\"conf_demo.h\"
-demo5.srcs = main_demo5.c
-
-demo5.CFLAGS += -DPERIODIC_FREQUENCY='100.'
-demo5.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c
-
-demo5.CFLAGS += -DUSE_LED
-
-demo5.srcs += $(SRC_ARCH)/armVIC.c
-
-demo5.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B38400
-demo5.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
-
-demo5.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=uart0
-demo5.srcs += modules/datalink/downlink.c modules/datalink/pprz_transport.c
-
-demo5.CFLAGS += -DDATALINK=PPRZ -DPPRZ_UART=uart0
-
-
-#
-# Serial link over USB
-#
-demo6.ARCHDIR = $(ARCH)
-
-demo6.CFLAGS += -DBOARD_CONFIG=\"conf_demo.h\"
-demo6.srcs = main_demo6.c
-
-demo6.CFLAGS += -DPERIODIC_FREQUENCY='100.'
-demo6.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c
-
-demo6.CFLAGS += -DUSE_LED
-
-demo6.srcs += $(SRC_ARCH)/armVIC.c
-
-demo6.CFLAGS += -DUSE_USB_SERIAL
-#demo6.LDFLAGS += -L$(SRC_ARCH)/lpcusb -lusbstack
-demo6.srcs += $(SRC_ARCH)/lpcusb/usbhw_lpc.c $(SRC_ARCH)/lpcusb/usbcontrol.c $(SRC_ARCH)/lpcusb/usbstdreq.c $(SRC_ARCH)/lpcusb/usbinit.c
-demo6.srcs += $(SRC_ARCH)/usb_ser_hw.c
-
-demo6.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=usb_serial
-demo6.srcs += modules/datalink/downlink.c modules/datalink/pprz_transport.c
-
-//demo6.CFLAGS += -DDATALINK=PPRZ -DPPRZ_UART=uart0
-
-
-
-#
-#
-#
-test_spk.ARCHDIR = $(ARCH)
-
-test_spk.CFLAGS += -DBOARD_CONFIG=\"booz2_board_usb.h\"
-test_spk.srcs = main_test_spk.c
-
-test_spk.CFLAGS += -DPERIODIC_FREQUENCY='512.'
-test_spk.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c
-
-test_spk.CFLAGS += -DUSE_LED
-
-test_spk.srcs += $(SRC_ARCH)/armVIC.c
-
-test_spk.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DUSE_USB_SERIAL
-test_spk.CFLAGS += -DDOWNLINK_DEVICE=usb_serial -DPPRZ_UART=usb_serial -DDATALINK=PPRZ
-test_spk.srcs += modules/datalink/downlink.c $(SRC_ARCH)/usb_ser_hw.c modules/datalink/pprz_transport.c
-test_spk.srcs += $(SRC_ARCH)/lpcusb/usbhw_lpc.c $(SRC_ARCH)/lpcusb/usbcontrol.c
-test_spk.srcs += $(SRC_ARCH)/lpcusb/usbstdreq.c $(SRC_ARCH)/lpcusb/usbinit.c
-
-test_spk.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B115200
-test_spk.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
-
-
-
-
diff --git a/conf/airframes/untested/easy_glider.xml b/conf/airframes/untested/easy_glider.xml
deleted file mode 100644
index 864a239f11..0000000000
--- a/conf/airframes/untested/easy_glider.xml
+++ /dev/null
@@ -1,190 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/untested/easystar.xml b/conf/airframes/untested/easystar.xml
deleted file mode 100644
index 6193716f75..0000000000
--- a/conf/airframes/untested/easystar.xml
+++ /dev/null
@@ -1,164 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/untested/funjet.xml b/conf/airframes/untested/funjet.xml
deleted file mode 100644
index 6fab6a4e55..0000000000
--- a/conf/airframes/untested/funjet.xml
+++ /dev/null
@@ -1,187 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/untested/funjet_cam.xml b/conf/airframes/untested/funjet_cam.xml
deleted file mode 100644
index 8ba7e5d214..0000000000
--- a/conf/airframes/untested/funjet_cam.xml
+++ /dev/null
@@ -1,195 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/untested/logger_sd.xml b/conf/airframes/untested/logger_sd.xml
deleted file mode 100644
index f4f63de1b0..0000000000
--- a/conf/airframes/untested/logger_sd.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/untested/turntable.xml b/conf/airframes/untested/turntable.xml
deleted file mode 100644
index 208901a6b0..0000000000
--- a/conf/airframes/untested/turntable.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-ARCH=lpc21
-
-FLASH_MODE = IAP
-
-MB=firmwares/motor_bench
-
-main.ARCHDIR = $(ARCH)
-
-# uncomment the next line to set the number of steps the encoder has (default 256)
-#main.CFLAGS += -DNB_STEP=256
-
-main.CFLAGS += -DBOARD_CONFIG=\"boards/olimex_lpc_h2148.h\" -I$(MB)
-main.CFLAGS += -DPERIPHERALS_AUTO_INIT
-main.srcs = $(MB)/main_turntable.c
-main.srcs += $(SRC_ARCH)/armVIC.c
-main.srcs += mcu.c
-main.srcs += $(SRC_ARCH)/mcu_arch.c
-
-main.CFLAGS += -DUSE_LED
-main.CFLAGS += -DPERIODIC_FREQUENCY='512.' -DSYS_TIME_LED=1
-main.srcs += mcu_periph/sys_time.c $(MB)/turntable_systime.c
-
-main.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B115200
-main.srcs += mcu_periph/uart.c
-main.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
-main.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=uart0
-
-main.srcs += modules/datalink/downlink.c modules/datalink/pprz_transport.c
-
-
-
-
diff --git a/conf/airframes/untested/turntable_usb.xml b/conf/airframes/untested/turntable_usb.xml
deleted file mode 100644
index fe70290499..0000000000
--- a/conf/airframes/untested/turntable_usb.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-ARCH=lpc21
-
-FLASH_MODE = IAP
-
-MB=firmwares/motor_bench
-
-main.ARCHDIR = $(ARCH)
-
-# uncomment the next line to set the number of steps the encoder has (default 256)
-#main.CFLAGS += -DNB_STEP=256
-
-main.CFLAGS += -DBOARD_CONFIG=\"boards/olimex_lpc_h2148.h\" -I$(MB)
-main.CFLAGS += -DPERIPHERALS_AUTO_INIT
-main.srcs = $(MB)/main_turntable.c
-main.srcs += $(SRC_ARCH)/armVIC.c
-main.srcs += mcu.c
-main.srcs += $(SRC_ARCH)/mcu_arch.c
-
-main.CFLAGS += -DUSE_LED
-main.CFLAGS += -DPERIODIC_FREQUENCY='512.' -DSYS_TIME_LED=1
-main.srcs += mcu_periph/sys_time.c $(MB)/turntable_systime.c
-
-main.CFLAGS += -DUSE_USB_SERIAL
-main.srcs += $(SRC_ARCH)/usb_ser_hw.c
-main.srcs += $(SRC_ARCH)/lpcusb/usbhw_lpc.c $(SRC_ARCH)/lpcusb/usbinit.c
-main.srcs += $(SRC_ARCH)/lpcusb/usbcontrol.c $(SRC_ARCH)/lpcusb/usbstdreq.c
-main.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=usb_serial
-
-main.srcs += modules/datalink/downlink.c modules/datalink/pprz_transport.c
-
-
-
-
diff --git a/conf/airframes/untested/twinjet_overo.xml b/conf/airframes/untested/twinjet_overo.xml
deleted file mode 100644
index 47f0365970..0000000000
--- a/conf/airframes/untested/twinjet_overo.xml
+++ /dev/null
@@ -1,187 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/untested/twinstar.xml b/conf/airframes/untested/twinstar.xml
deleted file mode 100644
index 4c9506894b..0000000000
--- a/conf/airframes/untested/twinstar.xml
+++ /dev/null
@@ -1,201 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/airframes/untested/wind_tunnel.xml b/conf/airframes/untested/wind_tunnel.xml
deleted file mode 100644
index af1a7773e0..0000000000
--- a/conf/airframes/untested/wind_tunnel.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-
-
-
-
-ARCH=lpc21
-
-FLASH_MODE = IAP
-
-
-WIND_TUNNEL=wind_tunnel
-
-ap.ARCHDIR = $(ARCH)
-
-ap.CFLAGS += -DBOARD_CONFIG=\"conf_demo.h\" -I$(WIND_TUNNEL)
-ap.srcs = $(WIND_TUNNEL)/main.c
-
-ap.CFLAGS += -DPERIODIC_FREQUENCY='10.'
-ap.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c
-
-ap.CFLAGS += -DUSE_LED
-
-ap.srcs += $(SRC_ARCH)/armVIC.c
-
-ap.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B38400
-ap.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
-
-ap.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=uart0
-ap.srcs += modules/datalink/downlink.c modules/datalink/pprz_transport.c
-
-ap.CFLAGS += -DDATALINK=PPRZ -DPPRZ_UART=uart0
-#ap.srcs += $(BOOZ)/booz_datalink.c
-
-ap.srcs += $(WIND_TUNNEL)/wt_servo.c
-
-
-#
-#
-#
-
-MB=motor_bench
-
-mb.ARCHDIR = $(ARCH)
-
-mb.CFLAGS += -DBOARD_CONFIG=\"conf_demo.h\" -I$(WIND_TUNNEL) -I$(MB)
-mb.srcs = $(WIND_TUNNEL)/main_mb.c
-
-mb.CFLAGS += -DPERIODIC_FREQUENCY='100.'
-mb.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c
-
-mb.CFLAGS += -DUSE_LED
-
-mb.srcs += $(SRC_ARCH)/armVIC.c
-
-mb.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B38400
-mb.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
-
-mb.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=uart0
-mb.srcs += modules/datalink/downlink.c modules/datalink/pprz_transport.c
-
-mb.CFLAGS += -DDATALINK=PPRZ -DPPRZ_UART=uart0
-
-mb.srcs += $(WIND_TUNNEL)/wt_servo.c
-
-mb.CFLAGS += -DUSE_TWI_CONTROLLER
-mb.CFLAGS += -DI2C_SCLL=100 -DI2C_SCLH=100
-mb.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c $(MB)/mb_twi_controller_mkk.c
-
-mb.CFLAGS += -DMB_TACHO
-mb.srcs += $(MB)/mb_tacho.c
-
-#mb.CFLAGS += -DADC -DUSE_ADC_0 -DUSE_ADC_1
-#mb.srcs += $(SRC_ARCH)/adc_hw.c
-#mb.srcs += $(MB)/mb_current.c
-
-
-
-
-
-
-
-
diff --git a/conf/boards/booz_1.0.makefile b/conf/boards/booz_1.0.makefile
deleted file mode 100644
index 3593821abf..0000000000
--- a/conf/boards/booz_1.0.makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# booz_1.0.makefile
-#
-# http://wiki.paparazziuav.org/wiki/Booz
-#
-ARCH=lpc21
-BOARD=booz
-BOARD_VERSION=1.0
-BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
-
-FLASH_MODE ?= IAP
-
-#
-#
-# some default values shared between different firmwares
-#
-#
-
-#
-# default LED configuration
-#
-RADIO_CONTROL_LED ?= 1
-BARO_LED ?= 2
-AHRS_ALIGNER_LED ?= 3
-GPS_LED ?= 4
-SYS_TIME_LED ?= none
-
-RADIO_CONTROL_LINK = UART0
-
-
-MODEM_PORT ?= UART1
-MODEM_BAUD ?= B57600
-
-GPS_PORT ?= UART0
-GPS_BAUD ?= B38400
-
diff --git a/conf/boards/hb_1.1.makefile b/conf/boards/hb_1.1.makefile
deleted file mode 100644
index 1ef9841ffe..0000000000
--- a/conf/boards/hb_1.1.makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# hb_1.1.makefile
-#
-# http://wiki.paparazziuav.org/wiki/HB_v1
-#
-ARCH=lpc21
-BOARD=hb
-BOARD_VERSION=1.1
-BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
-
-FLASH_MODE ?= IAP
-
-#
-#
-# some default values shared between different firmwares
-#
-#
-
-#
-# default LED configuration
-#
-RADIO_CONTROL_LED ?= none
-BARO_LED ?= none
-AHRS_ALIGNER_LED ?= none
-GPS_LED ?= 2
-SYS_TIME_LED ?= 1
-
-
-RADIO_CONTROL_LINK = UART0
-
-#
-# default UART configuration
-#
-MODEM_PORT ?= UART0
-MODEM_BAUD ?= B57600
-
-GPS_PORT ?= UART1
-GPS_BAUD ?= B38400
-
-
-$(TARGET).ARCHDIR = $(ARCH)
diff --git a/conf/boards/hbmini_1.0.makefile b/conf/boards/hbmini_1.0.makefile
deleted file mode 100644
index aecc487225..0000000000
--- a/conf/boards/hbmini_1.0.makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# hbmini_1.0.makefile
-#
-# prototype for HBMini board
-#
-
-ARCH=lpc21
-
-BOARD=hbmini
-BOARD_VERSION=1.0
-
-BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
-
-FLASH_MODE ?= IAP
-
-
-LPC21ISP_BAUD = 38400
-LPC21ISP_XTAL = 12000
-
-
-#
-# default LED configuration
-#
-RADIO_CONTROL_LED ?= none
-BARO_LED ?= none
-AHRS_ALIGNER_LED ?= none
-GPS_LED ?= none
-SYS_TIME_LED ?= none
-
-
-#
-# default uart settings
-#
-MODEM_PORT ?= UART0
-MODEM_BAUD ?= B57600
-
-GPS_PORT ?= UART1
-GPS_BAUD ?= B38400
-
-# All targets on the HBMini board run on the same processor achitecture
-$(TARGET).ARCHDIR = $(ARCH)
-
diff --git a/conf/boards/logom_2.6.makefile b/conf/boards/logom_2.6.makefile
deleted file mode 100644
index 660b944cec..0000000000
--- a/conf/boards/logom_2.6.makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# logom_2.6.makefile
-#
-# http://www.sparkfun.com/products/10216
-#
-
-ARCH=lpc21
-
-BOARD=logom
-BOARD_VERSION=2.6
-
-BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
-
-FLASH_MODE ?= IAP
-
-
-LPC21ISP_BAUD = 38400
-LPC21ISP_XTAL = 12000
-
-
-# All targets on the board run on the same processor achitecture
-$(TARGET).ARCHDIR = $(ARCH)
-
diff --git a/conf/boards/navgo_1.0.makefile b/conf/boards/navgo_1.0.makefile
deleted file mode 100644
index ca00d8f785..0000000000
--- a/conf/boards/navgo_1.0.makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# navgo_1.0.makefile
-#
-# prototype for NavGo board
-#
-
-ARCH=lpc21
-
-BOARD=navgo
-BOARD_VERSION=1.0
-
-BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
-
-FLASH_MODE ?= IAP
-
-
-LPC21ISP_BAUD = 38400
-LPC21ISP_XTAL = 12000
-
-
-#
-# default LED configuration
-#
-RADIO_CONTROL_LED ?= 1
-BARO_LED ?= 2
-AHRS_ALIGNER_LED ?= 3
-GPS_LED ?= 4
-SYS_TIME_LED ?= none
-
-
-#
-# default uart settings
-#
-MODEM_PORT ?= UART1
-MODEM_BAUD ?= B57600
-
-GPS_PORT ?= UART0
-GPS_BAUD ?= B38400
-
-# All targets on the NavGo board run on the same processor achitecture
-$(TARGET).ARCHDIR = $(ARCH)
-
diff --git a/conf/boards/sdlog_1.0.makefile b/conf/boards/sdlog_1.0.makefile
deleted file mode 100644
index ea9f99cc0d..0000000000
--- a/conf/boards/sdlog_1.0.makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# sdlog_1.0.makefile
-#
-# Paparazzi SD Logger
-#
-
-
-include $(PAPARAZZI_SRC)/conf/boards/tiny_2.11.makefile
-
-BOARD=sdlog
-BOARD_VERSION=1.0
-
-BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
diff --git a/conf/boards/tiny_0.99.makefile b/conf/boards/tiny_0.99.makefile
deleted file mode 100644
index f5a2b42af6..0000000000
--- a/conf/boards/tiny_0.99.makefile
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# tiny_0.99.makefile
-#
-# http://wiki.paparazziuav.org/wiki/Tiny_v0.99
-#
-
-ARCH=lpc21
-
-BOARD=tiny
-BOARD_VERSION=0.99
-
-BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
-
-# default flash mode is via usb bootloader
-FLASH_MODE ?= IAP
-
-LPC21ISP_BAUD = 38400
-LPC21ISP_XTAL = 12000
-
-#
-# default LED configuration
-#
-RADIO_CONTROL_LED ?= none
-BARO_LED ?= none
-AHRS_ALIGNER_LED ?= none
-GPS_LED ?= none
-SYS_TIME_LED ?= none
-
-
-#
-# default uart settings
-#
-MODEM_PORT ?= UART0
-MODEM_BAUD ?= B57600
-
-GPS_PORT ?= UART1
-GPS_BAUD ?= B38400
-
-
-#
-# you can use different actuators by adding a configure option to your firmware section
-# e.g.
-#
-ACTUATORS ?= actuators_4015
-
-# All targets on the TINY board run on the same processor achitecture
-$(TARGET).ARCHDIR = $(ARCH)
diff --git a/conf/boards/tiny_1.1.makefile b/conf/boards/tiny_1.1.makefile
deleted file mode 100644
index 31ac33fb95..0000000000
--- a/conf/boards/tiny_1.1.makefile
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# tiny_1.1.makefile
-#
-# http://wiki.paparazziuav.org/wiki/Tiny_v1.1
-#
-ARCH=lpc21
-
-
-BOARD=tiny
-BOARD_VERSION=1.1
-
-BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
-
-# default flash mode is via usb bootloader
-FLASH_MODE ?= IAP
-
-
-LPC21ISP_BAUD = 38400
-LPC21ISP_XTAL = 12000
-
-#
-# default LED configuration
-#
-RADIO_CONTROL_LED ?= none
-BARO_LED ?= none
-AHRS_ALIGNER_LED ?= none
-GPS_LED ?= none
-SYS_TIME_LED ?= none
-
-TUNNEL_RX_LED ?= 1
-TUNNEL_TX_LED ?= 2
-
-
-#
-# default uart settings
-#
-MODEM_PORT ?= UART0
-MODEM_BAUD ?= B57600
-
-GPS_PORT ?= UART1
-GPS_BAUD ?= B38400
-
-#
-# you can use different actuators by adding a configure option to your firmware section
-# e.g.
-#
-ACTUATORS ?= actuators_4015
-
-
-# All targets on the TINY board run on the same processor achitecture
-$(TARGET).ARCHDIR = $(ARCH)
diff --git a/conf/boards/tiny_2.1.makefile b/conf/boards/tiny_2.1.makefile
deleted file mode 100644
index fbf0a72706..0000000000
--- a/conf/boards/tiny_2.1.makefile
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# tiny_2.1.makefile
-#
-# http://wiki.paparazziuav.org/wiki/Tiny_v2
-#
-
-ARCH=lpc21
-
-BOARD=tiny
-BOARD_VERSION=2.1
-
-BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
-
-# default flash mode is via usb bootloader
-FLASH_MODE ?= IAP
-
-
-LPC21ISP_BAUD = 38400
-LPC21ISP_XTAL = 12000
-
-#
-# default LED configuration
-#
-RADIO_CONTROL_LED ?= none
-BARO_LED ?= none
-AHRS_ALIGNER_LED ?= none
-GPS_LED ?= 2
-SYS_TIME_LED ?= none
-
-
-#
-# default uart settings
-#
-MODEM_PORT ?= UART1
-MODEM_BAUD ?= B57600
-
-GPS_PORT ?= UART0
-GPS_BAUD ?= B38400
-
-#
-# you can use different actuators by adding a configure option to your firmware section
-# e.g.
-#
-ACTUATORS ?= actuators_4017
-
-# All targets on the TINY board run on the same processor achitecture
-$(TARGET).ARCHDIR = $(ARCH)
diff --git a/conf/boards/tiny_2.11.makefile b/conf/boards/tiny_2.11.makefile
deleted file mode 100644
index c1138c440c..0000000000
--- a/conf/boards/tiny_2.11.makefile
+++ /dev/null
@@ -1,52 +0,0 @@
-#
-# tiny_2.11.makefile
-#
-# http://wiki.paparazziuav.org/wiki/Tiny_v2
-#
-
-ARCH=lpc21
-
-BOARD=tiny
-BOARD_VERSION=2.11
-
-BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
-
-
-# default flash mode is via usb bootloader
-FLASH_MODE ?= IAP
-
-
-LPC21ISP_BAUD = 38400
-LPC21ISP_XTAL = 12000
-
-#
-# default LED configuration
-#
-RADIO_CONTROL_LED ?= none
-BARO_LED ?= none
-AHRS_ALIGNER_LED ?= none
-GPS_LED ?= 2
-SYS_TIME_LED ?= none
-
-
-#
-# default uart settings
-#
-MODEM_PORT ?= UART1
-MODEM_BAUD ?= B57600
-
-GPS_PORT ?= UART0
-GPS_BAUD ?= B38400
-
-
-#
-# you can use different actuators by adding a configure option to your firmware section
-# e.g.
-#
-ACTUATORS ?= actuators_4017
-
-
-# All targets on the TINY board run on the same processor achitecture
-$(TARGET).ARCHDIR = $(ARCH)
diff --git a/conf/boards/twog_1.0.makefile b/conf/boards/twog_1.0.makefile
deleted file mode 100644
index e3bc637cf6..0000000000
--- a/conf/boards/twog_1.0.makefile
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# twog_1.0.makefile
-#
-# http://wiki.paparazziuav.org/wiki/Twog_v1
-#
-
-ARCH=lpc21
-
-BOARD=twog
-BOARD_VERSION=1.0
-
-BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
-
-# default flash mode is via usb bootloader
-FLASH_MODE ?= IAP
-
-
-LPC21ISP_BAUD = 38400
-LPC21ISP_XTAL = 12000
-
-#
-# default LED configuration
-#
-RADIO_CONTROL_LED ?= none
-BARO_LED ?= none
-AHRS_ALIGNER_LED ?= none
-GPS_LED ?= 2
-SYS_TIME_LED ?= none
-
-
-#
-# default uart settings
-#
-MODEM_PORT ?= UART1
-MODEM_BAUD ?= B57600
-
-GPS_PORT ?= UART0
-GPS_BAUD ?= B38400
-
-#
-# you can use different actuators by adding a configure option to your firmware section
-# e.g.
-#
-ACTUATORS ?= actuators_4017
-
-
-# All targets on the TINY board run on the same processor achitecture
-$(TARGET).ARCHDIR = $(ARCH)
diff --git a/conf/boards/umarim_1.0.makefile b/conf/boards/umarim_1.0.makefile
deleted file mode 100644
index 35cfe4c548..0000000000
--- a/conf/boards/umarim_1.0.makefile
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# unami_1.0.makefile
-#
-# Umarim v1 board
-#
-
-ARCH=lpc21
-
-BOARD=umarim
-BOARD_VERSION=1.0
-
-BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
-
-
-# default flash mode is via usb bootloader
-FLASH_MODE = IAP
-
-
-LPC21ISP_BAUD = 38400
-LPC21ISP_XTAL = 12000
-
-
-#
-# default LED configuration
-#
-RADIO_CONTROL_LED ?= none
-BARO_LED ?= none
-AHRS_ALIGNER_LED ?= none
-GPS_LED ?= 2
-SYS_TIME_LED ?= 1
-
-
-#
-# default uart settings
-#
-MODEM_PORT ?= UART1
-MODEM_BAUD ?= B57600
-
-GPS_PORT ?= UART0
-GPS_BAUD ?= B38400
-
-#
-# you can use different actuators by adding a configure option to your firmware section
-# e.g.
-#
-ACTUATORS ?= actuators_4017
-
-# All targets on the Umarim board run on the same processor achitecture
-$(TARGET).ARCHDIR = $(ARCH)
diff --git a/conf/boards/umarim_lite_2.0.makefile b/conf/boards/umarim_lite_2.0.makefile
deleted file mode 100644
index b5d08517cc..0000000000
--- a/conf/boards/umarim_lite_2.0.makefile
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# umarim_lite_2.0.makefile
-#
-# Umarim Lite v2 board
-#
-
-ARCH=lpc21
-
-BOARD=umarim
-BOARD_VERSION=lite_2.0
-
-BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
-
-# default flash mode is via usb bootloader
-FLASH_MODE ?= IAP
-
-LPC21ISP_BAUD = 38400
-LPC21ISP_XTAL = 12000
-
-
-#
-# default LED configuration
-#
-RADIO_CONTROL_LED ?= none
-BARO_LED ?= none
-AHRS_ALIGNER_LED ?= none
-GPS_LED ?= 2
-SYS_TIME_LED ?= 1
-
-
-#
-# default uart settings
-#
-MODEM_PORT ?= UART1
-MODEM_BAUD ?= B57600
-
-GPS_PORT ?= UART0
-GPS_BAUD ?= B38400
-
-#
-# you can use different actuators by adding a configure option to your firmware section
-# e.g.
-#
-ACTUATORS ?= actuators_4017
-
-# All targets on the Umarim board run on the same processor achitecture
-$(TARGET).ARCHDIR = $(ARCH)
diff --git a/conf/boards/yapa_2.0.makefile b/conf/boards/yapa_2.0.makefile
deleted file mode 100644
index 481b869435..0000000000
--- a/conf/boards/yapa_2.0.makefile
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# yapa_2.0.makefile
-#
-# http://wiki.paparazziuav.org/wiki/YAPA/v2.0
-#
-
-ARCH=lpc21
-
-BOARD=yapa
-BOARD_VERSION=2.0
-
-BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
-
-# default flash mode is via usb bootloader
-FLASH_MODE ?= IAP
-
-LPC21ISP_BAUD = 38400
-LPC21ISP_XTAL = 12000
-
-#
-# default LED configuration
-#
-RADIO_CONTROL_LED ?= none
-BARO_LED ?= none
-AHRS_ALIGNER_LED ?= none
-GPS_LED ?= 2
-SYS_TIME_LED ?= 1
-
-
-#
-# default uart settings
-#
-MODEM_PORT ?= UART1
-MODEM_BAUD ?= B57600
-
-GPS_PORT ?= UART0
-GPS_BAUD ?= B38400
-
-#
-# you can use different actuators by adding a configure option to your firmware section
-# e.g.
-#
-ACTUATORS ?= actuators_4017
-
-# All targets on the TINY board run on the same processor achitecture
-$(TARGET).ARCHDIR = $(ARCH)
diff --git a/conf/conf_example.xml b/conf/conf_example.xml
index 2b82dfbeb0..e6e8993656 100644
--- a/conf/conf_example.xml
+++ b/conf/conf_example.xml
@@ -54,17 +54,6 @@
settings_modules="modules/digital_cam.xml modules/light.xml modules/gps_ubx_ucenter.xml modules/geo_mag.xml modules/air_data.xml modules/gps.xml modules/nav_basic_fw.xml modules/guidance_energy.xml modules/stabilization_attitude_fw.xml modules/ahrs_int_cmpl_quat.xml modules/imu_common.xml"
gui_color="#ffffffffffff"
/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -25,20 +11,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/joystick/xbox_booz_nav.xml b/conf/joystick/xbox_booz_nav.xml
deleted file mode 100644
index 0497aba173..0000000000
--- a/conf/joystick/xbox_booz_nav.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/modules/actuators_4015.xml b/conf/modules/actuators_4015.xml
deleted file mode 100644
index d94735f0db..0000000000
--- a/conf/modules/actuators_4015.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
- Actuators Driver using a 4015
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/modules/actuators_4017.xml b/conf/modules/actuators_4017.xml
deleted file mode 100644
index 5b246101af..0000000000
--- a/conf/modules/actuators_4017.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
- Actuators Driver using a 4017 chip
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/modules/actuators_ardrone2.xml b/conf/modules/actuators_ardrone2.xml
index 63a1c99d19..ac0342803b 100644
--- a/conf/modules/actuators_ardrone2.xml
+++ b/conf/modules/actuators_ardrone2.xml
@@ -16,5 +16,9 @@
+
+
+
+
diff --git a/conf/modules/actuators_asctec.xml b/conf/modules/actuators_asctec.xml
index c947099f6e..3d631243e1 100644
--- a/conf/modules/actuators_asctec.xml
+++ b/conf/modules/actuators_asctec.xml
@@ -10,7 +10,6 @@
- command_laws section to map motor_mixing commands to servos
-
@@ -21,8 +20,6 @@
-
-
diff --git a/conf/modules/actuators_asctec_v2.xml b/conf/modules/actuators_asctec_v2.xml
index 54430ed2fc..ef2fd7af44 100644
--- a/conf/modules/actuators_asctec_v2.xml
+++ b/conf/modules/actuators_asctec_v2.xml
@@ -10,7 +10,6 @@
- command_laws section to map motor_mixing commands to servos
-
@@ -21,8 +20,6 @@
-
-
diff --git a/conf/modules/actuators_asctec_v2_new.xml b/conf/modules/actuators_asctec_v2_new.xml
index 1c446674c9..117d5d6223 100644
--- a/conf/modules/actuators_asctec_v2_new.xml
+++ b/conf/modules/actuators_asctec_v2_new.xml
@@ -10,7 +10,6 @@
- command_laws section to map motor_mixing commands to servos
-
@@ -21,8 +20,6 @@
-
-
diff --git a/conf/modules/actuators_mkk.xml b/conf/modules/actuators_mkk.xml
index c1be71aa98..e66e100fba 100644
--- a/conf/modules/actuators_mkk.xml
+++ b/conf/modules/actuators_mkk.xml
@@ -11,7 +11,6 @@
- command_laws section to map motor_mixing commands to servos (max command = 255)
-
@@ -27,8 +26,6 @@
-
-
diff --git a/conf/modules/actuators_mkk_v2.xml b/conf/modules/actuators_mkk_v2.xml
index a0c8a360b5..2a35cb7682 100644
--- a/conf/modules/actuators_mkk_v2.xml
+++ b/conf/modules/actuators_mkk_v2.xml
@@ -11,7 +11,6 @@
- command_laws section to map motor_mixing commands to servos (max command = 255)
-
@@ -27,8 +26,6 @@
-
-
diff --git a/conf/modules/actuators_skiron.xml b/conf/modules/actuators_skiron.xml
deleted file mode 100644
index 034a5e5a49..0000000000
--- a/conf/modules/actuators_skiron.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
- Actuators Driver for Skiron ESC
-
- required xml configuration:
- - servo section with driver="Skiron"
- - command_laws section to map motor_mixing commands to servos
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/modules/baro_scp.xml b/conf/modules/baro_scp.xml
deleted file mode 100644
index 0ff62adf04..0000000000
--- a/conf/modules/baro_scp.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- VTI SCP1000 pressure sensor (SPI)
-
-
-
-
- spi_master
-
-
-
-
-
-
-
-
-
diff --git a/conf/modules/extra_dl.xml b/conf/modules/extra_dl.xml
index 291ed288a6..7f80c8c7bf 100644
--- a/conf/modules/extra_dl.xml
+++ b/conf/modules/extra_dl.xml
@@ -34,16 +34,11 @@
else
ifneq (,$(findstring usb_serial,$(EXTRA_DL_PORT_LOWER)))
# usb_serial telemetry chosen, add files based on architecture
- ifeq ($(ARCH), lpc21)
- $(TARGET).srcs += $(SRC_ARCH)/usb_ser_hw.c $(SRC_ARCH)/lpcusb/usbhw_lpc.c $(SRC_ARCH)/lpcusb/usbcontrol.c
- $(TARGET).srcs += $(SRC_ARCH)/lpcusb/usbstdreq.c $(SRC_ARCH)/lpcusb/usbinit.c
- else
ifeq ($(ARCH), stm32)
$(TARGET).srcs += $(SRC_ARCH)/usb_ser_hw.c
else
ifneq ($(ARCH), sim)
- $(error telemetry_transparent_usb currently only implemented for the lpc21 and stm32)
- endif
+ $(error telemetry_transparent_usb currently only implemented for the stm32)
endif
endif
else
diff --git a/conf/modules/i2c_abuse_test.xml b/conf/modules/i2c_abuse_test.xml
index e0934ccf1a..cdd978c4df 100644
--- a/conf/modules/i2c_abuse_test.xml
+++ b/conf/modules/i2c_abuse_test.xml
@@ -13,11 +13,7 @@
-ifeq ($(ARCH), lpc21)
-$(TARGET).CFLAGS += -DI2C_ABUSE_LED=3
-$(TARGET).CFLAGS += -DUSE_I2C0
-$(TARGET).CFLAGS += -DI2C_ABUSE_PORT=i2c0
-else ifeq ($(ARCH), stm32)
+ifeq ($(ARCH), stm32)
$(TARGET).CFLAGS += -DI2C_ABUSE_LED=7
$(TARGET).CFLAGS += -DI2C_ABUSE_PORT=i2c2
endif
diff --git a/conf/modules/imu_analog.xml b/conf/modules/imu_analog.xml
deleted file mode 100644
index 0eb8541a5d..0000000000
--- a/conf/modules/imu_analog.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-
-
-
-
-
- Analog IMU connected to MCU ADC ports.
- Only add the configure and define lines for the sensors you actually use.
- E.g. to replace the old gyro_pitch subsystem only add GYRO_P and GYRO_Q
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ifeq ($(ARCH), lpc21)
-ifneq ($(GYRO_P),)
-$(TARGET).CFLAGS += -DADC_CHANNEL_GYRO_P=$(GYRO_P) -DUSE_$(GYRO_P)
-endif
-
-ifneq ($(GYRO_Q),)
-$(TARGET).CFLAGS += -DADC_CHANNEL_GYRO_Q=$(GYRO_Q) -DUSE_$(GYRO_Q)
-endif
-
-ifneq ($(GYRO_R),)
-$(TARGET).CFLAGS += -DADC_CHANNEL_GYRO_R=$(GYRO_R) -DUSE_$(GYRO_R)
-endif
-
-ifneq ($(ACCEL_X),)
-$(TARGET).CFLAGS += -DADC_CHANNEL_ACCEL_X=$(ACCEL_X) -DUSE_$(ACCEL_X)
-endif
-
-ifneq ($(ACCEL_Y),)
-$(TARGET).CFLAGS += -DADC_CHANNEL_ACCEL_Y=$(ACCEL_Y) -DUSE_$(ACCEL_Y)
-endif
-
-ifneq ($(ACCEL_Z),)
-$(TARGET).CFLAGS += -DADC_CHANNEL_ACCEL_Z=$(ACCEL_Z) -DUSE_$(ACCEL_Z)
-endif
-
-else ifeq ($(ARCH), stm32)
-$(error Not implemented for the stm32 yet... should be trivial, just do it...)
-endif
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/modules/imu_aspirin_v2_common.xml b/conf/modules/imu_aspirin_v2_common.xml
index 0d45bcb489..3868323d02 100644
--- a/conf/modules/imu_aspirin_v2_common.xml
+++ b/conf/modules/imu_aspirin_v2_common.xml
@@ -32,7 +32,6 @@
-
diff --git a/conf/modules/imu_b2_common.xml b/conf/modules/imu_b2_common.xml
deleted file mode 100644
index 9d5567388e..0000000000
--- a/conf/modules/imu_b2_common.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-
-
-
-
-
- Common part for all Booz2 IMUs.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- spi_master
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ifeq ($(ARCH), lpc21)
-$(TARGET).CFLAGS += -DUSE_SPI_SLAVE0
-$(TARGET).CFLAGS += -DUSE_SPI1
-$(TARGET).CFLAGS += -DMAX1168_EOC_VIC_SLOT=11
-else ifeq ($(ARCH), stm32)
-#FIXME: untested
-$(TARGET).CFLAGS += -DUSE_SPI2 -DMAX1168_SPI_DEV=spi2
-$(TARGET).CFLAGS += -DMAX1168_SLAVE_IDX=2
-# Slave select configuration
-# SLAVE2 is on PB12 (NSS) (MAX1168)
-# SLAVE3 is on PC13 (EEPROM)
-$(TARGET).CFLAGS += -DUSE_SPI_SLAVE2 -DUSE_SPI_SLAVE3
-endif
-
-
-
diff --git a/conf/modules/imu_b2_v1.0.xml b/conf/modules/imu_b2_v1.0.xml
deleted file mode 100644
index 3e2b98e8ad..0000000000
--- a/conf/modules/imu_b2_v1.0.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-
- Booz2 IMU v1.0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Magnetometer
-ifndef NO_MAG
-$(TARGET).CFLAGS += -DIMU_B2_MAG_TYPE=IMU_B2_MAG_AMI601
-$(TARGET).CFLAGS += -DUSE_AMI601
-$(TARGET).srcs += peripherals/ami601.c
-
-ifeq ($(ARCH), lpc21)
-$(TARGET).CFLAGS += -DUSE_I2C1 -DI2C1_SCLL=150 -DI2C1_SCLH=150
-else ifeq ($(ARCH), stm32)
-#FIXME: untested
-$(TARGET).CFLAGS += -DUSE_I2C2
-endif
-
-endif #NO_MAG
-
-
-
diff --git a/conf/modules/imu_b2_v1.1.xml b/conf/modules/imu_b2_v1.1.xml
deleted file mode 100644
index 28d225331a..0000000000
--- a/conf/modules/imu_b2_v1.1.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
-
-
- Booz2 IMU v1.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ifeq ($(ARCH), lpc21)
-$(TARGET).CFLAGS += -DUSE_SPI_SLAVE1
-$(TARGET).CFLAGS += -DMS2100_SLAVE_IDX=1
-$(TARGET).CFLAGS += -DMS2100_SPI_DEV=spi1
-$(TARGET).CFLAGS += -DMS2100_DRDY_VIC_SLOT=12
-else ifeq ($(ARCH), stm32)
-$(TARGET).CFLAGS += -DUSE_SPI_SLAVE4
-$(TARGET).CFLAGS += -DMS2100_SLAVE_IDX=4
-$(TARGET).CFLAGS += -DMS2100_SPI_DEV=spi2
-endif
-
-
-
diff --git a/conf/modules/imu_b2_v1.2.xml b/conf/modules/imu_b2_v1.2.xml
deleted file mode 100644
index 22d8b0ab81..0000000000
--- a/conf/modules/imu_b2_v1.2.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
-
- Booz2 IMU v1.2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ifeq ($(ARCH), lpc21)
-$(TARGET).CFLAGS += -DIMU_B2_I2C_DEV=i2c1 -DUSE_I2C1
-else ifeq ($(ARCH), stm32)
-$(TARGET).CFLAGS += -DIMU_B2_I2C_DEV=i2c2 -DUSE_I2C2
-endif
-
-
-
diff --git a/conf/modules/imu_hbmini.xml b/conf/modules/imu_hbmini.xml
deleted file mode 100644
index 4674994405..0000000000
--- a/conf/modules/imu_hbmini.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
- HBmini IMU.
-
-
-
- spi_master
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/modules/imu_navgo.xml b/conf/modules/imu_navgo.xml
deleted file mode 100644
index 80cb48ffd7..0000000000
--- a/conf/modules/imu_navgo.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
- NAVGO IMU.
- - Accelerometer: ADXL345 via I2C
- - Gyroscope: ITG3200 via I2C
- - Magnetometer: HMC58xx via I2C
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/modules/imu_umarim.xml b/conf/modules/imu_umarim.xml
deleted file mode 100644
index 30970a90fe..0000000000
--- a/conf/modules/imu_umarim.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
- UMARIM IMU.
- - Accelerometer: ADXL345 via I2C
- - Gyroscope: ITG3200 via I2C
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/modules/imu_yai.xml b/conf/modules/imu_yai.xml
deleted file mode 100644
index 33be065a31..0000000000
--- a/conf/modules/imu_yai.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
- YAI IMU.
- Basically Booz2 IMU without mag.
-
-
-
-
-
diff --git a/conf/modules/lcd_dogm.xml b/conf/modules/lcd_dogm.xml
deleted file mode 100644
index 0ff0a256e5..0000000000
--- a/conf/modules/lcd_dogm.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- EA DOG-M163 LCD (SPI)
-
-
-
-
-
-
-
-
-
diff --git a/conf/modules/logger_sd_chibios.xml b/conf/modules/logger_sd_chibios.xml
index 24faff1343..69bf7541e3 100644
--- a/conf/modules/logger_sd_chibios.xml
+++ b/conf/modules/logger_sd_chibios.xml
@@ -37,19 +37,5 @@
-
diff --git a/conf/modules/mcu.xml b/conf/modules/mcu.xml
index 40113f8bef..f0c2dc0a9b 100644
--- a/conf/modules/mcu.xml
+++ b/conf/modules/mcu.xml
@@ -17,7 +17,6 @@
-
diff --git a/conf/modules/pwm_meas.xml b/conf/modules/pwm_meas.xml
index 2430ea6101..c49c05670e 100644
--- a/conf/modules/pwm_meas.xml
+++ b/conf/modules/pwm_meas.xml
@@ -7,10 +7,6 @@
PWM input measurement mcu periph access and init wrapper for other modules.
- For LPC21xx on the TWOG:
- - INPUT CAPTURE CAP0.3 on P0.29 (TWOG ADC5, 5V to 3.3V voltage divider)
- - INPUT CAPTURE CAP0.0 on P0.30 (TWOG ADC4, no voltage divider)
-
For STM32:
- each board (or airframe file) has to define the PWM input pin and parameters
- example can be found in sw/airborne/boards/apogee_1.0.h board file
diff --git a/conf/modules/spi_slave_hs.xml b/conf/modules/spi_slave_hs.xml
deleted file mode 100644
index 4659f044ff..0000000000
--- a/conf/modules/spi_slave_hs.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
- General SPI driver (high speed slave mode)
- Only for fixedwing and boards based on LPC21
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/modules/telemetry_transparent_usb.xml b/conf/modules/telemetry_transparent_usb.xml
index b33d6ddc9d..c4b40cf160 100644
--- a/conf/modules/telemetry_transparent_usb.xml
+++ b/conf/modules/telemetry_transparent_usb.xml
@@ -27,12 +27,6 @@
-
- ifeq ($(ARCH), lpc21)
- $(TARGET).srcs += $(SRC_ARCH)/lpcusb/usbhw_lpc.c $(SRC_ARCH)/lpcusb/usbcontrol.c
- $(TARGET).srcs += $(SRC_ARCH)/lpcusb/usbstdreq.c $(SRC_ARCH)/lpcusb/usbinit.c
- endif
-
diff --git a/conf/modules/trigger_ext.xml b/conf/modules/trigger_ext.xml
deleted file mode 100644
index cf14c84356..0000000000
--- a/conf/modules/trigger_ext.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
- External trigger
- (lpc only)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/modules/xtend_rssi.xml b/conf/modules/xtend_rssi.xml
index 963e19911b..5956a130ed 100644
--- a/conf/modules/xtend_rssi.xml
+++ b/conf/modules/xtend_rssi.xml
@@ -4,11 +4,7 @@
Digi Xtend RSSI PWM Module.
- For LPC21xx on the TWOG:
- - INPUT CAPTURE CAP0.3 on P0.29 (TWOG ADC5, 5V to 3.3V voltage divider)
- - INPUT CAPTURE CAP0.0 on P0.30 (TWOG ADC4, no voltage divider)
- Currently only available on LPC21xx arch.
You must also load the module pwm_meas.xml
diff --git a/conf/settings/estimation/booz_baro.xml b/conf/settings/estimation/booz_baro.xml
deleted file mode 100644
index 5883968890..0000000000
--- a/conf/settings/estimation/booz_baro.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/settings/motor_bench.xml b/conf/settings/motor_bench.xml
deleted file mode 100644
index 583dae5949..0000000000
--- a/conf/settings/motor_bench.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/settings/test_booz2_motors_hexa.xml b/conf/settings/test_booz2_motors_hexa.xml
deleted file mode 100644
index 2db350eddf..0000000000
--- a/conf/settings/test_booz2_motors_hexa.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/conf/system/preferences.d/paparazzi-uav-ppa b/conf/system/preferences.d/paparazzi-uav-ppa
deleted file mode 100644
index 0509d67510..0000000000
--- a/conf/system/preferences.d/paparazzi-uav-ppa
+++ /dev/null
@@ -1,3 +0,0 @@
-Package: lpc21isp
-Pin: version 1.48*
-Pin-Priority: 1001
diff --git a/conf/system/udev/rules/50-paparazzi.rules b/conf/system/udev/rules/50-paparazzi.rules
index 2cceaebb84..2c0335db72 100644
--- a/conf/system/udev/rules/50-paparazzi.rules
+++ b/conf/system/udev/rules/50-paparazzi.rules
@@ -54,9 +54,6 @@ ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", MODE="0666", GROUP="plugdev"
# dfu devices
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0666", GROUP="plugdev"
-# all (fake VID 0x7070) LPCUSB devices (access through libusb)
-ATTRS{idVendor}=="7070", GROUP="plugdev"
-
# make joysticks/gamepads readable on event interface (writeable for force feedback), see input_event.sh
KERNEL=="event*", IMPORT{program}="input_event.sh %p", NAME="input/%k", GROUP="plugdev", MODE="0640" ENV{FF_DEVICE}=="1", MODE="0660"
diff --git a/conf/userconf/tudelft/conf.xml b/conf/userconf/tudelft/conf.xml
index 9796f0a1c3..903106602e 100644
--- a/conf/userconf/tudelft/conf.xml
+++ b/conf/userconf/tudelft/conf.xml
@@ -309,18 +309,6 @@
gui_color="white"
release="997fa535902c4d8f73bc34c02c862652cd47cae5"
/>
-
-
50kHz */
-
- /* initialize interrupt vector */
- VICIntSelect &= ~VIC_BIT(VIC_SPI1); // SPI1 selected as IRQ
- VICIntEnable = VIC_BIT(VIC_SPI1); // SPI1 interrupt enabled
- _VIC_CNTL(SPI1_VIC_SLOT) = VIC_ENABLE | VIC_SPI1;
- _VIC_CNTL(SPI1_VIC_SLOT) = (uint32_t)SPI1_ISR; /* address of the ISR */
-
- /* setup slave select */
- /* configure SS pin */
- SetBit(ADS8344_SS_IODIR, ADS8344_SS_PIN); /* pin is output */
- ADS8344Unselect(); /* pin low */
-}
-
-static inline void read_values(void)
-{
- uint8_t foo __attribute__((unused)) = SSPDR;
- uint8_t msb = SSPDR;
- uint8_t lsb = SSPDR;
- uint8_t llsb = SSPDR;
- ADS8344_values[channel] = (msb << 8 | lsb) << 1 | llsb >> 7;
-}
-
-static inline void send_request(void)
-{
- uint8_t control = 1 << 7 | channel << 4 | SGL_DIF << 2 | POWER_MODE;
-
- SSPDR = control;
- SSPDR = 0;
- SSPDR = 0;
- SSPDR = 0;
-}
-
-void ADS8344_start(void)
-{
- ADS8344Select();
- SpiClearRti();
- SpiEnableRti();
- SpiEnable();
- send_request();
-}
-
-void SPI1_ISR(void)
-{
- ISR_ENTRY();
- LED_TOGGLE(2);
- read_values();
- channel++;
- if (channel > 7) {
- channel = 0;
- ADS8344_available = true;
- }
- send_request();
- SpiClearRti();
-
- VICVectAddr = 0x00000000; /* clear this interrupt from the VIC */
- ISR_EXIT();
-}
diff --git a/sw/airborne/arch/lpc21/ADS8344.h b/sw/airborne/arch/lpc21/ADS8344.h
deleted file mode 100644
index 8e7131787f..0000000000
--- a/sw/airborne/arch/lpc21/ADS8344.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2008- ENAC
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-#ifndef ADS8344_H
-#define ADS8344_H
-
-#include "std.h"
-
-#define NB_CHANNELS 8
-
-extern uint16_t ADS8344_values[NB_CHANNELS];
-extern bool ADS8344_available;
-
-void ADS8344_init(void);
-void ADS8344_start(void);
-
-#endif // ADS8344_H
diff --git a/sw/airborne/arch/lpc21/LPC2129-ROM.ld b/sw/airborne/arch/lpc21/LPC2129-ROM.ld
deleted file mode 100644
index 5dc4bfa0e6..0000000000
--- a/sw/airborne/arch/lpc21/LPC2129-ROM.ld
+++ /dev/null
@@ -1,143 +0,0 @@
-/***********************************************************************/
-/* ROM.ld: Linker Script File */
-/***********************************************************************/
-ENTRY(_boot)
-STACK_SIZE = 0x1000;
-
-/* Memory Definitions */
-MEMORY
-{
- ROM (rx) : ORIGIN = 0x00000000, LENGTH = 256k
- RAM (rw) : ORIGIN = 0x40000000, LENGTH = 16k
-}
-
-/* Section Definitions */
-SECTIONS
-{
- /* first section is .text which is used for code */
- .text :
- {
- /* *crt0.o (.text) */ /* Startup code */
- KEEP(*(.init)) /* Startup code from .init-section */
- *(.text .text.*) /* remaining code */
- *(.gnu.linkonce.t.*)
- *(.glue_7)
- *(.glue_7t)
- *(.gcc_except_table)
- *(.rodata) /* read-only data (constants) */
- *(.rodata*)
- *(.gnu.linkonce.r.*)
- } > ROM
-
- /***** old:
- .text :
- {
- *crt0.o (.text)
- *(.text)
- *(.rodata)
- *(.rodata*)
- *(.glue_7)
- *(.glue_7t)
- } > ROM
- *****/
-
- . = ALIGN(4);
-
- /* .ctors .dtors are used for c++ constructors/destructors */
- /* added by Martin Thomas 4/2005 based on Anglia Design example */
- .ctors :
- {
- PROVIDE(__ctors_start__ = .);
- KEEP(*(SORT(.ctors.*)))
- KEEP(*(.ctors))
- PROVIDE(__ctors_end__ = .);
- } >ROM
-
- .dtors :
- {
- PROVIDE(__dtors_start__ = .);
- KEEP(*(SORT(.dtors.*)))
- KEEP(*(.dtors))
- PROVIDE(__dtors_end__ = .);
- } >ROM
-
- . = ALIGN(4);
- /* mthomas - end */
-
- _etext = . ;
- PROVIDE (etext = .);
-
- /* .data section which is used for initialized data */
- .data : AT (_etext)
- {
- _data = .;
- *(.data)
- *(.data.*)
- *(.gnu.linkonce.d*)
- SORT(CONSTRUCTORS) /* mt 4/2005 */
- . = ALIGN(4);
- *(.fastrun) /* !!!! "RAM-Function" example */
- } > RAM
-
- . = ALIGN(4);
- _edata = . ;
- PROVIDE (edata = .);
-
- /* .bss section which is used for uninitialized data */
- .bss (NOLOAD) :
- {
- __bss_start = . ;
- __bss_start__ = . ;
- *(.bss)
- *(.gnu.linkonce.b*)
- *(COMMON)
- . = ALIGN(4);
- } > RAM
-
- . = ALIGN(4);
- __bss_end__ = . ;
- PROVIDE (__bss_end = .);
-
- .stack ALIGN(256) :
- {
- . += STACK_SIZE;
- PROVIDE (_stack = .);
- } > RAM
-
- _end = . ;
- PROVIDE (end = .);
-
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
-}
diff --git a/sw/airborne/arch/lpc21/LPC2148-ROM-bl.ld b/sw/airborne/arch/lpc21/LPC2148-ROM-bl.ld
deleted file mode 100644
index 730c1632e3..0000000000
--- a/sw/airborne/arch/lpc21/LPC2148-ROM-bl.ld
+++ /dev/null
@@ -1,161 +0,0 @@
-/***********************************************************************/
-/* ROM.ld: Linker Script File */
-/***********************************************************************/
-ENTRY(_boot)
-STACK_SIZE = 0x1000;
-
-/* Memory Definitions */
-MEMORY
-{
- /* 0x00000000: Paparazzi bootloader (16k) */
- /* 0x00004000: Paparazzi code (480k) */
- /* 0x0007C000: persistent settings (4k) */
- /* 0x0007D000: Philips/NXP bootloader (12k) */
- ROM (rx) : ORIGIN = 0x00004000, LENGTH = 480k
- /* topmost 32 bytes are reserved for IAP operations */
- RAM (rw) : ORIGIN = 0x40000000, LENGTH = 32736
-}
-
-/* Section Definitions */
-SECTIONS
-{
- /* first section is .text which is used for code */
- .text :
- {
- /* *crt0.o (.text) */ /* Startup code */
- KEEP(*(.init)) /* Startup code from .init-section */
- *(.text .text.*) /* remaining code */
- *(.gnu.linkonce.t.*)
- *(.glue_7)
- *(.glue_7t)
- *(.gcc_except_table)
- *(.rodata) /* read-only data (constants) */
- *(.rodata*)
- *(.gnu.linkonce.r.*)
- } > ROM
-
- /***** old:
- .text :
- {
- *crt0.o (.text)
- *(.text)
- *(.rodata)
- *(.rodata*)
- *(.glue_7)
- *(.glue_7t)
- } > ROM
- *****/
-
-. = ALIGN (4);
-
-.ARM.exidx :
- {
- __exidx_start = .;
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- __exidx_end = .;
-
- } >ROM
-
-
-
- . = ALIGN(4);
-
- /* .ctors .dtors are used for c++ constructors/destructors */
- /* added by Martin Thomas 4/2005 based on Anglia Design example */
- .ctors :
- {
- PROVIDE(__ctors_start__ = .);
- KEEP(*(SORT(.ctors.*)))
- KEEP(*(.ctors))
- PROVIDE(__ctors_end__ = .);
- } >ROM
-
- .dtors :
- {
- PROVIDE(__dtors_start__ = .);
- KEEP(*(SORT(.dtors.*)))
- KEEP(*(.dtors))
- PROVIDE(__dtors_end__ = .);
- } >ROM
-
- . = ALIGN(4);
- /* mthomas - end */
-
- _etext = . ;
- PROVIDE (etext = .);
-
- /* .data section which is used for initialized data */
- .data : AT (_etext)
- {
- _data = .;
- *(.data)
- *(.data.*)
- *(.gnu.linkonce.d*)
- SORT(CONSTRUCTORS) /* mt 4/2005 */
- . = ALIGN(4);
- *(.fastrun) /* !!!! "RAM-Function" example */
- } > RAM
-
- . = ALIGN(4);
- _edata = . ;
- PROVIDE (edata = .);
-
- /* .bss section which is used for uninitialized data */
- .bss (NOLOAD) :
- {
- __bss_start = . ;
- __bss_start__ = . ;
- *(.bss)
- *(.bss.*)
- *(.gnu.linkonce.b*)
- *(COMMON)
- . = ALIGN(4);
- } > RAM
-
- . = ALIGN(4);
- __bss_end__ = . ;
- PROVIDE (__bss_end = .);
-
- .stack ALIGN(256) :
- {
- . += STACK_SIZE;
- PROVIDE (_stack = .);
- } > RAM
-
- _end = . ;
- PROVIDE (end = .);
-
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
-}
diff --git a/sw/airborne/arch/lpc21/LPC2148-ROM.ld b/sw/airborne/arch/lpc21/LPC2148-ROM.ld
deleted file mode 100644
index fc421d2541..0000000000
--- a/sw/airborne/arch/lpc21/LPC2148-ROM.ld
+++ /dev/null
@@ -1,144 +0,0 @@
-/***********************************************************************/
-/* ROM.ld: Linker Script File */
-/***********************************************************************/
-ENTRY(_boot)
-STACK_SIZE = 0x1000;
-
-/* Memory Definitions */
-MEMORY
-{
- ROM (rx) : ORIGIN = 0x00000000, LENGTH = 500k
- RAM (rw) : ORIGIN = 0x40000000, LENGTH = 32k
-}
-
-/* Section Definitions */
-SECTIONS
-{
- /* first section is .text which is used for code */
- .text :
- {
- /* *crt0.o (.text) */ /* Startup code */
- KEEP(*(.init)) /* Startup code from .init-section */
- *(.text .text.*) /* remaining code */
- *(.gnu.linkonce.t.*)
- *(.glue_7)
- *(.glue_7t)
- *(.gcc_except_table)
- *(.rodata) /* read-only data (constants) */
- *(.rodata*)
- *(.gnu.linkonce.r.*)
- } > ROM
-
- /***** old:
- .text :
- {
- *crt0.o (.text)
- *(.text)
- *(.rodata)
- *(.rodata*)
- *(.glue_7)
- *(.glue_7t)
- } > ROM
- *****/
-
- . = ALIGN(4);
-
- /* .ctors .dtors are used for c++ constructors/destructors */
- /* added by Martin Thomas 4/2005 based on Anglia Design example */
- .ctors :
- {
- PROVIDE(__ctors_start__ = .);
- KEEP(*(SORT(.ctors.*)))
- KEEP(*(.ctors))
- PROVIDE(__ctors_end__ = .);
- } >ROM
-
- .dtors :
- {
- PROVIDE(__dtors_start__ = .);
- KEEP(*(SORT(.dtors.*)))
- KEEP(*(.dtors))
- PROVIDE(__dtors_end__ = .);
- } >ROM
-
- . = ALIGN(4);
- /* mthomas - end */
-
- _etext = . ;
- PROVIDE (etext = .);
-
- /* .data section which is used for initialized data */
- .data : AT (_etext)
- {
- _data = .;
- *(.data)
- *(.data.*)
- *(.gnu.linkonce.d*)
- SORT(CONSTRUCTORS) /* mt 4/2005 */
- . = ALIGN(4);
- *(.fastrun) /* !!!! "RAM-Function" example */
- } > RAM
-
- . = ALIGN(4);
- _edata = . ;
- PROVIDE (edata = .);
-
- /* .bss section which is used for uninitialized data */
- .bss (NOLOAD) :
- {
- __bss_start = . ;
- __bss_start__ = . ;
- *(.bss)
- *(.bss.*)
- *(.gnu.linkonce.b*)
- *(COMMON)
- . = ALIGN(4);
- } > RAM
-
- . = ALIGN(4);
- __bss_end__ = . ;
- PROVIDE (__bss_end = .);
-
- .stack ALIGN(256) :
- {
- . += STACK_SIZE;
- PROVIDE (_stack = .);
- } > RAM
-
- _end = . ;
- PROVIDE (end = .);
-
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
-}
diff --git a/sw/airborne/arch/lpc21/armVIC.c b/sw/airborne/arch/lpc21/armVIC.c
deleted file mode 100644
index 46284cfe87..0000000000
--- a/sw/airborne/arch/lpc21/armVIC.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/******************************************************************************
- *
- * $RCSfile$
- * $Revision$
- *
- * This module provides the interface routines for setting up and
- * controlling the various interrupt modes present on the ARM processor.
- * Copyright 2004, R O SoftWare
- * No guarantees, warrantees, or promises, implied or otherwise.
- * May be used for hobby or commercial purposes provided copyright
- * notice remains intact.
- *
- *****************************************************************************/
-#include "types.h"
-#include "armVIC.h"
-
-#define IRQ_MASK 0x00000080
-#define FIQ_MASK 0x00000040
-#define INT_MASK (IRQ_MASK | FIQ_MASK)
-
-static inline unsigned __get_cpsr(void)
-{
- unsigned long retval;
- asm volatile(" mrs %0, cpsr" : "=r"(retval) : /* no inputs */);
- return retval;
-}
-
-static inline void __set_cpsr(unsigned val)
-{
- asm volatile(" msr cpsr, %0" : /* no outputs */ : "r"(val));
-}
-
-unsigned disableIRQ(void)
-{
- unsigned _cpsr;
-
- _cpsr = __get_cpsr();
- __set_cpsr(_cpsr | IRQ_MASK);
- return _cpsr;
-}
-
-unsigned restoreIRQ(unsigned oldCPSR)
-{
- unsigned _cpsr;
-
- _cpsr = __get_cpsr();
- __set_cpsr((_cpsr & ~IRQ_MASK) | (oldCPSR & IRQ_MASK));
- return _cpsr;
-}
-
-unsigned enableIRQ(void)
-{
- unsigned _cpsr;
-
- _cpsr = __get_cpsr();
- __set_cpsr(_cpsr & ~IRQ_MASK);
- return _cpsr;
-}
-
-unsigned disableFIQ(void)
-{
- unsigned _cpsr;
-
- _cpsr = __get_cpsr();
- __set_cpsr(_cpsr | FIQ_MASK);
- return _cpsr;
-}
-
-unsigned restoreFIQ(unsigned oldCPSR)
-{
- unsigned _cpsr;
-
- _cpsr = __get_cpsr();
- __set_cpsr((_cpsr & ~FIQ_MASK) | (oldCPSR & FIQ_MASK));
- return _cpsr;
-}
-
-unsigned enableFIQ(void)
-{
- unsigned _cpsr;
-
- _cpsr = __get_cpsr();
- __set_cpsr(_cpsr & ~FIQ_MASK);
- return _cpsr;
-}
diff --git a/sw/airborne/arch/lpc21/armVIC.h b/sw/airborne/arch/lpc21/armVIC.h
deleted file mode 100644
index c8637a41e3..0000000000
--- a/sw/airborne/arch/lpc21/armVIC.h
+++ /dev/null
@@ -1,163 +0,0 @@
-/******************************************************************************
- *
- * $RCSfile$
- * $Revision$
- *
- * This module provides the interface definitions for setting up and
- * controlling the various interrupt modes present on the ARM processor.
- * Copyright 2004, R O SoftWare
- * No guarantees, warrantees, or promises, implied or otherwise.
- * May be used for hobby or commercial purposes provided copyright
- * notice remains intact.
- *
- *****************************************************************************/
-#ifndef INC_ARM_VIC_H
-#define INC_ARM_VIC_H
-
-#define __VIC_CNTL(idx) VICVectCntl##idx
-#define __VIC_ADDR(idx) VICVectAddr##idx
-#define _VIC_CNTL(idx) __VIC_CNTL(idx)
-#define _VIC_ADDR(idx) __VIC_ADDR(idx)
-
-
-/******************************************************************************
- *
- * MACRO Name: ISR_ENTRY()
- *
- * Description:
- * This MACRO is used upon entry to an ISR. The current version of
- * the gcc compiler for ARM does not produce correct code for
- * interrupt routines to operate properly with THUMB code. The MACRO
- * performs the following steps:
- *
- * 1 - Adjust address at which execution should resume after servicing
- * ISR to compensate for IRQ entry
- * 2 - Save the non-banked registers r0-r12 and lr onto the IRQ stack.
- * 3 - Get the status of the interrupted program is in SPSR.
- * 4 - Push it onto the IRQ stack as well.
- *
- *****************************************************************************/
-#define ISR_ENTRY() asm volatile(" sub lr, lr,#4\n" \
- " stmfd sp!,{r0-r12,lr}\n" \
- " mrs r1, spsr\n" \
- " stmfd sp!,{r1}")
-
-/******************************************************************************
- *
- * MACRO Name: ISR_EXIT()
- *
- * Description:
- * This MACRO is used to exit an ISR. The current version of the gcc
- * compiler for ARM does not produce correct code for interrupt
- * routines to operate properly with THUMB code. The MACRO performs
- * the following steps:
- *
- * 1 - Recover SPSR value from stack
- * 2 - and restore its value
- * 3 - Pop the return address & the saved general registers from
- * the IRQ stack & return
- *
- *****************************************************************************/
-#define ISR_EXIT() asm volatile(" ldmfd sp!,{r1}\n" \
- " msr spsr_c,r1\n" \
- " ldmfd sp!,{r0-r12,pc}^")
-
-/******************************************************************************
- *
- * Function Name: disableIRQ()
- *
- * Description:
- * This function sets the IRQ disable bit in the status register
- *
- * Calling Sequence:
- * void
- *
- * Returns:
- * previous value of CPSR
- *
- *****************************************************************************/
-unsigned disableIRQ(void);
-
-/******************************************************************************
- *
- * Function Name: enableIRQ()
- *
- * Description:
- * This function clears the IRQ disable bit in the status register
- *
- * Calling Sequence:
- * void
- *
- * Returns:
- * previous value of CPSR
- *
- *****************************************************************************/
-unsigned enableIRQ(void);
-
-/******************************************************************************
- *
- * Function Name: restoreIRQ()
- *
- * Description:
- * This function restores the IRQ disable bit in the status register
- * to the value contained within passed oldCPSR
- *
- * Calling Sequence:
- * void
- *
- * Returns:
- * previous value of CPSR
- *
- *****************************************************************************/
-unsigned restoreIRQ(unsigned oldCPSR);
-
-/******************************************************************************
- *
- * Function Name: disableFIQ()
- *
- * Description:
- * This function sets the FIQ disable bit in the status register
- *
- * Calling Sequence:
- * void
- *
- * Returns:
- * previous value of CPSR
- *
- *****************************************************************************/
-unsigned disableFIQ(void);
-
-/******************************************************************************
- *
- * Function Name: enableFIQ()
- *
- * Description:
- * This function clears the FIQ disable bit in the status register
- *
- * Calling Sequence:
- * void
- *
- * Returns:
- * previous value of CPSR
- *
- *****************************************************************************/
-unsigned enableFIQ(void);
-
-/******************************************************************************
- *
- * Function Name: restoreIRQ()
- *
- * Description:
- * This function restores the FIQ disable bit in the status register
- * to the value contained within passed oldCPSR
- *
- * Calling Sequence:
- * void
- *
- * Returns:
- * previous value of CPSR
- *
- *****************************************************************************/
-unsigned restoreFIQ(unsigned oldCPSR);
-
-#endif
diff --git a/sw/airborne/arch/lpc21/crt0.S b/sw/airborne/arch/lpc21/crt0.S
deleted file mode 100644
index f7a89c326d..0000000000
--- a/sw/airborne/arch/lpc21/crt0.S
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- crt0.S for LPC2xxx
- - based on examples from R O Software
- - based on examples from newlib-lpc
- - based on an example from Anglia Designs
-
- collected and modified by Martin Thomas
-*/
-
- .global _etext // -> .data initial values in ROM
- .global _data // -> .data area in RAM
- .global _edata // end of .data area
- .global __bss_start // -> .bss area in RAM
- .global __bss_end__ // end of .bss area
- .global _stack // top of stack
-
-// Stack Sizes
- .set UND_STACK_SIZE, 0x00000004
- .set ABT_STACK_SIZE, 0x00000004
- .set FIQ_STACK_SIZE, 0x00000004
- .set IRQ_STACK_SIZE, 0X00000080
- .set SVC_STACK_SIZE, 0x00000004
-
-// Standard definitions of Mode bits and Interrupt (I & F) flags in PSRs
- .set MODE_USR, 0x10 // User Mode
- .set MODE_FIQ, 0x11 // FIQ Mode
- .set MODE_IRQ, 0x12 // IRQ Mode
- .set MODE_SVC, 0x13 // Supervisor Mode
- .set MODE_ABT, 0x17 // Abort Mode
- .set MODE_UND, 0x1B // Undefined Mode
- .set MODE_SYS, 0x1F // System Mode
-
- .equ I_BIT, 0x80 // when I bit is set, IRQ is disabled
- .equ F_BIT, 0x40 // when F bit is set, FIQ is disabled
-
- .text
- .arm
- .section .init, "ax"
-
- .code 32
- .align 2
-
- .global _boot
- .func _boot
-_boot:
-
-// Runtime Interrupt Vectors
-// -------------------------
-Vectors:
- b _start // reset - _start
- ldr pc,_undf // undefined - _undf
- ldr pc,_swi // SWI - _swi
- ldr pc,_pabt // program abort - _pabt
- ldr pc,_dabt // data abort - _dabt
- nop // reserved
- ldr pc,[pc,#-0xFF0] // IRQ - read the VIC
- ldr pc,_fiq // FIQ - _fiq
-
-#if 0
-// Use this group for production
-_undf: .word _reset // undefined - _reset
-_swi: .word _reset // SWI - _reset
-_pabt: .word _reset // program abort - _reset
-_dabt: .word _reset // data abort - _reset
-_irq: .word _reset // IRQ - _reset
-_fiq: .word _reset // FIQ - _reset
-
-#else
-// Use this group for development
-_undf: .word __undf // undefined
-_swi: .word __swi // SWI
-_pabt: .word __pabt // program abort
-_dabt: .word __dabt // data abort
-_irq: .word __irq // IRQ
-_fiq: .word __fiq // FIQ
-
-__undf: b . // undefined
-__swi: b . // SWI
-__pabt: b . // program abort
-__dabt: b . // data abort
-__irq: b . // IRQ
-__fiq: b . // FIQ
-#endif
- .size _boot, . - _boot
- .endfunc
-
-
-// Setup the operating mode & stack.
-// ---------------------------------
- .global _start, start, _mainCRTStartup
- .func _start
-
-_start:
-start:
-_mainCRTStartup:
-
-// Initialize Interrupt System
-// - Set stack location for each mode
-// - Leave in System Mode with Interrupts Disabled
-// -----------------------------------------------
- ldr r0,=_stack
- msr CPSR_c,#MODE_UND|I_BIT|F_BIT // Undefined Instruction Mode
- mov sp,r0
- sub r0,r0,#UND_STACK_SIZE
- msr CPSR_c,#MODE_ABT|I_BIT|F_BIT // Abort Mode
- mov sp,r0
- sub r0,r0,#ABT_STACK_SIZE
- msr CPSR_c,#MODE_FIQ|I_BIT|F_BIT // FIQ Mode
- mov sp,r0
- sub r0,r0,#FIQ_STACK_SIZE
- msr CPSR_c,#MODE_IRQ|I_BIT|F_BIT // IRQ Mode
- mov sp,r0
- sub r0,r0,#IRQ_STACK_SIZE
- msr CPSR_c,#MODE_SVC|I_BIT|F_BIT // Supervisor Mode
- mov sp,r0
- sub r0,r0,#SVC_STACK_SIZE
- msr CPSR_c,#MODE_SYS|I_BIT|F_BIT // System Mode
- mov sp,r0
-
-// Copy initialized data to its execution address in RAM
-// -----------------------------------------------------
-//#ifdef ROM_RUN
- ldr r1,=_etext // -> ROM data start
- ldr r2,=_data // -> data start
- ldr r3,=_edata // -> end of data
-1: cmp r2,r3 // check if data to move
- ldrlo r0,[r1],#4 // copy it
- strlo r0,[r2],#4
- blo 1b // loop until done
-//#endif
-// Clear .bss
-// ----------
- mov r0,#0 // get a zero
- ldr r1,=__bss_start // -> bss start
- ldr r2,=__bss_end__ // -> bss end
-2: cmp r1,r2 // check if data to clear
- strlo r0,[r1],#4 // clear 4 bytes
- blo 2b // loop until done
-
-/*
- Call C++ constructors (for objects in "global scope")
- ctor loop added by Martin Thomas 4/2005
- based on a Anglia Design example-application for ST ARM
-*/
-
- LDR r0, =__ctors_start__
- LDR r1, =__ctors_end__
-ctor_loop:
- CMP r0, r1
- BEQ ctor_end
- LDR r2, [r0], #4
- STMFD sp!, {r0-r1}
- MOV lr, pc
- MOV pc, r2
- LDMFD sp!, {r0-r1}
- B ctor_loop
-ctor_end:
-
-// Call main program: main(0)
-// --------------------------
- mov r0,#0 // no arguments (argc = 0)
- mov r1,r0
- mov r2,r0
- mov fp,r0 // null frame pointer
- mov r7,r0 // null frame pointer for thumb
- ldr r10,=main
- mov lr,pc
-
-/* Enter the C code, use BX instruction so as to never return */
-/* use BLX (?) main if you want to use c++ destructors below */
-
- bx r10 // enter main()
-
-/* "global object"-dtors are never called and it should not be
- needed since there is no OS to exit to. */
-/* Call destructors */
-# LDR r0, =__dtors_start__
-# LDR r1, =__dtors_end__
-dtor_loop:
-# CMP r0, r1
-# BEQ dtor_end
-# LDR r2, [r0], #4
-# STMFD sp!, {r0-r1}
-# MOV lr, pc
-# MOV pc, r2
-# LDMFD sp!, {r0-r1}
-# B dtor_loop
-dtor_end:
-
- .size _start, . - _start
- .endfunc
-
- .global _reset, reset, exit, abort
- .func _reset
-_reset:
-reset:
-exit:
-abort:
-#if 0
-// Disable interrupts, then force a hardware reset by driving P23 low
-// -------------------------------------------------------------------
- mrs r0,cpsr // get PSR
- orr r0,r0,#I_BIT|F_BIT // disable IRQ and FIQ
- msr cpsr,r0 // set up status register
-
- ldr r1,=(PS_BASE) // PS Base Address
- ldr r0,=(PS_PIO) // PIO Module
- str r0,[r1,#PS_PCER_OFF] // enable its clock
- ldr r1,=(PIO_BASE) // PIO Base Address
- ldr r0,=(1<<23) // P23
- str r0,[r1,#PIO_PER_OFF] // make sure pin is contolled by PIO
- str r0,[r1,#PIO_CODR_OFF] // set the pin low
- str r0,[r1,#PIO_OER_OFF] // make it an output
-#endif
- b . // loop until reset
-
- .size _reset, . - _reset
- .endfunc
-
- .end
diff --git a/sw/airborne/arch/lpc21/efsl/conf/config.h b/sw/airborne/arch/lpc21/efsl/conf/config.h
deleted file mode 100644
index f063569441..0000000000
--- a/sw/airborne/arch/lpc21/efsl/conf/config.h
+++ /dev/null
@@ -1,146 +0,0 @@
-#ifndef __EFSL_CONFIG_H__
-#define __EFSL_CONFIG_H__
-
-/* This is for the LPC2000 SD-Card SPI interface (M. Thomas) */
-
-
-/* Hardware target
- ---------------
-
- * Here you will define for what hardware-endpoint EFSL should be compiled.
- * Look in interfaces.h to see what systems are supported, and add your own
- * there if you need to write your own driver. Then, define the name you
- * selected for your hardware there here. Make sure that you only select one
- * device!
-*/
-
- /*#define HW_ENDPOINT_LINUX*/
- /*#define HW_ENDPOINT_ATMEGA128_SD*/
-
-
- #define HW_ENDPOINT_LPC2000_SD
- /* defines the interface for LPC213x (0=SPI0 1=SPI1) */
- //#define HW_ENDPOINT_LPC2000_SPINUM (0)
- //#define HW_ENDPOINT_LPC2000_SPINUM (1)
-
- /*#define HW_ENDPOINT_DSP_TI6713_SD*/
-
-
-/* Memory configuration
- --------------------
-
- * Here you must configure wheter your processor can access memory byte
- * oriented. All x86 processors can do it, AVR's can do it to. Some DSP
- * or other microcontrollers can't. If you have an 8 bit system you're safe.
- * If you are really unsure, leave the setting commented out, it will be slower
- * but it will work for sure.
-*/
-
- /* disabled for ARM (mt): #define BYTE_ALIGNMENT */
-
-/* Cache configuration
- -------------------
-
- * Here you must configure how much memory of cache you can/want to use.
- * The number you put at IOMAN_NUMBUFFER is multiplied by 512. So 1 means
- * 512 bytes cache, 4 means 2048 bytes cache. More is better.
- * The number after IOMAN_NUMITERATIONS should be untouched.
- * The last field (IOMAN_DO_MEMALLOC) is to tell ioman to allocate it's
- * own memory in it's structure, or not. If you choose to do it yourself
- * you will have to pass a pointer to the memory as the last argument of
- * ioman_init.
-*/
- /*#define IOMAN_NUMBUFFER 1*/
- #define IOMAN_NUMBUFFER 6 /* 32kB RAM on the LPC2138 - let's use 3 kB */
- #define IOMAN_NUMITERATIONS 3
- #define IOMAN_DO_MEMALLOC
-
-/* Cluster pre-allocation
- ----------------------
-
- * When writing files, the function that performs the actual write has to
- * calculate how many clusters it will need for that request. It then allocates
- * that number of new clusters to the file. Since this involves some calculations
- * and writing of the FAT, you might find it beneficial to limit the number of
- * allocations, and allow fwrite to pre-allocate a number of clusters extra.
- * This setting determines how many clusters will be extra allocated whenever
- * this is required.
- * Take in carefull consideration how large your clustersize is, putting 10 here
- * with a clustersize of 32kb means you might waste 320 kb.
- * The first option is for preallocating files, the other is used when enlarging
- * a directory to accomodate more files
-*/
- /*#define CLUSTER_PREALLOC_FILE 0*/
- #define CLUSTER_PREALLOC_FILE 2
- #define CLUSTER_PREALLOC_DIRECTORY 0
-
-
-/* Endianess configuration
- -----------------------
-
- * Here you can configure wheter your architecture is little or big endian. This
- * is important since all FAT structures are stored in intel little endian order.
- * So if you have a big endian system the library has to convert all figures to
- * big endian in order to work.
- */
- #define LITTLE_ENDIAN
-
-
-/* Date and Time support
- ---------------------
-
- * Here you can enable or disable date and time support. If you enable
- * it you will have to create 6 functions, that are described in the
- * EFSL manual. If the functions are not present when linking your
- * program with the library you will get unresolved dependencies.
- */
- /*#define DATE_TIME_SUPPORT*/
-
-/* Error reporting support
- -----------------------
-
- * When you receive an error in userland, it usually only gives limited
- * information (most likely, fail or success). If error detection and
- * reporting is important for you, you can enable more detailed error
- * reporting here. This is optional, the costs are 1 byte per object,
- * and a small increase in code size.
- * You can enable error recording for all object, or you can select the
- * object manually.
- * For full error reporting use FULL_ERROR_SUPPORT
- * For only the base-core of the library use BASE_ERROR_SUPPORT
- * For IO/Man use ERRSUP_IOMAN
- * For Disc use ERRSUP_IOMAN
- * For Part use ERRSUP_PARTITION
- * For Fs use ERRSUP_FILESYSTEM
- * For File use ERRSUP_FILE
-*/
-
- #define FULL_ERROR_SUPPORT
- /*#define BASE_ERROR_SUPPORT*/
-
-/* List options
- ------------
-
- * In this section youcan configure what kind of data you will get from
- * directory listing requests. Please refer to the documentation for
- * more information
-*/
-
-#define LIST_MAXLENFILENAME 12
-
-
-
-
-/* Debugging configuration
- -----------------------
-
- * Here you can configure the debugging behaviour. Debugging is different
- * on every platform (see debug.h for more information).
- * If your hardware has no means of output (printf) dont define any anything,
- * and nothing will happen. For real world use debugging should be turned off.
-*/
-
- #define DEBUG_
-
-
-#endif
diff --git a/sw/airborne/arch/lpc21/efsl/inc/debug.h b/sw/airborne/arch/lpc21/efsl/inc/debug.h
deleted file mode 100644
index 0abaf84999..0000000000
--- a/sw/airborne/arch/lpc21/efsl/inc/debug.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------------------------------------------- *
-* *
-* Filename : debug.h *
-* Description : Headerfile for debug.c *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-/* Contributions
- * LPC2000 ARM7 Interface (c)2005 Martin Thomas *
- */
-
-#ifndef __DEBUG_H__
-#define __DEBUG_H__
-
-/*****************************************************************************/
-#include "types.h"
-#include "config.h"
-/*****************************************************************************/
-
-#ifndef DEBUG
- #define TXT(x) ;
- #define DBG(x) ;
- #define FUNC_IN(x) ;
- #define FUNC_OUT(x) ;
-#endif
-
-#ifdef DEBUG
- #if defined(HW_ENDPOINT_LINUX) || defined(HW_ENDPOINT_LINUX64)
- #define HW_ENDPOINT_LINUX_ALL
- #endif
-
- #ifdef HW_ENDPOINT_ATMEGA128_SD
- #include
- #include
- #include
- #include
-
- #define TXT(x) PSTR(x)
- #define DBG(x) debug x
- #define FUNC_IN(x) ;
- #define FUNC_OUT(x) ;
- #endif
-
- #ifdef HW_ENDPOINT_LINUX_ALL
- #include
- #include
-
- #define TXT(x) x
- #define DBG(x) debug x
- #define FUNC_IN(x) debug_funcin(x)
- #define FUNC_OUT(x) debug_funcout(x)
- #endif
-
- #ifdef HW_ENDPOINT_DSP_TI6713_SD
- #include
- #include
-
- #define TXT(x) x
- #define DBG(x) printf x
- #define FUNC_IN(x) ;
- #define FUNC_OUT(x) ;
- #endif
- #ifdef HW_ENDPOINT_NIOS_2_SD
- #include
- #include
-
- #define TXT(x) x
- #define DBG(x) printf x
- #define FUNC_IN(x) ;
- #define FUNC_OUT(x) ;
- #endif
- #ifdef HW_ENDPOINT_LPC2000_SD
- #include "interfaces/lpc2000_dbg_printf.h"
-
- #define TXT(x) x
- #define DBG(x) debug x
- #define FUNC_IN(x) ;
- #define FUNC_OUT(x) ;
- #define debug lpc2000_debug_printf
- #else
- void debug(const eint8 *format, ...); /* This is messy FIXME */
- #endif
-
- void debug_init();
- void debug_end();
-
- #ifdef HW_ENDPOINT_LINUX_ALL
- FILE* debugfile;
- volatile euint8 tw;
- void debug_funcin(const eint8 *format, ...);
- void debug_funcout(const eint8 *format, ...);
- euint8 debug_getByte();
- euint8 debug_getString(euint8 *data,euint16 length);
- #endif
-
- #ifdef HW_ENDPOINT_ATMEGA128_SD
- void debug_initUART(euint16 baudrate );
- void debug_sendByte(euint8 data );
- #endif
-
-#endif
-
-#endif
diff --git a/sw/airborne/arch/lpc21/efsl/inc/dir.h b/sw/airborne/arch/lpc21/efsl/inc/dir.h
deleted file mode 100644
index 0e840883be..0000000000
--- a/sw/airborne/arch/lpc21/efsl/inc/dir.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------- ----------------------------------- *
-* *
-* Filename : dir.h *
-* Description : Headerfile for dir.c The files are an extend of the fs.c fs.h *
-* pair. *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-#ifndef __DDIR_H__
-#define __DDIR_H__
-
-/*****************************************************************************/
-#include "config.h"
-#include "error.h"
-#include "fat.h"
-#include "plibc.h"
-#include "types.h"
-#include "ioman.h"
-#include "time.h"
-#include "fs.h"
-/*****************************************************************************/
-
-#define ATTR_READ_ONLY 0x01
-#define ATTR_HIDDEN 0x02
-#define ATTR_SYSTEM 0x04
-#define ATTR_VOLUME_ID 0x08
-#define ATTR_DIRECTORY 0x10
-#define ATTR_ARCHIVE 0x20
-
-#define OFFSET_DE_FILENAME 0
-#define OFFSET_DE_ATTRIBUTE 11
-#define OFFSET_DE_NTRESERVED 12
-#define OFFSET_DE_CRTIMETNT 13
-#define OFFSET_DE_CREATETIME 14
-#define OFFSET_DE_CREATEDATE 16
-#define OFFSET_DE_LASTACCESSDATE 18
-#define OFFSET_DE_FIRSTCLUSTERHIGH 20
-#define OFFSET_DE_WRITETIME 22
-#define OFFSET_DE_WRITEDATE 24
-#define OFFSET_DE_FIRSTCLUSTERLOW 26
-#define OFFSET_DE_FILESIZE 28
-
-#define DIRFIND_FILE 0
-#define DIRFIND_FREE 1
-
-void dir_getFileStructure(FileSystem *fs,FileRecord *filerec,FileLocation *loc);
-void dir_createDirectoryEntry(FileSystem *fs,FileRecord *filerec,FileLocation *loc);
-void dir_createDefaultEntry(FileSystem *fs,FileRecord *filerec,eint8* fatfilename);
-void dir_setFirstCluster(FileSystem *fs,FileLocation *loc,euint32 cluster_addr);
-void dir_setFileSize(FileSystem *fs,FileLocation *loc,euint32 numbytes);
-euint32 dir_findinRoot(FileSystem *fs,eint8 * fatname, FileLocation *loc);
-euint32 dir_findinDir(FileSystem *fs, eint8 * fatname, euint32 startCluster, FileLocation *loc, euint8 mode);
-euint32 dir_findinBuf(euint8 *buf,eint8 *fatname, FileLocation *loc, euint8 mode);
-euint32 dir_findinCluster(FileSystem *fs,euint32 cluster,eint8 *fatname, FileLocation *loc, euint8 mode);
-euint32 dir_findinRootArea(FileSystem *fs,eint8* fatname, FileLocation *loc, euint8 mode);
-esint8 dir_getFatFileName(eint8* filename, eint8* fatfilename);
-esint8 dir_updateDirectoryEntry(FileSystem *fs,FileRecord *entry,FileLocation *loc);
-esint8 dir_addCluster(FileSystem *fs,euint32 firstCluster);
-#endif
diff --git a/sw/airborne/arch/lpc21/efsl/inc/disc.h b/sw/airborne/arch/lpc21/efsl/inc/disc.h
deleted file mode 100644
index eafe09dd83..0000000000
--- a/sw/airborne/arch/lpc21/efsl/inc/disc.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------- ----------------------------------- *
-* *
-* Filename : disc.h *
-* Description : This is the header file for disc.c *
-* *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-#ifndef __DISC_H_
-#define __DISC_H_
-
-/*****************************************************************************/
-#include "config.h"
-#include "error.h"
-#include "interface.h"
-#include "ioman.h"
-#include "types.h"
-#include "debug.h"
-/*****************************************************************************/
-
-#define LBA_ADDR_MBR 0
-#define PARTITION_TABLE_OFFSET 0x1BE
-
-/**********************************************************\
- PartitionField
- ------------
-* uchar type Type of partition
-* ulong LBA_begin LBA address of first sector.
-* ulong numSectors Number of 512byte sectors
-This structure is a literal representation of a 16 byte
-partitionfield. Direct I/O is possible.
-\**********************************************************/
-struct PartitionField{
- euint8 bootFlag;
- euint8 CHS_begin[3];
- euint8 type;
- euint8 CHS_end[3];
- euint32 LBA_begin;
- euint32 numSectors;
-};
-typedef struct PartitionField PartitionField;
-
-#define SIZE_PARTITION_FIELD 16
-
-/***************************************************************************************\
- Disc
- --
-* CompactFlash* sourcedisc Pointer to the hardwareobject that this disc is on.
-* PartitionField* partitions Array of PartitionFields, containing the partition info
-\***************************************************************************************/
-struct Disc{
- IOManager *ioman;
- DISC_ERR_EUINT8
- PartitionField partitions[4];
-};
-typedef struct Disc Disc;
-
-void disc_initDisc(Disc *disc,IOManager *ioman);
-void disc_loadMBR(Disc *disc);
-
-#include "extract.h"
-
-#endif
diff --git a/sw/airborne/arch/lpc21/efsl/inc/efs.h b/sw/airborne/arch/lpc21/efsl/inc/efs.h
deleted file mode 100644
index b8bc20dffa..0000000000
--- a/sw/airborne/arch/lpc21/efsl/inc/efs.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------- ----------------------------------- *
-* *
-* Filename : efs.h *
-* Description : Headerfile for efs.c *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-#ifndef __EFS_H__
-#define __EFS_H__
-
-/*****************************************************************************/
-#include "types.h"
-#include "config.h"
-#include "interface.h"
-#include "disc.h"
-#include "partition.h"
-#include "fs.h"
-#include "file.h"
-#include "time.h"
-#include "ui.h"
-/*****************************************************************************/
-
-typedef File EmbeddedFile;
-
-struct EmbeddedFileSystem{
- hwInterface myCard;
- IOManager myIOman;
- Disc myDisc;
- Partition myPart;
- FileSystem myFs;
-};
-typedef struct EmbeddedFileSystem EmbeddedFileSystem;
-
-esint8 efs_init(EmbeddedFileSystem * efs,eint8 * opts);
-
-
-#endif
-
diff --git a/sw/airborne/arch/lpc21/efsl/inc/error.h b/sw/airborne/arch/lpc21/efsl/inc/error.h
deleted file mode 100644
index 6ebad4c1cc..0000000000
--- a/sw/airborne/arch/lpc21/efsl/inc/error.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------- ----------------------------------- *
-* *
-* Filename : error.h *
-* Description : Header file containing error-defines. *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-#ifndef __ERROR_H_
-#define __ERROR_H_
-
-/*****************************************************************************/
-#include "config.h"
-#include "interface.h"
-/*****************************************************************************/
-
-#if defined (FULL_ERROR_SUPPORT)
- #define ERRSUP_IOMAN
- #define ERRSUP_DISC
- #define ERRSUP_PARTITION
- #define ERRSUP_FAT_FILESYSTEM
- #define ERRSUP_FAT_FILESYSTEM
-#elif defined (BASE_ERROR_SUPPORT)
- #define ERRSUP_IOMAN
- #define ERRSUP_DISC
- #define ERRSUP_PARTITION
-#endif
-
-#if defined (HWINT_HAS_ERROR_SUPPORT) && defined (INTERFACE_ERROR_SUPPORT)
- #define ERRSUP_HWINTERFACE
-#endif
-
-#ifdef ERRSUP_IOMAN
- #define IOMAN_ERR_EUINT8 euint8 error;
- #define ioman_setError(ioman,errval) ioman->error = errval
- #define ioman_getError(ioman) ioman->error
-#else
- #define IOMAN_ERR_EUINT8
- #define ioman_setError(ioman,errval)
- #define ioman_getError(ioman) 0
-#endif
-
-#ifdef ERRSUP_DISC
- #define DISC_ERR_EUINT8 euint8 error;
- #define disc_setError(disc,errval) disc->error = errval
- #define disc_getError(disc) disc->error
-#else
- #define DISC_ERR_EUINT8
- #define disc_setError(disc,errval)
- #define disc_getError(disc) 0
-#endif
-
-#ifdef ERRSUP_PART
- #define PART_ERR_EUINT8 euint8 error;
- #define part_setError(part,errval) part->error = errval
- #define part_getError(part) part->error
-#else
- #define PART_ERR_EUINT8
- #define part_setError(part,errval)
- #define part_getError(part) 0
-#endif
-
-#ifdef ERRSUP_FAT_FILESYSTEM
- #define FILESYSTEM_ERR_EUINT8 euint8 error;
- #define fs_setError(fs,errval) fs->error = errval
- #define fs_getError(fs) fs->error
-#else
- #define FILESYSTEM_ERR_EUINT8
- #define fs_setError(fs,errval)
- #define fs_getError(fs) 0
-#endif
-
-#ifdef ERRSUP_FILE
- #define FILE_ERR_EUINT8 euint8 error;
- #define file_setError(file,errval) file->error = errval
- #define file_getError(file) file->error
-#else
- #define FILE_ERR_EUINT8
- #define file_setError(file,errval)
- #define file_getError(file) 0
-#endif
-
-#define IOMAN_NOERROR 0
-#define IOMAN_ERR_SETATTROUTOFBOUNDS 1
-#define IOMAN_ERR_GETATTROUTOFBOUNDS 2
-#define IOMAN_ERR_READFAIL 3
-#define IOMAN_ERR_WRITEFAIL 4
-#define IOMAN_ERR_OPOUTOFBOUNDS 5
-#define IOMAN_ERR_PUSHBEYONDSTACK 6
-#define IOMAN_ERR_POPEMPTYSTACK 7
-#define IOMAN_ERR_CACHEPTROUTOFRANGE 8
-#define IOMAN_ERR_WRITEREADONLYSECTOR 9
-#define IOMAN_ERR_NOMEMORY 10
-
-#define DISC_NOERROR 0
-
-#define PART_NOERROR 0
-
-
-#endif
diff --git a/sw/airborne/arch/lpc21/efsl/inc/extract.h b/sw/airborne/arch/lpc21/efsl/inc/extract.h
deleted file mode 100644
index acd838fe46..0000000000
--- a/sw/airborne/arch/lpc21/efsl/inc/extract.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------- ----------------------------------- *
-* *
-* Filename : extract.h *
-* Description : Headerfile for extract.c *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-#ifndef __EXTRACT_H_
-#define __EXTRACT_H_
-
-/*****************************************************************************/
-#include "config.h"
-#include "disc.h"
-#include "types.h"
-/*****************************************************************************/
-
-#ifdef BIG_ENDIAN
-
-#define ltb_end16(x) ((((uint16)(x) & 0xff00) >> 8) | \
- (((uint16)(x) & 0x00ff) << 8))
-#define ltb_end32(x) ((((uint32)(x) & 0xff000000) >> 24) | \
- (((uint32)(x) & 0x00ff0000) >> 8) | \
- (((uint32)(x) & 0x0000ff00) << 8) | \
- (((uint32)(x) & 0x000000ff) << 24))
-
-#else
-
-#define ltb_end16(x) (x)
-#define ltb_end32(x) (x)
-
-#endif
-
-#define btl_end16 ltb_end16
-#define btl_end32 ltb_end32
-
-
-/*****************************************************************************/
-
-euint16 ex_getb16(euint8* buf,euint32 offset);
-void ex_setb16(euint8* buf,euint32 offset,euint16 data);
-
-euint32 ex_getb32(euint8* buf,euint32 offset);
-void ex_setb32(euint8* buf,euint32 offset,euint32 data);
-
-void ex_getPartitionField(euint8* buf,PartitionField* pf, euint32 offset);
-void ex_setPartitionField(euint8* buf,PartitionField* pf, euint32 offset);
-
-#endif
-
diff --git a/sw/airborne/arch/lpc21/efsl/inc/fat.h b/sw/airborne/arch/lpc21/efsl/inc/fat.h
deleted file mode 100644
index f2134a92fb..0000000000
--- a/sw/airborne/arch/lpc21/efsl/inc/fat.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------- ----------------------------------- *
-* *
-* Filename : fat.h *
-* Description : Headerfile for fat.c The files are an extend of the fs.c fs.h *
-* pair. *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-#ifndef __FAT_H_
-#define __FAT_H_
-
-/*****************************************************************************/
-#include "config.h"
-#include "error.h"
-#include "file.h"
-#include "debug.h"
-#include "types.h"
-/*****************************************************************************/
-
-euint32 fat_getSectorAddressFatEntry(FileSystem *fs,euint32 cluster_addr);
-euint32 fat_getNextClusterAddress(FileSystem *fs, euint32 cluster_addr, euint16 *linear);
-void fat_setNextClusterAddress(FileSystem *fs,euint32 cluster_addr,euint32 next_cluster_addr);
-eint16 fat_isEocMarker(FileSystem *fs,euint32 fat_entry);
-euint32 fat_giveEocMarker(FileSystem *fs);
-euint32 fat_findClusterAddress(FileSystem *fs,euint32 cluster,euint32 offset, euint8 *linear);
-euint32 fat_getNextClusterAddressWBuf(FileSystem *fs,euint32 cluster_addr, euint8 * buf);
-void fat_setNextClusterAddressWBuf(FileSystem *fs,euint32 cluster_addr,euint32 next_cluster_addr,euint8 * buf);
-esint16 fat_getNextClusterChain(FileSystem *fs, ClusterChain *Cache);
-void fat_bogus(void);
-esint16 fat_LogicToDiscCluster(FileSystem *fs, ClusterChain *Cache,euint32 logiccluster);
-eint16 fat_allocClusterChain(FileSystem *fs,ClusterChain *Cache,euint32 num_clusters);
-eint16 fat_unlinkClusterChain(FileSystem *fs,ClusterChain *Cache);
-euint32 fat_countClustersInChain(FileSystem *fs,euint32 firstcluster);
-euint32 fat_DiscToLogicCluster(FileSystem *fs,euint32 firstcluster,euint32 disccluster);
-euint32 fat_countFreeClusters(FileSystem *fs);
-
-#endif
diff --git a/sw/airborne/arch/lpc21/efsl/inc/file.h b/sw/airborne/arch/lpc21/efsl/inc/file.h
deleted file mode 100644
index 3b7f7f39d7..0000000000
--- a/sw/airborne/arch/lpc21/efsl/inc/file.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------- ----------------------------------- *
-* *
-* Filename : file.h *
-* Description : Headerfile for file.c *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-#ifndef __FILE_H_
-#define __FILE_H_
-
-/*****************************************************************************/
-#include "config.h"
-#include "error.h"
-#include "time.h"
-#include "fs.h"
-#include "dir.h"
-#include "plibc.h"
-#include "debug.h"
-#include "types.h"
-#include "fat.h"
-/*****************************************************************************/
-
-#define MODE_READ 0x72
-#define MODE_WRITE 0x77
-#define MODE_APPEND 0x61
-
-#define FILE_STATUS_OPEN 0
-#define FILE_STATUS_WRITE 1
-
-/*****************************************************************************\
- * File
- * ------
- * FileRecord DirEntry Copy of the FileRecord for this file
- * FileLocation Location Location of the direntry
- * FileSystem *fs Pointer to the filesystem this file is on
- * FileCache Cache Pointer to the cache object of the file
- * euint8 FileStatus Contains bitfield regarding filestatus
- * euint32 FilePtr Offsetpointer for fread/fwrite functions
- * euint32 FileSize Working copy of the filesize, always use this,
- it is more up to date than DirEntry->FileSize,
- which is only updated when flushing to disc.
-\*****************************************************************************/
-struct File{
- FileRecord DirEntry;
- FileLocation Location; /* Location in directory!! */
- FileSystem *fs;
- ClusterChain Cache;
- euint8 FileStatus;
- euint32 FilePtr;
- euint32 FileSize;
-};
-typedef struct File File;
-
-
-esint8 file_fopen(File *file, FileSystem *fs,eint8 *filename, eint8 mode);
-esint8 file_fclose(File *file);
-esint16 file_setpos(File *file,euint32 pos);
-euint32 file_fread(File *file,euint32 offset, euint32 size,euint8 *buf);
-euint32 file_read (File *file,euint32 size,euint8 *buf);
-euint32 file_fwrite(File* file,euint32 offset,euint32 size,euint8* buf);
-euint32 file_write (File* file,euint32 size,euint8* buf);
-eint8* file_normalToFatName(eint8* filename,eint8* fatfilename);
-euint8 file_validateChar(euint8 c);
-void file_initFile(File *file, FileSystem *fs, FileLocation *loc);
-eint16 file_allocClusterChain(File *file,euint32 num_clusters);
-void file_setAttr(File* file,euint8 attribute,euint8 val);
-euint8 file_getAttr(File* file,euint8 attribute);
-euint32 file_requiredCluster(File *file,euint32 offset, euint32 size);
-
-#endif
diff --git a/sw/airborne/arch/lpc21/efsl/inc/fs.h b/sw/airborne/arch/lpc21/efsl/inc/fs.h
deleted file mode 100644
index f592ed15af..0000000000
--- a/sw/airborne/arch/lpc21/efsl/inc/fs.h
+++ /dev/null
@@ -1,196 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------- ----------------------------------- *
-* *
-* Filename : fs.h *
-* Description : Headerfile for fs.c *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-#ifndef __FS_H_
-#define __FS_H_
-
-/*****************************************************************************/
-#include "config.h"
-#include "error.h"
-#include "partition.h"
-#include "types.h"
-#include "debug.h"
-#include "time.h"
-/*****************************************************************************/
-
-#define FAT12 1
-#define FAT16 2
-#define FAT32 3
-
-#define FS_INFO_SECTOR 1
-#define FSINFO_MAGIC_BEGIN 0x41615252
-#define FSINFO_MAGIC_END 0xAA550000
-
-/*****************************************************************************************\
- VolumeId
- ------
-* ushort BytesPerSector Must be 512 or shit happens.
-* uchar SectorsPerCluster Must be multiple of 2 (1,2,4,8,16 or 32)
-* ushort ReservedSectorCount Number of sectors after which the first FAT begins.
-* uchar NumberOfFats Should be 2
-* ushort RootEntryCount Number of filerecords the Rootdir can contain. NOT for FAT32
-* ushort SectorCount16 Number of Sectors for 12/16 bit FAT
-* ushort FatSectorCount16 Number of Sectors for 1 FAT on FAT12/16 bit FAT's
-* ulong SectorCount32 Number of Sectors for 32 bit FAT
-* ulong FatSectorCount32 Number of Sectors for 1 FAT on FAT32
-* ulong RootCluster Clusternumber of the first cluster of the RootDir on FAT 32
-This is NOT a complete volumeId copy, no direct I/O is possible.
-\*****************************************************************************************/
-struct VolumeId{
- euint16 BytesPerSector;
- euint8 SectorsPerCluster;
- euint16 ReservedSectorCount;
- euint8 NumberOfFats;
- euint16 RootEntryCount;
- euint16 SectorCount16;
- euint16 FatSectorCount16;
- euint32 SectorCount32;
- euint32 FatSectorCount32;
- euint32 RootCluster;
-};
-typedef struct VolumeId VolumeId;
-
-/**************************************************************************************************\
- FileSystem
- --------
-* Partition* part Pointer to partition on which this FS resides.
-* VolumeId volumeId Contains important FS info.
-* ulong DataClusterCount Number of dataclusters. This number determines the FATType.
-* ulong FatSectorCount Number of sectors for 1 FAT, regardless of FATType
-* ulong SectorCount Number of sectors, regardless of FATType
-* ulong FirstSectorRootDir First sector of the RootDir.
-* uchar type Determines FATType (FAT12 FAT16 or FAT32 are defined)
-
-\**************************************************************************************************/
-struct FileSystem{
- Partition *part;
- VolumeId volumeId;
- euint32 DataClusterCount;
- euint32 FatSectorCount;
- euint32 SectorCount;
- euint32 FirstSectorRootDir;
- euint32 FirstClusterCurrentDir;
- euint32 FreeClusterCount;
- euint32 NextFreeCluster;
- euint8 type;
-};
-typedef struct FileSystem FileSystem;
-
-/**************************************************************************************************\ FileLocation
- ----------
-* euint32 Sector Sector where the directoryentry of the file/directory can be found.
-* euint8 Offset Offset (in 32byte segments) where in the sector the entry is.
-
-\**************************************************************************************************/
-struct FileLocation{
- euint32 Sector;
- euint8 Offset;
- euint8 attrib;
-};
-typedef struct FileLocation FileLocation;
-
-/*****************************************************************************\
-* FileCache
-* -----------
-* This struct acts as cache for the current file. It contains the current
-* FATPointer (next location in the FAT table), LogicCluster
-* (the last part of the file that was read) and DataCluster
-* (the last cluster that was read).
-* euint8 Linear For how many more clusters the file is nonfragmented
-* euint32 LogicCluster This field determines the n'th cluster of the file as current
-* euint32 DiscCluster If this field is 0, it means the cache is invalid. Otherwise
- it is the clusternumber corresponding with
- logic(FirstCluster+LogicCluster).
-* euint32 FirstCluster First cluster of the chain. Zero or one are invalid.
-* euint32 LastCluster Last cluster of the chain (is not always filled in)
-\*****************************************************************************/
-struct ClusterChain{
- euint8 Linear;
- esint32 LogicCluster;
- euint32 DiscCluster;
- euint32 FirstCluster;
- euint32 LastCluster;
- euint32 ClusterCount;
-};
-typedef struct ClusterChain ClusterChain;
-
-/*****************************************************************************\
-* FileRecord *
-* ------------ *
-* This struct represents a 32 byte file entry as it occurs in the data area *
-* of the filesystem. Direct I/O is possible. *
-\*****************************************************************************/
-struct FileRecord{
- euint8 FileName[11];
- euint8 Attribute;
- euint8 NTReserved;
- euint8 MilliSecTimeStamp;
- euint16 CreatedTime;
- euint16 CreatedDate;
- euint16 AccessDate;
- euint16 FirstClusterHigh;
- euint16 WriteTime;
- euint16 WriteDate;
- euint16 FirstClusterLow;
- euint32 FileSize;
-};
-typedef struct FileRecord FileRecord;
-
-
-eint16 fs_initFs(FileSystem *fs,Partition *part);
-eint16 fs_isValidFat(Partition *part);
-void fs_loadVolumeId(FileSystem *fs, Partition *part);
-esint16 fs_verifySanity(FileSystem *fs);
-void fs_countDataSectors(FileSystem *fs);
-void fs_determineFatType(FileSystem *fs);
-void fs_findFirstSectorRootDir(FileSystem *fs);
-void fs_initCurrentDir(FileSystem *fs);
-euint32 fs_getSectorAddressRootDir(FileSystem *fs,euint32 secref);
-euint32 fs_clusterToSector(FileSystem *fs,euint32 cluster);
-euint32 fs_sectorToCluster(FileSystem *fs,euint32 sector);
-euint32 fs_getNextFreeCluster(FileSystem *fs,euint32 startingcluster);
-euint32 fs_giveFreeClusterHint(FileSystem *fs);
-esint16 fs_findFreeFile(FileSystem *fs,eint8* filename,FileLocation *loc,euint8 mode);
-esint8 fs_findFile(FileSystem *fs,eint8* filename,FileLocation *loc,euint32 *lastDir);
-esint8 fs_findFile_broken(FileSystem *fs,eint8* filename,FileLocation *loc);
-euint32 fs_getLastCluster(FileSystem *fs,ClusterChain *Cache);
-euint32 fs_getFirstClusterRootDir(FileSystem *fs);
-euint16 fs_makeDate(void);
-euint16 fs_makeTime(void);
-void fs_setFirstClusterInDirEntry(FileRecord *rec,euint32 cluster_addr);
-void fs_initClusterChain(FileSystem *fs,ClusterChain *cache,euint32 cluster_addr);
-esint8 fs_flushFs(FileSystem *fs);
-esint8 fs_umount(FileSystem *fs);
-esint8 fs_clearCluster(FileSystem *fs,euint32 cluster);
-esint8 fs_getFsInfo(FileSystem *fs,euint8 force_update);
-esint8 fs_setFsInfo(FileSystem *fs);
-
-#endif
diff --git a/sw/airborne/arch/lpc21/efsl/inc/interface.h b/sw/airborne/arch/lpc21/efsl/inc/interface.h
deleted file mode 100644
index dcc1246db9..0000000000
--- a/sw/airborne/arch/lpc21/efsl/inc/interface.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* -------------------------------------------------------- *
-* *
-* Filename : interface.h *
-* Description : This headerfile includes the right interface headerfile *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-#ifndef __TYPES_H__
-#define __TYPES_H__
-
-/*****************************************************************************/
-#include "types.h"
-#include "config.h"
-/*****************************************************************************/
-
-#if defined(HW_ENDPOINT_LINUX) || defined(HW_ENDPOINT_LINUX64)
- #include "interfaces/linuxfile.h"
-#elif defined(HW_ENDPOINT_ATMEGA128_SD)
- #include "interfaces/atmega128.h"
-#elif defined(HW_ENDPOINT_DSP_TI6713_SD)
- #include "interfaces/dsp67xx.h"
-#elif defined(HW_ENDPOINT_LPC2000_SD)
- #include "interfaces/lpc2000_spi.h"
-#else
- #error "NO INTERFACE DEFINED - see interface.h"
-#endif
-
-#endif
-
diff --git a/sw/airborne/arch/lpc21/efsl/inc/interfaces/LPC2000_regs.h b/sw/airborne/arch/lpc21/efsl/inc/interfaces/LPC2000_regs.h
deleted file mode 100644
index 79341825a5..0000000000
--- a/sw/airborne/arch/lpc21/efsl/inc/interfaces/LPC2000_regs.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* based on LPC213x.h from Keil GmbH (keil.com/arm.com) */
-
-#ifndef LPC2000_regs_h
-#define LPC2000_regs_h
-
-/* Pin Connect Block */
-#define PINSEL0 (*((volatile unsigned long *) 0xE002C000))
-#define PINSEL1 (*((volatile unsigned long *) 0xE002C004))
-#define PINSEL2 (*((volatile unsigned long *) 0xE002C014))
-
-/* General Purpose Input/Output (GPIO) */
-#define IOPIN0 (*((volatile unsigned long *) 0xE0028000))
-#define IOSET0 (*((volatile unsigned long *) 0xE0028004))
-#define IODIR0 (*((volatile unsigned long *) 0xE0028008))
-#define IOCLR0 (*((volatile unsigned long *) 0xE002800C))
-#define IOPIN1 (*((volatile unsigned long *) 0xE0028010))
-#define IOSET1 (*((volatile unsigned long *) 0xE0028014))
-#define IODIR1 (*((volatile unsigned long *) 0xE0028018))
-#define IOCLR1 (*((volatile unsigned long *) 0xE002801C))
-
-/* SPI0 (Serial Peripheral Interface 0) */
-#define S0SPCR (*((volatile unsigned char *) 0xE0020000))
-#define S0SPSR (*((volatile unsigned char *) 0xE0020004))
-#define S0SPDR (*((volatile unsigned char *) 0xE0020008))
-#define S0SPCCR (*((volatile unsigned char *) 0xE002000C))
-#define S0SPTCR (*((volatile unsigned char *) 0xE0020010))
-#define S0SPTSR (*((volatile unsigned char *) 0xE0020014))
-#define S0SPTOR (*((volatile unsigned char *) 0xE0020018))
-#define S0SPINT (*((volatile unsigned char *) 0xE002001C))
-
-/* SSP Controller */
-#define SSPCR0 (*((volatile unsigned short* ) 0xE0068000))
-#define SSPCR1 (*((volatile unsigned char * ) 0xE0068004))
-#define SSPDR (*((volatile unsigned short* ) 0xE0068008))
-#define SSPSR (*((volatile unsigned char * ) 0xE006800C))
-#define SSPCPSR (*((volatile unsigned char * ) 0xE0068010))
-#define SSPIMSC (*((volatile unsigned char * ) 0xE0068014))
-#define SSPRIS (*((volatile unsigned char * ) 0xE0068018))
-#define SSPMIS (*((volatile unsigned char * ) 0xE006801C))
-#define SSPICR (*((volatile unsigned char * ) 0xE0068020))
-#define SSPDMACR (*((volatile unsigned char * ) 0xE0068024))
-
-/* Real Time Clock */
-/* maybe useful for the efsl time-handling : */
-#define ILR (*((volatile unsigned char *) 0xE0024000))
-#define CTC (*((volatile unsigned short*) 0xE0024004))
-#define CCR (*((volatile unsigned char *) 0xE0024008))
-#define CIIR (*((volatile unsigned char *) 0xE002400C))
-#define AMR (*((volatile unsigned char *) 0xE0024010))
-#define CTIME0 (*((volatile unsigned long *) 0xE0024014))
-#define CTIME1 (*((volatile unsigned long *) 0xE0024018))
-#define CTIME2 (*((volatile unsigned long *) 0xE002401C))
-#define SEC (*((volatile unsigned char *) 0xE0024020))
-#define MIN (*((volatile unsigned char *) 0xE0024024))
-#define HOUR (*((volatile unsigned char *) 0xE0024028))
-#define DOM (*((volatile unsigned char *) 0xE002402C))
-#define DOW (*((volatile unsigned char *) 0xE0024030))
-#define DOY (*((volatile unsigned short*) 0xE0024034))
-#define MONTH (*((volatile unsigned char *) 0xE0024038))
-#define YEAR (*((volatile unsigned short*) 0xE002403C))
-#define ALSEC (*((volatile unsigned char *) 0xE0024060))
-#define ALMIN (*((volatile unsigned char *) 0xE0024064))
-#define ALHOUR (*((volatile unsigned char *) 0xE0024068))
-#define ALDOM (*((volatile unsigned char *) 0xE002406C))
-#define ALDOW (*((volatile unsigned char *) 0xE0024070))
-#define ALDOY (*((volatile unsigned short*) 0xE0024074))
-#define ALMON (*((volatile unsigned char *) 0xE0024078))
-#define ALYEAR (*((volatile unsigned short*) 0xE002407C))
-#define PREINT (*((volatile unsigned short*) 0xE0024080))
-#define PREFRAC (*((volatile unsigned short*) 0xE0024084))
-
-#endif
diff --git a/sw/airborne/arch/lpc21/efsl/inc/interfaces/lpc2000_spi.h b/sw/airborne/arch/lpc21/efsl/inc/interfaces/lpc2000_spi.h
deleted file mode 100644
index 0556ce0b5f..0000000000
--- a/sw/airborne/arch/lpc21/efsl/inc/interfaces/lpc2000_spi.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------- ----------------------------------- *
-* *
-* Filename : lpc2000_spi.h *
-* Description : Headerfile for lpc2000_spi.c *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* LPC2000 ARM7 Interface (c)2005 Martin Thomas *
-\*****************************************************************************/
-
-#ifndef __LPC2000_SPI_H_
-#define __LPC2000_SPI_H_
-
-#ifndef FALSE
-#define FALSE 0x00
-#define TRUE 0x01
-#endif
-
-#include "../debug.h"
-#include "config.h"
-
-
-/*************************************************************\
- hwInterface
- ----------
-* FILE* imagefile File emulation of hw interface.
-* long sectorCount Number of sectors on the file.
-\*************************************************************/
-struct hwInterface{
- /*FILE *imageFile;*/
- eint32 sectorCount;
-};
-typedef struct hwInterface hwInterface;
-
-esint8 if_initInterface(hwInterface* file,eint8* opts);
-esint8 if_readBuf(hwInterface* file,euint32 address,euint8* buf);
-esint8 if_writeBuf(hwInterface* file,euint32 address,euint8* buf);
-esint8 if_setPos(hwInterface* file,euint32 address);
-
-void if_spiInit(hwInterface *iface);
-void if_spiSetSpeed(euint8 speed);
-euint8 if_spiSend(hwInterface *iface, euint8 outgoing);
-
-#endif
diff --git a/sw/airborne/arch/lpc21/efsl/inc/interfaces/sd.h b/sw/airborne/arch/lpc21/efsl/inc/interfaces/sd.h
deleted file mode 100644
index d1cc3a787b..0000000000
--- a/sw/airborne/arch/lpc21/efsl/inc/interfaces/sd.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------------------------------------------- *
-* *
-* Filename : sd.h *
-* Revision : Initial developement *
-* Description : Headerfile for sd.c *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-#ifndef __SD_H_
-#define __SD_H_
-
-#include "config.h"
-#include "types.h"
-#include "../debug.h"
-
-#ifdef HW_ENDPOINT_ATMEGA128_SD
- #include "interfaces/atmega128.h"
-#endif
-#ifdef HW_ENDPOINT_DSP_TI6713_SD
- #include "interfaces/dsp67xx.h"
-#endif
-#ifdef HW_ENDPOINT_LPC2000_SD
- #include "interfaces/lpc2000_spi.h"
-#endif
-
-#define CMDREAD 17
-#define CMDWRITE 24
-#define CMDREADCSD 9
-
-esint8 sd_Init(hwInterface *iface);
-void sd_Command(hwInterface *iface,euint8 cmd, euint16 paramx, euint16 paramy);
-euint8 sd_Resp8b(hwInterface *iface);
-void sd_Resp8bError(hwInterface *iface,euint8 value);
-euint16 sd_Resp16b(hwInterface *iface);
-esint8 sd_State(hwInterface *iface);
-
-esint8 sd_readSector(hwInterface *iface,euint32 address,euint8* buf, euint16 len);
-esint8 sd_writeSector(hwInterface *iface,euint32 address, euint8* buf);
-esint8 sd_getDriveSize(hwInterface *iface, euint32* drive_size );
-
-#endif
diff --git a/sw/airborne/arch/lpc21/efsl/inc/ioman.h b/sw/airborne/arch/lpc21/efsl/inc/ioman.h
deleted file mode 100644
index 539cc85669..0000000000
--- a/sw/airborne/arch/lpc21/efsl/inc/ioman.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/*****************************************************************************\
-* libfat - General purpose FAT library *
-* ---------------------------------- *
-* *
-* Filename : ioman.h *
-* Description : Header file for ioman.c *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-#ifndef __IOMAN_H__
-#define __IOMAN_H__
-
-/*****************************************************************************/
-#include "interface.h"
-#include "error.h"
-#include "plibc.h"
-#include "debug.h"
-#include "types.h"
-#include "config.h"
-/*****************************************************************************/
-
-#define IOMAN_STATUS_ATTR_VALIDDATA 0
-#define IOMAN_STATUS_ATTR_USERBUFFER 1
-#define IOMAN_STATUS_ATTR_WRITE 2
-
-#define IOM_MODE_READONLY 1
-#define IOM_MODE_READWRITE 2
-#define IOM_MODE_EXP_REQ 4
-
-struct IOManStack{
- euint32 sector;
- euint8 status;
- euint8 usage;
-};
-typedef struct IOManStack IOManStack;
-
-struct IOManager{
- hwInterface *iface;
-
- euint8 *bufptr;
- euint16 numbuf;
- euint16 numit;
-
- IOMAN_ERR_EUINT8
-
- IOManStack stack[IOMAN_NUMBUFFER][IOMAN_NUMITERATIONS];
-
- euint32 sector[IOMAN_NUMBUFFER];
- euint8 status[IOMAN_NUMBUFFER];
- euint8 usage[IOMAN_NUMBUFFER];
- euint8 reference[IOMAN_NUMBUFFER];
- euint8 itptr[IOMAN_NUMBUFFER];
-#ifdef IOMAN_DO_MEMALLOC
- euint8 cache_mem[IOMAN_NUMBUFFER * 512];
-#endif
-};
-typedef struct IOManager IOManager;
-
-#define IOBJ ioman
-
-#define ioman_isValid(bp) ioman_getAttr(IOBJ,bp,IOMAN_STATUS_ATTR_VALIDDATA)
-#define ioman_isUserBuf(bp) ioman_getAttr(IOBJ,bp,IOMAN_STATUS_ATTR_USERBUFFER)
-#define ioman_isWritable(bp) ioman_getAttr(IOBJ,bp,IOMAN_STATUS_ATTR_WRITE)
-
-#define ioman_setValid(bp) ioman_setAttr(IOBJ,bp,IOMAN_STATUS_ATTR_VALIDDATA,1)
-#define ioman_setUserBuf(bp) ioman_setAttr(IOBJ,bp,IOMAN_STATUS_ATTR_USERBUFFER,1)
-#define ioman_setWritable(bp) ioman_setAttr(IOBJ,bp,IOMAN_STATUS_ATTR_WRITE,1)
-
-#define ioman_setNotValid(bp) ioman_setAttr(IOBJ,bp,IOMAN_STATUS_ATTR_VALIDDATA,0)
-#define ioman_setNotUserBuf(bp) ioman_setAttr(IOBJ,bp,IOMAN_STATUS_ATTR_USERBUFFER,0)
-#define ioman_setNotWritable(bp) ioman_setAttr(IOBJ,bp,IOMAN_STATUS_ATTR_WRITE,0)
-
-#define ioman_isReqRo(mode) ((mode)&(IOM_MODE_READONLY))
-#define ioman_isReqRw(mode) ((mode)&(IOM_MODE_READWRITE))
-#define ioman_isReqExp(mode) ((mode)&(IOM_MODE_EXP_REQ))
-
-esint8 ioman_init(IOManager *ioman, hwInterface *iface, euint8* bufferarea);
-void ioman_reset(IOManager *ioman);
-euint8* ioman_getBuffer(IOManager *ioman,euint8* bufferarea);
-void ioman_setAttr(IOManager *ioman,euint16 bufplace,euint8 attribute,euint8 val);
-euint8 ioman_getAttr(IOManager *ioman,euint16 bufplace,euint8 attribute);
-euint8 ioman_getUseCnt(IOManager *ioman,euint16 bufplace);
-void ioman_incUseCnt(IOManager *ioman,euint16 bufplace);
-void ioman_decUseCnt(IOManager *ioman,euint16 bufplace);
-void ioman_resetUseCnt(IOManager *ioman,euint16 bufplace);
-euint8 ioman_getRefCnt(IOManager *ioman,euint16 bufplace);
-void ioman_incRefCnt(IOManager *ioman,euint16 bufplace);
-void ioman_decRefCnt(IOManager *ioman,euint16 bufplace);
-void ioman_resetRefCnt(IOManager *ioman,euint16 bufplace);
-esint8 ioman_pop(IOManager *ioman,euint16 bufplace);
-esint8 ioman_push(IOManager *ioman,euint16 bufplace);
-euint8* ioman_getPtr(IOManager *ioman,euint16 bufplace);
-esint16 ioman_getBp(IOManager *ioman,euint8* buf);
-esint8 ioman_readSector(IOManager *ioman,euint32 address,euint8* buf);
-esint8 ioman_writeSector(IOManager *ioman, euint32 address, euint8* buf);
-void ioman_resetCacheItem(IOManager *ioman,euint16 bufplace);
-esint32 ioman_findSectorInCache(IOManager *ioman, euint32 address);
-esint32 ioman_findFreeSpot(IOManager *ioman);
-esint32 ioman_findUnusedSpot(IOManager *ioman);
-esint32 ioman_findOverallocableSpot(IOManager *ioman);
-esint8 ioman_putSectorInCache(IOManager *ioman,euint32 address, euint16 bufplace);
-esint8 ioman_flushSector(IOManager *ioman, euint16 bufplace);
-euint8* ioman_getSector(IOManager *ioman,euint32 address, euint8 mode);
-esint8 ioman_releaseSector(IOManager *ioman,euint8* buf);
-esint8 ioman_directSectorRead(IOManager *ioman,euint32 address, euint8* buf);
-esint8 ioman_directSectorWrite(IOManager *ioman,euint32 address, euint8* buf);
-esint8 ioman_flushRange(IOManager *ioman,euint32 address_low, euint32 address_high);
-esint8 ioman_flushAll(IOManager *ioman);
-
-void ioman_printStatus(IOManager *ioman);
-
-#endif
diff --git a/sw/airborne/arch/lpc21/efsl/inc/ls.h b/sw/airborne/arch/lpc21/efsl/inc/ls.h
deleted file mode 100644
index 2ca7500550..0000000000
--- a/sw/airborne/arch/lpc21/efsl/inc/ls.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------- ----------------------------------- *
-* *
-* Filename : ls.h *
-* Description : Headerfile for ls.c *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-#ifndef __LS_H__
-#define __LS_H__
-
-/*****************************************************************************/
-#include "config.h"
-#include "fs.h"
-#include "dir.h"
-#include "fat.h"
-/*****************************************************************************/
-
-struct ListDirEntry{
- euint8 FileName[LIST_MAXLENFILENAME];
- euint32 FileSize;
- euint8 Attribute;
-};
-typedef struct ListDirEntry ListDirEntry;
-
-struct DirList{
- FileSystem *fs;
- euint16 cEntry,rEntry;
- /*FileRecord currentEntry;*/
- ListDirEntry currentEntry;
- ClusterChain Cache;
-};
-typedef struct DirList DirList;
-
-esint8 ls_openDir(DirList *dlist,FileSystem *fs,eint8* dirname);
-esint8 ls_getNext(DirList *dlist);
-
-esint8 ls_getDirEntry(DirList *dlist);
-esint8 ls_getRealDirEntry(DirList *dlist);
-esint8 ls_getRootAreaEntry(DirList *dlist);
-esint8 ls_isValidFileEntry(ListDirEntry *entry);
-void ls_fileEntryToDirListEntry(DirList *dlist, euint8* buf, euint16 offset);
-
-#endif
diff --git a/sw/airborne/arch/lpc21/efsl/inc/mkfs.h b/sw/airborne/arch/lpc21/efsl/inc/mkfs.h
deleted file mode 100644
index 182d7aee44..0000000000
--- a/sw/airborne/arch/lpc21/efsl/inc/mkfs.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------------------------------------------- *
-* *
-* Filename : mkfs.h *
-* Description : Headerfile for mkfs.c *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-#ifndef __MKFS_H_
-#define __MKFS_H_
-
-/*****************************************************************************/
-#include "partition.h"
-#include "plibc.h"
-#include "debug.h"
-#include "types.h"
-#include "config.h"
-/*****************************************************************************/
-
-#define MKFS_ERR_TOOLITTLESECTORS 1
-
-signed short mkfs_makevfat(Partition *part);
-
-#endif
diff --git a/sw/airborne/arch/lpc21/efsl/inc/partition.h b/sw/airborne/arch/lpc21/efsl/inc/partition.h
deleted file mode 100644
index b58387e896..0000000000
--- a/sw/airborne/arch/lpc21/efsl/inc/partition.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------------------------------------------- *
-* *
-* Filename : partition.h *
-* Description : Headerfile for partition.c *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-#ifndef __PARTITION_H__
-#define __PARTITION_H__
-
-/*****************************************************************************/
-#include "config.h"
-#include "error.h"
-#include "interface.h"
-#include "disc.h"
-#include "types.h"
-/*****************************************************************************/
-
-#define PT_FAT12 0x01
-#define PT_FAT16A 0x04
-#define PT_FAT16 0x06
-#define PT_FAT32 0x0B
-#define PT_FAT32A 0x5C
-#define PT_FAT16B 0x5E
-
-/*************************************************************************************\
- Partition
- -------
-* Disc* disc Pointer to disc containing this partition.
-* eint8 activePartition Array subscript for disc->partitions[activePartition]
-\*************************************************************************************/
-struct Partition{
- Disc *disc;
- esint8 activePartition;
-};
-typedef struct Partition Partition;
-
-void part_initPartition(Partition *part,Disc* refDisc);
-eint16 part_isFatPart(euint8 type);
-esint8 part_readBuf(Partition *part, euint32 address, euint8* buf);
-esint8 part_readPartBuf(Partition *part, euint32 address, euint8* buf, euint32 offset, euint16 len);
-eint16 part_writeBuf(Partition *part,euint32 address,euint8* buf);
-euint8* part_getSect(Partition *part, euint32 address,euint8 mode);
-esint8 part_relSect(Partition *part, euint8* buf);
-esint8 part_flushPart(Partition *part,euint32 addr_l, euint32 addr_h);
-esint8 part_directSectorRead(Partition *part, euint32 address, euint8* buf);
-esint8 part_directSectorWrite(Partition *part, euint32 address, euint8* buf);
-euint32 part_getRealLBA(Partition *part,euint32 address);
-
-#include "extract.h"
-
-#endif
diff --git a/sw/airborne/arch/lpc21/efsl/inc/plibc.h b/sw/airborne/arch/lpc21/efsl/inc/plibc.h
deleted file mode 100644
index ab6990b245..0000000000
--- a/sw/airborne/arch/lpc21/efsl/inc/plibc.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------------------------------------------- *
-* *
-* Filename : plibc.h *
-* Description : Headerfile for plibc.c *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-#ifndef __PLIBC_H__
-#define __PLIBC_H__
-
-/*****************************************************************************/
-#include "debug.h"
-#include "types.h"
-#include "config.h"
-/*****************************************************************************/
-
-euint16 strMatch(eint8* bufa, eint8*bufb,euint32 n);
-void memCpy(void* psrc, void* pdest, euint32 size);
-void memClr(void *pdest,euint32 size);
-void memSet(void *pdest,euint32 size,euint8 data);
-
-
-#endif
diff --git a/sw/airborne/arch/lpc21/efsl/inc/time.h b/sw/airborne/arch/lpc21/efsl/inc/time.h
deleted file mode 100644
index e5547f7602..0000000000
--- a/sw/airborne/arch/lpc21/efsl/inc/time.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------- ----------------------------------- *
-* *
-* Filename : types.h *
-* Description : Headerfile for types.c *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-#ifndef __TIME_H_
-#define __TIME_H_
-
-/*****************************************************************************/
-#include "types.h"
-/*****************************************************************************/
-
-#ifdef DATE_TIME_SUPPORT
- #define time_getYear(void) efsl_getYear()
- #define time_getMonth(void) efsl_getMonth()
- #define time_getDay(void) efsl_getDay()
- #define time_getHour(void) efsl_getHour()
- #define time_getMinute(void) efsl_getMinute()
- #define time_getSecond(void) efsl_getSecond()
- #define time_getDate(void) fs_makeDate()
- #define time_getTime(void) fs_makeTime()
-#else
- #define time_getYear(void) 0x0;
- #define time_getMonth(void) 0x0;
- #define time_getDay(void) 0x0;
- #define time_getHour(void) 0x0;
- #define time_getMinute(void) 0x0;
- #define time_getSecond(void) 0x0;
- #define time_getDate(void) 0x0;
- #define time_getTime(void) 0x0;
-#endif
-
-#ifdef DATE_TIME_SUPPORT
-euint16 efsl_getYear(void);
-euint8 efsl_getMonth(void);
-euint8 efsl_getDay(void);
-euint8 efsl_getHour(void);
-euint8 efsl_getMinute(void);
-euint8 efsl_getSecond(void);
-euint16 fs_makeDate(void);
-euint16 fs_makeTime(void);
-#endif
-
-euint8 fs_hasTimeSupport(void);
-
-#endif
diff --git a/sw/airborne/arch/lpc21/efsl/inc/types.h b/sw/airborne/arch/lpc21/efsl/inc/types.h
deleted file mode 100644
index 7050d19c94..0000000000
--- a/sw/airborne/arch/lpc21/efsl/inc/types.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------------------------------------------- *
-* *
-* Filename : types.h *
-* Description : This file contains the crossplatform data types *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-/* Contributions
- * (c)2005 Marcio Troccoli *
- */
-
-#ifndef __EFS_TYPES_H__
-#define __EFS_TYPES_H__
-
-/*****************************************************************************/
-#include "config.h"
-/*****************************************************************************/
-
-#if defined(HW_ENDPOINT_LINUX)
- typedef char eint8;
- typedef signed char esint8;
- typedef unsigned char euint8;
- typedef short eint16;
- typedef signed short esint16;
- typedef unsigned short euint16;
- typedef long eint32;
- typedef signed long esint32;
- typedef unsigned long euint32;
-#elif defined(HW_ENDPOINT_LINUX64)
- typedef char eint8;
- typedef signed char esint8;
- typedef unsigned char euint8;
- typedef short eint16;
- typedef signed short esint16;
- typedef unsigned short euint16;
- typedef int eint32;
- typedef signed int esint32;
- typedef unsigned int euint32;
-#elif defined (HW_ENDPOINT_ATMEGA128_SD)
- typedef char eint8;
- typedef signed char esint8;
- typedef unsigned char euint8;
- typedef short eint16;
- typedef signed short esint16;
- typedef unsigned short euint16;
- typedef long eint32;
- typedef signed long esint32;
- typedef unsigned long euint32;
-#elif defined(HW_ENDPOINT_DSP_TI6713_SD)
- typedef char eint8;
- typedef signed char esint8;
- typedef unsigned char euint8;
- typedef short eint16;
- typedef signed short esint16;
- typedef unsigned short euint16;
- typedef int eint32;
- typedef signed int esint32;
- typedef unsigned int euint32;
-#elif defined(NIOS_2)
- typedef char eint8;
- typedef signed char esint8;
- typedef unsigned char euint8;
- typedef short eint16;
- typedef signed short esint16;
- typedef unsigned short euint16;
- typedef int eint32;
- typedef signed int esint32;
- typedef unsigned int euint32;
-#else
- typedef char eint8;
- typedef signed char esint8;
- typedef unsigned char euint8;
- typedef short eint16;
- typedef signed short esint16;
- typedef unsigned short euint16;
- typedef long eint32;
- typedef signed long esint32;
- typedef unsigned long euint32;
-#endif
-
-#endif
diff --git a/sw/airborne/arch/lpc21/efsl/inc/ui.h b/sw/airborne/arch/lpc21/efsl/inc/ui.h
deleted file mode 100644
index 8f1630526a..0000000000
--- a/sw/airborne/arch/lpc21/efsl/inc/ui.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------------------------------------------- *
-* *
-* Filename : ui.h *
-* Description : Headerfile for ui.c *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-#ifndef __UI_H__
-#define __UI_H__
-
-/*****************************************************************************/
-#include "fs.h"
-#include "types.h"
-#include "fat.h"
-#include "dir.h"
-#include "config.h"
-/*****************************************************************************/
-
-short listFiles(FileSystem *fs, char *dir);
-esint16 rmfile(FileSystem *fs,euint8* filename);
-esint8 mkdir(FileSystem *fs,eint8* dirname);
-
-#endif
diff --git a/sw/airborne/arch/lpc21/efsl/src/debug.c b/sw/airborne/arch/lpc21/efsl/src/debug.c
deleted file mode 100644
index e72134e4ce..0000000000
--- a/sw/airborne/arch/lpc21/efsl/src/debug.c
+++ /dev/null
@@ -1,332 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------------------------------------------- *
-* *
-* Filename : debug.c *
-* Description : These functions are used for debugging output on different *
-* environments *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-/* COMMENT REGARDING FUNCTION COMMENTS IN THIS FILE
- * Only the linuxfile debug functions are commented since all functions
- * perform the same logical task.
-*/
-
-/*****************************************************************************/
-#include "debug.h"
-/*****************************************************************************/
-
-
-/*****************************************************************************/
-#ifdef DEBUG
-#ifdef HW_ENDPOINT_LINUX_ALL
-/*****************************************************************************/
-
-/* ****************************************************************************
- * void debug(const eint8 *format, ...)
- * Description: This function prints debug output to the screen (target dependant)
- * and if DO_FUNC_DEBUG is defined also to a localfile.
- * Return value: void
-*/
-
-void debug(const eint8 *format, ...)
-{
- va_list ap;
- #ifdef DO_FUNC_DEBUG
- euint8 c;
- extern FILE* debugfile;
- extern volatile euint8 tw;
- #endif
-
- va_start(ap, format);
- vprintf(format,ap);
- #ifdef DO_FUNC_DEBUG
- for(c=0;c0)tw--;
-
- for(c=0;c=90)
- debug(PSTR("\n"));
-}
-/*****************************************************************************/
-
-void debug_init(void)
-{
- unsigned short ubrr;
-
- ubrr = ((unsigned short)DEBUG_UBRR);
-
- switch(DEBUG_PORT){
- case 0:
- UBRR0H = (euint8) (ubrr>>8);
- UBRR0L = (euint8) (ubrr);
- UCSR0B = ( (1<>8);
- UBRR1L = (euint8) (ubrr);
- UCSR1B = ( (1<part,loc->Sector,IOM_MODE_READONLY);
- *filerec=*(((FileRecord*)buf)+loc->Offset);
- part_relSect(fs->part,buf);
-}
-
-/*****************************************************************************/
-
-/* ****************************************************************************
- * void dir_createDirectoryEntry(FileSystem *fs,FileRecord *filerec,FileLocation *loc)
- * Description: This function writes the filerecord stored in filerec to disc at
- * location loc.
- * Return value: void
-*/
-void dir_createDirectoryEntry(FileSystem *fs,FileRecord *filerec,FileLocation *loc)
-{
- euint8 *buf;
-
- buf = part_getSect(fs->part,loc->Sector,IOM_MODE_READWRITE);
- memCpy(filerec,buf+(loc->Offset*sizeof(*filerec)),sizeof(*filerec));
- part_relSect(fs->part,buf);
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * void dir_createDefaultEntry(FileSystem *fs,FileRecord *filerec,eint8* fatfilename)
- * Description: This function fills in a filerecord with safe default values, and
- * a given fatfilename. If your system has a means of knowing time, here is an
- * excellent place to apply it to the filerecord.
- * Return value: void
-*/
-void dir_createDefaultEntry(FileSystem *fs,FileRecord *filerec,eint8* fatfilename)
-{
- memCpy(fatfilename,filerec->FileName,11);
- filerec->Attribute=0x00;
- filerec->NTReserved=0x00;
- filerec->MilliSecTimeStamp=0x00;
- filerec->CreatedTime=time_getTime();
- filerec->CreatedDate=time_getDate();
- filerec->AccessDate=filerec->CreatedDate;
- filerec->FirstClusterHigh=0x0000;
- filerec->WriteTime=filerec->CreatedTime;
- filerec->WriteDate=filerec->CreatedDate;
- filerec->FirstClusterLow=0x0000;
- filerec->FileSize=0x00000000;
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * void dir_setFirstCluster(File *file,euint32 cluster_addr)
- * Description: This function requires modification to release it from
- * depending on the file object.
- * Return value:
-*/
-void dir_setFirstCluster(FileSystem *fs,FileLocation *loc,euint32 cluster_addr)
-{
- euint8 *buf;
-
- buf = part_getSect(fs->part,loc->Sector,IOM_MODE_READWRITE);
- (((FileRecord*)buf)+loc->Offset)->FirstClusterHigh=cluster_addr>>16;
- (((FileRecord*)buf)+loc->Offset)->FirstClusterLow=cluster_addr&0xFFFF;
- part_relSect(fs->part,buf);
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * void dir_setFileSize(FileSystem *fs, FileLocation *loc,euint32 numbytes)
- * Description: This function changes the filesize recorded at loc->Sector
- * to 'numbytes'.
- * Return value: void
-*/
-void dir_setFileSize(FileSystem *fs, FileLocation *loc,euint32 numbytes)
-{
- euint8 *buf;
-
- buf = part_getSect(fs->part,loc->Sector,IOM_MODE_READWRITE);
- (((FileRecord*)buf)+loc->Offset)->FileSize=numbytes;
- part_relSect(fs->part,buf);
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * esint8 dir_updateDirectoryEntry(FileSystem *fs,FileRecord *entry,FileLocation *loc))
- * This function changes the entire entity stores at loc to the data recorded
- * in entry. This is for custom updates to the directoryentry.
- * Return value: 0 on success, -1 on failure
-*/
-esint8 dir_updateDirectoryEntry(FileSystem *fs,FileRecord *entry,FileLocation *loc)
-{
- euint8 *buf;
-
- buf = part_getSect(fs->part,loc->Sector,IOM_MODE_READWRITE);
- memCpy(entry,buf+(loc->Offset*sizeof(*entry)),sizeof(*entry));
- part_relSect(fs->part,buf);
- return(0);
-}
-
-/* ****************************************************************************
- * euint32 dir_findFileinBuf(euint8 *buf, eint8 *fatname, FileLocation *loc)
- * This function searches for a given fatfilename in the buffer provided.
- * It will iterate through the 16 direntry's in the buffer and searches
- * for the fatfilename. If found, it will store the offset and attribute
- * entry of the directoryrecord in the loc structure.
- * If loc is 0, then it's members are not touched.
- * Return value: This function returns 0 when it cannot find the file,
- * if it can find the file it will return the first cluster number.
-*/
-euint32 dir_findFileinBuf(euint8 *buf, eint8 *fatname, FileLocation *loc)
-{
- FileRecord fileEntry;
- euint8 c;
-
- for(c=0; c<16; c++)
- {
- fileEntry = *(((FileRecord*)buf) + c);
- /* Check if the entry is for short filenames */
- if( !( (fileEntry.Attribute & 0x0F) == 0x0F ) )
- {
- if( strMatch((eint8*)fileEntry.FileName,fatname,11) == 0 )
- {
- /* The entry has been found, return the location in the dir */
- if(loc)loc->Offset = c;
- if(loc)loc->attrib = fileEntry.Attribute;
- if((((euint32 )fileEntry.FirstClusterHigh)<<16)+ fileEntry.FirstClusterLow==0){
- return(1); /* Lie about cluster, 0 means not found! */
- }else{
- return
- (
- (((euint32 )fileEntry.FirstClusterHigh)<<16)
- + fileEntry.FirstClusterLow
- );
- }
- }
- }
- }
- return(0);
-}
-
-/* ****************************************************************************
- * euint32 dir_findFreeEntryinBuf(euint8* buf, FileLocation *loc)
- * This function searches for a free entry in a given sector 'buf'.
- * It will put the offset into the loc->Offset field, given that loc is not 0.
- * Return value: 1 when it found a free spot, 0 if it hasn't.
-*/
-euint32 dir_findFreeEntryinBuf(euint8* buf, FileLocation *loc)
-{
- FileRecord fileEntry;
- euint8 c;
-
- for(c=0;c<16;c++){
- fileEntry = *(((FileRecord*)buf) + c);
- if( !( (fileEntry.Attribute & 0x0F) == 0x0F ) ){
- if(fileEntry.FileName[0] == 0x00 ||
- fileEntry.FileName[0] == 0xE5 ){
- if(loc)loc->Offset=c;
- return(1);
- }
- }
- }
- return(0);
-}
-
-/* ****************************************************************************
- * euint32 dir_findinBuf(euint8 *buf, eint8 *fatname, FileLocation *loc)
- * Description: This function searches for a given fatfilename in a buffer.
- * Return value: Returns 0 on not found, and the firstcluster when the name is found.
-*/
-euint32 dir_findinBuf(euint8 *buf, eint8 *fatname, FileLocation *loc, euint8 mode)
-{
- switch(mode){
- case DIRFIND_FILE:
- return(dir_findFileinBuf(buf,fatname,loc));
- break;
- case DIRFIND_FREE:
- return(dir_findFreeEntryinBuf(buf,loc));
- break;
- default:
- return(0);
- break;
- }
- return(0);
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * euint32 dir_findinCluster(FileSystem *fs,euint32 cluster,eint8 *fatname, FileLocation *loc, euint8 mode)
- * This function will search for an existing (fatname) or free directory entry
- * in a full cluster.
- * Return value: 0 on failure, firstcluster on finding file, and 1 on finding free spot.
-*/
-euint32 dir_findinCluster(FileSystem *fs,euint32 cluster,eint8 *fatname, FileLocation *loc, euint8 mode)
-{
- euint8 c,*buf=0;
- euint32 fclus;
-
- for(c=0;cvolumeId.SectorsPerCluster;c++){
- buf = part_getSect(fs->part,fs_clusterToSector(fs,cluster)+c,IOM_MODE_READONLY);
- if((fclus=dir_findinBuf(buf,fatname,loc,mode))){
- if(loc)loc->Sector=fs_clusterToSector(fs,cluster)+c;
- part_relSect(fs->part,buf);
- return(fclus);
- }
- part_relSect(fs->part,buf); /* Thanks Mike ;) */
- }
- return(0);
-}
-
-/* ****************************************************************************
- * euint32 dir_findinDir(FileSystem *fs, eint8* fatname,euint32 firstcluster, FileLocation *loc, euint8 mode)
- * This function will search for an existing (fatname) or free directory entry
- * in a directory, following the clusterchains.
- * Return value: 0 on failure, firstcluster on finding file, and 1 on finding free spot.
-*/
-euint32 dir_findinDir(FileSystem *fs, eint8* fatname,euint32 firstcluster, FileLocation *loc, euint8 mode)
-{
- euint32 c=0,cluster;
- ClusterChain Cache;
-
- Cache.DiscCluster = Cache.FirstCluster = firstcluster;
- Cache.LogicCluster = Cache.LastCluster = Cache.Linear = 0;
-
- if(firstcluster <= 1){
- return(dir_findinRootArea(fs,fatname,loc,mode));
- }
-
- while(!fat_LogicToDiscCluster(fs,&Cache,c++)){
- if((cluster=dir_findinCluster(fs,Cache.DiscCluster,fatname,loc,mode))){
- return(cluster);
- }
- }
- return(0);
-}
-
-/* ****************************************************************************
- * euint32 dir_findinDir(FileSystem *fs, eint8* fatname,euint32 firstcluster, FileLocation *loc, euint8 mode)
- * This function will search for an existing (fatname) or free directory entry
- * in the rootdirectory-area of a FAT12/FAT16 filesystem.
- * Return value: 0 on failure, firstcluster on finding file, and 1 on finding free spot.
-*/
-euint32 dir_findinRootArea(FileSystem *fs,eint8* fatname, FileLocation *loc, euint8 mode)
-{
- euint32 c,fclus;
- euint8 *buf=0;
-
- if((fs->type != FAT12) && (fs->type != FAT16))return(0);
-
- for(c=fs->FirstSectorRootDir;c<(fs->FirstSectorRootDir+fs->volumeId.RootEntryCount/32);c++){
- buf = part_getSect(fs->part,c,IOM_MODE_READONLY);
- if((fclus=dir_findinBuf(buf,fatname,loc,mode))){
- if(loc)loc->Sector=c;
- part_relSect(fs->part,buf);
- return(fclus);
- }
- part_relSect(fs->part,buf);
- }
- part_relSect(fs->part,buf);
- return(0);
-}
-
-/* ****************************************************************************
- * esint8 dir_getFatFileName(eint8* filename, eint8* fatfilename)
- * This function will take a full directory path, and strip off all leading
- * dirs and characters, leaving you with the MS-DOS notation of the actual filename.
- * Return value: 1 on success, 0 on not being able to produca a filename
-*/
-esint8 dir_getFatFileName(eint8* filename, eint8* fatfilename)
-{
- eint8 ffnamec[11],*next,nn=0;
-
- memClr(ffnamec,11); memClr(fatfilename,11);
- next = filename;
-
- if(*filename=='/')next++;
-
- while((next=file_normalToFatName(next,ffnamec))){
- memCpy(ffnamec,fatfilename,11);
- nn++;
- }
- if(nn)return(1);
- return(0);
-}
-
-/* ****************************************************************************
- * esint8 dir_addCluster(FileSystem *fs,euint32 firstCluster)
- * This function extends a directory by 1 cluster + optional the number of
- * clusters you want pre-allocated. It will also delete the contents of that
- * cluster. (or clusters)
- * Return value: 0 on success, -1 on fail
-*/
-esint8 dir_addCluster(FileSystem *fs,euint32 firstCluster)
-{
- euint32 lastc,logicalc;
- ClusterChain cache;
-
- fs_initClusterChain(fs,&cache,firstCluster);
- if(fat_allocClusterChain(fs,&cache,1)){
- return(-1);
- }
- lastc = fs_getLastCluster(fs,&cache);
- if(CLUSTER_PREALLOC_DIRECTORY){
- if(fat_allocClusterChain(fs,&cache,CLUSTER_PREALLOC_DIRECTORY)){
- return(-1);
- }
- logicalc = fat_DiscToLogicCluster(fs,firstCluster,lastc);
- while(!fat_LogicToDiscCluster(fs,&cache,++logicalc)){
- fs_clearCluster(fs,cache.DiscCluster);
- }
- }else{
- fs_clearCluster(fs,lastc);
- }
- return(0);
-}
-
-
diff --git a/sw/airborne/arch/lpc21/efsl/src/disc.c b/sw/airborne/arch/lpc21/efsl/src/disc.c
deleted file mode 100644
index f4d4ef5c9d..0000000000
--- a/sw/airborne/arch/lpc21/efsl/src/disc.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------- ----------------------------------- *
-* *
-* Filename : disc.c *
-* Description : This file contains the functions regarding the whole disc *
-* such as loading the MBR and performing read/write tests. *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-/*****************************************************************************/
-#include "disc.h"
-/*****************************************************************************/
-
-/* ****************************************************************************
- * void disc_initDisc(Disc *disc,hcInterface* source)
- * Description: This initialises the disc by loading the MBR and setting the
- * pointer to the hardware object.
-*/
-void disc_initDisc(Disc *disc,IOManager* ioman)
-{
- disc->ioman=ioman;
- disc_setError(disc,DISC_NOERROR);
- disc_loadMBR(disc);
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * void disc_loadMBR(Disc *disc)
- * Description: This functions copies the partitiontable to the partitions field.
-*/
-void disc_loadMBR(Disc *disc)
-{
- euint8 x;
- euint8 *buf;
-
- buf=ioman_getSector(disc->ioman,LBA_ADDR_MBR,IOM_MODE_READONLY|IOM_MODE_EXP_REQ);
- for(x=0;x<4;x++){
- ex_getPartitionField(buf,&(disc->partitions[x]),PARTITION_TABLE_OFFSET+(x*SIZE_PARTITION_FIELD));
- }
- ioman_releaseSector(disc->ioman,buf);
-}
-/*****************************************************************************/
-
-
diff --git a/sw/airborne/arch/lpc21/efsl/src/efs.c b/sw/airborne/arch/lpc21/efsl/src/efs.c
deleted file mode 100644
index 6635218620..0000000000
--- a/sw/airborne/arch/lpc21/efsl/src/efs.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------- ----------------------------------- *
-* *
-* Filename : efs.h *
-* Description : This should become the wrapper around efs. It will contain *
-* functions like efs_init etc. *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-/*****************************************************************************/
-#include "efs.h"
-/*****************************************************************************/
-
-/* ****************************************************************************
- * esint8 efs_init(EmbeddedFileSystem * efs,eint8* opts)
- * Description: This function initialises all subelements of a filesystem.
- * It sets the pointerchain and verifies each step.
- * Return value: 0 on success and -1 on failure.
-*/
-esint8 efs_init(EmbeddedFileSystem * efs,eint8* opts)
-{
- if(if_initInterface(&efs->myCard, opts)==0)
- {
- ioman_init(&efs->myIOman,&efs->myCard,0);
- disc_initDisc(&efs->myDisc, &efs->myIOman);
- part_initPartition(&efs->myPart, &efs->myDisc);
- if(efs->myPart.activePartition==-1){
- efs->myDisc.partitions[0].type=0x0B;
- efs->myDisc.partitions[0].LBA_begin=0;
- efs->myDisc.partitions[0].numSectors=efs->myCard.sectorCount;
- /*efs->myPart.activePartition = 0;*/
- /*efs->myPart.disc = &(efs->myDisc);*/
- part_initPartition(&efs->myPart, &efs->myDisc);
- }
- /*part_initPartition(&efs->myPart, &efs->myDisc);*/
- if(fs_initFs(&efs->myFs, &efs->myPart))
- return(-2);
- return(0);
- }
- return(-1);
-}
-/*****************************************************************************/
-
-
diff --git a/sw/airborne/arch/lpc21/efsl/src/extract.c b/sw/airborne/arch/lpc21/efsl/src/extract.c
deleted file mode 100644
index 227b53502a..0000000000
--- a/sw/airborne/arch/lpc21/efsl/src/extract.c
+++ /dev/null
@@ -1,158 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------- ----------------------------------- *
-* *
-* Filename : extract.c *
-* Description : This file contains functions to copy structures that get *
-* corrupted when using direct memory copy *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-/*****************************************************************************/
-#include "extract.h"
-/*****************************************************************************/
-
-/*****************************************************************************/
-#ifdef BYTE_ALIGNMENT
-/*****************************************************************************/
-
-euint16 ex_getb16(euint8* buf,euint32 offset)
-{
- return(ltb_end16(*((euint16*)(buf+offset))));
-}
-/*****************************************************************************/
-
-euint32 ex_getb32(euint8* buf,euint32 offset)
-{
- return(ltb_end32(*((euint32*)(buf+offset))));
-}
-/*****************************************************************************/
-
-void ex_setb16(euint8* buf,euint32 offset,euint16 data)
-{
- *((euint16*)(buf+offset)) = btl_end16(data);
-}
-/*****************************************************************************/
-
-void ex_setb32(euint8* buf,euint32 offset,euint32 data)
-{
- *((euint32*)(buf+offset)) = btl_end32(data);
-}
-/*****************************************************************************/
-
-void ex_getPartitionField(euint8* buf,PartitionField* pf, euint32 offset)
-{
- *pf=*((PartitionField*)(buf+offset));
-}
-/*****************************************************************************/
-
-void ex_setPartitionField(euint8* buf,PartitionField* pf, euint32 offset)
-{
-
-}
-/*****************************************************************************/
-
-
-
-
-/*****************************************************************************/
-/*****************************************************************************/
-#else
-/*****************************************************************************/
-/*****************************************************************************/
-
-
-
-euint16 ex_getb16(euint8* buf,euint32 offset)
-{
- return(ltb_end16(((*(buf+offset+1))<<8) + ((*(buf+offset+0))<<0)));
-}
-/*****************************************************************************/
-
-euint32 ex_getb32(euint8* buf,euint32 offset)
-{
- return(ltb_end32(((euint32)buf[offset+3]<<24)+
- ((euint32)buf[offset+2]<<16)+
- ((euint32)buf[offset+1]<<8)+
- ((euint32)buf[offset+0]<<0)));
-}
-/*****************************************************************************/
-
-void ex_setb16(euint8* buf,euint32 offset,euint16 data)
-{
-#ifdef BIG_ENDIAN
- *(buf+offset+1) = data>>0;
- *(buf+offset+0) = data>>8;
-#else
- *(buf+offset+0) = data>>0;
- *(buf+offset+1) = data>>8;
-#endif
-}
-/*****************************************************************************/
-
-void ex_setb32(euint8* buf,euint32 offset,euint32 data)
-{
-#ifdef BIG_ENDIAN
- *(buf+offset+3) = data>> 0;
- *(buf+offset+2) = data>> 8;
- *(buf+offset+1) = data>>16;
- *(buf+offset+0) = data>>24;
-#else
- *(buf+offset+0) = data>> 0;
- *(buf+offset+1) = data>> 8;
- *(buf+offset+2) = data>>16;
- *(buf+offset+3) = data>>24;
-#endif
-}
-/*****************************************************************************/
-
-void ex_getPartitionField(euint8* buf,PartitionField* pf, euint32 offset)
-{
- pf->bootFlag = *(buf + offset);
- pf->CHS_begin[0] = *(buf + offset + 1);
- pf->CHS_begin[1] = *(buf + offset + 2);
- pf->CHS_begin[2] = *(buf + offset + 3);
- pf->type = *(buf + offset + 4);
- pf->CHS_end[0] = *(buf + offset + 5);
- pf->CHS_end[1] = *(buf + offset + 6);
- pf->CHS_end[2] = *(buf + offset + 7);
- pf->LBA_begin = ex_getb32(buf + offset,8);
- pf->numSectors = ex_getb32(buf + offset,12);
-}
-/*****************************************************************************/
-
-void ex_setPartitionField(euint8* buf,PartitionField* pf, euint32 offset)
-{
-
-}
-/*****************************************************************************/
-
-
-
-/*****************************************************************************/
-#endif
-/*****************************************************************************/
-
diff --git a/sw/airborne/arch/lpc21/efsl/src/fat.c b/sw/airborne/arch/lpc21/efsl/src/fat.c
deleted file mode 100644
index 968de5f135..0000000000
--- a/sw/airborne/arch/lpc21/efsl/src/fat.c
+++ /dev/null
@@ -1,567 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------- ----------------------------------- *
-* *
-* Filename : fat.c *
-* Description : This file contains all the functions dealing with the FAT *
-* in a Microsoft FAT filesystem. It belongs under fs.c *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-/*****************************************************************************/
-#include "fs.h"
-/*****************************************************************************/
-
-/* ****************************************************************************
- * unsigned long fat_getSectorAddressFatEntry(FileSystem *fs,unsigned long cluster_addr)
- * Description: Returns the sectornumber that holds the fat entry for cluster cluster_addr.
- * This works for all FAT types.
- * Return value: Sectornumber, or 0. Warning, no boundary check.
-*/
-euint32 fat_getSectorAddressFatEntry(FileSystem *fs,euint32 cluster_addr)
-{
- euint32 base = fs->volumeId.ReservedSectorCount,res;
-
- switch(fs->type){
- case FAT12:
- res=(cluster_addr*3/1024);
- if(res>=fs->FatSectorCount){
- return(0);
- }else{
- return(base+res);
- }
- break;
- case FAT16:
- res=cluster_addr/256;
- if(res>=fs->FatSectorCount){
- return(0);
- }else{
- return(base+res);
- }
- break;
- case FAT32:
- res=cluster_addr/128;
- if(res>=fs->FatSectorCount){
- return(0);
- }else{
- return(base+res);
- }
- break;
- }
- return(0);
-}
-/*****************************************************************************/
-
-
-/* ****************************************************************************
- * unsigned long fat_getNextClusterAddress(FileSystem *fs,unsigned long cluster_addr
- * Description: This function loads the sector of the fat which contains the entry
- * for cluster_addr. It then fetches and (if required) calculates it's value.
- * This value is the EoC marker -or- the number of the next cluster in the chain.
- * Return value: Clusternumber or EoC
-*/
-euint32 fat_getNextClusterAddress(FileSystem *fs,euint32 cluster_addr,euint16 *linear)
-{
- euint8 *buf;
- euint8 hb,lb;
- euint16 offset;
- euint32 sector;
- euint32 nextcluster=0;
-
- sector=fat_getSectorAddressFatEntry(fs,cluster_addr);
- if( (fs->FatSectorCount <= (sector-fs->volumeId.ReservedSectorCount)) || sector==0 )
- {
- return(0);
- }
-
- buf=part_getSect(fs->part,sector,IOM_MODE_READONLY);
-
- switch(fs->type)
- {
- case FAT12:
- offset = ((cluster_addr%1024)*3/2)%512;
- hb = buf[offset];
- if(offset == 511){
- part_relSect(fs->part,buf);
- buf=part_getSect(fs->part,sector+1,IOM_MODE_READONLY);
- lb = buf[0];
- }else{
- lb = buf[offset + 1];
- }
- if(cluster_addr%2==0){
- nextcluster = ( ((lb&0x0F)<<8) + (hb) );
- }else{
- nextcluster = ( (lb<<4) + (hb>>4) );
- }
- break;
- case FAT16:
- offset=cluster_addr%256;
- nextcluster = *((euint16 *)buf + offset);
- break;
- case FAT32:
- offset=cluster_addr%128;
- nextcluster = *((euint32 *)buf + offset);
- break;
- }
-
- part_relSect(fs->part,buf);
-
- return(nextcluster);
-}
-/*****************************************************************************/
-
-
-/* ****************************************************************************
- * void fat_setNextClusterAddress(FileSystem *fs,unsigned long cluster_addr,unsigned long next_cluster_addr)
- * Description: This function makes an entry in the fattable for cluster_addr. The value it puts there
- * is next_cluster_addr.
-*/
-void fat_setNextClusterAddress(FileSystem *fs,euint32 cluster_addr,euint32 next_cluster_addr)
-{
- euint8 *buf,*buf2;
- euint16 offset;
- euint32 sector;
-
- sector=fat_getSectorAddressFatEntry(fs,cluster_addr);
-
- if(( fs->FatSectorCount <= (sector - fs->volumeId.ReservedSectorCount )||(sector==0))){
- DBG((TXT("HARDERROR:::fat_getNextClusterAddress READ PAST FAT BOUNDARY\n")));
- return;
- }
-
- buf=part_getSect(fs->part,sector,IOM_MODE_READWRITE);
-
- switch(fs->type){
- case FAT12:
- offset = ((cluster_addr%1024)*3/2)%512;
- if(offset == 511){
- if(cluster_addr%2==0){
- buf[offset]=next_cluster_addr&0xFF;
- }else{
- buf[offset]=(buf[offset]&0xF)+((next_cluster_addr<<4)&0xF0);
- }
- buf2=part_getSect(fs->part,fat_getSectorAddressFatEntry(fs,cluster_addr)+1,IOM_MODE_READWRITE);
- if(cluster_addr%2==0){
- buf2[0]=(buf2[0]&0xF0)+((next_cluster_addr>>8)&0xF);
- }else{
- buf2[0]=(next_cluster_addr>>4)&0xFF;
- }
- part_relSect(fs->part,buf2);
- }else{
- if(cluster_addr%2==0){
- buf[offset]=next_cluster_addr&0xFF;
- buf[offset+1]=(buf[offset+1]&0xF0)+((next_cluster_addr>>8)&0xF);
- }else{
- buf[offset]=(buf[offset]&0xF)+((next_cluster_addr<<4)&0xF0);
- buf[offset+1]=(next_cluster_addr>>4)&0xFF;
- }
- }
- part_relSect(fs->part,buf);
- break;
- case FAT16:
- offset=cluster_addr%256;
- *((euint16*)buf+offset)=next_cluster_addr;
- part_relSect(fs->part,buf);
- break;
- case FAT32:
- offset=cluster_addr%128;
- *((euint32*)buf+offset)=next_cluster_addr;
- part_relSect(fs->part,buf);
- break;
- }
-
-}
-/*****************************************************************************/
-
-
-/* ****************************************************************************
- * short fat_isEocMarker(FileSystem *fs,unsigned long fat_entry)
- * Description: Checks if a certain value is the EoC marker for the filesystem
- * noted in fs->type.
- * Return value: Returns 0 when it is the EoC marker, and 1 otherwise.
-*/
-eint16 fat_isEocMarker(FileSystem *fs,euint32 fat_entry)
-{
- switch(fs->type){
- case FAT12:
- if(fat_entry<0xFF8){
- return(0);
- }
- break;
- case FAT16:
- if(fat_entry<0xFFF8){
- return(0);
- }
- break;
- case FAT32:
- if((fat_entry&0x0FFFFFFF)<0xFFFFFF8){
- return(0);
- }
- break;
- }
- return(1);
-}
-/*****************************************************************************/
-
-
-/* ****************************************************************************
- * unsigned long fat_giveEocMarker(FileSystem *fs)
- * Description: Returns an EoC markernumber valid for the filesystem noted in
- * fs->type.
- * Note, for FAT32, the upper 4 bits are set to zero, although they should be un
- * touched according to MicroSoft specifications. I didn't care.
- * Return value: The EoC marker cast to an ulong.
-*/
-euint32 fat_giveEocMarker(FileSystem *fs)
-{
- switch(fs->type)
- {
- case FAT12:
- return(0xFFF);
- break;
- case FAT16:
- return(0xFFFF);
- break;
- case FAT32:
- return(0x0FFFFFFF);
- break;
- }
- return(0);
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * euint32 fat_getNextClusterAddressWBuf(FileSystem *fs,euint32 cluster_addr, euint8* buf)
- * Description: This function retrieves the contents of a FAT field. It does not fetch
- * it's own buffer, it is given as a parameter. (ioman makes this function rather obsolete)
- * Only in the case of a FAT12 crosssector data entry a sector is retrieved here.
- * Return value: The value of the clusterfield is returned.
-*/
-euint32 fat_getNextClusterAddressWBuf(FileSystem *fs,euint32 cluster_addr, euint8* buf)
-{
- euint8 *buf2; /* For FAT12 fallover only */
- euint8 hb,lb;
- euint16 offset;
- euint32 nextcluster=0;
-
- switch(fs->type)
- {
- case FAT12:
- offset = ((cluster_addr%1024)*3/2)%512;
- hb = buf[offset];
- if(offset == 511){
- buf2=part_getSect(fs->part,fat_getSectorAddressFatEntry(fs,cluster_addr)+1,IOM_MODE_READONLY);
- lb = buf2[0];
- part_relSect(fs->part,buf2);
- }else{
- lb = buf[offset + 1];
- }
- if(cluster_addr%2==0){
- nextcluster = ( ((lb&0x0F)<<8) + (hb) );
- }else{
- nextcluster = ( (lb<<4) + (hb>>4) );
- }
- break;
- case FAT16:
- offset=cluster_addr%256;
- nextcluster = *((euint16*)buf + offset);
- break;
- case FAT32:
- offset=cluster_addr%128;
- nextcluster = *((euint32*)buf + offset);
- break;
- }
- return(nextcluster);
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * void fat_setNextClusterAddressWBuf(FileSystem *fs,euint32 cluster_addr,euint32 next_cluster_addr,euint8* buf)
- * Description: This function fills in a fat entry. The entry is cluster_addr and the
- * data entered is next_cluster_addr. This function is also given a *buf, so it does
- * not write the data itself, except in the case of FAT 12 cross sector data, where
- * the second sector is handled by this function.
- * Return value:
-*/
-void fat_setNextClusterAddressWBuf(FileSystem *fs,euint32 cluster_addr,euint32 next_cluster_addr,euint8* buf)
-{
- euint16 offset;
- euint8 *buf2;
-
- switch(fs->type)
- {
- case FAT12:
- offset = ((cluster_addr%1024)*3/2)%512;
- if(offset == 511){
- if(cluster_addr%2==0){
- buf[offset]=next_cluster_addr&0xFF;
- }else{
- buf[offset]=(buf[offset]&0xF)+((next_cluster_addr<<4)&0xF0);
- }
- buf2=part_getSect(fs->part,fat_getSectorAddressFatEntry(fs,cluster_addr)+1,IOM_MODE_READWRITE);
- if(cluster_addr%2==0){
- buf2[0]=(buf2[0]&0xF0)+((next_cluster_addr>>8)&0xF);
- }else{
- buf2[0]=(next_cluster_addr>>4)&0xFF;
- }
- part_relSect(fs->part,buf2);
- }else{
- if(cluster_addr%2==0){
- buf[offset]=next_cluster_addr&0xFF;
- buf[offset+1]=(buf[offset+1]&0xF0)+((next_cluster_addr>>8)&0xF);
- }else{
- buf[offset]=(buf[offset]&0xF)+((next_cluster_addr<<4)&0xF0);
- buf[offset+1]=(next_cluster_addr>>4)&0xFF;
- }
- }
- break;
- case FAT16:
- offset=cluster_addr%256;
- *((euint16*)buf+offset)=next_cluster_addr;
- break;
- case FAT32:
- offset=cluster_addr%128;
- *((euint32*)buf+offset)=next_cluster_addr;
- break;
- }
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * esint16 fat_getNextClusterChain(FileSystem *fs, ClusterChain *Cache)
- * Description: This function is to advance the clusterchain of a Cache.
- * First, the function verifies if the Cache is valid. It could correct it if it
- * is not, but this is not done at the time. If the cachen is valid, the next step is
- * to see what the next cluster is, if this is the End of Clustermark, the cache is
- * updated to know the lastcluster but will remain untouched otherwise. -1 is returned.
- * If there are more clusters the function scans the rest of the chain until the next
- * cluster is no longer lineair, or until it has run out of fat data (only 1 sector) is
- * examined, namely the one fetched to check for EoC.
- * With lineair is meant that logical cluster n+1 should be 1 more than logical cluster n
- * at the disc level.
- * Return value: 0 on success, or -1 when EoC.
-*/
-esint16 fat_getNextClusterChain(FileSystem *fs, ClusterChain *Cache)
-{
- euint32 sect,lr,nlr,dc;
- esint16 lin=0;
- euint8 *buf;
-
- if(Cache->DiscCluster==0)
- {
- return(-1);
- }
-
- sect=fat_getSectorAddressFatEntry(fs,Cache->DiscCluster);
- buf=part_getSect(fs->part,sect,IOM_MODE_READONLY);
- dc=fat_getNextClusterAddressWBuf(fs,Cache->DiscCluster,buf);
- if(fat_isEocMarker(fs,dc))
- {
- Cache->LastCluster=Cache->DiscCluster;
- part_relSect(fs->part,buf);
- return(-1);
- }
-
- Cache->DiscCluster=dc;
- Cache->LogicCluster++;
-
- lr=Cache->DiscCluster-1;
- nlr=lr+1;
-
- while(nlr-1==lr && fat_getSectorAddressFatEntry(fs,nlr)==sect)
- {
- lr=nlr;
- nlr=fat_getNextClusterAddressWBuf(fs,lr,buf);
- lin++;
- }
-
- Cache->Linear=lin-1<0?0:lin-1;
-
- part_relSect(fs->part,buf);
- return(0);
-}
-/*****************************************************************************/
-
-
-/* ****************************************************************************
- * esint16 fat_LogicToDiscCluster(FileSystem *fs, ClusterChain *Cache,euint32 logiccluster)
- * Description: This function is used to follow clusterchains. When called it will convert
- * a logical cluster, to a disc cluster, using a Cache object. All it does is call
- * getNextClusterChain in the proper manner, and rewind clusterchains if required.
- * It is NOT recommended to go backwards in clusterchains, since this will require
- * scanning the entire chain every time.
- * Return value: 0 on success and -1 on failure (meaning out of bounds).
-*/
-esint16 fat_LogicToDiscCluster(FileSystem *fs, ClusterChain *Cache,euint32 logiccluster)
-{
- if(logicclusterLogicCluster || Cache->DiscCluster==0){
- Cache->LogicCluster=0;
- Cache->DiscCluster=Cache->FirstCluster;
- Cache->Linear=0;
- }
-
- if(Cache->LogicCluster==logiccluster){
- return(0);
- }
-
- while(Cache->LogicCluster!=logiccluster)
- {
- if(Cache->Linear!=0)
- {
- Cache->Linear--;
- Cache->LogicCluster++;
- Cache->DiscCluster++;
- }
- else
- {
- if((fat_getNextClusterChain(fs,Cache))!=0){
- return(-1);
- }
- }
- }
- return(0);
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * eint16 fat_allocClusterChain(FileSystem *fs,ClusterChain *Cache,euint32 num_clusters)
- * Description: This function extends a clusterchain by num_clusters. It returns the
- * number of clusters it *failed* to allocate.
- * Return value: 0 on success, all other values are the number of clusters it could
- * not allocate.
-*/
-eint16 fat_allocClusterChain(FileSystem *fs,ClusterChain *Cache,euint32 num_clusters)
-{
- euint32 cc,ncl=num_clusters,lc;
- euint8 *bufa=0,*bufb=0;
- euint8 overflow=0;
-
- if(Cache->FirstCluster<=1)return(num_clusters);
-
- lc=fs_getLastCluster(fs,Cache);
- cc=lc;
-
- while(ncl > 0){
- cc++;
- if(cc>=fs->DataClusterCount+1){
- if(overflow){
- bufa=part_getSect(fs->part,fat_getSectorAddressFatEntry(fs,lc),IOM_MODE_READWRITE);
- fat_setNextClusterAddressWBuf(fs,lc,fat_giveEocMarker(fs),bufa);
- Cache->LastCluster=lc;
- part_relSect(fs->part,bufa);
- fs->FreeClusterCount-=num_clusters-ncl;
- return(num_clusters-ncl);
- }
- cc=2;
- overflow++;
- }
- bufa=part_getSect(fs->part,fat_getSectorAddressFatEntry(fs,cc),IOM_MODE_READONLY);
- if(fat_getNextClusterAddressWBuf(fs,cc,bufa)==0){
- bufb=part_getSect(fs->part,fat_getSectorAddressFatEntry(fs,lc),IOM_MODE_READWRITE);
- fat_setNextClusterAddressWBuf(fs,lc,cc,bufb);
- part_relSect(fs->part,bufb);
- ncl--;
- lc=cc;
- }
- part_relSect(fs->part,bufa);
- if(ncl==0){
- bufa=part_getSect(fs->part,fat_getSectorAddressFatEntry(fs,lc),IOM_MODE_READWRITE);
- fat_setNextClusterAddressWBuf(fs,lc,fat_giveEocMarker(fs),bufa);
- Cache->LastCluster=lc;
- part_relSect(fs->part,bufa);
- }
- }
- if(Cache->ClusterCount)Cache->ClusterCount+=num_clusters;
- return(0);
-}
-
-/* ****************************************************************************
- * eint16 fat_unlinkClusterChain(FileSystem *fs,ClusterChain *Cache)
- * Description: This function removes a clusterchain. Starting at FirstCluster
- * it follows the chain until the end, resetting all values to 0.
- * Return value: 0 on success.
-*/
-eint16 fat_unlinkClusterChain(FileSystem *fs,ClusterChain *Cache)
-{
- euint32 c,tbd=0;
-
- Cache->LogicCluster=0;
- Cache->DiscCluster=Cache->FirstCluster;
-
- c=0;
-
- while(!fat_LogicToDiscCluster(fs,Cache,c++)){
- if(tbd!=0){
- fat_setNextClusterAddress(fs,tbd,0);
- }
- tbd=Cache->DiscCluster;
- }
- fat_setNextClusterAddress(fs,Cache->DiscCluster,0);
- fs->FreeClusterCount+=c;
- return(0);
-}
-
-euint32 fat_countClustersInChain(FileSystem *fs,euint32 firstcluster)
-{
- ClusterChain cache;
- euint32 c=0;
-
- if(firstcluster<=1)return(0);
-
- cache.DiscCluster = cache.LogicCluster = cache.LastCluster = cache.Linear = 0;
- cache.FirstCluster = firstcluster;
-
- while(!(fat_LogicToDiscCluster(fs,&cache,c++)));
-
- return(c-1);
-}
-
-euint32 fat_DiscToLogicCluster(FileSystem *fs,euint32 firstcluster,euint32 disccluster)
-{
- ClusterChain cache;
- euint32 c=0,r=0;
-
- cache.DiscCluster = cache.LogicCluster = cache.LastCluster = cache.Linear = 0;
- cache.FirstCluster = firstcluster;
-
- while(!(fat_LogicToDiscCluster(fs,&cache,c++)) && !r){
- if(cache.DiscCluster == disccluster){
- r = cache.LogicCluster;
- }
- }
- return(r);
-}
-
-euint32 fat_countFreeClusters(FileSystem *fs)
-{
- euint32 c=2,fc=0;
-
- while(c<=fs->DataClusterCount+1){
- if(fat_getNextClusterAddress(fs,c,0)==0)fc++;
- c++;
- }
- return(fc);
-}
diff --git a/sw/airborne/arch/lpc21/efsl/src/file.c b/sw/airborne/arch/lpc21/efsl/src/file.c
deleted file mode 100644
index 9e3c82e6e6..0000000000
--- a/sw/airborne/arch/lpc21/efsl/src/file.c
+++ /dev/null
@@ -1,504 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------- ----------------------------------- *
-* *
-* Filename : file.c *
-* Description : This file contains functions dealing with files such as: *
-* fopen, fread and fwrite. *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-/*****************************************************************************/
-#include "file.h"
-/*****************************************************************************/
-
-/* ****************************************************************************
- * euint32 file_fread(File *file,euint32 offset, euint32 size,euint8 *buf)
- * Description: This function reads 'size' bytes from 'file' starting at
- * 'offset' and puts the result in '*buf'.
- * Return value: amount of bytes actually read (can differ from the given
- * size when the file was smaller
-*/
-euint32 file_fread(File *file,euint32 offset, euint32 size,euint8 *buf)
-{
- euint32 bytes_read=0,size_left=size,coffset=offset;
- euint32 cclus,csec,cbyte;
- euint32 rclus,rsec;
- euint32 btr;
- euint8 *tbuf;
-
- if(!file_getAttr(file,FILE_STATUS_OPEN))return(0);
-
- if(offset>=file->FileSize)
- size_left=0; /* Offset check */
-
- if( (offset+size > file->FileSize) && size_left!=0)
- size_left=file->FileSize-offset;
-
- while(size_left>0){
-
- cclus = coffset/(512*file->fs->volumeId.SectorsPerCluster);
- csec = (coffset/(512))%file->fs->volumeId.SectorsPerCluster;
- cbyte = coffset%512;
-
- if(cbyte!=0 || size_left<512){
- btr = 512-(coffset%512)>=size_left?size_left:512-(coffset%512);
- }else{
- btr = 512;
- }
-
- if((fat_LogicToDiscCluster(file->fs,&(file->Cache),cclus))!=0){
- return(0);
- }
- rclus=file->Cache.DiscCluster;
- rsec=fs_clusterToSector(file->fs,rclus);
-
-
- if(btr==512){
- /*part_readBuf(file->fs->part,rsec+csec,buf+bytes_read);*/
- part_directSectorRead(file->fs->part,rsec+csec,buf+bytes_read);
- }else{
- /*part_readBuf(file->fs->part,rsec+csec,tbuf);*/
- tbuf = part_getSect(file->fs->part,rsec+csec,IOM_MODE_READONLY);
- memCpy(tbuf+(coffset%512),buf+bytes_read,btr);
- part_relSect(file->fs->part,tbuf);
- }
-
- coffset+=btr;
- bytes_read+=btr;
- size_left-=btr;
- }
-
- return(bytes_read);
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * euint32 file_read (File *file,euint32 size,euint8 *buf)
- * Description: This function reads from a file, taking the FilePtr into account
- * and advancing it according to the freadcall.
- * Return value: Value obtained from fread
-*/
-euint32 file_read(File *file,euint32 size,euint8 *buf)
-{
- euint32 r;
-
- r=file_fread(file,file->FilePtr,size,buf);
- file->FilePtr+=r;
- return(r);
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * euint32 file_write(File *file, euint32 size,euint8 *buf)
- * Description: This function writes to a file, taking FilePtr into account
- * and advancing it according to the fwritecall.
- * Return value: Value obtained from fread
-*/
-euint32 file_write(File *file, euint32 size,euint8 *buf)
-{
- euint32 r;
-
- r=file_fwrite(file,file->FilePtr,size,buf);
- file->FilePtr+=r;
- return(r);
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * esint16 file_setpos(File *file,euint32 pos)
- * Description: This function does a sanity check on the requested position
- * and changes the fileptr accordingly.
- * Return value: 0 on success and -1 on failure.
-*/
-esint16 file_setpos(File *file,euint32 pos)
-{
- if(pos<=file->FileSize){
- file->FilePtr=pos;
- return(0);
- }
- return(-1);
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * euint32 file_fwrite(File* file,euint32 offset,euint32 size,euint8* buf)
- * Description: This function writes to a file, at offset 'offset' and size 'size'.
- * It also updates the FileSize in the object, and discstructure.
- * Return value: Bytes actually written.
-*/
-euint32 file_fwrite(File* file,euint32 offset,euint32 size,euint8* buf)
-{
- euint32 need_cluster;
- euint32 cclus,csec,cbyte;
- euint32 size_left=size,bytes_written=0;
- euint32 rclus,rsec;
- euint32 coffset=offset;
- euint16 btr;
- euint8 *tbuf;
-
- if(!file_getAttr(file,FILE_STATUS_OPEN) || !file_getAttr(file,FILE_STATUS_WRITE))return(0);
-
- if(offset>file->FileSize){
- offset=file->FileSize;
- }
-
- need_cluster = file_requiredCluster(file,offset,size);
-
- if(need_cluster){
- if(fat_allocClusterChain(file->fs,&(file->Cache),need_cluster+CLUSTER_PREALLOC_FILE)!=0){
- return(0);
- }
- }
-
- while(size_left>0){
-
- cclus = coffset/(512*file->fs->volumeId.SectorsPerCluster);
- csec = (coffset/(512))%file->fs->volumeId.SectorsPerCluster;
- cbyte = coffset%512;
-
- if(cbyte!=0 || size_left<512){
- btr = 512-(coffset%512)>=size_left?size_left:512-(coffset%512);
- }else{
- btr = 512;
- }
-
- if((fat_LogicToDiscCluster(file->fs,&(file->Cache),cclus))!=0){
- file->FileSize+=bytes_written;
- dir_setFileSize(file->fs,&(file->Location),file->FileSize);
- return(bytes_written);
- }
- rclus=file->Cache.DiscCluster;
- rsec=fs_clusterToSector(file->fs,rclus);
-
- if(btr==512){
- /*part_writeBuf(file->fs->part,rsec+csec,buf+bytes_written);*/
- part_directSectorWrite(file->fs->part,rsec+csec,buf+bytes_written);
- }else{
- /*part_readBuf(file->fs->part,rsec+csec,tbuf);*/
- tbuf = part_getSect(file->fs->part,rsec+csec,IOM_MODE_READWRITE);
- memCpy(buf+bytes_written,tbuf+(coffset%512),btr);
- /*part_writeBuf(file->fs->part,rsec+csec,tbuf);*/
- part_relSect(file->fs->part,tbuf);
- }
-
- coffset+=btr;
- bytes_written+=btr;
- size_left-=btr;
- }
-
- if(bytes_written>file->FileSize-offset){
- file->FileSize+=bytes_written-(file->FileSize-offset);
- }
-
- return(bytes_written);
-}
-
-/* ***************************************************************************\
- * signed eint8 file_fopen(FileSystem *fs,File* file,eint8* filename)
- * Description: This functions opens a file.
- * This function is about to be redesigned. No Docs.
- * Return value:
-*/
-esint8 file_fopen(File* file,FileSystem *fs,eint8* filename,eint8 mode)
-{
- FileLocation loc;
- FileRecord wtmp;
- eint8 fatfilename[11];
- euint32 sec;
-
- dir_getFatFileName(filename,fatfilename);
-
- switch(mode)
- {
- case MODE_READ:
- if(fs_findFile(fs,filename,&loc,0)==1)
- {
- dir_getFileStructure(fs,&(file->DirEntry), &loc);
- file_initFile(file,fs,&loc);
- file_setAttr(file,FILE_STATUS_OPEN,1);
- file_setAttr(file,FILE_STATUS_WRITE,0);
- return(0);
- }
- return(-1);
- break;
- case MODE_WRITE:
- if(fs_findFile(fs,filename,&loc,&sec)) /* File may NOT exist, but parent HAS to exist */
- {
- return(-2);
- }
- if(sec==0){ /* Parent dir does not exist */
- return(-4);
- }
- if(fs_findFreeFile(fs,filename,&loc,0))
- {
- dir_createDefaultEntry(fs,&wtmp,fatfilename);
- dir_createDirectoryEntry(fs,&wtmp,&loc);
- memCpy(&wtmp,&(file->DirEntry),sizeof(wtmp));
- file_initFile(file,fs,&loc);
- sec=fs_getNextFreeCluster(file->fs,fs_giveFreeClusterHint(file->fs));
- dir_setFirstCluster(file->fs,&(file->Location),sec);
- fs_setFirstClusterInDirEntry(&(file->DirEntry),sec);
- fs_initClusterChain(fs,&(file->Cache),sec);
- fat_setNextClusterAddress(fs,sec,fat_giveEocMarker(fs));
- file_setAttr(file,FILE_STATUS_OPEN,1);
- file_setAttr(file,FILE_STATUS_WRITE,1);
- return(0);
- }
- else
- {
- return(-3);
- }
- break;
- case MODE_APPEND:
- if(fs_findFile(fs,filename,&loc,0)==1) /* File exists */
- {
- dir_getFileStructure(fs,&(file->DirEntry), &loc);
- file_initFile(file,fs,&loc);
- if(file->Cache.FirstCluster==0){
- sec=fs_getNextFreeCluster(file->fs,fs_giveFreeClusterHint(file->fs));
- dir_setFirstCluster(file->fs,&(file->Location),sec);
- fs_setFirstClusterInDirEntry(&(file->DirEntry),sec);
- fat_setNextClusterAddress(fs,sec,fat_giveEocMarker(fs));
- file_initFile(file,fs,&loc);
- }
- file_setpos(file,file->FileSize);
- file_setAttr(file,FILE_STATUS_OPEN,1);
- file_setAttr(file,FILE_STATUS_WRITE,1);
- }
- else /* File does not excist */
- {
- if(fs_findFreeFile(fs,filename,&loc,0))
- {
- dir_createDefaultEntry(fs,&wtmp,fatfilename);
- dir_createDirectoryEntry(fs,&wtmp,&loc);
- memCpy(&wtmp,&(file->DirEntry),sizeof(wtmp));
- file_initFile(file,fs,&loc);
- sec=fs_getNextFreeCluster(file->fs,fs_giveFreeClusterHint(file->fs));
- dir_setFirstCluster(file->fs,&(file->Location),sec);
- fs_setFirstClusterInDirEntry(&(file->DirEntry),sec);
- fs_initClusterChain(fs,&(file->Cache),sec);
- fat_setNextClusterAddress(fs,sec,fat_giveEocMarker(fs));
- file_setAttr(file,FILE_STATUS_OPEN,1);
- file_setAttr(file,FILE_STATUS_WRITE,1);
- }
- else
- {
- return(-3);
- }
- }
- return(0);
- break;
- default:
- return(-4);
- break;
- }
- return(-5);
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * esint8 file_fclose(File *file)
- * Description: This function closes a file, by clearing the object.
- * Return value: 0 on success.
-*/
-esint8 file_fclose(File *file)
-{
- if(fs_hasTimeSupport()){
- file->DirEntry.AccessDate = time_getDate();
- if(file_getAttr(file,FILE_STATUS_WRITE)){
- file->DirEntry.FileSize = file->FileSize;
- file->DirEntry.WriteDate = file->DirEntry.AccessDate;
- file->DirEntry.WriteTime = time_getTime();
- }
- dir_updateDirectoryEntry(file->fs,&(file->DirEntry),&(file->Location));
- }else{
- if(file_getAttr(file,FILE_STATUS_WRITE)){
- dir_setFileSize(file->fs,&(file->Location),file->FileSize);
- }
- }
-
- memClr(file,sizeof(*file));
- file_setAttr(file,FILE_STATUS_OPEN,0);
- file_setAttr(file,FILE_STATUS_WRITE,0);
- return(0);
-}
-
-
-/* ****************************************************************************
- * void file_initFile(File *file, FileSystem *fs, FileLocation *loc)
- * Description: This function initialises a new file object, by filling in
- * the fs pointer, filesize (note, that DirEntry must already be filled in)
- * and known cache parameters.
- * Return value: void
-*/
-void file_initFile(File *file, FileSystem *fs, FileLocation *loc)
-{
- file->fs=fs;
- file->FileSize=file->DirEntry.FileSize;
- file->FilePtr=0;
- file->Location.Sector=loc->Sector;
- file->Location.Offset=loc->Offset;
- file->Cache.Linear=0;
- file->Cache.FirstCluster=(((euint32)file->DirEntry.FirstClusterHigh)<<16)+
- file->DirEntry.FirstClusterLow;
- file->Cache.LastCluster=0;
- file->Cache.LogicCluster=0;
- file->Cache.DiscCluster=file->Cache.FirstCluster;
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * euint8* file_normalToFatName(eint8* filename,eint8* fatfilename)
- * Description: This function converts a human readable filename (limited to
- * 8.3 eint8 character) to a valid FAT (not VFAT) filename. Invalid characters are
- * changed to capital X and only the first 11 characters are used.
- * Furthermore all letters are capitalised.
- * Return value: pointer after the filename
-*/
-eint8* file_normalToFatName(eint8* filename,eint8* fatfilename)
-{
- euint8 c,dot=0,vc=0;
-
- for(c=0;c<11;c++)fatfilename[c]=' ';
-
- c=0;
-
- if(*filename == '.'){
- fatfilename[0]='.';
- vc++;
- if(*(filename+1) == '.'){
- fatfilename[1]='.';
- filename+=2;
- }else{
- filename++;
- }
- }else{
- while(*filename != '\0' && *filename != ' ' && *filename != '/'){
- if(*filename=='.' && !dot){
- dot=1;
- c=8;
- }else{
- if(dot){
- if(c<=10){
- fatfilename[c]=file_validateChar(*filename);
- c++;
- }
- }else{
- if(c<=7){
- fatfilename[c]=file_validateChar(*filename);
- c++; vc++;
- }
- }
- }
- filename++;
- }
- }
-
- if(vc>0){
- if(*filename=='\0'){
- return(filename);
- }else{
- return(filename+1);
- }
- }else{
- return(0);
- }
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- *
- * Description: This function takes the character c, and if it is not a *
- * valid FAT Filename character returns X. If it is a lowercase letter the *
- * uppercase equivalent is returned. The remaining characters are returned *
- * as they are.
- * Return value: The validated char
-*/
-euint8 file_validateChar(euint8 c)
-{
- if( (c<0x20) || (c>0x20&&c<0x30&&c!='-') || (c>0x39&&c<0x41) || (c>0x5A&&c<0x61&&c!='_') || (c>0x7A&&c!='~') )
- return(0x58);
- if( c>=0x61 && c<=0x7A )
- return(c-32);
-
- return(c);
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * void ioman_setAttr(IOManager *ioman,euint16 bufplace,euint8 attribute,euint8 val)
- * Description: This sets the attribute of 'bufplace' to the given value (binary).
- *
- * Return value: void
-*/
-void file_setAttr(File* file,euint8 attribute,euint8 val)
-{
- if(val){
- file->FileStatus|=1<FileStatus&=~(1<FileStatus&(1<file->FileSize){
- if(file->Cache.ClusterCount==0){ /* Number of cluster unknown */
- hc = fat_countClustersInChain(file->fs,file->Cache.FirstCluster);
- file->Cache.ClusterCount = hc;
- }else{
- hc = file->Cache.ClusterCount; /* This better be right */
- }
- clustersize = file->fs->volumeId.BytesPerSector * file->fs->volumeId.SectorsPerCluster;
- if((size-file->FileSize+offset)>
- ((hc-((file->FileSize+clustersize-1)/clustersize))*clustersize)){
- clusters_required = (((offset+size)-(hc*clustersize))+clustersize-1)/clustersize;
- }else{
- clusters_required = 0;
- }
- }else{
- clusters_required = 0;
- }
- return(clusters_required);
-}
diff --git a/sw/airborne/arch/lpc21/efsl/src/fs.c b/sw/airborne/arch/lpc21/efsl/src/fs.c
deleted file mode 100644
index 7b537818fa..0000000000
--- a/sw/airborne/arch/lpc21/efsl/src/fs.c
+++ /dev/null
@@ -1,523 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------- ----------------------------------- *
-* *
-* Filename : fs.c *
-* Description : These are general filesystem functions, supported by the *
-* functions of dir.c and fat.c file.c uses these functions *
-* heavily, but is not used by fs.c (not true anymore) *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-/*****************************************************************************/
-#include "fs.h"
-#include "fat.h"
-#include "dir.h"
-/*****************************************************************************/
-
-/* ****************************************************************************
- * eint16 fs_initFs(FileSystem *fs,Partition *part)
- * Description: This functions glues the initialisation of the filesystem together.
- * It loads the volumeID, computes the FS type and searches for the rootsector.
- * Return value: Returns 0 on succes and -1 on error (if magic code is wrong)
-*/
-eint16 fs_initFs(FileSystem *fs,Partition *part)
-{
- if(!fs_isValidFat(part)){
- return(-1);
- }
- fs->part=part;
- fs_loadVolumeId(fs,part);
- if(!fs_verifySanity(fs))return(-2);
- fs_countDataSectors(fs);
- fs_determineFatType(fs);
- fs_findFirstSectorRootDir(fs);
- fs_initCurrentDir(fs);
- return(0);
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * eint16 fs_isValidFat(Partition *part)
- * Description: This functions loads the volumeID and checks if the magic
- * value is present.
- * Return value: returns 0 when magic code is missing, 1 if it is there.
-*/
-eint16 fs_isValidFat(Partition *part)
-{
- euint8 *buf;
-
- buf=part_getSect(part,0,IOM_MODE_READONLY|IOM_MODE_EXP_REQ); /* Load Volume label */
- if( ex_getb16(buf,0x1FE) != 0xAA55 ){
- return (0);
- }
- part_relSect(part,buf);
- return(1);
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * void fs_loadVolumeId(FileSystem *fs, Partition *part)
- * Description: This function loads all relevant fields from the volumeid.
-*/
-void fs_loadVolumeId(FileSystem *fs, Partition *part)
-{
- euint8 *buf;
-
- buf=part_getSect(part,0,IOM_MODE_READONLY|IOM_MODE_EXP_REQ);
-
- fs->volumeId.BytesPerSector=ex_getb16(buf,0x0B);
- fs->volumeId.SectorsPerCluster=*((eint8*)(buf+0x0D));
- fs->volumeId.ReservedSectorCount=ex_getb16(buf,0x0E);
- fs->volumeId.NumberOfFats=*((eint8*)(buf+0x10));
- fs->volumeId.RootEntryCount=ex_getb16(buf,0x11);
- fs->volumeId.SectorCount16=ex_getb16(buf,0x13);
- fs->volumeId.FatSectorCount16=ex_getb16(buf,0x16);
- fs->volumeId.SectorCount32=ex_getb32(buf,0x20);
- fs->volumeId.FatSectorCount32=ex_getb32(buf,0x24);
- fs->volumeId.RootCluster=ex_getb32(buf,0x2C);
-
- part_relSect(part,buf);
-
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * esint16 fs_verifySanity(FileSystem *fs)
- * Description: Does some sanity calculations.
- * Return value: 1 on success, 0 when discrepancies were found.
-*/
-esint16 fs_verifySanity(FileSystem *fs)
-{
- esint16 sane=1; /* Sane until proven otherwise */
- /* First check, BPS, we only support 512 */
- if(fs->volumeId.BytesPerSector!=512)sane=0;
- /* Check is SPC is valid (multiple of 2, and clustersize >=32KB */
- if(!((fs->volumeId.SectorsPerCluster == 1 ) |
- (fs->volumeId.SectorsPerCluster == 2 ) |
- (fs->volumeId.SectorsPerCluster == 4 ) |
- (fs->volumeId.SectorsPerCluster == 8 ) |
- (fs->volumeId.SectorsPerCluster == 16) |
- (fs->volumeId.SectorsPerCluster == 32) |
- (fs->volumeId.SectorsPerCluster == 64) ))sane=0;
- /* Any number of FAT's should be supported... (untested) */
- /* There should be at least 1 reserved sector */
- if(fs->volumeId.ReservedSectorCount==0)sane=0;
- if(fs->volumeId.FatSectorCount16 != 0){
- if(fs->volumeId.FatSectorCount16 > fs->part->disc->partitions[fs->part->activePartition].numSectors)sane=0;
- }else{
- if(fs->volumeId.FatSectorCount32 > fs->part->disc->partitions[fs->part->activePartition].numSectors)sane=0;
- }
- return(sane);
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * void fs_countDataSectors(FileSystem *fs)
- * Description: This functions calculates the sectorcounts, fatsectorcounts and
- * dataclustercounts. It fills in the general fields.
-*/
-void fs_countDataSectors(FileSystem *fs)
-{
- euint32 rootDirSectors,dataSectorCount;
-
- rootDirSectors=((fs->volumeId.RootEntryCount*32) +
- (fs->volumeId.BytesPerSector - 1)) /
- fs->volumeId.BytesPerSector;
-
- if(fs->volumeId.FatSectorCount16 != 0)
- {
- fs->FatSectorCount=fs->volumeId.FatSectorCount16;
- fs->volumeId.FatSectorCount32=0;
- }
- else
- {
- fs->FatSectorCount=fs->volumeId.FatSectorCount32;
- fs->volumeId.FatSectorCount16=0;
- }
-
- if(fs->volumeId.SectorCount16!=0)
- {
- fs->SectorCount=fs->volumeId.SectorCount16;
- fs->volumeId.SectorCount32=0;
- }
- else
- {
- fs->SectorCount=fs->volumeId.SectorCount32;
- fs->volumeId.SectorCount16=0;
- }
-
- dataSectorCount=fs->SectorCount - (
- fs->volumeId.ReservedSectorCount +
- (fs->volumeId.NumberOfFats * fs->FatSectorCount) +
- rootDirSectors);
-
- fs->DataClusterCount=dataSectorCount/fs->volumeId.SectorsPerCluster;
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * void fs_determineFatType(FileSystem *fs)
- * Description: This function looks af the Dataclustercount and determines the
- * FAT type. It fills in fs->type.
-*/
-void fs_determineFatType(FileSystem *fs)
-{
- if(fs->DataClusterCount < 4085)
- {
- fs->type=FAT12;
- fs->volumeId.RootCluster=0;
- }
- else if(fs->DataClusterCount < 65525)
- {
- fs->type=FAT16;
- fs->volumeId.RootCluster=0;
- }
- else
- {
- fs->type=FAT32;
- }
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * void fs_findFirstSectorRootDir(FileSystem *fs)
- * Description: This functions fills in the fs->FirstSectorRootDir field, even
- * for FAT32, although that is not necessary (because you have FirstClusterRootDir).
-*/
-void fs_findFirstSectorRootDir(FileSystem *fs)
-{
- if(fs->type==FAT32)
- fs->FirstSectorRootDir = fs->volumeId.ReservedSectorCount +
- (fs->volumeId.NumberOfFats*fs->volumeId.FatSectorCount32) +
- (fs->volumeId.RootCluster-2)*fs->volumeId.SectorsPerCluster;
- else
- fs->FirstSectorRootDir = fs->volumeId.ReservedSectorCount +
- (fs->volumeId.NumberOfFats*fs->volumeId.FatSectorCount16);
-}
-/*****************************************************************************/
-
-void fs_initCurrentDir(FileSystem *fs)
-{
- fs->FirstClusterCurrentDir = fs_getFirstClusterRootDir(fs);
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * long fs_clusterToSector(FileSystem *fs,euint32 cluster)
- * Description: This function converts a clusternumber in the effective sector
- * number where this cluster starts. Boundary check is not implemented
- * Return value: A long is returned representing the sectornumber.
-*/
-euint32 fs_clusterToSector(FileSystem *fs,euint32 cluster)
-{
- eint32 base;
-
- if(fs->type==FAT32)
- {
- base=
- fs->volumeId.ReservedSectorCount+
- fs->FatSectorCount*fs->volumeId.NumberOfFats;
- }
- else
- {
- base=
- fs->volumeId.ReservedSectorCount+
- fs->FatSectorCount*fs->volumeId.NumberOfFats+
- fs->volumeId.RootEntryCount/16;
- }
- return( base + (cluster-2)*fs->volumeId.SectorsPerCluster );
-}
-/*****************************************************************************/
-
-/* Function is unused, but may be usefull */
-euint32 fs_sectorToCluster(FileSystem *fs,euint32 sector)
-{
- eint32 base;
-
- if(fs->type==FAT32)
- {
- base=
- fs->volumeId.ReservedSectorCount+
- fs->FatSectorCount*fs->volumeId.NumberOfFats;
- }
- else
- {
- base=
- fs->volumeId.ReservedSectorCount+
- fs->FatSectorCount*fs->volumeId.NumberOfFats+
- fs->volumeId.RootEntryCount/16;
- }
- return(((sector-base)-((sector-base)%fs->volumeId.SectorsPerCluster))/fs->volumeId.SectorsPerCluster+2 );
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * euint32 fs_getNextFreeCluster(FileSystem *fs,euint32 startingcluster)
- * Description: This functions searches for a free cluster, starting it's search at
- * cluster startingcluster. This allow to speed up searches and try to avoid
- * fragmentation. Implementing rollover search is still to be done.
- * Return value: If a free cluster is found it's number is returned. If none is
- * found 0 is returned.
-*/
-euint32 fs_getNextFreeCluster(FileSystem *fs,euint32 startingcluster)
-{
- euint32 r;
-
- while(startingclusterDataClusterCount){
- r=fat_getNextClusterAddress(fs,startingcluster,0);
- if(r==0){
- return(startingcluster);
- }
- startingcluster++;
- }
- return(0);
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * euint32 fs_giveFreeClusterHint(FileSystem *fs)
- *
- * Description: This function should return a clusternumber that is free or
- * lies close before free clusters. The result MUST be checked to see if
- * it is free! Implementationhint: search the largest clusternumber in the
- * files in the rootdirectory.
- *
- * Return value: Returns it's best guess.
-*/
-euint32 fs_giveFreeClusterHint(FileSystem *fs)
-{
- return(2); /* Now THIS is a hint ;) */
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * esint8 fs_findFile(FileSystem *fs,eint8* filename,FileLocation *loc,euint32 *lastDir)
- *
- * Description: This function looks if the given filename is on the given fs
- * and, if found, fills in its location in loc.
- * The function will first check if the pathname starts with a slash. If so it will
- * set the starting directory to the rootdirectory. Else, it will take the firstcluster-
- * currentdir (That you can change with chdir()) as startingpoint.
- * The lastdir pointer will be the first cluster of the last directory fs_findfile
- * enters. It starts out at the root/current dir and then traverses the path along with
- * fs_findFile.
- * It is set to 0 in case of errors (like dir/dir/dir/file/dir/dir...)
- * Return value: Returns 0 when nothing was found, 1 when the thing found
- * was a file and 2 if the thing found was a directory.
-*/
-
-esint8 fs_findFile(FileSystem *fs,eint8* filename,FileLocation *loc,euint32 *lastDir)
-{
- euint32 fccd,tmpclus;
- eint8 ffname[11],*next,it=0,filefound=0;
-
- if(*filename=='/'){
- fccd = fs_getFirstClusterRootDir(fs);
- filename++;
- if(lastDir)*lastDir=fccd;
- if(!*filename){
- return(2);
- }
- }else{
- fccd = fs->FirstClusterCurrentDir;
- if(lastDir)*lastDir=fccd;
- }
-
-
- while((next=file_normalToFatName(filename,ffname))!=0){
- if((tmpclus=dir_findinDir(fs,ffname,fccd,loc,DIRFIND_FILE))==0){
- /* We didn't find what we wanted */
- /* We should check, to see if there is more after it, so that
- * we can invalidate lastDir
- */
- if((file_normalToFatName(next,ffname))!=0){
- if(lastDir)*lastDir=0;
- }
- return(0);
- }
- it++;
- if(loc->attrib&ATTR_DIRECTORY){
- fccd = tmpclus;
- filename = next;
- if(lastDir)*lastDir=fccd;
- if(filefound)*lastDir=0;
- }else{
- filefound=1;
- if((file_normalToFatName(next,ffname))!=0){
- if(lastDir)*lastDir=0;
- return(0);
- }else{
- filename=next;
- }
- }
- }
-
- if(it==0)return(0);
- if(loc->attrib&ATTR_DIRECTORY || !filefound)return(2);
- return(1);
-}
-/*****************************************************************************/
-
-esint16 fs_findFreeFile(FileSystem *fs,eint8* filename,FileLocation *loc,euint8 mode)
-{
- euint32 targetdir=0;
- eint8 ffname[11];
-
- if(fs_findFile(fs,filename,loc,&targetdir))return(0);
- if(!dir_getFatFileName(filename,ffname))return(0);
- if(dir_findinDir(fs,ffname,targetdir,loc,DIRFIND_FREE)){
- return(1);
- }else{
- if(dir_addCluster(fs,targetdir)){
- return(0);
- }else{
- if(dir_findinDir(fs,ffname,targetdir,loc,DIRFIND_FREE)){
- return(1);
- }
- }
- }
-
- return(0);
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * euint32 fs_getLastCluster(FileSystem *fs,ClusterChain *Cache)
- * Description: This function searches the last cluster of a chain.
- * Return value: The LastCluster (also stored in cache);
-*/
-euint32 fs_getLastCluster(FileSystem *fs,ClusterChain *Cache)
-{
- if(Cache->DiscCluster==0){
- Cache->DiscCluster=Cache->FirstCluster;
- Cache->LogicCluster=0;
- }
-
- if(Cache->LastCluster==0)
- {
- while(fat_getNextClusterChain(fs, Cache)==0)
- {
- Cache->LogicCluster+=Cache->Linear;
- Cache->DiscCluster+=Cache->Linear;
- Cache->Linear=0;
- }
- }
- return(Cache->LastCluster);
-}
-/*****************************************************************************/
-
-euint32 fs_getFirstClusterRootDir(FileSystem *fs)
-{
- switch(fs->type){
- case FAT32:
- return(fs->volumeId.RootCluster);
- break;
- default:
- return(1);
- break;
- }
-}
-/*****************************************************************************/
-
-void fs_initClusterChain(FileSystem *fs,ClusterChain *cache,euint32 cluster_addr)
-{
- cache->FirstCluster=cluster_addr;
- cache->DiscCluster=cluster_addr;
- cache->LogicCluster=0;
- cache->LastCluster=0; /* Warning flag here */
- cache->Linear=0;
- cache->ClusterCount=0; /* 0 means NOT known */
-}
-/*****************************************************************************/
-
-void fs_setFirstClusterInDirEntry(FileRecord *rec,euint32 cluster_addr)
-{
- rec->FirstClusterHigh=cluster_addr>>16;
- rec->FirstClusterLow=cluster_addr&0xFFFF;
-}
-/*****************************************************************************/
-
-esint8 fs_flushFs(FileSystem *fs)
-{
- return(part_flushPart(fs->part,0,fs->SectorCount));
-}
-/*****************************************************************************/
-
-esint8 fs_umount(FileSystem *fs)
-{
- return(fs_flushFs(fs));
-}
-/*****************************************************************************/
-
-esint8 fs_clearCluster(FileSystem *fs,euint32 cluster)
-{
- euint16 c;
- euint8* buf;
-
- for(c=0;c<(fs->volumeId.SectorsPerCluster);c++){
- buf = part_getSect(fs->part,fs_clusterToSector(fs,cluster)+c,IOM_MODE_READWRITE);
- memClr(buf,512);
- part_relSect(fs->part,buf);
- }
- return(0);
-}
-
-esint8 fs_getFsInfo(FileSystem *fs,euint8 force_update)
-{
- euint8 *buf;
-
- if(!fs->type==FAT32)return(0);
- buf = part_getSect(fs->part,FS_INFO_SECTOR,IOM_MODE_READONLY);
- if(ex_getb32(buf,0)!=FSINFO_MAGIC_BEGIN || ex_getb32(buf,508)!=FSINFO_MAGIC_END){
- part_relSect(fs->part,buf);
- return(-1);
- }
- fs->FreeClusterCount = ex_getb32(buf,488);
- fs->NextFreeCluster = ex_getb32(buf,492);
- part_relSect(fs->part,buf);
- if(force_update){
- fs->FreeClusterCount=fat_countFreeClusters(fs);
- }
- return(0);
-}
-
-esint8 fs_setFsInfo(FileSystem *fs)
-{
- euint8* buf;
-
- if(!fs->type==FAT32)return(0);
- buf = part_getSect(fs->part,FS_INFO_SECTOR,IOM_MODE_READWRITE);
- if(ex_getb32(buf,0)!=FSINFO_MAGIC_BEGIN || ex_getb32(buf,508)!=FSINFO_MAGIC_END){
- part_relSect(fs->part,buf);
- return(-1);
- }
- ex_setb32(buf,488,fs->FreeClusterCount);
- ex_setb32(buf,492,fs->NextFreeCluster);
- part_relSect(fs->part,buf);
- return(0);
-}
-
diff --git a/sw/airborne/arch/lpc21/efsl/src/interfaces/lpc2000_spi.c b/sw/airborne/arch/lpc21/efsl/src/interfaces/lpc2000_spi.c
deleted file mode 100644
index cbd9bf91ae..0000000000
--- a/sw/airborne/arch/lpc21/efsl/src/interfaces/lpc2000_spi.c
+++ /dev/null
@@ -1,291 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------- ----------------------------------- *
-* *
-* Filename : lpc2000_spi.c *
-* Description : This file contains the functions needed to use efs for *
-* accessing files on an SD-card connected to an LPC2xxx. *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2005 Martin Thomas *
-\*****************************************************************************/
-
-/*****************************************************************************/
-#include "interfaces/LPC2000_regs.h"
-#include "interfaces/lpc2000_spi.h"
-#include "interfaces/sd.h"
-#include "config.h"
-/*****************************************************************************/
-
-#ifndef HW_ENDPOINT_LPC2000_SPINUM
-#error "HW_ENDPOINT_LPC2000_SPINUM has to be defined in config.h"
-#endif
-
-#if ( HW_ENDPOINT_LPC2000_SPINUM == 0 )
-// LPC213x ### SPI0 ###
-
-// SP0SPCR Bit-Definitions
-#define CPHA 3
-#define CPOL 4
-#define MSTR 5
-// SP0SPSR Bit-Definitions
-#define SPIF 7
-
-#define SPI_IODIR IODIR0
-#define SPI_SCK_PIN 4 /* Clock P0.4 out */
-#define SPI_MISO_PIN 5 /* from Card P0.5 in */
-#define SPI_MOSI_PIN 6 /* to Card P0.6 out */
-#define SPI_SS_PIN 7 /* Card-Select P0.7 - GPIO out */
-
-#define SPI_PINSEL PINSEL0
-#define SPI_SCK_FUNCBIT 8
-#define SPI_MISO_FUNCBIT 10
-#define SPI_MOSI_FUNCBIT 12
-#define SPI_SS_FUNCBIT 14
-
-#define SPI_PRESCALE_REG S0SPCCR
-#define SPI_PRESCALE_MIN 8
-
-#define SELECT_CARD() IOCLR0 = (1<sectorCount=4; /* FIXME ASAP!! */
-
- sd_getDriveSize(file, &sc);
- file->sectorCount = sc/512;
- if( (sc%512) != 0) {
- file->sectorCount--;
- }
- DBG((TXT("Drive Size is %lu Bytes (%lu Sectors)\n"), sc, file->sectorCount));
-
- /* increase speed after init */
-#if ( HW_ENDPOINT_LPC2000_SPINUM == 1 )
- SSPCR0 = ((8-1)<<0) | (0<> 8)); /* MSB of parameter x */
- if_spiSend(iface,(euint8) (paramx)); /* LSB of parameter x */
- if_spiSend(iface,(euint8) (paramy >> 8)); /* MSB of parameter y */
- if_spiSend(iface,(euint8) (paramy)); /* LSB of parameter y */
-
- if_spiSend(iface,0x95); /* Checksum (should be only valid for first command (0) */
-
- if_spiSend(iface,0xff); /* eat empty command - response */
-}
-/*****************************************************************************/
-
-euint8 sd_Resp8b(hwInterface *iface)
-{
- euint8 i;
- euint8 resp;
-
- /* Respone will come after 1 - 8 pings */
- for(i=0;i<8;i++){
- resp = if_spiSend(iface,0xff);
- if(resp != 0xff)
- return(resp);
- }
-
- return(resp);
-}
-/*****************************************************************************/
-
-euint16 sd_Resp16b(hwInterface *iface)
-{
- euint16 resp;
-
- resp = ( sd_Resp8b(iface) << 8 ) & 0xff00;
- resp |= if_spiSend(iface,0xff);
-
- return(resp);
-}
-/*****************************************************************************/
-
-void sd_Resp8bError(hwInterface *iface,euint8 value)
-{
- switch(value)
- {
- case 0x40:
- DBG((TXT("Argument out of bounds.\n")));
- break;
- case 0x20:
- DBG((TXT("Address out of bounds.\n")));
- break;
- case 0x10:
- DBG((TXT("Error during erase sequence.\n")));
- break;
- case 0x08:
- DBG((TXT("CRC failed.\n")));
- break;
- case 0x04:
- DBG((TXT("Illegal command.\n")));
- break;
- case 0x02:
- DBG((TXT("Erase reset (see SanDisk docs p5-13).\n")));
- break;
- case 0x01:
- DBG((TXT("Card is initialising.\n")));
- break;
- default:
- DBG((TXT("Unknown error 0x%x (see SanDisk docs p5-13).\n"),value));
- break;
- }
-}
-/*****************************************************************************/
-
-esint8 sd_State(hwInterface *iface)
-{
- eint16 value;
-
- sd_Command(iface,13, 0, 0);
- value=sd_Resp16b(iface);
-
- switch(value)
- {
- case 0x000:
- return(1);
- break;
- case 0x0001:
- DBG((TXT("Card is Locked.\n")));
- break;
- case 0x0002:
- DBG((TXT("WP Erase Skip, Lock/Unlock Cmd Failed.\n")));
- break;
- case 0x0004:
- DBG((TXT("General / Unknown error -- card broken?.\n")));
- break;
- case 0x0008:
- DBG((TXT("Internal card controller error.\n")));
- break;
- case 0x0010:
- DBG((TXT("Card internal ECC was applied, but failed to correct the data.\n")));
- break;
- case 0x0020:
- DBG((TXT("Write protect violation.\n")));
- break;
- case 0x0040:
- DBG((TXT("An invalid selection, sectors for erase.\n")));
- break;
- case 0x0080:
- DBG((TXT("Out of Range, CSD_Overwrite.\n")));
- break;
- default:
- if(value>0x00FF)
- sd_Resp8bError(iface,(euint8) (value>>8));
- else
- DBG((TXT("Unknown error: 0x%x (see SanDisk docs p5-14).\n"),value));
- break;
- }
- return(-1);
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * WAIT ?? -- FIXME
- * CMDWRITE
- * WAIT
- * CARD RESP
- * WAIT
- * DATA BLOCK OUT
- * START BLOCK
- * DATA
- * CHKS (2B)
- * BUSY...
- */
-
-esint8 sd_writeSector(hwInterface *iface,euint32 address, euint8* buf)
-{
- euint32 place;
- euint16 i;
- euint16 t=0;
-
- /*DBG((TXT("Trying to write %u to sector %u.\n"),(void *)&buf,address));*/
- place=512*address;
- sd_Command(iface,CMDWRITE, (euint16) (place >> 16), (euint16) place);
-
- sd_Resp8b(iface); /* Card response */
-
- if_spiSend(iface,0xfe); /* Start block */
- for(i=0;i<512;i++)
- if_spiSend(iface,buf[i]); /* Send data */
- if_spiSend(iface,0xff); /* Checksum part 1 */
- if_spiSend(iface,0xff); /* Checksum part 2 */
-
- if_spiSend(iface,0xff);
-
- while(if_spiSend(iface,0xff)!=0xff){
- t++;
- /* Removed NOP */
- }
- /*DBG((TXT("Nopp'ed %u times.\n"),t));*/
-
- return(0);
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * WAIT ?? -- FIXME
- * CMDCMD
- * WAIT
- * CARD RESP
- * WAIT
- * DATA BLOCK IN
- * START BLOCK
- * DATA
- * CHKS (2B)
- */
-
-esint8 sd_readSector(hwInterface *iface,euint32 address, euint8* buf, euint16 len)
-{
- euint8 cardresp;
- euint8 firstblock;
- euint8 c;
- euint16 fb_timeout=0xffff;
- euint32 i;
- euint32 place;
-
- /*DBG((TXT("sd_readSector::Trying to read sector %u and store it at %p.\n"),address,&buf[0]));*/
- place=512*address;
- sd_Command(iface,CMDREAD, (euint16) (place >> 16), (euint16) place);
-
- cardresp=sd_Resp8b(iface); /* Card response */
-
- /* Wait for startblock */
- do
- firstblock=sd_Resp8b(iface);
- while(firstblock==0xff && fb_timeout--);
-
- if(cardresp!=0x00 || firstblock!=0xfe){
- sd_Resp8bError(iface,firstblock);
- return(-1);
- }
-
- for(i=0;i<512;i++){
- c = if_spiSend(iface,0xff);
- if(i>6;
-
-DBG((TXT(" c_size %d"), c_size));
-
- by= iob[5] & 0x0F;
- read_bl_len = 1;
- read_bl_len <<= by;
-
-DBG((TXT(" read_bl_len %d"), read_bl_len));
-
- by=iob[9] & 0x03;
- by <<= 1;
- by += iob[10] >> 7;
-
-DBG((TXT(" by %d"), by));
-
- c_size_mult = 1;
- c_size_mult <<= (2+by);
-
-DBG((TXT(" c_size_mult %d"), c_size_mult));
-
- *drive_size = (euint32)(c_size+1) * (euint32)c_size_mult * (euint32)read_bl_len;
-
- return 0;
-}
diff --git a/sw/airborne/arch/lpc21/efsl/src/ioman.c b/sw/airborne/arch/lpc21/efsl/src/ioman.c
deleted file mode 100644
index c5e043bca1..0000000000
--- a/sw/airborne/arch/lpc21/efsl/src/ioman.c
+++ /dev/null
@@ -1,594 +0,0 @@
-/*****************************************************************************\
-* libfat - General purpose FAT library *
-* ---------------------------------- *
-* *
-* Filename : ioman.c *
-* Description : The IO Manager receives all requests for sectors in a central *
-* allowing it to make smart decision regarding caching. *
-* The IOMAN_NUMBUFFER parameter determines how many sectors *
-* ioman can cache. ioman also supports overallocating and *
-* backtracking sectors. *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-/*****************************************************************************/
-#include "ioman.h"
-/*****************************************************************************/
-
-esint8 ioman_init(IOManager *ioman, hwInterface *iface, euint8* bufferarea)
-{
- ioman->iface=iface;
-
- ioman->bufptr = ioman_getBuffer(ioman,bufferarea);
- ioman->numbuf = IOMAN_NUMBUFFER;
- ioman->numit = IOMAN_NUMITERATIONS;
-
- ioman_reset(ioman);
- return(0);
-}
-/*****************************************************************************/
-
-void ioman_reset(IOManager *ioman)
-{
- euint16 nb,ni;
-
- memClr(ioman->sector,sizeof(euint32)*ioman->numbuf);
- memClr(ioman->status,sizeof(euint8) *ioman->numbuf);
- memClr(ioman->usage ,sizeof(euint8) *ioman->numbuf);
- memClr(ioman->itptr ,sizeof(euint8) *ioman->numbuf);
- ioman_setError(ioman,IOMAN_NOERROR);
-
- for(nb=0;nbnumbuf;nb++){
- for(ni=0;ninumit;ni++){
- ioman->stack[nb][ni].sector=0;
- ioman->stack[nb][ni].status=0;
- ioman->stack[nb][ni].usage =0;
- }
- }
-}
-/*****************************************************************************/
-
-euint8* ioman_getBuffer(IOManager *ioman,euint8* bufferarea)
-{
-#ifdef IOMAN_DO_MEMALLOC
- return(ioman->cache_mem);
-#else
- return(bufferarea);
-#endif
-}
-/*****************************************************************************/
-
-void ioman_setAttr(IOManager *ioman,euint16 bufplace,euint8 attribute,euint8 val)
-{
- if(bufplace>=ioman->numbuf){
- ioman_setError(ioman,IOMAN_ERR_SETATTROUTOFBOUNDS);
- return; /* Out of bounds */
- }
-
- if(val){
- ioman->status[bufplace]|=1<status[bufplace]&=~(1<=ioman->numbuf){
- ioman_setError(ioman,IOMAN_ERR_GETATTROUTOFBOUNDS);
- return(0xFF); /* Out of bounds */
- }
-
- return(ioman->status[bufplace]&(1<=ioman->numbuf){
- ioman_setError(ioman,IOMAN_ERR_OPOUTOFBOUNDS);
- return(0x00);
- }
- return(ioman->usage[bufplace]);
-}
-/*****************************************************************************/
-
-
-void ioman_incUseCnt(IOManager *ioman,euint16 bufplace)
-{
- if(bufplace>=ioman->numbuf){
- ioman_setError(ioman,IOMAN_ERR_OPOUTOFBOUNDS);
- return;
- }
- if(ioman->usage[bufplace]==0xFF)return;
- else ioman->usage[bufplace]++;
-}
-/*****************************************************************************/
-
-void ioman_decUseCnt(IOManager *ioman,euint16 bufplace)
-{
- if(bufplace>=ioman->numbuf){
- ioman_setError(ioman,IOMAN_ERR_OPOUTOFBOUNDS);
- return;
- }
- if(ioman->usage[bufplace]==0x0)return;
- else ioman->usage[bufplace]--;
-}
-/*****************************************************************************/
-
-void ioman_resetUseCnt(IOManager *ioman,euint16 bufplace)
-{
- if(bufplace>=ioman->numbuf){
- ioman_setError(ioman,IOMAN_ERR_OPOUTOFBOUNDS);
- return;
- }
- ioman->usage[bufplace]=0x00;
-}
-/*****************************************************************************/
-
-euint8 ioman_getRefCnt(IOManager *ioman,euint16 bufplace)
-{
- if(bufplace>=ioman->numbuf){
- ioman_setError(ioman,IOMAN_ERR_OPOUTOFBOUNDS);
- return(0x00);
- }
- return(ioman->reference[bufplace]);
-}
-/*****************************************************************************/
-
-void ioman_incRefCnt(IOManager *ioman,euint16 bufplace)
-{
- if(bufplace>=ioman->numbuf){
- ioman_setError(ioman,IOMAN_ERR_OPOUTOFBOUNDS);
- return;
- }
- if(ioman->reference[bufplace]==0xFF)return;
- else ioman->reference[bufplace]++;
-}
-/*****************************************************************************/
-
-void ioman_decRefCnt(IOManager *ioman,euint16 bufplace)
-{
- if(bufplace>=ioman->numbuf){
- ioman_setError(ioman,IOMAN_ERR_OPOUTOFBOUNDS);
- return;
- }
- if(ioman->reference[bufplace]==0x00)return;
- else ioman->reference[bufplace]--;
-}
-/*****************************************************************************/
-
-void ioman_resetRefCnt(IOManager *ioman,euint16 bufplace)
-{
- if(bufplace>=ioman->numbuf){
- ioman_setError(ioman,IOMAN_ERR_OPOUTOFBOUNDS);
- return;
- }
- ioman->reference[bufplace]=0x00;
-}
-/*****************************************************************************/
-
-esint8 ioman_pop(IOManager *ioman,euint16 bufplace)
-{
- if(bufplace>=ioman->numbuf){
- ioman_setError(ioman,IOMAN_ERR_POPEMPTYSTACK);
- return(-1);
- }
- if(ioman->itptr[bufplace]==0 || ioman->itptr[bufplace]>IOMAN_NUMITERATIONS)return(-1);
- ioman->sector[bufplace] = ioman->stack[bufplace][ioman->itptr[bufplace]].sector;
- ioman->status[bufplace] = ioman->stack[bufplace][ioman->itptr[bufplace]].status;
- ioman->usage[bufplace] = ioman->stack[bufplace][ioman->itptr[bufplace]].usage;
- ioman->itptr[bufplace]--;
- return(0);
-}
-/*****************************************************************************/
-
-esint8 ioman_push(IOManager *ioman,euint16 bufplace)
-{
- if(bufplace>=ioman->numbuf){
- ioman_setError(ioman,IOMAN_ERR_OPOUTOFBOUNDS);
- return(-1);
- }
- if(ioman->itptr[bufplace]>=IOMAN_NUMITERATIONS){
- ioman_setError(ioman,IOMAN_ERR_PUSHBEYONDSTACK);
- return(-1);
- }
- ioman->itptr[bufplace]++;
- ioman->stack[bufplace][ioman->itptr[bufplace]].sector = ioman->sector[bufplace];
- ioman->stack[bufplace][ioman->itptr[bufplace]].status = ioman->status[bufplace];
- ioman->stack[bufplace][ioman->itptr[bufplace]].usage = ioman->usage[bufplace];
- return(0);
-}
-/*****************************************************************************/
-
-euint8* ioman_getPtr(IOManager *ioman,euint16 bufplace)
-{
- if(bufplace>=ioman->numbuf){
- ioman_setError(ioman,IOMAN_ERR_OPOUTOFBOUNDS);
- return(0);
- }
- return(ioman->bufptr+bufplace*512);
-}
-/*****************************************************************************/
-
-esint16 ioman_getBp(IOManager *ioman,euint8* buf)
-{
- if(buf<(ioman->bufptr) || buf>=( ioman->bufptr+(ioman->numbuf*512) )){
- ioman_setError(ioman,IOMAN_ERR_CACHEPTROUTOFRANGE);
- return(-1);
- }
- return((buf-(ioman->bufptr))/512);
-}
-/*****************************************************************************/
-
-esint8 ioman_readSector(IOManager *ioman,euint32 address,euint8* buf)
-{
- esint8 r;
-
- if(buf==0){
- return(-1);
- }
-
- r=if_readBuf(ioman->iface,address,buf);
-
- if(r!=0){
- ioman_setError(ioman,IOMAN_ERR_READFAIL);
- return(-1);
- }
- return(0);
-}
-/*****************************************************************************/
-
-esint8 ioman_writeSector(IOManager *ioman, euint32 address, euint8* buf)
-{
- esint8 r;
-
- if(buf==0)return(-1);
-
- r=if_writeBuf(ioman->iface,address,buf);
-
- if(r<=0){
- ioman_setError(ioman,IOMAN_ERR_WRITEFAIL);
- return(-1);
- }
- return(0);
-}
-/*****************************************************************************/
-
-void ioman_resetCacheItem(IOManager *ioman,euint16 bufplace)
-{
- if(bufplace>=ioman->numbuf){
- ioman_setError(ioman,IOMAN_ERR_OPOUTOFBOUNDS);
- return;
- }
- ioman->sector[bufplace] = 0;
- ioman->status[bufplace] = 0;
- ioman->usage[bufplace] = 0;
- ioman->reference[bufplace] = 0;
-}
-/*****************************************************************************/
-
-esint32 ioman_findSectorInCache(IOManager *ioman, euint32 address)
-{
- euint16 c;
-
- for(c=0;cnumbuf;c++){
- if(ioman_isValid(c) && ioman->sector[c] == address)return(c);
- }
- return(-1);
-}
-/*****************************************************************************/
-
-esint32 ioman_findFreeSpot(IOManager *ioman)
-{
- euint16 c;
-
- for(c=0;cnumbuf;c++){
- if(!ioman_isValid(c))return(c);
- }
- return(-1);
-}
-/*****************************************************************************/
-
-esint32 ioman_findUnusedSpot(IOManager *ioman)
-{
- esint32 r=-1;
- euint16 c;
- euint8 fr=0,lr=0xFF;
-
- for(c=0;cnumbuf;c++){
- if(ioman_getUseCnt(ioman,c)==0){
- if(!ioman_isWritable(c) && !fr){
- fr=1;
- lr=0xFF;
- r=-1;
- }
- if(ioman_isWritable(c) && !fr){
- if(ioman_getRefCnt(ioman,c)<=lr){
- r=c;
- lr=ioman_getRefCnt(ioman,c);
- }
- }
- if(fr && !ioman_isWritable(c)){
- if(ioman_getRefCnt(ioman,c)<=lr){
- r=c;
- lr=ioman_getRefCnt(ioman,c);
- }
- }
- }
- }
- return(r);
-}
-/*****************************************************************************/
-
-esint32 ioman_findOverallocableSpot(IOManager *ioman)
-{
- euint8 points,lp=0xFF;
- euint16 c;
- esint32 r=-1;
-
- for(c=0;cnumbuf;c++){
- if(ioman->itptr[c]numit){
- points = 0;
- if(ioman_isWritable(c))points+=0x7F;
- points += ((euint16)(ioman->itptr[c]*0x4D))/(ioman->numit);
- points += ((euint16)(ioman_getRefCnt(ioman,c)*0x33))/0xFF;
- if(pointssector[bufplace]=address;
- return(0);
-}
-/***************** if(bufplace>=ioman->numbuf)return;
-************************************************************/
-
-esint8 ioman_flushSector(IOManager *ioman, euint16 bufplace)
-{
- euint8* buf;
-
- if((buf = ioman_getPtr(ioman,bufplace))==0){
- ioman_setError(ioman,IOMAN_ERR_CACHEPTROUTOFRANGE);
- return(-1);
- }
- if(!ioman_isWritable(bufplace)){
- ioman_setError(ioman,IOMAN_ERR_WRITEREADONLYSECTOR);
- return(-1);
- }
- if(!(ioman_writeSector(ioman,ioman->sector[bufplace],buf))){
- ioman_setError(ioman,IOMAN_ERR_WRITEFAIL);
- return(-1);
- }
- if(ioman->usage==0)ioman_setNotWritable(bufplace);
- return(0);
-}
-/*****************************************************************************/
-
-esint8 ioman_flushRange(IOManager *ioman,euint32 address_low, euint32 address_high)
-{
- euint32 c;
-
- if(address_low>address_high){
- c=address_low; address_low=address_high;address_high=c;
- }
-
- for(c=0;cnumbuf;c++){
- if((ioman->sector[c]>=address_low) && (ioman->sector[c]<=address_high) && (ioman_isWritable(c))){
- if(ioman_flushSector(ioman,c)){
- return(-1);
- }
- if(ioman->usage[c]==0)ioman_setNotWritable(c);
- }
- }
- return(0);
-}
-/*****************************************************************************/
-
-esint8 ioman_flushAll(IOManager *ioman)
-{
- euint16 c;
-
- for(c=0;cnumbuf;c++){
- if(ioman_isWritable(c)){
- if(ioman_flushSector(ioman,c)){
- return(-1);
- }
- if(ioman->usage[c]==0)ioman_setNotWritable(c);
- }
- }
- return(0);
-}
-/*****************************************************************************/
-
-euint8* ioman_getSector(IOManager *ioman,euint32 address, euint8 mode)
-{
- esint32 bp;
-
- if((bp=ioman_findSectorInCache(ioman,address))!=-1){
- if(ioman_isReqRw(mode)){
- ioman_setWritable(bp);
- }
- ioman_incUseCnt(ioman,bp);
- if(!ioman_isReqExp(mode))ioman_incRefCnt(ioman,bp);
- return(ioman_getPtr(ioman,bp));
- }
-
- if((bp=ioman_findFreeSpot(ioman))==-1){
- if(((bp=ioman_findUnusedSpot(ioman))!=-1)&&(ioman_isWritable(bp))){
- ioman_flushSector(ioman,bp);
- }
- }
-
- if(bp!=-1){
- ioman_resetCacheItem(ioman,bp);
- if((ioman_putSectorInCache(ioman,address,bp))){
- return(0);
- }
- if(mode==IOM_MODE_READWRITE){
- ioman_setWritable(bp);
- }
- ioman_incUseCnt(ioman,bp);
- if(!ioman_isReqExp(mode))ioman_incRefCnt(ioman,bp);
- return(ioman_getPtr(ioman,bp));
- }
-
- if((bp=ioman_findOverallocableSpot(ioman))!=-1){
- if(ioman_isWritable(bp)){
- ioman_flushSector(ioman,bp);
- }
- if(ioman_push(ioman,bp)){
- return(0);
- }
- ioman_resetCacheItem(ioman,bp);
- if((ioman_putSectorInCache(ioman,address,bp))){
- return(0);
- }
- if(ioman_isReqRw(mode)){
- ioman_setWritable(bp);
- }
- ioman_incUseCnt(ioman,bp);
- if(!ioman_isReqExp(mode))ioman_incRefCnt(ioman,bp);
- return(ioman_getPtr(ioman,bp));
- }
- ioman_setError(ioman,IOMAN_ERR_NOMEMORY);
- return(0);
-}
-/*****************************************************************************/
-
-esint8 ioman_releaseSector(IOManager *ioman,euint8* buf)
-{
- euint16 bp;
-
- bp=ioman_getBp(ioman,buf);
- ioman_decUseCnt(ioman,bp);
-
- if(ioman_getUseCnt(ioman,bp)==0 && ioman->itptr[bp]!=0){
- if(ioman_isWritable(bp)){
- ioman_flushSector(ioman,bp);
- }
- ioman_pop(ioman,bp);
- ioman_putSectorInCache(ioman,ioman->sector[bp],bp);
- }
- return(0);
-}
-/*****************************************************************************/
-
-esint8 ioman_directSectorRead(IOManager *ioman,euint32 address, euint8* buf)
-{
- euint8* ibuf;
- esint16 bp;
-
- if((bp=ioman_findSectorInCache(ioman,address))!=-1){
- ibuf=ioman_getPtr(ioman,bp);
- memCpy(ibuf,buf,512);
- return(0);
- }
-
- if((bp=ioman_findFreeSpot(ioman))!=-1){
- if((ioman_putSectorInCache(ioman,address,bp))){
- return(-1);
- }
- ibuf=ioman_getPtr(ioman,bp);
- memCpy(ibuf,buf,512);
- return(0);
- }
-
- if(ioman_readSector(ioman,address,buf)){
- return(-1);
- }
-
- return(0);
-}
-/*****************************************************************************/
-
-esint8 ioman_directSectorWrite(IOManager *ioman,euint32 address, euint8* buf)
-{
- euint8* ibuf;
- esint16 bp;
-
- if((bp=ioman_findSectorInCache(ioman,address))!=-1){
- ibuf=ioman_getPtr(ioman,bp);
- memCpy(buf,ibuf,512);
- ioman_setWritable(bp);
- return(0);
- }
-
- if((bp=ioman_findFreeSpot(ioman))!=-1){
- ibuf=ioman_getPtr(ioman,bp);
- memCpy(buf,ibuf,512);
- ioman_resetCacheItem(ioman,bp);
- ioman->sector[bp]=address;
- ioman_setWritable(bp);
- ioman_setValid(bp);
- return(0);
- }
-
- if(ioman_writeSector(ioman,address,buf)){
- return(-1);
- }
-
- return(0);
-}
-/*****************************************************************************/
-
-void ioman_printStatus(IOManager *ioman)
-{
- euint16 c;
-
- DBG((TXT("IO-Manager -- Report\n====================\n")));
- DBG((TXT("Buffer is %i sectors, from %p to %p\n"),
- ioman->numbuf,ioman->bufptr,ioman->bufptr+(ioman->numbuf*512)));
- for(c=0;cnumbuf;c++){
- if(ioman_isValid(c)){
- DBG((TXT("BP %3i\t SC %8li\t\t US %i\t RF %i\t %s %s\n"),
- c,ioman->sector[c],ioman_getUseCnt(ioman,c),ioman_getRefCnt(ioman,c),
- ioman_isUserBuf(c) ? "USRBUF" : " ",
- ioman_isWritable(c) ? "WRITABLE" : "READONLY"));
- }
- }
-}
-/*****************************************************************************/
-
diff --git a/sw/airborne/arch/lpc21/efsl/src/ls.c b/sw/airborne/arch/lpc21/efsl/src/ls.c
deleted file mode 100644
index 84e585cb5d..0000000000
--- a/sw/airborne/arch/lpc21/efsl/src/ls.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------- ----------------------------------- *
-* *
-* Filename : ls.c *
-* Description : This file contains functions to list the files in a directory *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-/*****************************************************************************/
-#include "ls.h"
-/*****************************************************************************/
-
-esint8 ls_openDir(DirList *dlist,FileSystem *fs,eint8* dirname)
-{
- FileLocation loc;
- euint32 fc;
-
- dlist->fs=fs;
-
- if(fs_findFile(dlist->fs,dirname,&loc,&fc)!=2)
- {
- return(-1);
- }
-
- fs_initClusterChain(dlist->fs,&(dlist->Cache),fc);
- memClr(&(dlist->currentEntry),sizeof(dlist->currentEntry));
- dlist->rEntry=0;
- dlist->cEntry=0xFFFF;
-
- return(0);
-}
-/*****************************************************************************/
-
-esint8 ls_getDirEntry(DirList *dlist)
-{
- if(dlist->Cache.FirstCluster == 1){
- return(ls_getRootAreaEntry(dlist));
- }else if(dlist->Cache.FirstCluster){
- return(ls_getRealDirEntry(dlist));
- }
- return(-1);
-}
-/*****************************************************************************/
-
-esint8 ls_getNext(DirList *dlist)
-{
- do{
- if(ls_getDirEntry(dlist))return(-1);
- dlist->rEntry++;
- }while(!ls_isValidFileEntry(&(dlist->currentEntry)));
- dlist->cEntry++;
- return(0);
-}
-/*****************************************************************************/
-
-esint8 ls_getRealDirEntry(DirList *dlist)
-{
- euint8* buf;
-
- if(dlist->Cache.FirstCluster<=1)return(-1);
-
- if(fat_LogicToDiscCluster(dlist->fs,
- &(dlist->Cache),
- (dlist->rEntry)/(16 * dlist->fs->volumeId.SectorsPerCluster))){
- return(-1);
- }
-
- buf = part_getSect(dlist->fs->part,
- fs_clusterToSector(dlist->fs,dlist->Cache.DiscCluster) + (dlist->rEntry/16)%dlist->fs->volumeId.SectorsPerCluster,
- IOM_MODE_READONLY);
-
- /*memCpy(buf+(dlist->rEntry%16)*32,&(dlist->currentEntry),32);*/
- ls_fileEntryToDirListEntry(dlist,buf,32*(dlist->rEntry%16));
-
- part_relSect(dlist->fs->part,buf);
-
- return(0);
-}
-/*****************************************************************************/
-
-esint8 ls_getRootAreaEntry(DirList *dlist)
-{
- euint8 *buf=0;
-
- if((dlist->fs->type != FAT12) && (dlist->fs->type != FAT16))return(-1);
- if(dlist->rEntry>=dlist->fs->volumeId.RootEntryCount)return(-1);
-
- buf = part_getSect(dlist->fs->part,
- dlist->fs->FirstSectorRootDir+dlist->rEntry/16,
- IOM_MODE_READONLY);
- /*memCpy(buf+32*(dlist->rEntry%16),&(dlist->currentEntry),32);*/
- ls_fileEntryToDirListEntry(dlist,buf,32*(dlist->rEntry%16));
- part_relSect(dlist->fs->part,buf);
- return(0);
-}
-/*****************************************************************************/
-
-esint8 ls_isValidFileEntry(ListDirEntry *entry)
-{
- if(entry->FileName[0] == 0 || entry->FileName[0] == 0xE5 || entry->FileName[0] == '.')return(0);
- if((entry->Attribute&0x0F)==0x0F)return(0);
- return(1);
-}
-/*****************************************************************************/
-
-void ls_fileEntryToDirListEntry(DirList *dlist, euint8* buf, euint16 offset)
-{
- if(offset>480 || offset%32)return;
-
- buf+=offset;
- memCpy(buf+OFFSET_DE_FILENAME,dlist->currentEntry.FileName,LIST_MAXLENFILENAME);
- dlist->currentEntry.Attribute = *(buf+OFFSET_DE_ATTRIBUTE);
- dlist->currentEntry.FileSize = ex_getb32(buf,OFFSET_DE_FILESIZE);
-}
-/*****************************************************************************/
-
diff --git a/sw/airborne/arch/lpc21/efsl/src/mkfs.c b/sw/airborne/arch/lpc21/efsl/src/mkfs.c
deleted file mode 100644
index 47edb7ff66..0000000000
--- a/sw/airborne/arch/lpc21/efsl/src/mkfs.c
+++ /dev/null
@@ -1,153 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------- ----------------------------------- *
-* *
-* Filename : mkfs.c *
-* Description : These functions are used for creating an empty filesystem. *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-/*****************************************************************************/
-#include "mkfs.h"
-/*****************************************************************************/
-
-signed short mkfs_makevfat(Partition *part)
-{
- unsigned long c,cc,ret;
- unsigned long ns,fs,ds,dc;
- unsigned char buf[512];
-
- ns=part->disc->partitions[part->activePartition].numSectors;
-
- if( ns < 66581 ){
- DBG((TXT("This is not possible due to insufficient sectors. Sorry\n")));
- return(MKFS_ERR_TOOLITTLESECTORS);
- }
-
- ret=0;
-
- for(c=1<<6;c>=1;c>>=1){
-
- /* First guess */
- ds = ns - 32;
- fs = ((ds/c)+127)/128;
- /* ds was guess too large, so fs is too large now too. */
-
- for(cc=0;cc<2;cc++){
-
- /* Round 2, error round */
- ds = ns - 32 - 2*fs;
- fs = ((ds/c)+127)/128;
- /* Since fs was too large, ds became too small. So the fs for this small ds is too small as well. */
-
- /* Round 3, correction round */
- ds = ns - 32 - 2*fs;
- fs = ((ds/c)+127)/128;
- /* The fs was too small, so ds was too large. The calculated fs should be slightly too large. */
-
- }
-
- /* Round 4, finalise */
- ds = ns - 32 - 2*fs;
-
- dc = ds / c;
- if(ret<(fs*128-dc)/128)ret=(fs*128-dc)/128;
-
- /* Check if with current setting we have a valid fat ? */
-
- if(dc >= 65525 + 16){
- break;
- }
- }
-
- /* Generate BPB */
- memClr(buf,512);
-
- /* Boot code */
- *(buf+0)=0xE9; *(buf+1)=0x00; *(buf+2)=0x00; /* RESET */
-
- /* OEM name */
- memCpy("DSCOSMSH",buf+3,8);
-
- /* Bytes/Sector */
- *((unsigned short*)(buf+11)) = 512;
-
- /* Sectors/Cluster */
- *(buf+13) = c;
-
- /* Reserved Sectors */
- *((unsigned short*)(buf+14)) = 32;
-
- /* Number of FAT Tables */
- *(buf+16) = 2;
-
- /* RootEntryCount */
- *((unsigned short*)(buf+17)) = 0;
-
- /* Total Sector Count __16 */
- *((unsigned short*)(buf+19)) = 0;
-
- /* Media (crap) */
- *(buf+21) = 0xF8;
-
- /* FAT size 16 */
- *((unsigned short*)(buf+22)) = 0;
-
- /* Total Sector Count __32 */
- *((unsigned long*)(buf+32)) = ns;
-
- /* Fat Size 32 */
- *((unsigned long*)(buf+36)) = fs;
-
- /* First Cluster Root Dir */
- *((unsigned long*)(buf+44)) = 2;
-
- /* VolumeID */
- *((unsigned long*)(buf+67)) = 0x13371337;
-
- /* Volume Label */
- memCpy("DISCOSMASH!",buf+71,11);
-
- /* Filesystemtype */
- memCpy("FAT32 ",buf+82,8);
-
- /* Magic */
- *(buf+510) = 0x55; *(buf+511) = 0xAA;
-
- part_writeBuf(part,0,buf);
-
- memClr(buf,512);
- for(c=32;c<(32+2*fs);c++){
- part_writeBuf(part,c,buf);
- }
- *(((unsigned long*)buf) )=0x0FFFFFF8;
- *(((unsigned long*)buf)+1)=0x0FFFFFFF;
- *(((unsigned long*)buf)+2)=0x0FFFFFF8;
- part_writeBuf(part,32,buf);
- part_writeBuf(part,32+fs,buf);
-
- return(0);
-}
diff --git a/sw/airborne/arch/lpc21/efsl/src/partition.c b/sw/airborne/arch/lpc21/efsl/src/partition.c
deleted file mode 100644
index 6ad086b604..0000000000
--- a/sw/airborne/arch/lpc21/efsl/src/partition.c
+++ /dev/null
@@ -1,152 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------- ----------------------------------- *
-* *
-* Filename : partition.c *
-* Description : These functions are partition specific. Searching FAT type *
-* partitions and read/write functions to partitions. *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-/*****************************************************************************/
-#include "partition.h"
-/*****************************************************************************/
-
-/* ****************************************************************************
- * void part_initPartition(Partition *part,Disc* refDisc)
- * Description: This function searches the 4 partitions for a FAT class partition
- * and marks the first one found as the active to be used partition.
-*/
-void part_initPartition(Partition *part,Disc* refDisc)
-{
- eint16 c;
-
- part->disc=refDisc;
- part->activePartition=-1; /* No partition selected */
- part_setError(part,PART_NOERROR);
- for(c=3;c>=0;c--){
- if(part_isFatPart(part->disc->partitions[c].type))
- part->activePartition=c;
- }
-}
-/*****************************************************************************/
-
-
-/* ****************************************************************************
- * eint16 part_isFatPart(euint8 type)
- * Description: This functions checks if a partitiontype (eint8) is of the FAT
- * type in the broadest sense. I
- * Return value: If it is FAT, returns 1, otherwise 0.
-*/
-eint16 part_isFatPart(euint8 type)
-{
- if(type == PT_FAT12 ||
- type == PT_FAT16A ||
- type == PT_FAT16 ||
- type == PT_FAT32 ||
- type == PT_FAT32A ||
- type == PT_FAT16B )
- {
- return(1);
- }
- return(0);
-}
-/*****************************************************************************/
-
-esint8 part_readBuf(Partition *part, euint32 address, euint8* buf)
-{
- return(if_readBuf(part->disc->ioman->iface,part_getRealLBA(part,address), buf));
-}
-
-/* ****************************************************************************
- * eint16 part_writeBuf(Partition *part,euint32 address,euint8* buf)
- * Description: This function writes 512 bytes, from buf. It's offset is address
- * sectors from the beginning of the partition.
- * Return value: It returns whatever the hardware function returns. (-1=error)
-*/
-eint16 part_writeBuf(Partition *part,euint32 address,euint8* buf)
-{
- /*DBG((TXT("part_writeBuf :: %li\n"),address));*/
- return(if_writeBuf(part->disc->ioman->iface,part_getRealLBA(part,address),buf));
-}
-/*****************************************************************************/
-
-
-/* ****************************************************************************
- * euint32 part_getRealLBA(Partition *part,euint32 address)
- * Description: This function calculates what the partition offset for
- * a partition is + the address.
- * Return value: Sector address.
-*/
-euint32 part_getRealLBA(Partition *part,euint32 address)
-{
- return(part->disc->partitions[part->activePartition].LBA_begin+address);
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * euint8* part_getSect(Partition *part, euint32 address, euint8 mode)
- * Description: This function calls ioman_getSector, but recalculates the sector
- * address to be partition relative.
- * Return value: Whatever getSector returns. (pointer or 0)
-*/
-euint8* part_getSect(Partition *part, euint32 address, euint8 mode)
-{
- return(ioman_getSector(part->disc->ioman,part_getRealLBA(part,address),mode));
-}
-
-/* ****************************************************************************
- * esint8 part_relSect(Partition *part, euint8* buf)
- * Description: This function calls ioman_releaseSector.
- * Return value: Whatever releaseSector returns.
-*/
-esint8 part_relSect(Partition *part, euint8* buf)
-{
- return(ioman_releaseSector(part->disc->ioman,buf));
-}
-
-esint8 part_flushPart(Partition *part,euint32 addr_l, euint32 addr_h)
-{
- return(
- ioman_flushRange(part->disc->ioman,part_getRealLBA(part,addr_l),part_getRealLBA(part,addr_h))
- );
-}
-
-esint8 part_directSectorRead(Partition *part,euint32 address, euint8* buf)
-{
- return(
- ioman_directSectorRead(part->disc->ioman,part_getRealLBA(part,address),buf)
- );
-}
-
-esint8 part_directSectorWrite(Partition *part,euint32 address, euint8* buf)
-{
- return(
- ioman_directSectorWrite(part->disc->ioman,part_getRealLBA(part,address),buf)
- );
-}
-
-
diff --git a/sw/airborne/arch/lpc21/efsl/src/plibc.c b/sw/airborne/arch/lpc21/efsl/src/plibc.c
deleted file mode 100644
index 2a2ad9559b..0000000000
--- a/sw/airborne/arch/lpc21/efsl/src/plibc.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------- ----------------------------------- *
-* *
-* Filename : plibc.c *
-* Description : This file contains replacements of common c library functions *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-/*****************************************************************************/
-#include "plibc.h"
-/*****************************************************************************/
-
-/* ****************************************************************************
- * unsigned short strMatch(char* bufa, char*bufb, unsigned long n)
- * Description: Compares bufa and bufb for a length of n bytes.
- * Return value: Returns the number of character NOT matching.
-*/
-euint16 strMatch(eint8* bufa, eint8*bufb,euint32 n)
-{
- euint32 c;
- euint16 res=0;
- for(c=0;c0){
- *((eint8*)pdest+size-1)=*((eint8*)psrc+size-1);
- size--;
- }
-}
-/*****************************************************************************/
-
-void memClr(void *pdest,euint32 size)
-{
- while(size>0){
- *(((eint8*)pdest)+size-1)=0x00;
- size--;
- }
-}
-
-void memSet(void *pdest,euint32 size,euint8 data)
-{
- while(size>0){
- *(((eint8*)pdest)+size-1)=data;
- size--;
- }
-}
-
-
diff --git a/sw/airborne/arch/lpc21/efsl/src/time.c b/sw/airborne/arch/lpc21/efsl/src/time.c
deleted file mode 100644
index 7be9f65970..0000000000
--- a/sw/airborne/arch/lpc21/efsl/src/time.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------- ----------------------------------- *
-* *
-* Filename : time.c *
-* Description : This file contains functions for time support *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-/*****************************************************************************/
-#include "time.h"
-/*****************************************************************************/
-
-euint16 fs_makeDate(void)
-{
-#ifndef DATE_TIME_SUPPORT
- return(0);
-#else
- euint8 m,d;
- euint16 y;
-
- y = time_getYear()-1980;
- m = time_getMonth();
- d = time_getDay();
-
- return(
- (y>127?127<<9:(y&0x3F)<<9) |
- ((m==0||m>12)?1:(m&0xF)<<5) |
- ((d==0||d>31)?1:(d&0x1F))
- );
-#endif
-}
-/*****************************************************************************/
-
-euint16 fs_makeTime(void)
-{
-#ifndef DATE_TIME_SUPPORT
- return(0);
-#else
- euint8 s,m,h;
-
- s = time_getSecond();
- m = time_getMinute();
- h = time_getHour();
-
- return(
- (h>23?0:(h&0x1F)<<11) |
- (m>59?0:(m&0x3F)<<5) |
- (s>59?0:(s-s%2)/2)
- );
-#endif
-}
-/*****************************************************************************/
-
-euint8 fs_hasTimeSupport(void)
-{
-#ifdef DATE_TIME_SUPPORT
- return(1);
-#else
- return(0);
-#endif
-}
-/*****************************************************************************/
-
-
diff --git a/sw/airborne/arch/lpc21/efsl/src/ui.c b/sw/airborne/arch/lpc21/efsl/src/ui.c
deleted file mode 100644
index 3c711af537..0000000000
--- a/sw/airborne/arch/lpc21/efsl/src/ui.c
+++ /dev/null
@@ -1,230 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------- ----------------------------------- *
-* *
-* Filename : ui.c *
-* Description : This file contains functions which will be presented to the *
-* user of this library. *
-* *
-* This program is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU General Public License *
-* as published by the Free Software Foundation; version 2 *
-* of the License. *
- *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* As a special exception, if other files instantiate templates or *
-* use macros or inline functions from this file, or you compile this *
-* file and link it with other works to produce a work based on this file, *
-* this file does not by itself cause the resulting work to be covered *
-* by the GNU General Public License. However the source code for this *
-* file must still be made available in accordance with section (3) of *
-* the GNU General Public License. *
-* *
-* This exception does not invalidate any other reasons why a work based *
-* on this file might be covered by the GNU General Public License. *
-* *
-* (c)2006 Lennart Yseboodt *
-* (c)2006 Michael De Nil *
-\*****************************************************************************/
-
-/*****************************************************************************/
-#include "ui.h"
-/*****************************************************************************/
-
-/*****************************************************************************
- * short listfiles(char *dir)
- *
- * Deschription: This function returns the number of files / directories
- * inside the given directory.
- *
- * Return value: number of files/directories in the given directory or -1
- * if directory does not exist.
-\*****************************************************************************/
-
-short listFiles(FileSystem *fs, char *dirname)
-{
- unsigned long startCluster;
- unsigned char fileEntryCount;
- unsigned short counter=0;
- unsigned long offset=0;
- FileRecord fileEntry;
- FileLocation loc;
- unsigned char buf[512];
- File dir;
- unsigned short i;
-
- /* Find out if we are searching in the root dir or in */
- if(dirname[0]=='/' && dirname[1]=='\0')
- {
- if( (fs->type == FAT12) || (fs->type == FAT16) )
- {
- for(i=0;i<=(fs->volumeId.RootEntryCount/16);i++)
- {
- loc.Sector=fs->FirstSectorRootDir + i;
- part_readBuf(fs->part,loc.Sector,buf);
- /* I STOPPED HERE*/
- /* FIXME */
- }
- }
- }
- else /* Normal directory */
- {
- /* Check if path given is a directory */
- if(fs_findFile(fs,dirname,&loc,0)!=2)
- {
- FUNC_OUT((TXT("")));
- return(-1);
- }
-
- /* Find out what the startcluster of the directory is */
- part_readBuf(fs->part,loc.Sector, buf);
- fileEntry = *(((FileRecord*)buf) + loc.Offset);
- startCluster = (((unsigned long)fileEntry.FirstClusterHigh)<<16)
- + fileEntry.FirstClusterLow;
-
- /* Init of dir */
- dir.fs=fs;
- dir.Cache.LogicCluster=-1;
- dir.Cache.FirstCluster=startCluster;
- dir.DirEntry.Attribute=ATTR_DIRECTORY;
-
- while((file_fread(&dir,offset,512,buf)))
- {
- DBG((TXT("Read 512 bytes from dir with offset %li.\n"),offset));
- for(fileEntryCount=0;fileEntryCount<16;fileEntryCount++)
- {
- fileEntry = *(((FileRecord*)buf) + fileEntryCount);
- if( !( (fileEntry.Attribute & 0x0F) == 0x0F ) )
- {
- if
- (
- (fileEntry.FileName[0]>='A' && fileEntry.FileName[0]<='Z')
- ||
- (fileEntry.FileName[0]>='0' && fileEntry.FileName[0]<='9')
- )
- {
- DBG((TXT("Filename: %s\n"),fileEntry.FileName));
- counter++;
- }
- }
- }
- offset+=512;
- }
- }
-
- FUNC_OUT((TXT("")));
- return(counter);
-
- return(-1);
-}
-/*****************************************************************************/
-
-/* ****************************************************************************
- * esint16 rmfile(FileSystem *fs,euint8* filename)
- * Description: This function takes a filename as argument and deletes it,
- * by freeing it's clusterchain, and deleting it's entry from the directory.
- * Return value: 0 on success, -1 on errors, like file not found.
-*/
-esint16 rmfile(FileSystem *fs,euint8* filename)
-{
- FileLocation loc;
- ClusterChain cache;
- euint8* buf;
- euint32 firstCluster=0;
-
- if((fs_findFile(fs,(eint8*)filename,&loc,0))==1){
- buf=part_getSect(fs->part,loc.Sector,IOM_MODE_READWRITE);
- firstCluster = ex_getb16(buf,loc.Offset*32+20);
- firstCluster <<= 16;
- firstCluster += ex_getb16(buf,loc.Offset*32+26);
- /* Bugfix:
- * By clearing the entire structure, you mark end of directory.
- * If this is not the case, files that are further away cannot
- * be opened anymore by implementations that follow the spec. */
- /*memClr(buf+(loc.Offset*32),32);*/
- *(buf+(loc.Offset*32)+0) = 0xE5; /* Mark file deleted */
- part_relSect(fs->part,buf);
- cache.DiscCluster = cache.LastCluster = cache.Linear = cache.LogicCluster = 0;
- cache.FirstCluster = firstCluster;
- fat_unlinkClusterChain(fs,&cache);
- return(0);
- }
- return(-1);
-}
-
-/*****************************************************************************/
-esint8 mkdir(FileSystem *fs,eint8* dirname)
-{
- FileLocation loc;
- FileRecord direntry;
- euint32 nc,parentdir;
- euint8* buf;
- eint8 ffname[11];
-
- if( fs_findFile(fs,dirname,&loc,&parentdir) ){
- return(-1);
- }
- if(parentdir==0)return(-2);
-
- if(!fs_findFreeFile(fs,dirname,&loc,0))return(-3);
-
- /* You may never search for a free cluster, and the call
- * functions that may cause changes to the FAT table, that
- * is why getNextFreeCluster has to be called AFTER calling
- * fs_findFreeFile, which may have to expand a directory in
- * order to store the new filerecord !!
- */
-
- nc = fs_getNextFreeCluster(fs,fs_giveFreeClusterHint(fs));
- if(nc==0)return(0);
-
- fs_clearCluster(fs,nc);
-
- buf = part_getSect(fs->part,loc.Sector,IOM_MODE_READWRITE);
-
- dir_getFatFileName(dirname,ffname);
- memClr(&direntry,sizeof(direntry));
- memCpy(ffname,&direntry,11);
- direntry.FileSize = 0;
- direntry.FirstClusterHigh=nc>>16;
- direntry.FirstClusterLow=nc&0xFFFF;
- direntry.Attribute = ATTR_DIRECTORY;
- memCpy(&direntry,buf+(32*loc.Offset),32);
-
- part_relSect(fs->part,buf);
-
- buf = part_getSect(fs->part,fs_clusterToSector(fs,nc),IOM_MODE_READWRITE);
-
- memClr(&direntry,sizeof(direntry));
- memCpy(". ",&direntry,11);
- direntry.Attribute = ATTR_DIRECTORY;
- direntry.FileSize = 0;
- direntry.FirstClusterHigh=nc>>16;
- direntry.FirstClusterLow=nc&0xFFFF;
- memCpy(&direntry,buf,32);
-
- if(fs->type == FAT32 && parentdir == fs->volumeId.RootCluster){
- parentdir = 0;
- }
- if(fs->type != FAT32 && parentdir<=1){
- parentdir = 0;
- }
-
- memClr(&direntry,sizeof(direntry));
- memCpy(".. ",&direntry,11);
- direntry.Attribute = ATTR_DIRECTORY;
- direntry.FileSize = 0;
- direntry.FirstClusterHigh=parentdir>>16;
- direntry.FirstClusterLow=parentdir&0xFFFF;
- memCpy(&direntry,buf+32,32);
-
- part_relSect(fs->part,buf);
-
- fat_setNextClusterAddress(fs,nc,fat_giveEocMarker(fs));
-
- return(0);
-}
diff --git a/sw/airborne/arch/lpc21/icp_scale.h b/sw/airborne/arch/lpc21/icp_scale.h
deleted file mode 100644
index 086e9d4a47..0000000000
--- a/sw/airborne/arch/lpc21/icp_scale.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef ICP_SCALE_H
-#define ICP_SCALE_H
-
-/* INPUT CAPTURE on P0.6*/
-#define ICP_PINSEL PINSEL0
-#define ICP_PINSEL_VAL 0x02
-#define ICP_PINSEL_BIT 12
-
-#include "led.h"
-
-volatile uint32_t pulse_len;
-
-static inline void icp_scale_init(void)
-{
- /* select pin for capture */
- ICP_PINSEL |= ICP_PINSEL_VAL << ICP_PINSEL_BIT;
- /* enable capture 0.2 on falling edge + trigger interrupt */
- T0CCR |= TCCR_CR2_F | TCCR_CR2_I;
-}
-
-
-#define ICP_ISR() { \
- static uint32_t last; \
- uint32_t now = T0CR2; \
- pulse_len = now - last; \
- last = now; \
- LED_TOGGLE(2); \
- }
-
-
-
-#endif /* ICP_SCALE_H */
diff --git a/sw/airborne/arch/lpc21/include/LPC21xx.h b/sw/airborne/arch/lpc21/include/LPC21xx.h
deleted file mode 100644
index 4ec0f651d0..0000000000
--- a/sw/airborne/arch/lpc21/include/LPC21xx.h
+++ /dev/null
@@ -1,538 +0,0 @@
-/******************************************************************************
- *
- * $RCSfile$
- * $Revision$
- *
- * Header file for Philips LPC21xx ARM Processors
- * Copyright 2004 R O SoftWare
- *
- * No guarantees, warrantees, or promises, implied or otherwise.
- * May be used for hobby or commercial purposes provided copyright
- * notice remains intact.
- *
- *****************************************************************************/
-#ifndef INC_LPC21xx_H
-#define INC_LPC21xx_H
-
-
-#define REG_8 volatile unsigned char
-#define REG16 volatile unsigned short
-#define REG32 volatile unsigned long
-
-#include "lpcWD.h"
-#include "lpcTMR.h"
-#include "lpcUART.h"
-#include "lpcI2C.h"
-#include "lpcSPI.h"
-#include "lpcRTC.h"
-#include "lpcGPIO.h"
-#include "lpcPIN.h"
-#include "lpcADC.h"
-#include "lpcSCB.h"
-#include "lpcVIC.h"
-#include "lpcCAN.h"
-
-///////////////////////////////////////////////////////////////////////////////
-// Watchdog
-#define WD ((wdRegs_t *)0xE0000000)
-
-// Watchdog Registers
-#define WDMOD WD->mod /* Watchdog Mode Register */
-#define WDTC WD->tc /* Watchdog Time Constant Register */
-#define WDFEED WD->feed /* Watchdog Feed Register */
-#define WDTV WD->tv /* Watchdog Time Value Register */
-
-///////////////////////////////////////////////////////////////////////////////
-// Timer 0
-#define TMR0 ((pwmTmrRegs_t *)0xE0004000)
-
-// Timer 0 Registers
-#define T0IR TMR0->ir /* Interrupt Register */
-#define T0TCR TMR0->tcr /* Timer Control Register */
-#define T0TC TMR0->tc /* Timer Counter */
-#define T0PR TMR0->pr /* Prescale Register */
-#define T0PC TMR0->pc /* Prescale Counter Register */
-#define T0MCR TMR0->mcr /* Match Control Register */
-#define T0MR0 TMR0->mr0 /* Match Register 0 */
-#define T0MR1 TMR0->mr1 /* Match Register 1 */
-#define T0MR2 TMR0->mr2 /* Match Register 2 */
-#define T0MR3 TMR0->mr3 /* Match Register 3 */
-#define T0CCR TMR0->ccr /* Capture Control Register */
-#define T0CR0 TMR0->cr0 /* Capture Register 0 */
-#define T0CR1 TMR0->cr1 /* Capture Register 1 */
-#define T0CR2 TMR0->cr2 /* Capture Register 2 */
-#define T0CR3 TMR0->cr3 /* Capture Register 3 */
-#define T0EMR TMR0->emr /* External Match Register */
-
-///////////////////////////////////////////////////////////////////////////////
-// Timer 1
-#define TMR1 ((pwmTmrRegs_t *)0xE0008000)
-
-// Timer 1 Registers
-#define T1IR TMR1->ir /* Interrupt Register */
-#define T1TCR TMR1->tcr /* Timer Control Register */
-#define T1TC TMR1->tc /* Timer Counter */
-#define T1PR TMR1->pr /* Prescale Register */
-#define T1PC TMR1->pc /* Prescale Counter Register */
-#define T1MCR TMR1->mcr /* Match Control Register */
-#define T1MR0 TMR1->mr0 /* Match Register 0 */
-#define T1MR1 TMR1->mr1 /* Match Register 1 */
-#define T1MR2 TMR1->mr2 /* Match Register 2 */
-#define T1MR3 TMR1->mr3 /* Match Register 3 */
-#define T1CCR TMR1->ccr /* Capture Control Register */
-#define T1CR0 TMR1->cr0 /* Capture Register 0 */
-#define T1CR1 TMR1->cr1 /* Capture Register 1 */
-#define T1CR2 TMR1->cr2 /* Capture Register 2 */
-#define T1CR3 TMR1->cr3 /* Capture Register 3 */
-#define T1EMR TMR1->emr /* External Match Register */
-
-///////////////////////////////////////////////////////////////////////////////
-// Pulse Width Modulator (PWM)
-#define PWM ((pwmTmrRegs_t *)0xE0014000)
-
-// PWM Registers
-#define PWMIR PWM->ir /* Interrupt Register */
-#define PWMTCR PWM->tcr /* Timer Control Register */
-#define PWMTC PWM->tc /* Timer Counter */
-#define PWMPR PWM->pr /* Prescale Register */
-#define PWMPC PWM->pc /* Prescale Counter Register */
-#define PWMMCR PWM->mcr /* Match Control Register */
-#define PWMMR0 PWM->mr0 /* Match Register 0 */
-#define PWMMR1 PWM->mr1 /* Match Register 1 */
-#define PWMMR2 PWM->mr2 /* Match Register 2 */
-#define PWMMR3 PWM->mr3 /* Match Register 3 */
-#define PWMMR4 PWM->mr4 /* Match Register 4 */
-#define PWMMR5 PWM->mr5 /* Match Register 5 */
-#define PWMMR6 PWM->mr6 /* Match Register 6 */
-#define PWMPCR PWM->pcr /* Control Register */
-#define PWMLER PWM->ler /* Latch Enable Register */
-
-///////////////////////////////////////////////////////////////////////////////
-// Universal Asynchronous Receiver Transmitter 0 (UART0)
-#define UART0_BASE ((uartRegs_t *)0xE000C000)
-#define U0_PINSEL (0x00000005) /* PINSEL0 Value for UART0 */
-#define U0_PINMASK (0x0000000F) /* PINSEL0 Mask for UART0 */
-#define U0_PINSEL_RX (0x00000004) /* PINSEL0 Value for UART0 RX only */
-#define U0_PINMASK_RX (0x0000000C) /* PINSEL0 Mask for UART0 RX only */
-
-// UART0 Registers
-#define U0RBR UART0_BASE->rbr /* Receive Buffer Register */
-#define U0THR UART0_BASE->thr /* Transmit Holding Register */
-#define U0IER UART0_BASE->ier /* Interrupt Enable Register */
-#define U0IIR UART0_BASE->iir /* Interrupt ID Register */
-#define U0FCR UART0_BASE->fcr /* FIFO Control Register */
-#define U0LCR UART0_BASE->lcr /* Line Control Register */
-#define U0LSR UART0_BASE->lsr /* Line Status Register */
-#define U0SCR UART0_BASE->scr /* Scratch Pad Register */
-#define U0DLL UART0_BASE->dll /* Divisor Latch Register (LSB) */
-#define U0DLM UART0_BASE->dlm /* Divisor Latch Register (MSB) */
-
-///////////////////////////////////////////////////////////////////////////////
-// Universal Asynchronous Receiver Transmitter 1 (UART1)
-#define UART1_BASE ((uartRegs_t *)0xE0010000)
-#define U1_PINSEL (0x00050000) /* PINSEL0 Value for UART1 */
-#define U1_PINMASK (0x000F0000) /* PINSEL0 Mask for UART1 */
-#define U1_PINSEL_RX (0x00040000) /* PINSEL0 Value for UART1 RX only */
-#define U1_PINMASK_RX (0x000C0000) /* PINSEL0 Mask for UART1 RX only */
-
-// UART1 Registers
-#define U1RBR UART1_BASE->rbr /* Receive Buffer Register */
-#define U1THR UART1_BASE->thr /* Transmit Holding Register */
-#define U1IER UART1_BASE->ier /* Interrupt Enable Register */
-#define U1IIR UART1_BASE->iir /* Interrupt ID Register */
-#define U1FCR UART1_BASE->fcr /* FIFO Control Register */
-#define U1LCR UART1_BASE->lcr /* Line Control Register */
-#define U1MCR UART1_BASE->mcr /* MODEM Control Register */
-#define U1LSR UART1_BASE->lsr /* Line Status Register */
-#define U1MSR UART1_BASE->msr /* MODEM Status Register */
-#define U1SCR UART1_BASE->scr /* Scratch Pad Register */
-#define U1DLL UART1_BASE->dll /* Divisor Latch Register (LSB) */
-#define U1DLM UART1_BASE->dlm /* Divisor Latch Register (MSB) */
-
-///////////////////////////////////////////////////////////////////////////////
-// I2C Interface
-#define I2C0 ((i2cRegs_t *)0xE001C000)
-
-// I2C Registers
-#define I2C0CONSET I2C0->conset /* Control Set Register */
-#define I2C0STAT I2C0->stat /* Status Register */
-#define I2C0DAT I2C0->dat /* Data Register */
-#define I2C0ADR I2C0->adr /* Slave Address Register */
-#define I2C0SCLH I2C0->sclh /* SCL Duty Cycle Register (high half word) */
-#define I2C0SCLL I2C0->scll /* SCL Duty Cycle Register (low half word) */
-#define I2C0CONCLR I2C0->conclr /* Control Clear Register */
-
-
-#define I2C1 ((i2cRegs_t *)0xE005C000)
-// I2C Registers
-#define I2C1CONSET I2C1->conset /* Control Set Register */
-#define I2C1STAT I2C1->stat /* Status Register */
-#define I2C1DAT I2C1->dat /* Data Register */
-#define I2C1ADR I2C1->adr /* Slave Address Register */
-#define I2C1SCLH I2C1->sclh /* SCL Duty Cycle Register (high half word) */
-#define I2C1SCLL I2C1->scll /* SCL Duty Cycle Register (low half word) */
-#define I2C1CONCLR I2C1->conclr /* Control Clear Register */
-
-
-// I2CONSET bit definition
-
-#define AA 2
-#define SI 3
-#define STO 4
-#define STA 5
-#define I2EN 6
-
-// I2CONCLR bit definition
-
-#define AAC 2
-#define SIC 3
-#define STAC 5
-#define I2ENC 6
-
-
-///////////////////////////////////////////////////////////////////////////////
-// Serial Peripheral Interface 0 (SPI0)
-#define SPI0 ((spiRegs_t *)0xE0020000)
-
-// SPI0 Registers
-#define S0SPCR SPI0->cr /* Control Register */
-#define S0SPSR SPI0->sr /* Status Register */
-#define S0SPDR SPI0->dr /* Data Register */
-#define S0SPCCR SPI0->ccr /* Clock Counter Register */
-#define S0SPINT SPI0->flag /* Interrupt Flag Register */
-
-/* S0SPINT bits definition */
-#define SPI0IF 0
-
-
-///////////////////////////////////////////////////////////////////////////////
-// Serial Peripheral Interface 1 (SPI1)
-#define SPI1 ((sspRegs_t *)0xE0068000)
-
-// SPI1 Registers
-//#define S1SPCR SPI1->cr /* Control Register */
-//#define S1SPSR SPI1->sr /* Status Register */
-//#define S1SPDR SPI1->dr /* Data Register */
-//#define S1SPCCR SPI1->ccr /* Clock Counter Register */
-//#define S1SPINT SPI1->flag /* Interrupt Flag Register */
-
-/* S1SPINT bits definition */
-#define SPI1IF 0
-
-#define SSPCR0 SPI1->cr0 /* Control Register 0 */
-#define SSPCR1 SPI1->cr1 /* Control Register 1 */
-#define SSPDR SPI1->dr /* Data register */
-#define SSPSR SPI1->sr /* Status register */
-#define SSPCPSR SPI1->cpsr /* Clock prescale register */
-#define SSPIMSC SPI1->imsc /* Interrupt mask register */
-#define SSPRIS SPI1->ris /* Raw interrupt status register */
-#define SSPMIS SPI1->mis /* Masked interrupt status register */
-#define SSPICR SPI1->icr /* Interrupt clear register */
-
-//#define SSPCR0 (*(REG16*) 0xE0068000) /* Control Register 0 */
-//#define SSPCR1 (*(REG_8*) 0xE0068004) /* Control Register 1 */
-//#define SSPDR (*(REG16*) 0xE0068008) /* Data register */
-//#define SSPSR (*(REG_8*) 0xE006800C) /* Status register */
-//#define SSPCPSR (*(REG_8*) 0xE0068010) /* Clock prescale register */
-//#define SSPIMSC (*(REG_8*) 0xE0068014) /* Interrupt mask register */
-//#define SSPRIS (*(REG_8*) 0xE0068018) /* Raw interrupt status register */
-//#define SSPMIS (*(REG_8*) 0xE006801C) /* Masked interrupt status register */
-//#define SSPICR (*(REG_8*) 0xE0068020) /* Interrupt clear register */
-
-/* SSPCR0 bits definition */
-#define DSS 0
-#define FRF 4
-#define CPOL 6
-#define CPHA 7
-#define SCR 8
-
-/* SSPDSS values definition */
-#define DSS_VAL4 0x3
-#define DSS_VAL5 0x4
-#define DSS_VAL6 0x5
-#define DSS_VAL7 0x6
-#define DSS_VAL8 0x7
-#define DSS_VAL9 0x8
-#define DSS_VAL10 0x9
-#define DSS_VAL11 0xA
-#define DSS_VAL12 0xB
-#define DSS_VAL13 0XC
-#define DSS_VAL14 0xD
-#define DSS_VAL15 0xE
-#define DSS_VAL16 0xF
-
-/* SSPCR1 bits definition */
-#define LBM 0
-#define SSE 1
-#define MS 2
-#define SOD 3
-
-/* SSPIMSC bits definition */
-#define RORIM 0
-#define RTIM 1
-#define RXIM 2
-#define TXIM 3
-
-/* SSPSR bits definition */
-#define TFE 0
-#define TNF 1
-#define RNE 2
-#define RFF 3
-#define BSY 4
-
-/* SSPMIS bits definition */
-#define RORMIS 0
-#define RTMIS 1
-#define RXMIS 2
-#define TXMIS 3
-
-/* SSPICR bits definition */
-#define RORIC 0
-#define RTIC 1
-
-
-
-
-///////////////////////////////////////////////////////////////////////////////
-// Real Time Clock
-#define RTC ((rtcRegs_t *)0xE0024000)
-
-// RTC Registers
-#define RTCILR RTC->ilr /* Interrupt Location Register */
-#define RTCCTC RTC->ctc /* Clock Tick Counter */
-#define RTCCCR RTC->ccr /* Clock Control Register */
-#define RTCCIIR RTC->ciir /* Counter Increment Interrupt Register */
-#define RTCAMR RTC->amr /* Alarm Mask Register */
-#define RTCCTIME0 RTC->ctime0 /* Consolidated Time Register 0 */
-#define RTCCTIME1 RTC->ctime1 /* Consolidated Time Register 1 */
-#define RTCCTIME2 RTC->ctime2 /* Consolidated Time Register 2 */
-#define RTCSEC RTC->sec /* Seconds Register */
-#define RTCMIN RTC->min /* Minutes Register */
-#define RTCHOUR RTC->hour /* Hours Register */
-#define RTCDOM RTC->dom /* Day Of Month Register */
-#define RTCDOW RTC->dow /* Day Of Week Register */
-#define RTCDOY RTC->doy /* Day Of Year Register */
-#define RTCMONTH RTC->month /* Months Register */
-#define RTCYEAR RTC->year /* Years Register */
-#define RTCALSEC RTC->alsec /* Alarm Seconds Register */
-#define RTCALMIN RTC->almin /* Alarm Minutes Register */
-#define RTCALHOUR RTC->alhour /* Alarm Hours Register */
-#define RTCALDOM RTC->aldom /* Alarm Day Of Month Register */
-#define RTCALDOW RTC->aldow /* Alarm Day Of Week Register */
-#define RTCALDOY RTC->aldoy /* Alarm Day Of Year Register */
-#define RTCALMON RTC->almon /* Alarm Months Register */
-#define RTCALYEAR RTC->alyear /* Alarm Years Register */
-#define RTCPREINT RTC->preint /* Prescale Value Register (integer) */
-#define RTCPREFRAC RTC->prefrac /* Prescale Value Register (fraction) */
-
-///////////////////////////////////////////////////////////////////////////////
-// General Purpose Input/Output
-#define GPIO ((gpioRegs_t *)0xE0028000)
-
-// GPIO Registers
-#define IO0PIN GPIO->in0 /* P0 Pin Value Register */
-#define IO0SET GPIO->set0 /* P0 Pin Output Set Register */
-#define IO0DIR GPIO->dir0 /* P0 Pin Direction Register */
-#define IO0CLR GPIO->clr0 /* P0 Pin Output Clear Register */
-#define IO1PIN GPIO->in1 /* P1 Pin Value Register */
-#define IO1SET GPIO->set1 /* P1 Pin Output Set Register */
-#define IO1DIR GPIO->dir1 /* P1 Pin Direction Register */
-#define IO1CLR GPIO->clr1 /* P1 Pin Output Clear Register */
-
-///////////////////////////////////////////////////////////////////////////////
-// Pin Connect Block
-#define PINSEL ((pinRegs_t *)0xE002C000)
-
-// Pin Connect Block Registers
-#define PINSEL0 PINSEL->sel0 /* Pin Function Select Register 0 */
-#define PINSEL1 PINSEL->sel1 /* Pin Function Select Register 1 */
-#define PINSEL2 PINSEL->sel2 /* Pin Function Select Register 2 */
-
-///////////////////////////////////////////////////////////////////////////////
-// A/D Converter
-#define ADC0 ((adcRegs_t *)0xE0034000)
-
-// A/D0 Converter Registers
-#define AD0CR ADC0->cr /* Control Register */
-#define AD0GDR ADC0->gdr /* Global Data Register */
-#define ADGSR ADC0->gsr /* ADC global start resister */
-#define AD0INTEN ADC0->inten /* Interrupt Enable Register */
-#define AD0DR0 ADC0->dr0 /* Channel 0 Data Register */
-#define AD0DR1 ADC0->dr1 /* Channel 1 Data Register */
-#define AD0DR2 ADC0->dr2 /* Channel 2 Data Register */
-#define AD0DR3 ADC0->dr3 /* Channel 3 Data Register */
-#define AD0DR4 ADC0->dr4 /* Channel 4 Data Register */
-#define AD0DR5 ADC0->dr5 /* Channel 5 Data Register */
-#define AD0DR6 ADC0->dr6 /* Channel 6 Data Register */
-#define AD0DR7 ADC0->dr7 /* Channel 7 Data Register */
-#define AD0STAT ADC0->stat /* Status Register */
-
-#define ADC1 ((adcRegs_t *)0xE0060000)
-
-// A/D1 Converter Registers
-#define AD1CR ADC1->cr /* Control Register */
-#define AD1GDR ADC1->gdr /* Data Register */
-#define AD1INTEN ADC1->inten /* Interrupt Enable Register */
-#define AD1DR0 ADC1->dr0 /* Channel 0 Data Register */
-#define AD1DR1 ADC1->dr1 /* Channel 1 Data Register */
-#define AD1DR2 ADC1->dr2 /* Channel 2 Data Register */
-#define AD1DR3 ADC1->dr3 /* Channel 3 Data Register */
-#define AD1DR4 ADC1->dr4 /* Channel 4 Data Register */
-#define AD1DR5 ADC1->dr5 /* Channel 5 Data Register */
-#define AD1DR6 ADC1->dr6 /* Channel 6 Data Register */
-#define AD1DR7 ADC1->dr7 /* Channel 7 Data Register */
-#define AD1STAT ADC1->stat /* Status Register */
-
-
-///////////////////////////////////////////////////////////////////////////////
-// Digital to Analog Converter
-#define DACR (*(REG32*) 0xE006C000)
-
-
-///////////////////////////////////////////////////////////////////////////////
-// System Contol Block
-#define SCB ((scbRegs_t *)0xE01FC000)
-
-// Memory Accelerator Module Registers (MAM)
-#define MAMCR SCB->mam.cr /* Control Register */
-#define MAMTIM SCB->mam.tim /* Timing Control Register */
-
-// Memory Mapping Control Register
-#define MEMMAP SCB->memmap
-
-// Phase Locked Loop Registers (PLL)
-#define PLLCON SCB->pll.con /* Control Register */
-#define PLLCFG SCB->pll.cfg /* Configuration Register */
-#define PLLSTAT SCB->pll.stat /* Status Register */
-#define PLLFEED SCB->pll.feed /* Feed Register */
-
-// Power Control Registers
-#define PCON SCB->p.con /* Control Register */
-#define PCONP SCB->p.conp /* Peripherals Register */
-
-// VPB Divider Register
-#define VPBDIV SCB->vpbdiv
-
-// External Interrupt Registers
-#define EXTINT SCB->ext.flag /* Flag Register */
-#define EXTWAKE SCB->ext.wake /* Wakeup Register */
-#define EXTMODE SCB->ext.mode /* Mode Register */
-#define EXTPOLAR SCB->ext.polar /* Polarity Register */
-
-///////////////////////////////////////////////////////////////////////////////
-// Vectored Interrupt Controller
-#define VIC ((vicRegs_t *)0xFFFFF000)
-
-// Vectored Interrupt Controller Registers
-#define VICIRQStatus VIC->irqStatus /* IRQ Status Register */
-#define VICFIQStatus VIC->fiqStatus /* FIQ Status Register */
-#define VICRawIntr VIC->rawIntr /* Raw Interrupt Status Register */
-#define VICIntSelect VIC->intSelect /* Interrupt Select Register */
-#define VICIntEnable VIC->intEnable /* Interrupt Enable Register */
-#define VICIntEnClear VIC->intEnClear /* Interrupt Enable Clear Register */
-#define VICSoftInt VIC->softInt /* Software Interrupt Register */
-#define VICSoftIntClear VIC->softIntClear /* Software Interrupt Clear Register */
-#define VICProtection VIC->protection /* Protection Enable Register */
-#define VICVectAddr VIC->vectAddr /* Vector Address Register */
-#define VICDefVectAddr VIC->defVectAddr /* Default Vector Address Register */
-#define VICVectAddr0 VIC->vectAddr0 /* Vector Address 0 Register */
-#define VICVectAddr1 VIC->vectAddr1 /* Vector Address 1 Register */
-#define VICVectAddr2 VIC->vectAddr2 /* Vector Address 2 Register */
-#define VICVectAddr3 VIC->vectAddr3 /* Vector Address 3 Register */
-#define VICVectAddr4 VIC->vectAddr4 /* Vector Address 4 Register */
-#define VICVectAddr5 VIC->vectAddr5 /* Vector Address 5 Register */
-#define VICVectAddr6 VIC->vectAddr6 /* Vector Address 6 Register */
-#define VICVectAddr7 VIC->vectAddr7 /* Vector Address 7 Register */
-#define VICVectAddr8 VIC->vectAddr8 /* Vector Address 8 Register */
-#define VICVectAddr9 VIC->vectAddr9 /* Vector Address 9 Register */
-#define VICVectAddr10 VIC->vectAddr10 /* Vector Address 10 Register */
-#define VICVectAddr11 VIC->vectAddr11 /* Vector Address 11 Register */
-#define VICVectAddr12 VIC->vectAddr12 /* Vector Address 12 Register */
-#define VICVectAddr13 VIC->vectAddr13 /* Vector Address 13 Register */
-#define VICVectAddr14 VIC->vectAddr14 /* Vector Address 14 Register */
-#define VICVectAddr15 VIC->vectAddr15 /* Vector Address 15 Register */
-#define VICVectCntl0 VIC->vectCntl0 /* Vector Control 0 Register */
-#define VICVectCntl1 VIC->vectCntl1 /* Vector Control 1 Register */
-#define VICVectCntl2 VIC->vectCntl2 /* Vector Control 2 Register */
-#define VICVectCntl3 VIC->vectCntl3 /* Vector Control 3 Register */
-#define VICVectCntl4 VIC->vectCntl4 /* Vector Control 4 Register */
-#define VICVectCntl5 VIC->vectCntl5 /* Vector Control 5 Register */
-#define VICVectCntl6 VIC->vectCntl6 /* Vector Control 6 Register */
-#define VICVectCntl7 VIC->vectCntl7 /* Vector Control 7 Register */
-#define VICVectCntl8 VIC->vectCntl8 /* Vector Control 8 Register */
-#define VICVectCntl9 VIC->vectCntl9 /* Vector Control 9 Register */
-#define VICVectCntl10 VIC->vectCntl10 /* Vector Control 10 Register */
-#define VICVectCntl11 VIC->vectCntl11 /* Vector Control 11 Register */
-#define VICVectCntl12 VIC->vectCntl12 /* Vector Control 12 Register */
-#define VICVectCntl13 VIC->vectCntl13 /* Vector Control 13 Register */
-#define VICVectCntl14 VIC->vectCntl14 /* Vector Control 14 Register */
-#define VICVectCntl15 VIC->vectCntl15 /* Vector Control 15 Register */
-
-
-///////////////////////////////////////////////////////////////////////////////
-// CAN controllers
-
-
-#define CAN_CENTRAL ((can_central_Regs_t *)0xE0040000)
-#define CANTxSR CAN_CENTRAL->tx_sr /* CAN Central Transmit Status Register */
-#define CANRxSR CAN_CENTRAL->rx_sr /* CAN Central Receive Status Register */
-#define CANMSR CAN_CENTRAL->m_sr /* CAN Central Miscellanous Register */
-
-#define CAN_ACCEPT ((can_accept_Regs_t *)0xE003C000)
-#define AFMR CAN_ACCEPT->afmr /* Acceptance Filter Register */
-
-#define CAN1 ((can_Regs_t *)0xE0044000)
-#define C1MOD CAN1->can_mod /* */
-#define C1CMR CAN1->can_cmr /* */
-#define C1GSR CAN1->can_gsr /* */
-#define C1ICR CAN1->can_icr
-#define C1IER CAN1->can_ier
-#define C1BTR CAN1->can_btr
-#define C1EWL CAN1->can_ewl
-#define C1SR CAN1->can_sr
-#define C1RFS CAN1->can_rfs
-#define C1RID CAN1->can_rid
-#define C1RDA CAN1->can_rda
-#define C1RDB CAN1->can_rdb
-#define C1TFI1 CAN1->can_tfi1
-#define C1TID1 CAN1->can_tid1
-#define C1TDA1 CAN1->can_tda1
-#define C1TDB1 CAN1->can_tdb1
-#define C1TFI2 CAN1->can_tfi2
-#define C1TID2 CAN1->can_tid2
-#define C1TDA2 CAN1->can_tda2
-#define C1TDB2 CAN1->can_tdb2
-#define C1TFI3 CAN1->can_tfi3
-#define C1TID3 CAN1->can_tid3
-#define C1TDA3 CAN1->can_tda3
-#define C1TDB3 CAN1->can_tdb3
-
-#define CAN2 ((can_Regs_t *)0xE0048000)
-#define C2MOD CAN2->can_mod /* */
-#define C2CMR CAN2->can_cmr /* */
-#define C2GSR CAN2->can_gsr /* */
-#define C2ICR CAN2->can_icr
-#define C2IER CAN2->can_ier
-#define C2BTR CAN2->can_btr
-#define C2EWL CAN2->can_ewl
-#define C2SR CAN2->can_sr
-#define C2RFS CAN2->can_rfs
-#define C2RID CAN2->can_rid
-#define C2RDA CAN2->can_rda
-#define C2RDB CAN2->can_rdb
-#define C2TFI1 CAN2->can_tfi1
-#define C2TID1 CAN2->can_tid1
-#define C2TDA1 CAN2->can_tda1
-#define C2TDB1 CAN2->can_tdb1
-#define C2TFI2 CAN2->can_tfi2
-#define C2TID2 CAN2->can_tid2
-#define C2TDA2 CAN2->can_tda2
-#define C2TDB2 CAN2->can_tdb2
-#define C2TFI3 CAN2->can_tfi3
-#define C2TID3 CAN2->can_tid3
-#define C2TDA3 CAN2->can_tda3
-#define C2TDB3 CAN2->can_tdb3
-
-
-
-#endif
diff --git a/sw/airborne/arch/lpc21/include/lpcADC.h b/sw/airborne/arch/lpc21/include/lpcADC.h
deleted file mode 100644
index c9c2ac55e5..0000000000
--- a/sw/airborne/arch/lpc21/include/lpcADC.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/******************************************************************************
- *
- * $RCSfile$
- * $Revision$
- *
- * Header file for Philips LPC ARM Processors.
- * Copyright 2004 R O SoftWare
- *
- * No guarantees, warrantees, or promises, implied or otherwise.
- * May be used for hobby or commercial purposes provided copyright
- * notice remains intact.
- *
- *****************************************************************************/
-#ifndef INC_LPC_ADC_H
-#define INC_LPC_ADC_H
-
-// A/D Converter Registers
-typedef struct
-{
- REG32 cr; // Control Register
- REG32 gdr; // Global Data Register
- REG32 gsr; // Global Start Register
- REG32 inten; // Interrupt Enable Register
- REG32 dr0; // Channel 0 Data Register
- REG32 dr1; // Channel 1 Data Register
- REG32 dr2; // Channel 2 Data Register
- REG32 dr3; // Channel 3 Data Register
- REG32 dr4; // Channel 4 Data Register
- REG32 dr5; // Channel 5 Data Register
- REG32 dr6; // Channel 6 Data Register
- REG32 dr7; // Channel 7 Data Register
- REG32 stat; // Status Register
-} adcRegs_t;
-
-#endif
diff --git a/sw/airborne/arch/lpc21/include/lpcCAN.h b/sw/airborne/arch/lpc21/include/lpcCAN.h
deleted file mode 100644
index 35468ade63..0000000000
--- a/sw/airborne/arch/lpc21/include/lpcCAN.h
+++ /dev/null
@@ -1,57 +0,0 @@
-#ifndef LPC_CAN_H
-#define LPC_CAN_H
-
-typedef struct
-{
- REG32 afmr;
- REG32 sff_sa;
- REG32 sff_grp_sa;
- REG32 eff_sa;
- REG32 eff_grp_sa;
- REG32 end_of_table;
- REG32 lut_err_ad;
- REG32 lut_err_reg;
-} can_accept_Regs_t;
-
-
-typedef struct
-{
- REG32 tx_sr;
- REG32 rx_sr;
- REG32 m_sr;
-} can_central_Regs_t;
-
-
-
-typedef struct
-{
- REG32 can_mod;
- REG32 can_cmr;
- REG32 can_gsr;
- REG32 can_icr;
- REG32 can_ier;
- REG32 can_btr;
- REG32 can_ewl;
- REG32 can_sr;
- REG32 can_rfs;
- REG32 can_rid;
- REG32 can_rda;
- REG32 can_rdb;
- REG32 can_tfi1;
- REG32 can_tid1;
- REG32 can_tda1;
- REG32 can_tdb1;
- REG32 can_tfi2;
- REG32 can_tid2;
- REG32 can_tda2;
- REG32 can_tdb2;
- REG32 can_tfi3;
- REG32 can_tid3;
- REG32 can_tda3;
- REG32 can_tdb3;
-} can_Regs_t;
-
-
-#endif /* LPC_CAN_H */
-
-
diff --git a/sw/airborne/arch/lpc21/include/lpcEMC.h b/sw/airborne/arch/lpc21/include/lpcEMC.h
deleted file mode 100644
index 7aec85888b..0000000000
--- a/sw/airborne/arch/lpc21/include/lpcEMC.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/******************************************************************************
- *
- * $RCSfile$
- * $Revision$
- *
- * Header file for Philips LPC ARM Processors.
- * Copyright 2004 R O SoftWare
- *
- * No guarantees, warrantees, or promises, implied or otherwise.
- * May be used for hobby or commercial purposes provided copyright
- * notice remains intact.
- *
- *****************************************************************************/
-#ifndef INC_LPC_EMC_H
-#define INC_LPC_EMC_H
-
-// External Memory Controller Registers
-typedef struct
-{
- REG32 bcfg0; // Bank 0 Configuration Register
- REG32 bcfg1; // Bank 1 Configuration Register
- REG32 bcfg2; // Bank 2 Configuration Register
- REG32 bcfg3; // Bank 3 Configuration Register
-} emcRegs_t;
-
-#endif
diff --git a/sw/airborne/arch/lpc21/include/lpcGPIO.h b/sw/airborne/arch/lpc21/include/lpcGPIO.h
deleted file mode 100644
index dd384840e5..0000000000
--- a/sw/airborne/arch/lpc21/include/lpcGPIO.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/******************************************************************************
- *
- * $RCSfile$
- * $Revision$
- *
- * Header file for Philips LPC ARM Processors.
- * Copyright 2004 R O SoftWare
- *
- * No guarantees, warrantees, or promises, implied or otherwise.
- * May be used for hobby or commercial purposes provided copyright
- * notice remains intact.
- *
- *****************************************************************************/
-#ifndef INC_LPC_GPIO_H
-#define INC_LPC_GPIO_H
-
-// General Purpose Input/Output Registers (GPIO)
-typedef struct
-{
- REG32 in0; // P0 Pin Value Register
- REG32 set0; // P0 Pin Output Set Register
- REG32 dir0; // P0 Pin Direction Register
- REG32 clr0; // P0 Pin Output Clear Register
- REG32 in1; // P1 Pin Value Register
- REG32 set1; // P1 Pin Output Set Register
- REG32 dir1; // P1 Pin Direction Register
- REG32 clr1; // P1 Pin Output Clear Register
- REG32 in2; // P2 Pin Value Register
- REG32 set2; // P2 Pin Output Set Register
- REG32 dir2; // P2 Pin Direction Register
- REG32 clr2; // P2 Pin Output Clear Register
- REG32 in3; // P3 Pin Value Register
- REG32 set3; // P3 Pin Output Set Register
- REG32 dir3; // P3 Pin Direction Register
- REG32 clr3; // P3 Pin Output Clear Register
-} gpioRegs_t;
-
-#endif
diff --git a/sw/airborne/arch/lpc21/include/lpcI2C.h b/sw/airborne/arch/lpc21/include/lpcI2C.h
deleted file mode 100644
index 22e34afc93..0000000000
--- a/sw/airborne/arch/lpc21/include/lpcI2C.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/******************************************************************************
- *
- * $RCSfile$
- * $Revision$
- *
- * Header file for Philips LPC ARM Processors.
- * Copyright 2004 R O SoftWare
- *
- * No guarantees, warrantees, or promises, implied or otherwise.
- * May be used for hobby or commercial purposes provided copyright
- * notice remains intact.
- *
- *****************************************************************************/
-#ifndef INC_LPC_I2C_H
-#define INC_LPC_I2C_H
-
-// I2C Interface Registers
-typedef struct
-{
- REG_8 conset; // Control Set Register
- REG_8 _pad0[3];
- REG_8 stat; // Status Register
- REG_8 _pad1[3];
- REG_8 dat; // Data Register
- REG_8 _pad2[3];
- REG_8 adr; // Slave Address Register
- REG_8 _pad3[3];
- REG16 sclh; // SCL Duty Cycle Register (high half word)
- REG16 _pad4;
- REG16 scll; // SCL Duty Cycle Register (low half word)
- REG16 _pad5;
- REG_8 conclr; // Control Clear Register
- REG_8 _pad6[3];
-} i2cRegs_t;
-
-#endif
diff --git a/sw/airborne/arch/lpc21/include/lpcPIN.h b/sw/airborne/arch/lpc21/include/lpcPIN.h
deleted file mode 100644
index 41b399ed17..0000000000
--- a/sw/airborne/arch/lpc21/include/lpcPIN.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/******************************************************************************
- *
- * $RCSfile$
- * $Revision$
- *
- * Header file for Philips LPC ARM Processors.
- * Copyright 2004 R O SoftWare
- *
- * No guarantees, warrantees, or promises, implied or otherwise.
- * May be used for hobby or commercial purposes provided copyright
- * notice remains intact.
- *
- *****************************************************************************/
-#ifndef INC_LPC_PIN_H
-#define INC_LPC_PIN_H
-
-// Pin Connect Block Registers
-typedef struct
-{
- REG32 sel0; // Pin Function Select Register 0
- REG32 sel1; // Pin Function Select Register 1
- REG32 _pad[3];
- REG32 sel2; // Pin Function Select Register 2
-} pinRegs_t;
-
-#endif
diff --git a/sw/airborne/arch/lpc21/include/lpcRTC.h b/sw/airborne/arch/lpc21/include/lpcRTC.h
deleted file mode 100644
index c558d1d2d1..0000000000
--- a/sw/airborne/arch/lpc21/include/lpcRTC.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/******************************************************************************
- *
- * $RCSfile$
- * $Revision$
- *
- * Header file for Philips LPC ARM Processors.
- * Copyright 2004 R O SoftWare
- *
- * No guarantees, warrantees, or promises, implied or otherwise.
- * May be used for hobby or commercial purposes provided copyright
- * notice remains intact.
- *
- *****************************************************************************/
-#ifndef INC_LPC_RTC_H
-#define INC_LPC_RTC_H
-
-typedef struct
-{
- REG_8 ilr; // Interrupt Location Register
- REG_8 _pad0[3];
- REG16 ctc; // Clock Tick Counter
- REG16 _pad1;
- REG_8 ccr; // Clock Control Register
- REG_8 _pad2[3];
- REG_8 ciir; // Counter Increment Interrupt Register
- REG_8 _pad3[3];
- REG_8 amr; // Alarm Mask Register
- REG_8 _pad4[3];
- REG32 ctime0; // Consolidated Time Register 0
- REG32 ctime1; // Consolidated Time Register 1
- REG32 ctime2; // Consolidated Time Register 2
- REG_8 sec; // Seconds Register
- REG_8 _pad5[3];
- REG_8 min; // Minutes Register
- REG_8 _pad6[3];
- REG_8 hour; // Hours Register
- REG_8 _pad7[3];
- REG_8 dom; // Day Of Month Register
- REG_8 _pad8[3];
- REG_8 dow; // Day Of Week Register
- REG_8 _pad9[3];
- REG16 doy; // Day Of Year Register
- REG16 _pad10;
- REG_8 month; // Months Register
- REG_8 _pad11[3];
- REG16 year; // Years Register
- REG32 _pad12[8];
- REG_8 alsec; // Alarm Seconds Register
- REG_8 _pad13[3];
- REG_8 almin; // Alarm Minutes Register
- REG_8 _pad14[3];
- REG_8 alhour; // Alarm Hours Register
- REG_8 _pad15[3];
- REG_8 aldom; // Alarm Day Of Month Register
- REG_8 _pad16[3];
- REG_8 aldow; // Alarm Day Of Week Register
- REG_8 _pad17[3];
- REG16 aldoy; // Alarm Day Of Year Register
- REG16 _pad18;
- REG_8 almon; // Alarm Months Register
- REG_8 _pad19[3];
- REG16 alyear; // Alarm Years Register
- REG16 _pad20;
- REG16 preint; // Prescale Value Register (integer)
- REG16 _pad21;
- REG16 prefrac; // Prescale Value Register (fraction)
- REG16 _pad22;
-} rtcRegs_t;
-
-#endif
diff --git a/sw/airborne/arch/lpc21/include/lpcSCB.h b/sw/airborne/arch/lpc21/include/lpcSCB.h
deleted file mode 100644
index 7ebcccdc22..0000000000
--- a/sw/airborne/arch/lpc21/include/lpcSCB.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/******************************************************************************
- *
- * $RCSfile$
- * $Revision$
- *
- * Header file for Philips LPC ARM Processors.
- * Copyright 2004 R O SoftWare
- *
- * No guarantees, warrantees, or promises, implied or otherwise.
- * May be used for hobby or commercial purposes provided copyright
- * notice remains intact.
- *
- *****************************************************************************/
-#ifndef INC_LPC_SCB_H
-#define INC_LPC_SCB_H
-
-// System Control Block Registers
-typedef struct
-{
- // Memory Accelerator Module Registers (MAM)
- struct
- {
- REG_8 cr; // Control Register
- REG_8 _pad0[3];
- REG_8 tim; // Timing Control Register
- REG32 _pad1[14];
- } mam;
-
- // Memory Mapping Control Register
- REG_8 memmap;
- REG32 _pad0[15];
-
- // Phase Locked Loop Registers (PLL)
- struct
- {
- REG_8 con; // Control Register
- REG_8 _pad0[3];
- REG_8 cfg; // Configuration Register
- REG_8 _pad1[3];
- REG16 stat; // Status Register
- REG16 _pad2;
- REG_8 feed; // Feed Register
- REG32 _pad3[12];
- } pll;
-
- // Power Control Registers
- struct
- {
- REG_8 con; // Control Register
- REG_8 _pad0[3];
- REG32 conp; // Peripherals Register
- REG32 _pad1[14];
- } p;
-
- // VPB Divider Register
- REG_8 vpbdiv;
- REG32 _pad1[15];
-
- // External Interrupt Registers
- struct
- {
- REG_8 flag; // Flag Register
- REG_8 _pad0[3];
- REG_8 wake; // Wakeup Register
- REG_8 _pad1[3];
- REG_8 mode; // Mode Register
- REG_8 _pad2[3];
- REG_8 polar; // Polarity Register
- REG32 _pad3[12];
- } ext;
-} scbRegs_t;
-
-
-///////////////////////////////////////////////////////////////////////////////
-// MAM defines
-#define MAMCR_OFF 0
-#define MAMCR_PART 1
-#define MAMCR_FULL 2
-
-#define MAMTIM_CYCLES (((CCLK) + 19999999) / 20000000)
-
-///////////////////////////////////////////////////////////////////////////////
-// MEMMAP defines
-#define MEMMAP_BBLK 0 // Interrupt Vectors in Boot Block
-#define MEMMAP_FLASH 1 // Interrupt Vectors in Flash
-#define MEMMAP_SRAM 2 // Interrupt Vectors in SRAM
-
-///////////////////////////////////////////////////////////////////////////////
-// PLL defines & computations
-// Compute the value of PLL_DIV and test range validity
-// FOSC & PLL_MUL should be defined in project configuration file (config.h)
-#ifndef CCLK
-#define CCLK (FOSC * PLL_MUL) // CPU Clock Freq.
-#endif
-
-#define FCCO_MAX (320000000) // Max CC Osc Freq.
-#define PLL_DIV (FCCO_MAX / (2 * CCLK)) // PLL Divider
-#define FCCO (FOSC * PLL_MUL * 2 * PLL_DIV) // CC Osc. Freq.
-
-// PLLCON Register Bit Definitions
-#define PLLCON_PLLE (1 << 0) // PLL Enable
-#define PLLCON_PLLC (1 << 1) // PLL Connect
-
-// PLLCFG Register Bit Definitions
-#define PLLCFG_MSEL ((PLL_MUL - 1) << 0) // PLL Multiplier
-#define PLLCFG_PSEL ((PLL_DIV - 1) << 5) // PLL Divider
-
-// PLLSTAT Register Bit Definitions
-#define PLLSTAT_LOCK (1 << 10) // PLL Lock Status Bit
-
-///////////////////////////////////////////////////////////////////////////////
-// VPBDIV defines & computations
-#define VPBDIV_VALUE (PBSD_BITS & 0x03) // VPBDIV value
-
-#endif
diff --git a/sw/airborne/arch/lpc21/include/lpcSPI.h b/sw/airborne/arch/lpc21/include/lpcSPI.h
deleted file mode 100644
index 96137cb7bc..0000000000
--- a/sw/airborne/arch/lpc21/include/lpcSPI.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/******************************************************************************
- *
- * $RCSfile$
- * $Revision$
- *
- * Header file for Philips LPC ARM Processors.
- * Copyright 2004 R O SoftWare
- *
- * No guarantees, warrantees, or promises, implied or otherwise.
- * May be used for hobby or commercial purposes provided copyright
- * notice remains intact.
- *
- *****************************************************************************/
-#ifndef INC_LPC_SPI_H
-#define INC_LPC_SPI_H
-
-// Serial Peripheral Interface Registers (SPI)
-typedef struct
-{
- REG_8 cr; // Control Register
- REG_8 _pad0[3];
- REG_8 sr; // Status Register
- REG_8 _pad1[3];
- REG_8 dr; // Data Register
- REG_8 _pad2[3];
- REG_8 ccr; // Clock Counter Register
- REG_8 _pad3[3];
- REG_8 tcr; // Test Control Register
- REG_8 _pad4[3];
- REG_8 tsr; // Test Status Register
- REG_8 _pad5[3];
- REG_8 tor; // Test Observe Register
- REG_8 _pad6[3];
- REG_8 flag; // Interrupt Flag Register
- REG_8 _pad7[3];
-} spiRegs_t;
-
-// Serial Serial Port Registers (SSP/SPI)
-typedef struct
-{
- REG16 cr0; // Control Register 0
- REG16 _pad0;
- REG_8 cr1; // Control Register 1
- REG_8 _pad1[3];
- REG16 dr; // Data Register
- REG16 _pad2;
- REG_8 sr; // Status Register
- REG_8 _pad3[3];
- REG_8 cpsr; // Clock Prescale Register
- REG_8 _pad4[3];
- REG_8 imsc; // Interrupt Mask Set and Clear Register
- REG_8 _pad5[3];
- REG_8 ris; // Raw Interrupt Status Register
- REG_8 _pad6[3];
- REG_8 mis; // Masked Interrupt Status Register
- REG_8 _pad7[3];
- REG_8 icr; // Interrupt Clear Register
- REG_8 _pad8[3];
-} sspRegs_t;
-
-#endif
diff --git a/sw/airborne/arch/lpc21/include/lpcTMR.h b/sw/airborne/arch/lpc21/include/lpcTMR.h
deleted file mode 100644
index 1ece7d2d7a..0000000000
--- a/sw/airborne/arch/lpc21/include/lpcTMR.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/******************************************************************************
- *
- * $RCSfile$
- * $Revision$
- *
- * Header file for Philips LPC ARM Processors.
- * Copyright 2004 R O SoftWare
- *
- * No guarantees, warrantees, or promises, implied or otherwise.
- * May be used for hobby or commercial purposes provided copyright
- * notice remains intact.
- *
- *****************************************************************************/
-#ifndef INC_LPC_TMR_H
-#define INC_LPC_TMR_H
-
-// Timer & PWM Registers
-typedef struct
-{
- REG32 ir; // Interrupt Register
- REG32 tcr; // Timer Control Register
- REG32 tc; // Timer Counter
- REG32 pr; // Prescale Register
- REG32 pc; // Prescale Counter Register
- REG32 mcr; // Match Control Register
- REG32 mr0; // Match Register 0
- REG32 mr1; // Match Register 1
- REG32 mr2; // Match Register 2
- REG32 mr3; // Match Register 3
- REG32 ccr; // Capture Control Register
- REG32 cr0; // Capture Register 0
- REG32 cr1; // Capture Register 1
- REG32 cr2; // Capture Register 2
- REG32 cr3; // Capture Register 3
- REG32 emr; // External Match Register
- REG32 mr4; // Match Register 4
- REG32 mr5; // Match Register 5
- REG32 mr6; // Match Register 6
- REG32 pcr; // Control Register
- REG32 ler; // Latch Enable Register
-} pwmTmrRegs_t;
-
-// Timer Interrupt Register Bit Definitions
-#define TIR_MR0I (1 << 0) // Interrupt flag for match channel 0
-#define TIR_MR1I (1 << 1) // Interrupt flag for match channel 1
-#define TIR_MR2I (1 << 2) // Interrupt flag for match channel 2
-#define TIR_MR3I (1 << 3) // Interrupt flag for match channel 3
-#define TIR_CR0I (1 << 4) // Interrupt flag for capture channel 0 event
-#define TIR_CR1I (1 << 5) // Interrupt flag for capture channel 1 event
-#define TIR_CR2I (1 << 6) // Interrupt flag for capture channel 2 event
-#define TIR_CR3I (1 << 7) // Interrupt flag for capture channel 3 event
-
-// Timer Control Register Bit Definitions
-#define TCR_ENABLE (1 << 0)
-#define TCR_RESET (1 << 1)
-
-
-// Timer Match Control Register Bit Definitions
-#define TMCR_MR0_I (1 << 0) // Enable Interrupt when MR0 matches TC
-#define TMCR_MR0_R (1 << 1) // Enable Reset of TC upon MR0 match
-#define TMCR_MR0_S (1 << 2) // Enable Stop of TC upon MR0 match
-#define TMCR_MR1_I (1 << 3) // Enable Interrupt when MR1 matches TC
-#define TMCR_MR1_R (1 << 4) // Enable Reset of TC upon MR1 match
-#define TMCR_MR1_S (1 << 5) // Enable Stop of TC upon MR1 match
-#define TMCR_MR2_I (1 << 6) // Enable Interrupt when MR2 matches TC
-#define TMCR_MR2_R (1 << 7) // Enable Reset of TC upon MR2 match
-#define TMCR_MR2_S (1 << 8) // Enable Stop of TC upon MR2 match
-#define TMCR_MR3_I (1 << 9) // Enable Interrupt when MR3 matches TC
-#define TMCR_MR3_R (1 << 10) // Enable Reset of TC upon MR3 match
-#define TMCR_MR3_S (1 << 11) // Enable Stop of TC upon MR3 match
-
-/* PWMIR ( Interrupt Register ) bits definitions */
-#define PWMIR_MR0I _BV(0) /* Interrupt flag for match channel 0 */
-#define PWMIR_MR1I _BV(1) /* Interrupt flag for match channel 1 */
-#define PWMIR_MR2I _BV(2) /* Interrupt flag for match channel 2 */
-#define PWMIR_MR3I _BV(3) /* Interrupt flag for match channel 3 */
-#define PWMIR_MR4I _BV(8) /* Interrupt flag for match channel 4 */
-#define PWMIR_MR5I _BV(9) /* Interrupt flag for match channel 5 */
-#define PWMIR_MR6I _BV(10) /* Interrupt flag for match channel 6 */
-#define PWMIR_MASK (0x070F)
-
-/* PWMTCR ( Timer Control Register ) bits definitions */
-#define PWMTCR_COUNTER_ENABLE _BV(0) /* enable PWM timer counter */
-#define PWMTCR_COUNTER_RESET _BV(1) /* reset PWM timer counter */
-#define PWMTCR_PWM_ENABLE _BV(3) /* enable PWM mode */
-
-/* PWMMCR ( Match Control Register ) bits definitions */
-#define PWMMCR_MR0I (1 << 0) /* enable interrupt on match channel 0 */
-#define PWMMCR_MR0R (1 << 1) /* enable reset on match channel 0 */
-#define PWMMCR_MR0S (1 << 2) /* enable stop on match channel 0 */
-#define PWMMCR_MR1I (1 << 3) /* enable interrupt on match channel 1 */
-#define PWMMCR_MR1R (1 << 4) /* enable reset on match channel 1 */
-#define PWMMCR_MR1S (1 << 5) /* enable stop on match channel 1 */
-#define PWMMCR_MR2I (1 << 6) /* enable interrupt on match channel 2 */
-#define PWMMCR_MR2R (1 << 7) /* enable reset on match channel 2 */
-#define PWMMCR_MR2S (1 << 8) /* enable stop on match channel 2 */
-#define PWMMCR_MR3I (1 << 9) /* enable interrupt on match channel 3 */
-#define PWMMCR_MR3R (1 << 10) /* enable reset on match channel 3 */
-#define PWMMCR_MR3S (1 << 11) /* enable stop on match channel 3 */
-#define PWMMCR_MR4I (1 << 12) /* enable interrupt on match channel 4 */
-#define PWMMCR_MR4R (1 << 13) /* enable reset on match channel 4 */
-#define PWMMCR_MR4S (1 << 14) /* enable stop on match channel 4 */
-#define PWMMCR_MR5I (1 << 15) /* enable interrupt on match channel 5 */
-#define PWMMCR_MR5R (1 << 16) /* enable reset on match channel 5 */
-#define PWMMCR_MR5S (1 << 17) /* enable stop on match channel 5 */
-#define PWMMCR_MR6I (1 << 18) /* enable interrupt on match channel 6 */
-#define PWMMCR_MR6R (1 << 19) /* enable reset on match channel 6 */
-#define PWMMCR_MR6S (1 << 20) /* enable stop on match channel 6 */
-
-/* PWMPCR ( Control Register ) bit definitions */
-#define PWMPCR_SEL2 _BV(2) /* select double edge for PWM2 output */
-#define PWMPCR_SEL3 _BV(3) /* select double edge for PWM3 output */
-#define PWMPCR_SEL4 _BV(4) /* select double edge for PWM4 output */
-#define PWMPCR_SEL5 _BV(5) /* select double edge for PWM5 output */
-#define PWMPCR_SEL6 _BV(6) /* select double edge for PWM6 output */
-#define PWMPCR_ENA1 _BV(9) /* PWM1 output enabled */
-#define PWMPCR_ENA2 _BV(10) /* PWM2 output enabled */
-#define PWMPCR_ENA3 _BV(11) /* PWM3 output enabled */
-#define PWMPCR_ENA4 _BV(12) /* PWM4 output enabled */
-#define PWMPCR_ENA5 _BV(13) /* PWM5 output enabled */
-#define PWMPCR_ENA6 _BV(14) /* PWM6 output enabled */
-
-/* PWMLER ( Latch Enable Register ) bit definitions */
-#define PWMLER_LATCH0 _BV(0) /* latch last MATCH0 register value */
-#define PWMLER_LATCH1 _BV(1) /* latch last MATCH1 register value */
-#define PWMLER_LATCH2 _BV(2) /* latch last MATCH2 register value */
-#define PWMLER_LATCH3 _BV(3) /* latch last MATCH3 register value */
-#define PWMLER_LATCH4 _BV(4) /* latch last MATCH4 register value */
-#define PWMLER_LATCH5 _BV(5) /* latch last MATCH5 register value */
-#define PWMLER_LATCH6 _BV(6) /* latch last MATCH6 register value */
-
-
-// Timer Capture Control Register Bit Definitions
-#define TCCR_CR0_R (1 << 0) // Enable Rising edge on CAPn.0 will load TC to CR0
-#define TCCR_CR0_F (1 << 1) // Enable Falling edge on CAPn.0 will load TC to CR0
-#define TCCR_CR0_I (1 << 2) // Enable Interrupt on load of CR0
-#define TCCR_CR1_R (1 << 3) // Enable Rising edge on CAPn.1 will load TC to CR1
-#define TCCR_CR1_F (1 << 4) // Enable Falling edge on CAPn.1 will load TC to CR1
-#define TCCR_CR1_I (1 << 5) // Enable Interrupt on load of CR1
-#define TCCR_CR2_R (1 << 6) // Enable Rising edge on CAPn.2 will load TC to CR2
-#define TCCR_CR2_F (1 << 7) // Enable Falling edge on CAPn.2 will load TC to CR2
-#define TCCR_CR2_I (1 << 8) // Enable Interrupt on load of CR2
-#define TCCR_CR3_R (1 << 9) // Enable Rising edge on CAPn.3 will load TC to CR3
-#define TCCR_CR3_F (1 << 10) // Enable Falling edge on CAPn.3 will load TC to CR3
-#define TCCR_CR3_I (1 << 11) // Enable Interrupt on load of CR3
-
-
-// Timer External Match Register
-#define TEMR_EM0 (1 << 0) // reflects state of output match 0
-#define TEMR_EM1 (1 << 1) // reflects state of output match 1
-#define TEMR_EM2 (1 << 2) // reflects state of output match 2
-#define TEMR_EM3 (1 << 3) // reflects state of output match 3
-#define TEMR_EMC0_0 (0 << 4) // configure match 0 pin behaviour
-#define TEMR_EMC0_1 (1 << 4) // configure match 0 pin behaviour
-#define TEMR_EMC0_2 (2 << 4) // configure match 0 pin behaviour
-#define TEMR_EMC0_3 (3 << 4) // configure match 0 pin behaviour
-#define TEMR_EMC1_0 (0 << 6) // configure match 1 pin behaviour
-#define TEMR_EMC1_1 (1 << 6) // configure match 1 pin behaviour
-#define TEMR_EMC1_2 (2 << 6) // configure match 1 pin behaviour
-#define TEMR_EMC1_3 (3 << 6) // configure match 0 pin behaviour
-#define TEMR_EMC2_0 (0 << 8) // configure match 1 pin behaviour
-#define TEMR_EMC2_1 (1 << 8) // configure match 1 pin behaviour
-#define TEMR_EMC2_2 (2 << 8) // configure match 1 pin behaviour
-#define TEMR_EMC2_3 (3 << 8) // configure match 0 pin behaviour
-#define TEMR_EMC3_0 (0 << 10) // configure match 1 pin behaviour
-#define TEMR_EMC3_1 (1 << 10) // configure match 1 pin behaviour
-#define TEMR_EMC3_2 (2 << 10) // configure match 1 pin behaviour
-#define TEMR_EMC3_3 (3 << 10) // configure match 0 pin behaviour
-
-
-#endif
diff --git a/sw/airborne/arch/lpc21/include/lpcUART.h b/sw/airborne/arch/lpc21/include/lpcUART.h
deleted file mode 100644
index 194fc5b7c4..0000000000
--- a/sw/airborne/arch/lpc21/include/lpcUART.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/******************************************************************************
- *
- * $RCSfile$
- * $Revision$
- *
- * Header file for Philips LPC ARM Processors.
- * Copyright 2004 R O SoftWare
- *
- * No guarantees, warrantees, or promises, implied or otherwise.
- * May be used for hobby or commercial purposes provided copyright
- * notice remains intact.
- *
- *****************************************************************************/
-#ifndef INC_LPC_UART_H
-#define INC_LPC_UART_H
-
-// Universal Asynchronous Receiver Transmitter Registers
-typedef struct
-{
- union
- {
- REG_8 rbr; // Receive Buffer Register
- REG_8 thr; // Transmit Holding Register
- REG_8 dll; // Divisor Latch Register (LSB)
- REG_8 _pad0[4];
- };
-
- union
- {
- REG_8 ier; // Interrupt Enable Register
- REG_8 dlm; // Divisor Latch Register (MSB)
- REG_8 _pad1[4];
- };
-
- union
- {
- REG_8 iir; // Interrupt ID Register
- REG_8 fcr; // FIFO Control Register
- REG_8 _pad2[4];
- };
-
- REG_8 lcr; // Line Control Registe
- REG_8 _pad3[3];
- REG_8 mcr; // MODEM Control Register
- REG_8 _pad4[3];
- REG_8 lsr; // Line Status Register
- REG_8 _pad5[3];
- REG_8 msr; // MODEM Status Register
- REG_8 _pad6[3];
- REG_8 scr; // Scratch Pad Register
- REG_8 _pad7[3];
-} uartRegs_t;
-
-///////////////////////////////////////////////////////////////////////////////
-// UART defines
-
-// Interrupt Enable Register bit definitions
-#define UIER_ERBFI (1 << 0) // Enable Receive Data Available Interrupt
-#define UIER_ETBEI (1 << 1) // Enable Transmit Holding Register Empty Interrupt
-#define UIER_ELSI (1 << 2) // Enable Receive Line Status Interrupt
-#define UIER_EDSSI (1 << 3) // Enable MODEM Status Interrupt
-
-// Interrupt ID Register bit definitions
-#define UIIR_NO_INT (1 << 0) // NO INTERRUPTS PENDING
-#define UIIR_MS_INT (0 << 1) // MODEM Status
-#define UIIR_THRE_INT (1 << 1) // Transmit Holding Register Empty
-#define UIIR_RDA_INT (2 << 1) // Receive Data Available
-#define UIIR_RLS_INT (3 << 1) // Receive Line Status
-#define UIIR_CTI_INT (6 << 1) // Character Timeout Indicator
-#define UIIR_ID_MASK 0x0E
-
-// FIFO Control Register bit definitions
-#define UFCR_FIFO_ENABLE (1 << 0) // FIFO Enable
-#define UFCR_RX_FIFO_RESET (1 << 1) // Reset Receive FIFO
-#define UFCR_TX_FIFO_RESET (1 << 2) // Reset Transmit FIFO
-#define UFCR_FIFO_TRIG1 (0 << 6) // Trigger @ 1 character in FIFO
-#define UFCR_FIFO_TRIG4 (1 << 6) // Trigger @ 4 characters in FIFO
-#define UFCR_FIFO_TRIG8 (2 << 6) // Trigger @ 8 characters in FIFO
-#define UFCR_FIFO_TRIG14 (3 << 6) // Trigger @ 14 characters in FIFO
-
-// Line Control Register bit definitions
-#define ULCR_CHAR_5 (0 << 0) // 5-bit character length
-#define ULCR_CHAR_6 (1 << 0) // 6-bit character length
-#define ULCR_CHAR_7 (2 << 0) // 7-bit character length
-#define ULCR_CHAR_8 (3 << 0) // 8-bit character length
-#define ULCR_STOP_1 (0 << 2) // 1 stop bit
-#define ULCR_STOP_2 (1 << 2) // 2 stop bits
-#define ULCR_PAR_NO (0 << 3) // No Parity
-#define ULCR_PAR_ODD (1 << 3) // Odd Parity
-#define ULCR_PAR_EVEN (3 << 3) // Even Parity
-#define ULCR_PAR_MARK (5 << 3) // MARK "1" Parity
-#define ULCR_PAR_SPACE (7 << 3) // SPACE "0" Paruty
-#define ULCR_BREAK_ENABLE (1 << 6) // Output BREAK line condition
-#define ULCR_DLAB_ENABLE (1 << 7) // Enable Divisor Latch Access
-
-// Modem Control Register bit definitions
-#define UMCR_DTR (1 << 0) // Data Terminal Ready
-#define UMCR_RTS (1 << 1) // Request To Send
-#define UMCR_LB (1 << 4) // Loopback
-
-// Line Status Register bit definitions
-#define ULSR_RDR (1 << 0) // Receive Data Ready
-#define ULSR_OE (1 << 1) // Overrun Error
-#define ULSR_PE (1 << 2) // Parity Error
-#define ULSR_FE (1 << 3) // Framing Error
-#define ULSR_BI (1 << 4) // Break Interrupt
-#define ULSR_THRE (1 << 5) // Transmit Holding Register Empty
-#define ULSR_TEMT (1 << 6) // Transmitter Empty
-#define ULSR_RXFE (1 << 7) // Error in Receive FIFO
-#define ULSR_ERR_MASK 0x1E
-
-// Modem Status Register bit definitions
-#define UMSR_DCTS (1 << 0) // Delta Clear To Send
-#define UMSR_DDSR (1 << 1) // Delta Data Set Ready
-#define UMSR_TERI (1 << 2) // Trailing Edge Ring Indicator
-#define UMSR_DDCD (1 << 3) // Delta Data Carrier Detect
-#define UMSR_CTS (1 << 4) // Clear To Send
-#define UMSR_DSR (1 << 5) // Data Set Ready
-#define UMSR_RI (1 << 6) // Ring Indicator
-#define UMSR_DCD (1 << 7) // Data Carrier Detect
-
-#endif
diff --git a/sw/airborne/arch/lpc21/include/lpcVIC.h b/sw/airborne/arch/lpc21/include/lpcVIC.h
deleted file mode 100644
index 23e8e25e0a..0000000000
--- a/sw/airborne/arch/lpc21/include/lpcVIC.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/******************************************************************************
- *
- * $RCSfile$
- * $Revision$
- *
- * Header file for Philips LPC ARM Processors.
- * Copyright 2004 R O SoftWare
- *
- * No guarantees, warrantees, or promises, implied or otherwise.
- * May be used for hobby or commercial purposes provided copyright
- * notice remains intact.
- *
- *****************************************************************************/
-#ifndef INC_LPC_VIC_H
-#define INC_LPC_VIC_H
-
-// Vectored Interrupt Controller Registers (VIC)
-typedef struct
-{
- REG32 irqStatus; // IRQ Status Register
- REG32 fiqStatus; // FIQ Status Register
- REG32 rawIntr; // Raw Interrupt Status Register
- REG32 intSelect; // Interrupt Select Register
- REG32 intEnable; // Interrupt Enable Register
- REG32 intEnClear; // Interrupt Enable Clear Register
- REG32 softInt; // Software Interrupt Register
- REG32 softIntClear; // Software Interrupt Clear Register
- REG32 protection; // Protection Enable Register
- REG32 _pad0[3];
- REG32 vectAddr; // Vector Address Register
- REG32 defVectAddr; // Default Vector Address Register
- REG32 _pad1[50];
- REG32 vectAddr0; // Vector Address 0 Register
- REG32 vectAddr1; // Vector Address 1 Register
- REG32 vectAddr2; // Vector Address 2 Register
- REG32 vectAddr3; // Vector Address 3 Register
- REG32 vectAddr4; // Vector Address 4 Register
- REG32 vectAddr5; // Vector Address 5 Register
- REG32 vectAddr6; // Vector Address 6 Register
- REG32 vectAddr7; // Vector Address 7 Register
- REG32 vectAddr8; // Vector Address 8 Register
- REG32 vectAddr9; // Vector Address 9 Register
- REG32 vectAddr10; // Vector Address 10 Register
- REG32 vectAddr11; // Vector Address 11 Register
- REG32 vectAddr12; // Vector Address 12 Register
- REG32 vectAddr13; // Vector Address 13 Register
- REG32 vectAddr14; // Vector Address 14 Register
- REG32 vectAddr15; // Vector Address 15 Register
- REG32 _pad2[48];
- REG32 vectCntl0; // Vector Control 0 Register
- REG32 vectCntl1; // Vector Control 1 Register
- REG32 vectCntl2; // Vector Control 2 Register
- REG32 vectCntl3; // Vector Control 3 Register
- REG32 vectCntl4; // Vector Control 4 Register
- REG32 vectCntl5; // Vector Control 5 Register
- REG32 vectCntl6; // Vector Control 6 Register
- REG32 vectCntl7; // Vector Control 7 Register
- REG32 vectCntl8; // Vector Control 8 Register
- REG32 vectCntl9; // Vector Control 9 Register
- REG32 vectCntl10; // Vector Control 10 Register
- REG32 vectCntl11; // Vector Control 11 Register
- REG32 vectCntl12; // Vector Control 12 Register
- REG32 vectCntl13; // Vector Control 13 Register
- REG32 vectCntl14; // Vector Control 14 Register
- REG32 vectCntl15; // Vector Control 15 Register
-} vicRegs_t;
-
-// VIC Channel Assignments
-#define VIC_WDT 0
-#define VIC_ARMCore0 2
-#define VIC_ARMCore1 3
-#define VIC_TIMER0 4
-#define VIC_TIMER1 5
-#define VIC_UART0 6
-#define VIC_UART1 7
-#define VIC_PWM 8
-#define VIC_PWM0 8
-#define VIC_I2C0 9
-#define VIC_SPI 10
-#define VIC_SPI0 10
-#define VIC_SPI1 11
-#define VIC_PLL 12
-#define VIC_RTC 13
-#define VIC_EINT0 14
-#define VIC_EINT1 15
-#define VIC_EINT2 16
-#define VIC_EINT3 17
-#define VIC_AD0 18
-#define VIC_I2C1 19
-#define VIC_BOD 20
-#define VIC_AD1 21
-#define VIC_USB 22
-
-#define VIC_CAN 19
-#define VIC_CAN1_TX 20
-#define VIC_CAN2_TX 21
-#define VIC_CAN1_RX 26
-#define VIC_CAN2_RX 27
-
-
-// Vector Control Register bit definitions
-#define VIC_ENABLE (1 << 5)
-
-// Convert Channel Number to Bit Value
-#define VIC_BIT(chan) (1 << (chan))
-
-#endif
-
diff --git a/sw/airborne/arch/lpc21/include/lpcWD.h b/sw/airborne/arch/lpc21/include/lpcWD.h
deleted file mode 100644
index 379fa44918..0000000000
--- a/sw/airborne/arch/lpc21/include/lpcWD.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/******************************************************************************
- *
- * $RCSfile$
- * $Revision$
- *
- * Header file for Philips LPC ARM Processors.
- * Copyright 2004 R O SoftWare
- *
- * No guarantees, warrantees, or promises, implied or otherwise.
- * May be used for hobby or commercial purposes provided copyright
- * notice remains intact.
- *
- *****************************************************************************/
-#ifndef INC_LPC_WD_H
-#define INC_LPC_WD_H
-
-// Watchdog Registers
-typedef struct
-{
- REG_8 mod; // Watchdog Mode Register
- REG_8 _pad0[3];
- REG32 tc; // Watchdog Time Constant Register
- REG_8 feed; // Watchdog Feed Register
- REG32 tv; // Watchdog Time Value Register
-} wdRegs_t;
-
-#endif
diff --git a/sw/airborne/arch/lpc21/include/types.h b/sw/airborne/arch/lpc21/include/types.h
deleted file mode 100644
index f82dd40342..0000000000
--- a/sw/airborne/arch/lpc21/include/types.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/******************************************************************************
- *
- * $RCSfile$
- * $Revision$
- *
- * This module defines some regularly used typedefs
- *
- *****************************************************************************/
-
-#ifndef INC_TYPES_H
-#define INC_TYPES_H
-
-/* typedefs are here */
-typedef unsigned char uint8_t;
-typedef signed char int8_t;
-typedef unsigned short uint16_t;
-typedef signed short int16_t;
-typedef unsigned long uint32_t;
-typedef signed long int32_t;
-typedef unsigned long long uint64_t;
-typedef signed long long int64_t;
-
-typedef enum {False, True} boolean;
-
-#endif
diff --git a/sw/airborne/arch/lpc21/inttypes.h b/sw/airborne/arch/lpc21/inttypes.h
deleted file mode 100644
index f82dd40342..0000000000
--- a/sw/airborne/arch/lpc21/inttypes.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/******************************************************************************
- *
- * $RCSfile$
- * $Revision$
- *
- * This module defines some regularly used typedefs
- *
- *****************************************************************************/
-
-#ifndef INC_TYPES_H
-#define INC_TYPES_H
-
-/* typedefs are here */
-typedef unsigned char uint8_t;
-typedef signed char int8_t;
-typedef unsigned short uint16_t;
-typedef signed short int16_t;
-typedef unsigned long uint32_t;
-typedef signed long int32_t;
-typedef unsigned long long uint64_t;
-typedef signed long long int64_t;
-
-typedef enum {False, True} boolean;
-
-#endif
diff --git a/sw/airborne/arch/lpc21/led_hw.h b/sw/airborne/arch/lpc21/led_hw.h
deleted file mode 100644
index 3d1f75d5f0..0000000000
--- a/sw/airborne/arch/lpc21/led_hw.h
+++ /dev/null
@@ -1,40 +0,0 @@
-#ifndef LED_HW_H
-#define LED_HW_H
-
-#include BOARD_CONFIG
-#include "LPC21xx.h"
-#include "std.h"
-
-#define LED_PERIODIC() {}
-
-#define __LED_DIR(i) IO ## i ## DIR
-#define _LED_DIR(i) __LED_DIR(i)
-#define __LED_CLR(i) IO ## i ## CLR
-#define _LED_CLR(i) __LED_CLR(i)
-#define __LED_SET(i) IO ## i ## SET
-#define _LED_SET(i) __LED_SET(i)
-#define __LED_PIN_REG(i) IO ## i ## PIN
-#define _LED_PIN_REG(i) __LED_PIN_REG(i)
-
-#define LED_DIR(i) _LED_DIR(LED_ ## i ## _BANK)
-#define LED_CLR(i) _LED_CLR(LED_ ## i ## _BANK)
-#define LED_SET(i) _LED_SET(LED_ ## i ## _BANK)
-#define LED_PIN_REG(i) _LED_PIN_REG(LED_ ## i ## _BANK)
-#define LED_PIN(i) LED_ ## i ## _PIN
-
-/* set pin as output */
-#define LED_INIT(i) LED_DIR(i) |= _BV(LED_PIN(i))
-
-#define LED_ON(i) LED_CLR(i) = _BV(LED_PIN(i));
-#define LED_OFF(i) LED_SET(i) = _BV(LED_PIN(i));
-#define LED_TOGGLE(i) { \
- if (LED_PIN_REG(i) & _BV(LED_PIN(i))) \
- LED_ON(i) \
- else \
- LED_OFF(i) \
- }
-
-/* set pin as input */
-#define LED_DISABLE(i) LED_DIR(i) &= ~(_BV(LED_PIN(i)))
-
-#endif /* LED_HW_H */
diff --git a/sw/airborne/arch/lpc21/link_mcu_hw.h b/sw/airborne/arch/lpc21/link_mcu_hw.h
deleted file mode 100644
index d350fb9d62..0000000000
--- a/sw/airborne/arch/lpc21/link_mcu_hw.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* $Id$
- *
- * Copyright (C) 2003-2005 Pascal Brisset, Antoine Drouin
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/** \brief handling of arm7 inter mcu link
- *
- */
-
-#ifndef LINK_MCU_HW_H
-#define LINK_MCU_HW_H
-
-#define CRC_INIT 0x0
-#define CrcLow(x) ((x)&0xff)
-#define CrcHigh(x) ((x)>>8)
-
-static inline uint16_t CrcUpdate(uint16_t crc, uint8_t data)
-{
- uint8_t a = ((uint8_t)CrcHigh(crc)) + data;
- uint8_t b = ((uint8_t)CrcLow(crc)) + a;
- crc = b | a << 8;
- return crc;
-}
-
-#endif /* LINK_MCU_HW_H */
diff --git a/sw/airborne/arch/lpc21/lpcusb/CHANGELOG b/sw/airborne/arch/lpc21/lpcusb/CHANGELOG
deleted file mode 100644
index c5948544a8..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/CHANGELOG
+++ /dev/null
@@ -1,115 +0,0 @@
- 20070123, bertrik
- * crt.s: increased IRQ stack size to prevent stack overflow (thanks to Paul Knight)
-
-v20061124
- 20061112, bertrik
- * usbhw_lpc.c: Updated LED display to show effect of double buffering
- * armvic.c/.h: Newly added (used by serial port example)
- * main_serial.c: Bugfix suggested by Galen Seitz
-
- 20061105, bertrik
- * main_serial.c: now uses FIFO with VCOM_getchar and VCOM_putchar functions to receive/send data
- * serial_fifo.c/.h: Newly added (used by serial port example)
-
- 20061018, bertrik
- * Updated license to modified BSD license
-
- 20060924, bertrik
- * usbstdreq.c: Prevent EPs from being configured when UNconfiguring the device
-
- 20060915, bertrik
- * msc_scsi.c: Implemented more SCSI commands to improve windows compatibility and compliance with specification
-
- 20060912, bertrik
- * usbhw_lpc.c: Updated interrupt clearing order, according to new user manual
-
- 20060906, bertrik
- * usbapi.h: Updated EP_STATUS_* defines
-
-v20060903
- 20060830, bertrik
- * Makefiles: Initial try at dependencies
- * lpc2000_spi.c: Fixed silly bug in setting PINSEL1
-
- 20060825, bertrik
- * main_*.c: Fixed bug in LE_WORD macro
-
- 20060822, bertrik
- * Device configuration is now done according to USB descriptor.
- * usbapi.h/usbhw_lpc.c: USBHwRegisterEPIntHandler no longer needs the max packet size argument.
- * usbapi.h/usbhw_lpc.c: Added USBHwEPConfig function
- * usbapi.h/usbstdreq.c: USBHandleDescriptor renamed to USBGetDescriptor.
- * usbdescrip.c: code moved into usbstdreq.c, usbdescrip.c removed
-
- 20060820, bertrik
- * msc_scsi.c: now uses #defines instead of numerics
-
- 20060811, bertrik
- * Doxygenised most of the source code
-
-v20060729
- 20060729, bertrik
- * Fixed bug with uninitialised variable (iType) in usbcontrol.c
- * Minor cosmetic cleanup
-
-v20060603
- 20060530, bertrik
- * startup.c: Updated order of setting MAMTIM and MAMCR.
- MAMTIM is now set to 3 as suggested in the user manual.
-
- 20060526, bertrik
- * Eliminated copying data around in mass storage example
-
- 20060512, bertrik
- * Added mass storage application example (using the SD card interface from EFSL).
- * usbhw_lpc.c: Added function USBHwNakIntEnable
-
- 20060505, bertrik
- * usbhw_lpc.c: Renamed function USBHwGetEPStall to USBHwEPIsStalled
- * Removed installable descriptor handler (is now called directly)
- * Added standard request handler hook (through USBRegisterCustomReqHandler)
- * usbhw_lpc.c: Updated USBHwEPRead API: now takes an extra argument for maximum length
- * usbhw_lpc.c: Updated USBHwEPRead/USBHeEPWrite API: now returns int (number of bytes) instead of BOOL
-
- 20060415, bertrik
- * updated data storage for control transfers, each handler now provides its own.
-
-v20060405
- 20060328, bertrik
- * main_serial.c: new file, USB serial port emulation
- * usbser.inf: new file
-
- 20060326, bertrik
- * Renamed linker file from .cmd to .ld, added ram linker file.
- * usbcontrol.c: fixed STALL, now stalls IN control endpoint, instead of OUT.
- * usbhw_lpc.c: updated clearing of EP interrupt and retrieval of EP status
- * Makefile: linker file cleanup
-
- 20060321, fixes/additions by Martin Mueller
- * usbstdreq.c: fixes for passing the USBCV compliance tests
- * usbhw_lpc.c/.h: added function to get stall property of endpoint
- * usbstruct.h: added more USB definitions
- * main_hid.c: updated to pass HID compliance tests
- * Makefile: rename (makefile->Makefile) to allow compilation under Linux
-
- 20060308, bertrik
- * usbhw_lpc.c: turned off debug LEDs by default
-
-v20060307
- 20060307, bertrik
- * Added frame interrupt handler
- * Updated HID example. It is now possible to actually read something from the device using HidProbe.
- * Makefile: main_hid is now the default target
-
- 20060303, bertrik
- * updated clearing of interrupt bits
- * added debug LEDs to show interrupt activity
- * serial output now uses FIFO
-
- 20060226, bertrik
- * removed limitation of fixed packet size of 64 bytes.
- * reduced number of stored EP interrupt handler pointers from 32 to 16
-
-v20060224
- Initial release
-
diff --git a/sw/airborne/arch/lpc21/lpcusb/Doxyfile b/sw/airborne/arch/lpc21/lpcusb/Doxyfile
deleted file mode 100644
index b2ac361c1f..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/Doxyfile
+++ /dev/null
@@ -1,1237 +0,0 @@
-# Doxyfile 1.4.6
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-# TAG = value [value, ...]
-# For lists items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
-# by quotes) that should identify the project.
-
-PROJECT_NAME = LPCUSB
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-PROJECT_NUMBER =
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY = doc
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish,
-# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese,
-# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish,
-# Swedish, and Ukrainian.
-
-OUTPUT_LANGUAGE = English
-
-# This tag can be used to specify the encoding used in the generated output.
-# The encoding is not always determined by the language that is chosen,
-# but also whether or not the output is meant for Windows or non-Windows users.
-# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES
-# forces the Windows encoding (this is the default for the Windows binary),
-# whereas setting the tag to NO uses a Unix-style encoding (the default for
-# all platforms other than Windows).
-
-USE_WINDOWS_ENCODING = YES
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF =
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
-
-STRIP_FROM_PATH =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful is your file systems
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like the Qt-style comments (thus requiring an
-# explicit @brief command for a brief description.
-
-JAVADOC_AUTOBRIEF = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the DETAILS_AT_TOP tag is set to YES then Doxygen
-# will output the detailed description near the top, like JavaDoc.
-# If set to NO, the detailed description appears after the member
-# documentation.
-
-DETAILS_AT_TOP = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE = 8
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for Java.
-# For instance, namespaces will be presented as packages, qualified scopes
-# will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to
-# include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also make the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT = NO
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING = YES
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
-EXTRACT_PRIVATE = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
-EXTRACT_STATIC = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES = YES
-
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS = NO
-
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
-
-SHOW_INCLUDE_FILES = YES
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
-INLINE_INFO = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
-
-SORT_MEMBER_DOCS = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
-
-SORT_BRIEF_DOCS = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
-GENERATE_TODOLIST = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
-GENERATE_TESTLIST = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
-GENERATE_BUGLIST = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or define consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and defines in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES = YES
-
-# If the sources in your project are distributed over multiple directories
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
-# in the documentation. The default is NO.
-
-SHOW_DIRECTORIES = NO
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from the
-# version control system). Doxygen will invoke the program by executing (via
-# popen()) the command , where is the value of
-# the FILE_VERSION_FILTER tag, and is the name of an input file
-# provided by doxygen. Whatever the program writes to standard output
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR = YES
-
-# This WARN_NO_PARAMDOC option can be abled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
-
-WARN_NO_PARAMDOC = YES
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
-
-INPUT = ./
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py
-
-FILE_PATTERNS =
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
-RECURSIVE = NO
-
-# The EXCLUDE tag can be used to specify files and/or directories that should
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE =
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
-# directories that are symbolic links (a Unix filesystem feature) are excluded
-# from the input.
-
-EXCLUDE_SYMLINKS = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
-EXAMPLE_PATH =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
-EXAMPLE_PATTERNS =
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
-
-IMAGE_PATH =
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command , where
-# is the value of the INPUT_FILTER tag, and is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output. If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
-INPUT_FILTER =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis. Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match. The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
-# is applied to all files.
-
-FILTER_PATTERNS =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES (the default)
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = YES
-
-# If the REFERENCES_RELATION tag is set to YES (the default)
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
-USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX = NO
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX = 5
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header.
-
-HTML_HEADER =
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER =
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET =
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS = YES
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND = NO
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it.
-
-DISABLE_INDEX = NO
-
-# This tag can be used to set the number of enum values (range [1..20])
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE = 4
-
-# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
-# generated containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
-# probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW = NO
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH = 250
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-GENERATE_LATEX = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-
-LATEX_CMD_NAME = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
-MAKEINDEX_CMD_NAME = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, a4wide, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS = NO
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
-# higher quality PDF documentation.
-
-USE_PDFLATEX = NO
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
-LATEX_HIDE_INDICES = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT = man
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD =
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader. This is useful
-# if you want to understand what is going on. On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
-ENABLE_PREPROCESSING = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
-INCLUDE_PATH =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
-INCLUDE_FILE_PATTERNS =
-
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
-# instead of the = operator.
-
-PREDEFINED =
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all function-like macros that are alone
-# on a line, have an all uppercase name, and do not end with a semicolon. Such
-# function macros are typically used for boiler-plate code, and will confuse
-# the parser if not removed.
-
-SKIP_FUNCTION_MACROS = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles.
-# Optionally an initial location of the external documentation
-# can be added for each tagfile. The format of a tag file without
-# this location is as follows:
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths or
-# URLs. If a location is present for each tag, the installdox tool
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE =
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option is superseded by the HAVE_DOT option below. This is only a
-# fallback. It is recommended to install and use dot, since it yields more
-# powerful graphs.
-
-CLASS_DIAGRAMS = YES
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT = YES
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH = YES
-
-# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will
-# generate a call dependency graph for every global function or class method.
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable call graphs for selected
-# functions only using the \callgraph command.
-
-CALL_GRAPH = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
-DOTFILE_DIRS =
-
-# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than
-# this value, doxygen will try to truncate the graph, so that it fits within
-# the specified constraint. Beware that most browsers cannot cope with very
-# large images.
-
-MAX_DOT_GRAPH_WIDTH = 1024
-
-# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than
-# this value, doxygen will try to truncate the graph, so that it fits within
-# the specified constraint. Beware that most browsers cannot cope with very
-# large images.
-
-MAX_DOT_GRAPH_HEIGHT = 1024
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that a graph may be further truncated if the graph's
-# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH
-# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default),
-# the graph is not depth-constrained.
-
-MAX_DOT_GRAPH_DEPTH = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, which results in a white background.
-# Warning: Depending on the platform used, enabling this option may lead to
-# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
-# read).
-
-DOT_TRANSPARENT = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE = NO
diff --git a/sw/airborne/arch/lpc21/lpcusb/Makefile b/sw/airborne/arch/lpc21/lpcusb/Makefile
deleted file mode 100644
index 131aa28c16..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/Makefile
+++ /dev/null
@@ -1,87 +0,0 @@
-# Hey Emacs, this is a -*- makefile -*-
-#
-# Copyright (C) 2004 Pascal Brisset, Antoine Drouin
-#
-# This file is part of paparazzi.
-#
-# paparazzi is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# paparazzi is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with paparazzi; see the file COPYING. If not, write to
-# the Free Software Foundation, 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# The default is to produce a quiet echo of compilation commands
-# Launch with "make Q=''" to get full echo
-Q=@
-
-LIBNAME = libusbstack
-
-# Package definitions
-PKG_NAME = target
-DATE = $$(date +%Y%m%d)
-
-#
-# find compiler toolchain
-#
-include $(PAPARAZZI_SRC)/conf/Makefile.arm-embedded-toolchain
-
-#
-# if the new arm-none-eabi multilib compiler was not found try the old arm-elf one
-#
-ifeq ($(CC),)
-CC = $(shell which arm-elf-gcc)
-LD = $(shell which arm-elf-gcc)
-AR = $(shell which arm-elf-ar)
-CP = $(shell which arm-elf-objcopy)
-DMP = $(shell which arm-elf-objdump)
-NM = $(shell which arm-elf-nm)
-SIZE = $(shell which arm-elf-size)
-endif
-
-
-# Define some other programs and commands.
-TAR = tar
-
-CFLAGS = -I./ -I../ -c -W -Wall -Os -g -mcpu=arm7tdmi
-# -mthumb -mthumb-interwork
-ARFLAGS = -rcs
-
-LIBSRCS = usbhw_lpc.c usbcontrol.c usbstdreq.c usbinit.c
-LIBOBJS = $(LIBSRCS:.c=.o)
-
-all: depend lib
-
-clean:
- @echo CLEAN $(LIBNAME)
- $(Q)$(RM) -f $(LIBNAME).a $(LIBOBJS) .depend
-
-# build lib
-lib: $(LIBNAME).a
-
-$(LIBNAME).a: $(LIBOBJS)
- $(AR) $(ARFLAGS) $@ $^
-
-# Builds release tar file
-dist: clean
- cd .. && $(TAR) --exclude={CVS,cvs,.svn} -cvzf $(PKG_NAME)-$(DATE).tar.gz $(PKG_NAME)
-
-# recompile if the Makefile changes
-$(LIBOBJS): Makefile
-
-# dependency checking
-depend: $(LIBSRCS)
- $(Q)$(CC) $(CFLAGS) -MM $^ > .depend || rm -f .depend
-
-# phony targets
-.PHONY: all clean lib dist depend
-
--include .depend
diff --git a/sw/airborne/arch/lpc21/lpcusb/examples/Makefile b/sw/airborne/arch/lpc21/lpcusb/examples/Makefile
deleted file mode 100644
index ed8af37aa3..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/examples/Makefile
+++ /dev/null
@@ -1,60 +0,0 @@
-# Quiet compilation
-Q=@
-
-LIBNAME = ../libusbstack
-APPNAME = main
-
-# Tool definitions
-CC = arm-elf-gcc
-LD = arm-elf-ld -v
-AR = arm-elf-ar
-AS = arm-elf-as
-CP = arm-elf-objcopy
-OD = arm-elf-objdump
-RM = rm
-
-# Tool flags
-CFLAGS = -I./ -I../ -c -W -Wall -Os -g -mcpu=arm7tdmi -n
-# -DDEBUG
-ASFLAGS = -ahls -mapcs-32 -o crt.o
-LFLAGS = -nostartfiles --warn-common -n
-CPFLAGS = -O ihex
-ODFLAGS = -x --syms
-
-LINKFILE = lpc2148-ram.ld
-#LINKFILE = lpc2148-rom-hi.ld
-
-CSRCS = startup.c printf.c console.c
-OBJS = crt.o $(CSRCS:.c=.o)
-
-EXAMPLES = msc
-
-all: depend $(EXAMPLES)
-
-msc: $(OBJS) main_msc.o msc_bot.o msc_scsi.o blockdev_sd.o lpc2000_spi.o $(LIBNAME).a
-
-$(EXAMPLES):
-# @ echo "Building $@ example..."
- $(CC) -T $(LINKFILE) $(LFLAGS) $^ -o $@.elf -Wl,-Map,$@.map
- $(CP) $(CPFLAGS) $@.elf $@.hex
- $(OD) $(ODFLAGS) $@.elf > $@.dmp
-
-crt.o: crt.s
-# @ echo ".assembling"
- $(CC) -c $(AFLAGS) -Wa,-ahlms=crt.lst crt.s -o crt.o
-
-clean:
- $(Q)rm -f *.hex *.elf *.o *.lst *.dmp *.map .depend
-
-# recompile if the Makefile changes
-$(OBJS): Makefile
-
-# dependency checking
-depend: $(CSRCS)
- $(CC) $(CFLAGS) -MM $^ > .depend || rm -f .depend
-
-# phony targets
-.PHONY: clean
-
--include .depend
-
diff --git a/sw/airborne/arch/lpc21/lpcusb/examples/armVIC.c b/sw/airborne/arch/lpc21/lpcusb/examples/armVIC.c
deleted file mode 100644
index 122d7ac3a8..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/examples/armVIC.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/******************************************************************************
- *
- * $RCSfile$
- * $Revision$
- *
- * This module provides the interface routines for setting up and
- * controlling the various interrupt modes present on the ARM processor.
- * Copyright 2004, R O SoftWare
- * No guarantees, warrantees, or promises, implied or otherwise.
- * May be used for hobby or commercial purposes provided copyright
- * notice remains intact.
- *
- *****************************************************************************/
-#include "type.h"
-#include "armVIC.h"
-
-#define IRQ_MASK 0x00000080
-#define FIQ_MASK 0x00000040
-#define INT_MASK (IRQ_MASK | FIQ_MASK)
-
-static inline unsigned __get_cpsr(void)
-{
- unsigned long retval;
- asm volatile (" mrs %0, cpsr" : "=r" (retval) : /* no inputs */ );
- return retval;
-}
-
-static inline void __set_cpsr(unsigned val)
-{
- asm volatile (" msr cpsr, %0" : /* no outputs */ : "r" (val) );
-}
-
-unsigned disableIRQ(void)
-{
- unsigned _cpsr;
-
- _cpsr = __get_cpsr();
- __set_cpsr(_cpsr | IRQ_MASK);
- return _cpsr;
-}
-
-unsigned restoreIRQ(unsigned oldCPSR)
-{
- unsigned _cpsr;
-
- _cpsr = __get_cpsr();
- __set_cpsr((_cpsr & ~IRQ_MASK) | (oldCPSR & IRQ_MASK));
- return _cpsr;
-}
-
-unsigned enableIRQ(void)
-{
- unsigned _cpsr;
-
- _cpsr = __get_cpsr();
- __set_cpsr(_cpsr & ~IRQ_MASK);
- return _cpsr;
-}
-
-unsigned disableFIQ(void)
-{
- unsigned _cpsr;
-
- _cpsr = __get_cpsr();
- __set_cpsr(_cpsr | FIQ_MASK);
- return _cpsr;
-}
-
-unsigned restoreFIQ(unsigned oldCPSR)
-{
- unsigned _cpsr;
-
- _cpsr = __get_cpsr();
- __set_cpsr((_cpsr & ~FIQ_MASK) | (oldCPSR & FIQ_MASK));
- return _cpsr;
-}
-
-unsigned enableFIQ(void)
-{
- unsigned _cpsr;
-
- _cpsr = __get_cpsr();
- __set_cpsr(_cpsr & ~FIQ_MASK);
- return _cpsr;
-}
diff --git a/sw/airborne/arch/lpc21/lpcusb/examples/armVIC.h b/sw/airborne/arch/lpc21/lpcusb/examples/armVIC.h
deleted file mode 100644
index e9fc63bb97..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/examples/armVIC.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/******************************************************************************
- *
- * $RCSfile$
- * $Revision$
- *
- * This module provides the interface definitions for setting up and
- * controlling the various interrupt modes present on the ARM processor.
- * Copyright 2004, R O SoftWare
- * No guarantees, warrantees, or promises, implied or otherwise.
- * May be used for hobby or commercial purposes provided copyright
- * notice remains intact.
- *
- *****************************************************************************/
-#ifndef INC_ARM_VIC_H
-#define INC_ARM_VIC_H
-
-/******************************************************************************
- *
- * MACRO Name: ISR_ENTRY()
- *
- * Description:
- * This MACRO is used upon entry to an ISR. The current version of
- * the gcc compiler for ARM does not produce correct code for
- * interrupt routines to operate properly with THUMB code. The MACRO
- * performs the following steps:
- *
- * 1 - Adjust address at which execution should resume after servicing
- * ISR to compensate for IRQ entry
- * 2 - Save the non-banked registers r0-r12 and lr onto the IRQ stack.
- * 3 - Get the status of the interrupted program is in SPSR.
- * 4 - Push it onto the IRQ stack as well.
- *
- *****************************************************************************/
-#define ISR_ENTRY() asm volatile(" sub lr, lr,#4\n" \
- " stmfd sp!,{r0-r12,lr}\n" \
- " mrs r1, spsr\n" \
- " stmfd sp!,{r1}")
-
-/******************************************************************************
- *
- * MACRO Name: ISR_EXIT()
- *
- * Description:
- * This MACRO is used to exit an ISR. The current version of the gcc
- * compiler for ARM does not produce correct code for interrupt
- * routines to operate properly with THUMB code. The MACRO performs
- * the following steps:
- *
- * 1 - Recover SPSR value from stack
- * 2 - and restore its value
- * 3 - Pop the return address & the saved general registers from
- * the IRQ stack & return
- *
- *****************************************************************************/
-#define ISR_EXIT() asm volatile(" ldmfd sp!,{r1}\n" \
- " msr spsr_c,r1\n" \
- " ldmfd sp!,{r0-r12,pc}^")
-
-/******************************************************************************
- *
- * Function Name: disableIRQ()
- *
- * Description:
- * This function sets the IRQ disable bit in the status register
- *
- * Calling Sequence:
- * void
- *
- * Returns:
- * previous value of CPSR
- *
- *****************************************************************************/
-unsigned disableIRQ(void);
-
-/******************************************************************************
- *
- * Function Name: enableIRQ()
- *
- * Description:
- * This function clears the IRQ disable bit in the status register
- *
- * Calling Sequence:
- * void
- *
- * Returns:
- * previous value of CPSR
- *
- *****************************************************************************/
-unsigned enableIRQ(void);
-
-/******************************************************************************
- *
- * Function Name: restoreIRQ()
- *
- * Description:
- * This function restores the IRQ disable bit in the status register
- * to the value contained within passed oldCPSR
- *
- * Calling Sequence:
- * void
- *
- * Returns:
- * previous value of CPSR
- *
- *****************************************************************************/
-unsigned restoreIRQ(unsigned oldCPSR);
-
-/******************************************************************************
- *
- * Function Name: disableFIQ()
- *
- * Description:
- * This function sets the FIQ disable bit in the status register
- *
- * Calling Sequence:
- * void
- *
- * Returns:
- * previous value of CPSR
- *
- *****************************************************************************/
-unsigned disableFIQ(void);
-
-/******************************************************************************
- *
- * Function Name: enableFIQ()
- *
- * Description:
- * This function clears the FIQ disable bit in the status register
- *
- * Calling Sequence:
- * void
- *
- * Returns:
- * previous value of CPSR
- *
- *****************************************************************************/
-unsigned enableFIQ(void);
-
-/******************************************************************************
- *
- * Function Name: restoreIRQ()
- *
- * Description:
- * This function restores the FIQ disable bit in the status register
- * to the value contained within passed oldCPSR
- *
- * Calling Sequence:
- * void
- *
- * Returns:
- * previous value of CPSR
- *
- *****************************************************************************/
-unsigned restoreFIQ(unsigned oldCPSR);
-
-#endif
diff --git a/sw/airborne/arch/lpc21/lpcusb/examples/blockdev.h b/sw/airborne/arch/lpc21/lpcusb/examples/blockdev.h
deleted file mode 100644
index bd7a5a9646..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/examples/blockdev.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include "type.h"
-
-
-int BlockDevInit(void);
-
-int BlockDevWrite(U32 dwAddress, U8* pbBuf);
-int BlockDevRead(U32 dwAddress, U8* pbBuf);
-
-int BlockDevGetSize(U32 *pdwDriveSize);
-int BlockDevGetStatus(void);
diff --git a/sw/airborne/arch/lpc21/lpcusb/examples/blockdev_sd.c b/sw/airborne/arch/lpc21/lpcusb/examples/blockdev_sd.c
deleted file mode 100644
index 86a793494a..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/examples/blockdev_sd.c
+++ /dev/null
@@ -1,342 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------- ----------------------------------- *
-* *
-* Filename : sd.c *
-* Revision : Initial developement *
-* Description : This file contains the functions needed to use efs for *
-* accessing files on an SD-card. *
-* *
-* This library is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU Lesser General Public *
-* License as published by the Free Software Foundation; either *
-* version 2.1 of the License, or (at your option) any later version. *
-* *
-* This library is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
-* Lesser General Public License for more details. *
-* *
-* (c)2005 Michael De Nil *
-* (c)2005 Lennart Yseboodt *
-\*****************************************************************************/
-
-/*
- 2006, Bertrik Sikken, modified for LPCUSB
-*/
-
-
-#include "type.h"
-#include "usbdebug.h"
-
-
-#include "blockdev.h"
-#include "spi.h"
-
-
-
-#define CMD_GOIDLESTATE 0
-#define CMD_SENDOPCOND 1
-#define CMD_READCSD 9
-#define CMD_READCID 10
-#define CMD_SENDSTATUS 13
-#define CMD_READSINGLEBLOCK 17
-#define CMD_WRITE 24
-#define CMD_WRITE_MULTIPLE 25
-
-
-static void Command(U8 cmd, U32 param)
-{
- U8 abCmd[8];
-
- // create buffer
- abCmd[0] = 0xff;
- abCmd[1] = 0x40 | cmd;
- abCmd[2] = (U8)(param >> 24);
- abCmd[3] = (U8)(param >> 16);
- abCmd[4] = (U8)(param >> 8);
- abCmd[5] = (U8)(param);
- abCmd[6] = 0x95; /* Checksum (should be only valid for first command (0) */
- abCmd[7] = 0xff; /* eat empty command - response */
-
- SPISendN(abCmd, 8);
-}
-
-
-/*****************************************************************************/
-
-static U8 Resp8b(void)
-{
- U8 i;
- U8 resp;
-
- /* Respone will come after 1 - 8 pings */
- for (i = 0; i < 8; i++) {
- resp = SPISend(0xff);
- if (resp != 0xff) {
- return resp;
- }
- }
-
- return resp;
-}
-
-/*****************************************************************************/
-
-static void Resp8bError(U8 value)
-{
- switch (value) {
- case 0x40: DBG("Argument out of bounds.\n"); break;
- case 0x20: DBG("Address out of bounds.\n"); break;
- case 0x10: DBG("Error during erase sequence.\n"); break;
- case 0x08: DBG("CRC failed.\n"); break;
- case 0x04: DBG("Illegal command.\n"); break;
- case 0x02: DBG("Erase reset (see SanDisk docs p5-13).\n"); break;
- case 0x01: DBG("Card is initialising.\n"); break;
- default:
- DBG("Unknown error 0x%x (see SanDisk docs p5-13).\n", value);
- break;
- }
-}
-
-
-/* ****************************************************************************
- calculates size of card from CSD
- (extension by Martin Thomas, inspired by code from Holger Klabunde)
- */
-int BlockDevGetSize(U32 *pdwDriveSize)
-{
- U8 cardresp, i, by;
- U8 iob[16];
- U16 c_size, c_size_mult, read_bl_len;
-
- Command(CMD_READCSD, 0);
- do {
- cardresp = Resp8b();
- } while (cardresp != 0xFE);
-
- DBG("CSD:");
- for (i = 0; i < 16; i++) {
- iob[i] = SPISend(0xFF);
- DBG(" %02x", iob[i]);
- }
- DBG("\n");
-
- SPISend(0xff);
- SPISend(0xff);
-
- c_size = iob[6] & 0x03; // bits 1..0
- c_size <<= 10;
- c_size += (U16) iob[7] << 2;
- c_size += iob[8] >> 6;
-
- by = iob[5] & 0x0F;
- read_bl_len = 1 << by;
-
- by = iob[9] & 0x03;
- by <<= 1;
- by += iob[10] >> 7;
-
- c_size_mult = 1 << (2 + by);
-
- *pdwDriveSize = (U32) (c_size + 1) * (U32) c_size_mult *(U32) read_bl_len;
-
- return 0;
-}
-
-
-/*****************************************************************************/
-
-static U16 Resp16b(void)
-{
- U16 resp;
-
- resp = (Resp8b() << 8) & 0xff00;
- resp |= SPISend(0xff);
-
- return resp;
-}
-
-
-/*****************************************************************************/
-
-static int State(void)
-{
- U16 value;
-
- Command(CMD_SENDSTATUS, 0);
- value = Resp16b();
-
- switch (value) {
- case 0x0000: return 1;
- case 0x0001: DBG("Card is Locked.\n"); break;
- case 0x0002: DBG("WP Erase Skip, Lock/Unlock Cmd Failed.\n"); break;
- case 0x0004: DBG("General / Unknown error -- card broken?.\n"); break;
- case 0x0008: DBG("Internal card controller error.\n"); break;
- case 0x0010: DBG("Card internal ECC was applied, but failed to correct the data.\n"); break;
- case 0x0020: DBG("Write protect violation.\n"); break;
- case 0x0040: DBG("An invalid selection, sectors for erase.\n"); break;
- case 0x0080: DBG("Out of Range, CSD_Overwrite.\n"); break;
- default:
- if (value > 0x00FF) {
- Resp8bError((U8) (value >> 8));
- }
- else {
- DBG("Unknown error: 0x%x (see SanDisk docs p5-14).\n", value);
- }
- break;
- }
- return -1;
-}
-
-/*****************************************************************************/
-
-
-int BlockDevInit(void)
-{
- int i;
- U8 resp;
-
- SPIInit(); /* init at low speed */
-
- /* Try to send reset command up to 100 times */
- i = 100;
- do {
- Command(CMD_GOIDLESTATE, 0);
- resp = Resp8b();
- } while (resp != 1 && i--);
-
- if (resp != 1) {
- if (resp == 0xff) {
- DBG("resp=0xff\n");
- return -1;
- }
- else {
- Resp8bError(resp);
- DBG("resp!=0xff\n");
- return -2;
- }
- }
-
- /* Wait till card is ready initialising (returns 0 on CMD_1) */
- /* Try up to 32000 times. */
- i = 32000;
- do {
- Command(CMD_SENDOPCOND, 0);
-
- resp = Resp8b();
- if (resp != 0) {
- Resp8bError(resp);
- }
- } while (resp == 1 && i--);
-
- if (resp != 0) {
- Resp8bError(resp);
- return -3;
- }
-
- /* increase speed after init */
- SPISetSpeed(SPI_PRESCALE_MIN);
-
- if (State() < 0) {
- DBG("Card didn't return the ready state, breaking up...\n");
- return -2;
- }
-
- DBG("Init done...\n");
-
- return 0;
-}
-
-/*****************************************************************************/
-
-
-
-/*****************************************************************************/
-
-
-/*****************************************************************************/
-
-/* ****************************************************************************
- * WAIT ?? -- FIXME
- * CMD_WRITE
- * WAIT
- * CARD RESP
- * WAIT
- * DATA BLOCK OUT
- * START BLOCK
- * DATA
- * CHKS (2B)
- * BUSY...
- */
-
-int BlockDevWrite(U32 dwAddress, U8 * pbBuf)
-{
- U32 place;
- U16 t = 0;
-
- place = 512 * dwAddress;
- Command(CMD_WRITE, place);
-
- Resp8b(); /* Card response */
-
- SPISend(0xfe); /* Start block */
- SPISendN(pbBuf, 512);
- SPISend(0xff); /* Checksum part 1 */
- SPISend(0xff); /* Checksum part 2 */
-
- SPISend(0xff);
-
- while (SPISend(0xff) != 0xff) {
- t++;
- }
-
- return 0;
-}
-
-/*****************************************************************************/
-
-/* ****************************************************************************
- * WAIT ?? -- FIXME
- * CMD_CMD_
- * WAIT
- * CARD RESP
- * WAIT
- * DATA BLOCK IN
- * START BLOCK
- * DATA
- * CHKS (2B)
- */
-
-int BlockDevRead(U32 dwAddress, U8 * pbBuf)
-{
- U8 cardresp;
- U8 firstblock;
- U16 fb_timeout = 0xffff;
- U32 place;
-
- place = 512 * dwAddress;
- Command(CMD_READSINGLEBLOCK, place);
-
- cardresp = Resp8b(); /* Card response */
-
- /* Wait for startblock */
- do {
- firstblock = Resp8b();
- } while (firstblock == 0xff && fb_timeout--);
-
- if (cardresp != 0x00 || firstblock != 0xfe) {
- Resp8bError(firstblock);
- return -1;
- }
-
- SPIRecvN(pbBuf, 512);
-
- /* Checksum (2 byte) - ignore for now */
- SPISend(0xff);
- SPISend(0xff);
-
- return 0;
-}
-
-/*****************************************************************************/
diff --git a/sw/airborne/arch/lpc21/lpcusb/examples/console.c b/sw/airborne/arch/lpc21/lpcusb/examples/console.c
deleted file mode 100644
index f976a514e2..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/examples/console.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
- Simple console input/output, over serial port #0
-
- Partially copied from Jim Lynch's tutorial
-*/
-
-#include "console.h"
-
-#define PINSEL0 *(volatile unsigned int *)0xE002C000
-
-#define U0THR *(volatile unsigned int *)0xE000C000
-#define U0RBR *(volatile unsigned int *)0xE000C000
-#define U0DLL *(volatile unsigned int *)0xE000C000
-#define U0DLM *(volatile unsigned int *)0xE000C004
-#define U0FCR *(volatile unsigned int *)0xE000C008
-#define U0LCR *(volatile unsigned int *)0xE000C00C
-#define U0LSR *(volatile unsigned int *)0xE000C014
-
-
-/* Initialize Serial Interface */
-void ConsoleInit(int iDivider)
-{
- PINSEL0 = (PINSEL0 & ~0x0000000F) | 0x00000005; /* Enable RxD0 and TxD0 */
- U0LCR = 0x83; /* 8 bits, no Parity, 1 Stop bit */
- U0DLL = iDivider & 0xFF; /* set divider / baud rate */
- U0DLM = iDivider >> 8;
- U0LCR = 0x03; /* DLAB = 0 */
-
- // enable FIFO
- U0FCR = 1;
-}
-
-
-/* Write character to Serial Port */
-int putchar(int ch)
-{
- if (ch == '\n') {
- while (!(U0LSR & 0x20));
- U0THR = '\r';
- }
- while (!(U0LSR & 0x20));
- U0THR = ch;
-
- return ch;
-}
-
-
-int getchar (void) { /* Read character from Serial Port */
-
- while (!(U0LSR & 0x01));
-
- return (U0RBR);
-}
-
-
-int puts(const char *s)
-{
- while (*s) {
- putchar(*s++);
- }
- putchar('\n');
- return 1;
-}
-
-
diff --git a/sw/airborne/arch/lpc21/lpcusb/examples/console.h b/sw/airborne/arch/lpc21/lpcusb/examples/console.h
deleted file mode 100644
index da1e3aac06..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/examples/console.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#define EOF (-1)
-
-void ConsoleInit(int iDivider);
-int putchar(int c);
-int puts(const char *s);
-
diff --git a/sw/airborne/arch/lpc21/lpcusb/examples/crt.s b/sw/airborne/arch/lpc21/lpcusb/examples/crt.s
deleted file mode 100644
index e37c319ac8..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/examples/crt.s
+++ /dev/null
@@ -1,104 +0,0 @@
-# 1 "crt.S"
-# 1 ""
-# 1 ""
-# 1 "crt.S"
-# 12 "crt.S"
-.set UND_STACK_SIZE, 0x00000040
-.set ABT_STACK_SIZE, 0x00000040
-.set FIQ_STACK_SIZE, 0x00000040
-.set IRQ_STACK_SIZE, 0X00000100
-.set SVC_STACK_SIZE, 0x00000400
-
-
-
-
-.set MODE_USR, 0x10
-.set MODE_FIQ, 0x11
-.set MODE_IRQ, 0x12
-.set MODE_SVC, 0x13
-.set MODE_ABT, 0x17
-.set MODE_UND, 0x1B
-.set MODE_SYS, 0x1F
-
-.set I_BIT, 0x80
-.set F_BIT, 0x40
-
-
-.text
-.arm
-
-.global Reset_Handler
-.global _startup
-.func _startup
-
-_startup:
-
-# Exception Vectors
-
-_vectors: ldr PC, Reset_Addr
- ldr PC, Undef_Addr
- ldr PC, SWI_Addr
- ldr PC, PAbt_Addr
- ldr PC, DAbt_Addr
- nop
- ldr PC, [PC,#-0xFF0]
- ldr PC, FIQ_Addr
-
-Reset_Addr: .word Reset_Handler
-Undef_Addr: .word UNDEF_Routine
-SWI_Addr: .word SWI_Routine
-PAbt_Addr: .word UNDEF_Routine
-DAbt_Addr: .word UNDEF_Routine
-IRQ_Addr: .word IRQ_Routine
-FIQ_Addr: .word FIQ_Routine
- .word 0
-
-
-# Reset Handler
-
-Reset_Handler:
-
-
-
-
- ldr r0, =_stack_end
- msr CPSR_c, #MODE_UND|I_BIT|F_BIT
- mov sp, r0
- sub r0, r0, #UND_STACK_SIZE
- msr CPSR_c, #MODE_ABT|I_BIT|F_BIT
- mov sp, r0
- sub r0, r0, #ABT_STACK_SIZE
- msr CPSR_c, #MODE_FIQ|I_BIT|F_BIT
- mov sp, r0
- sub r0, r0, #FIQ_STACK_SIZE
- msr CPSR_c, #MODE_IRQ|I_BIT|F_BIT
- mov sp, r0
- sub r0, r0, #IRQ_STACK_SIZE
- msr CPSR_c, #MODE_SVC|I_BIT|F_BIT
- mov sp, r0
- sub r0, r0, #SVC_STACK_SIZE
- msr CPSR_c, #MODE_SYS|I_BIT|F_BIT
- mov sp, r0
-
-
- ldr R1, =_etext
- ldr R2, =_data
- ldr R3, =_edata
-1: cmp R2, R3
- ldrlo R0, [R1], #4
- strlo R0, [R2], #4
- blo 1b
-
-
- mov R0, #0
- ldr R1, =_bss_start
- ldr R2, =_bss_end
-2: cmp R1, R2
- strlo R0, [R1], #4
- blo 2b
-
-
- b main
-
-.endfunc
-.end
diff --git a/sw/airborne/arch/lpc21/lpcusb/examples/lpc2000_spi.c b/sw/airborne/arch/lpc21/lpcusb/examples/lpc2000_spi.c
deleted file mode 100644
index 367dac047b..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/examples/lpc2000_spi.c
+++ /dev/null
@@ -1,199 +0,0 @@
-/*****************************************************************************\
-* efs - General purpose Embedded Filesystem library *
-* --------------------- ----------------------------------- *
-* *
-* Filename : lpc2000_spi.c *
-* Description : This contains the functions needed to use efs for *
-* accessing files on an SD-card connected to an LPC2xxx. *
-* *
-* This library is free software; you can redistribute it and/or *
-* modify it under the terms of the GNU Lesser General Public *
-* License as published by the Free Software Foundation; either *
-* version 2.1 of the License, or (at your option) any later version. *
-* *
-* This library is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
-* Lesser General Public License for more details. *
-* *
-* (c)2005 Martin Thomas *
-* *
-\*****************************************************************************/
-
-/*
- 2006, Bertrik Sikken, modified for LPCUSB
-*/
-
-
-/*****************************************************************************/
-#include "type.h"
-#include "usbdebug.h"
-
-#include "spi.h"
-/*****************************************************************************/
-
-/* General Purpose Input/Output (GPIO) */
-#define IOPIN0 (*((volatile unsigned long *) 0xE0028000))
-#define IOSET0 (*((volatile unsigned long *) 0xE0028004))
-#define IODIR0 (*((volatile unsigned long *) 0xE0028008))
-#define IOCLR0 (*((volatile unsigned long *) 0xE002800C))
-#define IOPIN1 (*((volatile unsigned long *) 0xE0028010))
-#define IOSET1 (*((volatile unsigned long *) 0xE0028014))
-#define IODIR1 (*((volatile unsigned long *) 0xE0028018))
-#define IOCLR1 (*((volatile unsigned long *) 0xE002801C))
-
-/* Pin Connect Block */
-#define PINSEL0 (*((volatile unsigned long *) 0xE002C000))
-#define PINSEL1 (*((volatile unsigned long *) 0xE002C004))
-#define PINSEL2 (*((volatile unsigned long *) 0xE002C014))
-
-/* SSP Controller */
-#define SSPCR0 (*((volatile unsigned short* ) 0xE0068000))
-#define SSPCR1 (*((volatile unsigned char * ) 0xE0068004))
-#define SSPDR (*((volatile unsigned short* ) 0xE0068008))
-#define SSPSR (*((volatile unsigned char * ) 0xE006800C))
-#define SSPCPSR (*((volatile unsigned char * ) 0xE0068010))
-#define SSPIMSC (*((volatile unsigned char * ) 0xE0068014))
-#define SSPRIS (*((volatile unsigned char * ) 0xE0068018))
-#define SSPMIS (*((volatile unsigned char * ) 0xE006801C))
-#define SSPICR (*((volatile unsigned char * ) 0xE0068020))
-#define SSPDMACR (*((volatile unsigned char * ) 0xE0068024))
-
-// SSPCR0 Bit-Definitions
-#define CPOL 6
-#define CPHA 7
-// SSPCR1 Bit-Defintions
-#define SSE 1
-#define MS 2
-#define SCR 8
-// SSPSR Bit-Definitions
-#define TNF 1
-#define RNE 2
-#define BSY 4
-
-#define SPI_IODIR IODIR0
-#define SPI_IOSET IOSET0
-
-#define SPI_SCK_PIN 17 /* Clock P0.17 out */
-#define SPI_MISO_PIN 18 /* from Card P0.18 in */
-#define SPI_MOSI_PIN 19 /* to Card P0.19 out */
-/* Card-Select P0.20 - GPIO out during startup */
-#define SPI_SS_PIN 20
-
-#define SPI_PINSEL PINSEL1
-#define SPI_SCK_FUNCBIT 2
-#define SPI_MISO_FUNCBIT 4
-#define SPI_MOSI_FUNCBIT 6
-#define SPI_SS_FUNCBIT 8
-
-#define SPI_PRESCALE_REG SSPCPSR
-
-/* only needed during init: */
-#define SELECT_CARD() IOCLR0 = (1<|---------------------------------| */
-/* . | variables and stack |0x40007FFF */
-/* ram_isp_high | for Philips boot loader | */
-/* . | 32 + 256 = 288 bytes | */
-/* . | | */
-/* . | Do not put anything here |0x40007EE0 */
-/* .-------->|---------------------------------| */
-/* | UDF Stack 4 bytes |0x40007EDC <---------- _stack_end */
-/* .-------->|---------------------------------| */
-/* | ABT Stack 4 bytes |0x40007ED8 */
-/* .-------->|---------------------------------| */
-/* | FIQ Stack 4 bytes |0x40007ED4 */
-/* .-------->|---------------------------------| */
-/* | IRQ Stack 4 bytes |0x40007ED0 */
-/* .-------->|---------------------------------| */
-/* | SVC Stack 4 bytes |0x40007ECC */
-/* .-------->|---------------------------------| */
-/* . | |0x40007EC8 */
-/* . | stack area for user program | */
-/* . | | | */
-/* . | | | */
-/* . | | | */
-/* . | V | */
-/* . | | */
-/* . | | */
-/* . | | */
-/* . | free ram | */
-/* ram | | */
-/* . | | */
-/* . | | */
-/* . |.................................|0x40000234 <---------- _bss_end */
-/* . | | */
-/* . | .bss uninitialized variables | */
-/* . |.................................|0x40000218 <---------- _bss_start, _edata */
-/* . | | */
-/* . | .data initialized variables | */
-/* . | |0x40000200 <---------- _data */
-/* .-------->|---------------------------------| */
-/* . | variables used by |0x400001FF */
-/* ram_isp_low | Philips boot loader | */
-/* . | 223 bytes |0x40000120 */
-/* .-------->|---------------------------------| */
-/* . | |0x4000011F */
-/* ram_vectors | free ram | */
-/* . |---------------------------------|0x40000040 */
-/* . | |0x4000003F */
-/* . | Interrupt Vectors (re-mapped) | */
-/* . | 64 bytes |0x40000000 */
-/* .-------->|---------------------------------| */
-/* | | */
-/* */
-/* */
-/* */
-/* | | */
-/* .--------> |---------------------------------| */
-/* . | |0x0001FFFF */
-/* . | | */
-/* . | | */
-/* . | | */
-/* . | | */
-/* . | | */
-/* . | unused flash eprom | */
-/* . | | */
-/* . |.................................|0x0000032c */
-/* . | | */
-/* . | copy of .data area | */
-/* flash | | */
-/* . |---------------------------------|0x00000314 <----------- _etext */
-/* . | | */
-/* . | |0x00000180 main */
-/* . | |0x00000278 feed */
-/* . | main() |0x000002c4 FIQ_Routine */
-/* . | |0x000002d8 SWI_Routine */
-/* . | |0x000002ec UNDEF_Routine */
-/* . | |0x000002b0 IRQ_routine */
-/* . |---------------------------------|0x000001cc initialize */
-/* . | |0x000000D4 */
-/* . | Startup Code | */
-/* . | (assembler) | */
-/* . | | */
-/* . |---------------------------------|0x00000040 Reset_Handler */
-/* . | |0x0000003F */
-/* . | Interrupt Vector Table (unused) | */
-/* . | 64 bytes | */
-/* .--------->|---------------------------------|0x00000000 _startup *
-/* */
-/* */
-/* The easy way to prevent the linker from loading anything into a memory area is to define */
-/* a MEMORY region for it and then avoid assigning any .text, .data or .bss sections into it. */
-/* */
-/* */
-/* MEMORY */
-/* { */
-/* ram_isp_low(A) : ORIGIN = 0x40000120, LENGTH = 223 */
-/* */
-/* } */
-/* */
-/* */
-/* Author: James P. Lynch */
-/* */
-/* ****************************************************************************************************** */
-
-
-/* identify the Entry Point */
-
-ENTRY(_startup)
-
-
-
-/* specify the LPC2148 memory areas */
-
-MEMORY
-{
- flash : ORIGIN = 0, LENGTH = 512K /* FLASH ROM */
- ram_isp_low(A) : ORIGIN = 0x40000120, LENGTH = 223 /* variables used by Philips ISP bootloader */
- ram : ORIGIN = 0x40000200, LENGTH = 26369 /* free RAM area */
-/* ram : ORIGIN = 0x40001200, LENGTH = 32513 free RAM area */
- ram_isp_high(A) : ORIGIN = 0x40007FE0, LENGTH = 32 /* variables used by Philips ISP bootloader */
- ram_usb_dma : ORIGIN = 0x7FD00000, LENGTH = 8192 /* on-chip USB DMA RAM area (not used) */
-}
-
-
-
-/* define a global symbol _stack_end */
-
-_stack_end = 0x40007EDC;
-
-
-
-/* now define the output sections */
-
-SECTIONS
-{
- . = 0; /* set location counter to address zero */
-
- startup : { *(.startup)} >ram /* the startup code goes into FLASH */
-
-
-
- .text : /* collect all sections that should go into FLASH after startup */
- {
- *(.text) /* all .text sections (code) */
- *(.rodata) /* all .rodata sections (constants, strings, etc.) */
- *(.rodata*) /* all .rodata* sections (constants, strings, etc.) */
- *(.glue_7) /* all .glue_7 sections (no idea what these are) */
- *(.glue_7t) /* all .glue_7t sections (no idea what these are) */
- _etext = .; /* define a global symbol _etext just after the last code byte */
- } >ram /* put all the above into FLASH */
-
-
-
-
- .data : /* collect all initialized .data sections that go into RAM */
- {
- _data = .; /* create a global symbol marking the start of the .data section */
- *(.data) /* all .data sections */
- _edata = .; /* define a global symbol marking the end of the .data section */
- } >ram AT >ram /* put all the above into RAM (but load the LMA copy into FLASH) */
-
- .bss : /* collect all uninitialized .bss sections that go into RAM */
- {
- _bss_start = .; /* define a global symbol marking the start of the .bss section */
- *(.bss) /* all .bss sections */
- } >ram /* put all the above in RAM (it will be cleared in the startup code */
-
- . = ALIGN(4); /* advance location counter to the next 32-bit boundary */
- _bss_end = . ; /* define a global symbol marking the end of the .bss section */
-}
- _end = .; /* define a global symbol marking the end of application RAM */
-
diff --git a/sw/airborne/arch/lpc21/lpcusb/examples/lpc2148-rom-hi.ld b/sw/airborne/arch/lpc21/lpcusb/examples/lpc2148-rom-hi.ld
deleted file mode 100644
index 77fe563e55..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/examples/lpc2148-rom-hi.ld
+++ /dev/null
@@ -1,198 +0,0 @@
-/* ****************************************************************************************************** */
-/* demo2148_blink_flash.cmd LINKER SCRIPT */
-/* */
-/* */
-/* The Linker Script defines how the code and data emitted by the GNU C compiler and assembler are */
-/* to be loaded into memory (code goes into FLASH, variables go into RAM). */
-/* */
-/* Any symbols defined in the Linker Script are automatically global and available to the rest of the */
-/* program. */
-/* */
-/* To force the linker to use this LINKER SCRIPT, just add the -T demo2148_blink_flash.cmd directive */
-/* to the linker flags in the makefile. */
-/* */
-/* LFLAGS = -Map main.map -nostartfiles -T demo2148_blink_flash.cmd */
-/* */
-/* */
-/* The Philips boot loader supports the ISP (In System Programming) via the serial port and the IAP */
-/* (In Application Programming) for flash programming from within your application. */
-/* */
-/* The boot loader uses RAM memory and we MUST NOT load variables or code in these areas. */
-/* */
-/* RAM used by boot loader: 0x40000120 - 0x400001FF (223 bytes) for ISP variables */
-/* 0x40007FE0 - 0x4000FFFF (32 bytes) for ISP and IAP variables */
-/* 0x40007EE0 - 0x40007FE0 (256 bytes) stack for ISP and IAP */
-/* */
-/* */
-/* MEMORY MAP */
-/* | |0x40008000 */
-/* .-------->|---------------------------------| */
-/* . | variables and stack |0x40007FFF */
-/* ram_isp_high | for Philips boot loader | */
-/* . | 32 + 256 = 288 bytes | */
-/* . | | */
-/* . | Do not put anything here |0x40007EE0 */
-/* .-------->|---------------------------------| */
-/* | UDF Stack 4 bytes |0x40007EDC <---------- _stack_end */
-/* .-------->|---------------------------------| */
-/* | ABT Stack 4 bytes |0x40007ED8 */
-/* .-------->|---------------------------------| */
-/* | FIQ Stack 4 bytes |0x40007ED4 */
-/* .-------->|---------------------------------| */
-/* | IRQ Stack 4 bytes |0x40007ED0 */
-/* .-------->|---------------------------------| */
-/* | SVC Stack 4 bytes |0x40007ECC */
-/* .-------->|---------------------------------| */
-/* . | |0x40007EC8 */
-/* . | stack area for user program | */
-/* . | | | */
-/* . | | | */
-/* . | | | */
-/* . | V | */
-/* . | | */
-/* . | | */
-/* . | | */
-/* . | free ram | */
-/* ram | | */
-/* . | | */
-/* . | | */
-/* . |.................................|0x40000234 <---------- _bss_end */
-/* . | | */
-/* . | .bss uninitialized variables | */
-/* . |.................................|0x40000218 <---------- _bss_start, _edata */
-/* . | | */
-/* . | .data initialized variables | */
-/* . | |0x40000200 <---------- _data */
-/* .-------->|---------------------------------| */
-/* . | variables used by |0x400001FF */
-/* ram_isp_low | Philips boot loader | */
-/* . | 223 bytes |0x40000120 */
-/* .-------->|---------------------------------| */
-/* . | |0x4000011F */
-/* ram_vectors | free ram | */
-/* . |---------------------------------|0x40000040 */
-/* . | |0x4000003F */
-/* . | Interrupt Vectors (re-mapped) | */
-/* . | 64 bytes |0x40000000 */
-/* .-------->|---------------------------------| */
-/* | | */
-/* */
-/* */
-/* */
-/* | | */
-/* .--------> |---------------------------------| */
-/* . | |0x0001FFFF */
-/* . | | */
-/* . | | */
-/* . | | */
-/* . | | */
-/* . | | */
-/* . | unused flash eprom | */
-/* . | | */
-/* . |.................................|0x0000032c */
-/* . | | */
-/* . | copy of .data area | */
-/* flash | | */
-/* . |---------------------------------|0x00000314 <----------- _etext */
-/* . | | */
-/* . | |0x00000180 main */
-/* . | |0x00000278 feed */
-/* . | main() |0x000002c4 FIQ_Routine */
-/* . | |0x000002d8 SWI_Routine */
-/* . | |0x000002ec UNDEF_Routine */
-/* . | |0x000002b0 IRQ_routine */
-/* . |---------------------------------|0x000001cc initialize */
-/* . | |0x000000D4 */
-/* . | Startup Code | */
-/* . | (assembler) | */
-/* . | | */
-/* . |---------------------------------|0x00000040 Reset_Handler */
-/* . | |0x0000003F */
-/* . | Interrupt Vector Table (unused) | */
-/* . | 64 bytes | */
-/* .--------->|---------------------------------|0x00000000 _startup *
-/* */
-/* */
-/* The easy way to prevent the linker from loading anything into a memory area is to define */
-/* a MEMORY region for it and then avoid assigning any .text, .data or .bss sections into it. */
-/* */
-/* */
-/* MEMORY */
-/* { */
-/* ram_isp_low(A) : ORIGIN = 0x40000120, LENGTH = 223 */
-/* */
-/* } */
-/* */
-/* */
-/* Author: James P. Lynch */
-/* */
-/* ****************************************************************************************************** */
-
-
-/* identify the Entry Point */
-
-ENTRY(_startup)
-
-
-
-/* specify the LPC2148 memory areas */
-
-MEMORY
-{
- flash : ORIGIN = 0x4000, LENGTH = 500K /* FLASH ROM */
- ram_isp_low(A) : ORIGIN = 0x40000120, LENGTH = 223 /* variables used by Philips ISP bootloader */
-/* ram : ORIGIN = 0x40000200, LENGTH = 32513 free RAM area */
- ram : ORIGIN = 0x40006000, LENGTH = 20513 /* free RAM area */
- ram_isp_high(A) : ORIGIN = 0x40007FE0, LENGTH = 32 /* variables used by Philips ISP bootloader */
- ram_usb_dma : ORIGIN = 0x7FD00000, LENGTH = 8192 /* on-chip USB DMA RAM area (not used) */
-}
-
-
-
-/* define a global symbol _stack_end */
-
-_stack_end = 0x40007EDC;
-
-
-
-/* now define the output sections */
-
-SECTIONS
-{
- . = 0x3000; /* set location counter to address zero */
-
- startup : { *(.startup)} >flash /* the startup code goes into FLASH */
-
-
-
- .text : /* collect all sections that should go into FLASH after startup */
- {
- *(.text) /* all .text sections (code) */
- *(.rodata) /* all .rodata sections (constants, strings, etc.) */
- *(.rodata*) /* all .rodata* sections (constants, strings, etc.) */
- *(.glue_7) /* all .glue_7 sections (no idea what these are) */
- *(.glue_7t) /* all .glue_7t sections (no idea what these are) */
- _etext = .; /* define a global symbol _etext just after the last code byte */
- } >flash /* put all the above into FLASH */
-
-
-
-
- .data : /* collect all initialized .data sections that go into RAM */
- {
- _data = .; /* create a global symbol marking the start of the .data section */
- *(.data) /* all .data sections */
- _edata = .; /* define a global symbol marking the end of the .data section */
- } >ram AT >flash /* put all the above into RAM (but load the LMA copy into FLASH) */
-
- .bss : /* collect all uninitialized .bss sections that go into RAM */
- {
- _bss_start = .; /* define a global symbol marking the start of the .bss section */
- *(.bss) /* all .bss sections */
- } >ram /* put all the above in RAM (it will be cleared in the startup code */
-
- . = ALIGN(4); /* advance location counter to the next 32-bit boundary */
- _bss_end = . ; /* define a global symbol marking the end of the .bss section */
-}
- _end = .; /* define a global symbol marking the end of application RAM */
-
diff --git a/sw/airborne/arch/lpc21/lpcusb/examples/lpc2148-rom.ld b/sw/airborne/arch/lpc21/lpcusb/examples/lpc2148-rom.ld
deleted file mode 100644
index 396ba0e5b0..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/examples/lpc2148-rom.ld
+++ /dev/null
@@ -1,197 +0,0 @@
-/* ****************************************************************************************************** */
-/* demo2148_blink_flash.cmd LINKER SCRIPT */
-/* */
-/* */
-/* The Linker Script defines how the code and data emitted by the GNU C compiler and assembler are */
-/* to be loaded into memory (code goes into FLASH, variables go into RAM). */
-/* */
-/* Any symbols defined in the Linker Script are automatically global and available to the rest of the */
-/* program. */
-/* */
-/* To force the linker to use this LINKER SCRIPT, just add the -T demo2148_blink_flash.cmd directive */
-/* to the linker flags in the makefile. */
-/* */
-/* LFLAGS = -Map main.map -nostartfiles -T demo2148_blink_flash.cmd */
-/* */
-/* */
-/* The Philips boot loader supports the ISP (In System Programming) via the serial port and the IAP */
-/* (In Application Programming) for flash programming from within your application. */
-/* */
-/* The boot loader uses RAM memory and we MUST NOT load variables or code in these areas. */
-/* */
-/* RAM used by boot loader: 0x40000120 - 0x400001FF (223 bytes) for ISP variables */
-/* 0x40007FE0 - 0x4000FFFF (32 bytes) for ISP and IAP variables */
-/* 0x40007EE0 - 0x40007FE0 (256 bytes) stack for ISP and IAP */
-/* */
-/* */
-/* MEMORY MAP */
-/* | |0x40008000 */
-/* .-------->|---------------------------------| */
-/* . | variables and stack |0x40007FFF */
-/* ram_isp_high | for Philips boot loader | */
-/* . | 32 + 256 = 288 bytes | */
-/* . | | */
-/* . | Do not put anything here |0x40007EE0 */
-/* .-------->|---------------------------------| */
-/* | UDF Stack 4 bytes |0x40007EDC <---------- _stack_end */
-/* .-------->|---------------------------------| */
-/* | ABT Stack 4 bytes |0x40007ED8 */
-/* .-------->|---------------------------------| */
-/* | FIQ Stack 4 bytes |0x40007ED4 */
-/* .-------->|---------------------------------| */
-/* | IRQ Stack 4 bytes |0x40007ED0 */
-/* .-------->|---------------------------------| */
-/* | SVC Stack 4 bytes |0x40007ECC */
-/* .-------->|---------------------------------| */
-/* . | |0x40007EC8 */
-/* . | stack area for user program | */
-/* . | | | */
-/* . | | | */
-/* . | | | */
-/* . | V | */
-/* . | | */
-/* . | | */
-/* . | | */
-/* . | free ram | */
-/* ram | | */
-/* . | | */
-/* . | | */
-/* . |.................................|0x40000234 <---------- _bss_end */
-/* . | | */
-/* . | .bss uninitialized variables | */
-/* . |.................................|0x40000218 <---------- _bss_start, _edata */
-/* . | | */
-/* . | .data initialized variables | */
-/* . | |0x40000200 <---------- _data */
-/* .-------->|---------------------------------| */
-/* . | variables used by |0x400001FF */
-/* ram_isp_low | Philips boot loader | */
-/* . | 223 bytes |0x40000120 */
-/* .-------->|---------------------------------| */
-/* . | |0x4000011F */
-/* ram_vectors | free ram | */
-/* . |---------------------------------|0x40000040 */
-/* . | |0x4000003F */
-/* . | Interrupt Vectors (re-mapped) | */
-/* . | 64 bytes |0x40000000 */
-/* .-------->|---------------------------------| */
-/* | | */
-/* */
-/* */
-/* */
-/* | | */
-/* .--------> |---------------------------------| */
-/* . | |0x0001FFFF */
-/* . | | */
-/* . | | */
-/* . | | */
-/* . | | */
-/* . | | */
-/* . | unused flash eprom | */
-/* . | | */
-/* . |.................................|0x0000032c */
-/* . | | */
-/* . | copy of .data area | */
-/* flash | | */
-/* . |---------------------------------|0x00000314 <----------- _etext */
-/* . | | */
-/* . | |0x00000180 main */
-/* . | |0x00000278 feed */
-/* . | main() |0x000002c4 FIQ_Routine */
-/* . | |0x000002d8 SWI_Routine */
-/* . | |0x000002ec UNDEF_Routine */
-/* . | |0x000002b0 IRQ_routine */
-/* . |---------------------------------|0x000001cc initialize */
-/* . | |0x000000D4 */
-/* . | Startup Code | */
-/* . | (assembler) | */
-/* . | | */
-/* . |---------------------------------|0x00000040 Reset_Handler */
-/* . | |0x0000003F */
-/* . | Interrupt Vector Table (unused) | */
-/* . | 64 bytes | */
-/* .--------->|---------------------------------|0x00000000 _startup *
-/* */
-/* */
-/* The easy way to prevent the linker from loading anything into a memory area is to define */
-/* a MEMORY region for it and then avoid assigning any .text, .data or .bss sections into it. */
-/* */
-/* */
-/* MEMORY */
-/* { */
-/* ram_isp_low(A) : ORIGIN = 0x40000120, LENGTH = 223 */
-/* */
-/* } */
-/* */
-/* */
-/* Author: James P. Lynch */
-/* */
-/* ****************************************************************************************************** */
-
-
-/* identify the Entry Point */
-
-ENTRY(_startup)
-
-
-
-/* specify the LPC2148 memory areas */
-
-MEMORY
-{
- flash : ORIGIN = 0, LENGTH = 512K /* FLASH ROM */
- ram_isp_low(A) : ORIGIN = 0x40000120, LENGTH = 223 /* variables used by Philips ISP bootloader */
- ram : ORIGIN = 0x40000200, LENGTH = 32513 /* free RAM area */
- ram_isp_high(A) : ORIGIN = 0x40007FE0, LENGTH = 32 /* variables used by Philips ISP bootloader */
- ram_usb_dma : ORIGIN = 0x7FD00000, LENGTH = 8192 /* on-chip USB DMA RAM area (not used) */
-}
-
-
-
-/* define a global symbol _stack_end */
-
-_stack_end = 0x40007EDC;
-
-
-
-/* now define the output sections */
-
-SECTIONS
-{
- . = 0; /* set location counter to address zero */
-
- startup : { *(.startup)} >flash /* the startup code goes into FLASH */
-
-
-
- .text : /* collect all sections that should go into FLASH after startup */
- {
- *(.text) /* all .text sections (code) */
- *(.rodata) /* all .rodata sections (constants, strings, etc.) */
- *(.rodata*) /* all .rodata* sections (constants, strings, etc.) */
- *(.glue_7) /* all .glue_7 sections (no idea what these are) */
- *(.glue_7t) /* all .glue_7t sections (no idea what these are) */
- _etext = .; /* define a global symbol _etext just after the last code byte */
- } >flash /* put all the above into FLASH */
-
-
-
-
- .data : /* collect all initialized .data sections that go into RAM */
- {
- _data = .; /* create a global symbol marking the start of the .data section */
- *(.data) /* all .data sections */
- _edata = .; /* define a global symbol marking the end of the .data section */
- } >ram AT >flash /* put all the above into RAM (but load the LMA copy into FLASH) */
-
- .bss : /* collect all uninitialized .bss sections that go into RAM */
- {
- _bss_start = .; /* define a global symbol marking the start of the .bss section */
- *(.bss) /* all .bss sections */
- } >ram /* put all the above in RAM (it will be cleared in the startup code */
-
- . = ALIGN(4); /* advance location counter to the next 32-bit boundary */
- _bss_end = . ; /* define a global symbol marking the end of the .bss section */
-}
- _end = .; /* define a global symbol marking the end of application RAM */
-
diff --git a/sw/airborne/arch/lpc21/lpcusb/examples/main_msc.c b/sw/airborne/arch/lpc21/lpcusb/examples/main_msc.c
deleted file mode 100644
index 99f0abd006..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/examples/main_msc.c
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
- Connects a microSD card to the SPI port of the Paparazzi Tiny. Keep cables
- short, microSD card can be directly soldered to Molex cable. For now only
- non SDHC SD cards (<= 2GB) are supported. martinmm@pfump.org
-
- microSD TinyV2 SPI J3
- 8 nc
- 7 DO 5 MISO
- 6 GND 1 GND
- 5 CLK 7 SCK
- 4 Vcc 2 +3V3
- 3 DI 4 MOSI
- 2 CS 3 SSEL
- 1 nc
-
- Looking onto the gold plated connector side of the microSD card:
-
- ---------------
- I 8
- I 7
- I 6
- I 5
- I 4
- I 3
- I 2
- I 1
- ------ --
- \ I \
- -- --
-
-*/
-
-#include "type.h"
-#include "usbdebug.h"
-
-#include "console.h"
-#include "usbapi.h"
-#include "startup.h"
-
-#include "msc_bot.h"
-#include "blockdev.h"
-
-#define BAUD_RATE 115200
-
-#define MAX_PACKET_SIZE 64
-
-#define LE_WORD(x) ((x)&0xFF),((x)>>8)
-
-
-static U8 abClassReqData[4];
-
-static const U8 abDescriptors[] = {
-
-// device descriptor
- 0x12,
- DESC_DEVICE,
- LE_WORD(0x0200), // bcdUSB
- 0x00, // bDeviceClass
- 0x00, // bDeviceSubClass
- 0x00, // bDeviceProtocol
- MAX_PACKET_SIZE0, // bMaxPacketSize
- LE_WORD(0x7070), // idVendor
- LE_WORD(0x1235), // idProduct
- LE_WORD(0x0100), // bcdDevice
- 0x01, // iManufacturer
- 0x02, // iProduct
- 0x03, // iSerialNumber
- 0x01, // bNumConfigurations
-
-// configuration descriptor
- 0x09,
- DESC_CONFIGURATION,
- LE_WORD(32), // wTotalLength
- 0x01, // bNumInterfaces
- 0x01, // bConfigurationValue
- 0x00, // iConfiguration
- 0xC0, // bmAttributes
- 0x32, // bMaxPower
-
-// interface
- 0x09,
- DESC_INTERFACE,
- 0x00, // bInterfaceNumber
- 0x00, // bAlternateSetting
- 0x02, // bNumEndPoints
- 0x08, // bInterfaceClass = mass storage
- 0x06, // bInterfaceSubClass = transparent SCSI
- 0x50, // bInterfaceProtocol = BOT
- 0x00, // iInterface
-// EP
- 0x07,
- DESC_ENDPOINT,
- MSC_BULK_IN_EP, // bEndpointAddress
- 0x02, // bmAttributes = bulk
- LE_WORD(MAX_PACKET_SIZE),// wMaxPacketSize
- 0x00, // bInterval
-// EP
- 0x07,
- DESC_ENDPOINT,
- MSC_BULK_OUT_EP, // bEndpointAddress
- 0x02, // bmAttributes = bulk
- LE_WORD(MAX_PACKET_SIZE),// wMaxPacketSize
- 0x00, // bInterval
-
-// string descriptors
- 0x04,
- DESC_STRING,
- LE_WORD(0x0409),
-
- 0x0E,
- DESC_STRING,
- 'L', 0, 'P', 0, 'C', 0, 'U', 0, 'S', 0, 'B', 0,
-
- 0x14,
- DESC_STRING,
- 'S', 0, 'D', 0, '-', 0, 'R', 0, 'e', 0, 'a', 0, 'd', 0, 'e', 0, 'r', 0,
-
- 0x1A,
- DESC_STRING,
- 'D', 0, 'E', 0, 'A', 0, 'D', 0, 'C', 0, '0', 0, 'D', 0, 'E', 0, 'C', 0, 'A', 0, 'F', 0, 'E', 0,
-
-// terminating zero
- 0
-};
-
-
-/*************************************************************************
- HandleClassRequest
- ==================
- Handle mass storage class request
-
-**************************************************************************/
-static BOOL HandleClassRequest(TSetupPacket *pSetup, int *piLen, U8 **ppbData)
-{
- if (pSetup->wIndex != 0) {
- DBG("Invalid idx %X\n", pSetup->wIndex);
- return FALSE;
- }
- if (pSetup->wValue != 0) {
- DBG("Invalid val %X\n", pSetup->wValue);
- return FALSE;
- }
-
- switch (pSetup->bRequest) {
-
- // get max LUN
- case 0xFE:
- *ppbData[0] = 0; // No LUNs
- *piLen = 1;
- break;
-
- // MSC reset
- case 0xFF:
- if (pSetup->wLength > 0) {
- return FALSE;
- }
- MSCBotReset();
- break;
-
- default:
- DBG("Unhandled class\n");
- return FALSE;
- }
- return TRUE;
-}
-
-
-/*************************************************************************
- main
- ====
-**************************************************************************/
-int main(void)
-{
- // PLL and MAM
- Initialize();
-
- // init DBG
- ConsoleInit(60000000 / (16 * BAUD_RATE));
-
- // initialise the SD card
- BlockDevInit();
-
- DBG("Initialising USB stack\n");
-
- // initialise stack
- USBInit();
-
- // enable bulk-in interrupts on NAKs
- // these are required to get the BOT protocol going again after a STALL
- USBHwNakIntEnable(INACK_BI);
-
- // register descriptors
- USBRegisterDescriptors(abDescriptors);
-
- // register class request handler
- USBRegisterRequestHandler(REQTYPE_TYPE_CLASS, HandleClassRequest, abClassReqData);
-
- // register endpoint handlers
- USBHwRegisterEPIntHandler(MSC_BULK_IN_EP, MSCBotBulkIn);
- USBHwRegisterEPIntHandler(MSC_BULK_OUT_EP, MSCBotBulkOut);
-
- DBG("Starting USB communication\n");
-
- // connect to bus
- USBHwConnect(TRUE);
-
- // call USB interrupt handler continuously
- while (1) {
- USBHwISR();
- }
-
- return 0;
-}
-
diff --git a/sw/airborne/arch/lpc21/lpcusb/examples/msc_bot.c b/sw/airborne/arch/lpc21/lpcusb/examples/msc_bot.c
deleted file mode 100644
index cf725a84d1..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/examples/msc_bot.c
+++ /dev/null
@@ -1,403 +0,0 @@
-/*
- LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/** @file
-
- Bulk-only-transfer layer for mass storage.
-
- This layers sits between the generic USB layers and the SCSI layer
- and performs data transfer according to the BOT protocol.
-*/
-
-#include
-
-#include "type.h"
-#include "usbdebug.h"
-#include "usbapi.h"
-
-#include "msc_bot.h"
-#include "msc_scsi.h"
-
-
-/** Command block wrapper structure */
-typedef struct {
- U32 dwCBWSignature;
- U32 dwCBWTag;
- U32 dwCBWDataTransferLength;
- U8 bmCBWFlags;
- U8 bCBWLun;
- U8 bCBWCBLength;
- U8 CBWCB[16];
-} TCBW;
-
-/** Command status wrapper structure */
-typedef struct {
- U32 dwCSWSignature;
- U32 dwCSWTag;
- U32 dwCSWDataResidue;
- U8 bmCSWStatus;
-} TCSW;
-
-/** States of BOT state machine */
-typedef enum {
- eCBW,
- eDataOut,
- eDataIn,
- eCSW,
- eStalled
-} EBotState;
-
-
-#define CBW_SIGNATURE 0x43425355 /**< magic word in CBW */
-#define CSW_SIGNATURE 0x53425355 /**< magic word in CSW */
-
-#define STATUS_PASSED 0x00 /**< successful transfer */
-#define STATUS_FAILED 0x01 /**< failed transfer */
-#define STATUS_PHASE_ERR 0x02 /**< conflict between host and device */
-
-static U32 dwTransferSize; /**< total size of data transfer */
-static U32 dwOffset; /**< offset in current data transfer */
-
-static TCBW CBW;
-static TCSW CSW;
-
-static EBotState eState;
-
-static U8 *pbData;
-
-
-
-/**
- Resets the BOT state machine
- */
-void MSCBotReset(void)
-{
- DBG("BOT reset in state %d\n", eState);
- // reset BOT state
- eState = eCBW;
- // reset SCSI
- SCSIReset();
-}
-
-
-/**
- Prepares a CSW, to be sent on next bulk-IN interrupt
-
- @param [in] bStatus CSW status
- */
-static void SendCSW(U8 bStatus)
-{
- int iResidue;
-
- iResidue = CBW.dwCBWDataTransferLength - dwTransferSize;
-
- // construct CSW
- CSW.dwCSWSignature = CSW_SIGNATURE;
- CSW.dwCSWTag = CBW.dwCBWTag;
- CSW.dwCSWDataResidue = MAX(iResidue, 0);
- CSW.bmCSWStatus = bStatus;
-
- DBG("CSW: status=%x, residue=%d\n", bStatus, CSW.dwCSWDataResidue);
-
- // next state
- eState = eCSW;
-}
-
-
-/**
- Checks if CBW is valid and meaningful
-
- @param [in] pCBW Command block wrapper
- @param [in] iLen Length of CBW
-
- @return TRUE if valid and meaningful
- */
-static BOOL CheckCBW(TCBW *pCBW, int iLen)
-{
- // CBW valid?
- if (iLen != 31) {
- DBG("Invalid length (%d)\n", iLen);
- return FALSE;
- }
- if (pCBW->dwCBWSignature != CBW_SIGNATURE) {
- DBG("Invalid signature %x\n", pCBW->dwCBWSignature);
- return FALSE;
- }
-
- // CBW meaningful?
- if (pCBW->bCBWLun != 0) {
- DBG("Invalid LUN %d\n", pCBW->bCBWLun);
- return FALSE;
- }
- if ((pCBW->bCBWCBLength < 1) || (pCBW->bCBWCBLength > 16)) {
- DBG("Invalid CB len %d\n", pCBW->bCBWCBLength);
- return FALSE;
- }
- return TRUE;
-}
-
-
-/*************************************************************************
- BOTStall
- ========
- Local function to stall ongoing transfer
-
- Which endpoint to stall is determined by looking at the transfer
- direction intended by the host.
-
-**************************************************************************/
-static void BOTStall(void)
-{
- if ((CBW.bmCBWFlags & 0x80) || (CBW.dwCBWDataTransferLength == 0)) {
- // stall data-in or CSW
- USBHwEPStall(MSC_BULK_IN_EP, TRUE);
- }
- else {
- // stall data-out
- USBHwEPStall(MSC_BULK_OUT_EP, TRUE);
- }
-}
-
-
-/*************************************************************************
- HandleDataIn
- ============
- Handles data from device-to-host
-
-**************************************************************************/
-static void HandleDataIn(void)
-{
- int iChunk;
-
- // process data for host in SCSI layer
- pbData = SCSIHandleData(CBW.CBWCB, CBW.bCBWCBLength, pbData, dwOffset);
- if (pbData == NULL) {
- BOTStall();
- SendCSW(STATUS_FAILED);
- return;
- }
-
- // send data to host?
- if (dwOffset < dwTransferSize) {
- iChunk = MIN(64, dwTransferSize - dwOffset);
- USBHwEPWrite(MSC_BULK_IN_EP, pbData, iChunk);
- dwOffset += iChunk;
- }
-
- // are we done now?
- if (dwOffset == dwTransferSize) {
- if (dwOffset != CBW.dwCBWDataTransferLength) {
- // stall pipe
- DBG("stalling DIN");
- BOTStall();
- }
- // done
- SendCSW(STATUS_PASSED);
- }
-}
-
-
-/*************************************************************************
- HandleDataOut
- =============
- Handles data from host-to-device
-
-**************************************************************************/
-static void HandleDataOut(void)
-{
- int iChunk;
-
- if (dwOffset < dwTransferSize) {
- // get data from host
- iChunk = USBHwEPRead(MSC_BULK_OUT_EP, pbData, dwTransferSize - dwOffset);
- // process data in SCSI layer
- pbData = SCSIHandleData(CBW.CBWCB, CBW.bCBWCBLength, pbData, dwOffset);
- if (pbData == NULL) {
- BOTStall();
- SendCSW(STATUS_FAILED);
- return;
- }
- dwOffset += iChunk;
- }
-
- // are we done now?
- if (dwOffset == dwTransferSize) {
- if (dwOffset != CBW.dwCBWDataTransferLength) {
- // stall pipe
- DBG("stalling DOUT");
- BOTStall();
- }
- SendCSW(STATUS_PASSED);
- }
-}
-
-
-/**
- Handles the BOT bulk OUT endpoint
-
- @param [in] bEP Endpoint number
- @param [in] bEPStatus Endpoint status (indicates NAK, STALL, etc)
-
- */
-void MSCBotBulkOut(U8 bEP, U8 bEPStatus)
-{
- int iLen, iChunk;
- BOOL fHostIn, fDevIn;
-
- // ignore events on stalled EP
- if (bEPStatus & EP_STATUS_STALLED) {
- return;
- }
-
- switch (eState) {
-
- case eCBW:
- iLen = USBHwEPRead(bEP, (U8 *)&CBW, sizeof(CBW));
-
- // check if we got a good CBW
- if (!CheckCBW(&CBW, iLen)) {
- // see 6.6.1
- USBHwEPStall(MSC_BULK_IN_EP, TRUE);
- USBHwEPStall(MSC_BULK_OUT_EP, TRUE);
- eState = eStalled;
- break;
- }
-
- DBG("CBW: len=%d, flags=%x, cmd=%x, cmdlen=%d\n",
- CBW.dwCBWDataTransferLength, CBW.bmCBWFlags, CBW.CBWCB[0], CBW.bCBWCBLength);
-
- dwOffset = 0;
- dwTransferSize = 0;
- fHostIn = ((CBW.bmCBWFlags & 0x80) != 0);
-
- // verify request
- pbData = SCSIHandleCmd(CBW.CBWCB, CBW.bCBWCBLength, &iLen, &fDevIn);
- if (pbData == NULL) {
- // unknown command
- BOTStall();
- SendCSW(STATUS_FAILED);
- break;
- }
-
- // rule: if device and host disagree on direction, send CSW with status 2
- if ((iLen > 0) &&
- ((fHostIn && !fDevIn) ||
- (!fHostIn && fDevIn))) {
- DBG("Host and device disagree on direction\n");
- BOTStall();
- SendCSW(STATUS_PHASE_ERR);
- break;
- }
-
- // rule: if D > H, send CSW with status 2
- if (iLen > CBW.dwCBWDataTransferLength) {
- DBG("Negative residue\n");
- BOTStall();
- SendCSW(STATUS_PHASE_ERR);
- break;
- }
-
- dwTransferSize = iLen;
- if ((dwTransferSize == 0) || fDevIn) {
- // data from device-to-host
- eState = eDataIn;
- HandleDataIn();
- }
- else {
- // data from host-to-device
- eState = eDataOut;
- }
- break;
-
- case eDataOut:
- HandleDataOut();
- break;
-
- case eDataIn:
- case eCSW:
- iChunk = USBHwEPRead(bEP, NULL, 0);
- DBG("Phase error in state %d, %d bytes\n", eState, iChunk);
- eState = eCBW;
- break;
-
- case eStalled:
- // keep stalling
- USBHwEPStall(MSC_BULK_OUT_EP, TRUE);
- break;
-
- default:
- DBG("Invalid state %d\n", eState);
- ASSERT(FALSE);
- break;
- }
-}
-
-
-/**
- Handles the BOT bulk IN endpoint
-
- @param [in] bEP Endpoint number
- @param [in] bEPStatus Endpoint status (indicates NAK, STALL, etc)
-
- */
-void MSCBotBulkIn(U8 bEP, U8 bEPStatus)
-{
- // ignore events on stalled EP
- if (bEPStatus & EP_STATUS_STALLED) {
- return;
- }
-
- switch (eState) {
-
- case eCBW:
- case eDataOut:
- // ignore possibly old ACKs
- break;
-
- case eDataIn:
- HandleDataIn();
- break;
-
- case eCSW:
- // wait for an IN token, then send the CSW
- USBHwEPWrite(MSC_BULK_IN_EP, (U8 *)&CSW, 13);
- eState = eCBW;
- break;
-
- case eStalled:
- // keep stalling
- USBHwEPStall(MSC_BULK_IN_EP, TRUE);
- break;
-
- default:
- DBG("Invalid state %d\n", eState);
- ASSERT(FALSE);
- break;
- }
-}
-
-
diff --git a/sw/airborne/arch/lpc21/lpcusb/examples/msc_bot.h b/sw/airborne/arch/lpc21/lpcusb/examples/msc_bot.h
deleted file mode 100644
index c62798e817..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/examples/msc_bot.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include "type.h"
-
-#define MSC_BULK_OUT_EP 0x02
-#define MSC_BULK_IN_EP 0x85
-
-void MSCBotReset(void);
-void MSCBotBulkOut(U8 bEP, U8 bEPStatus);
-void MSCBotBulkIn(U8 bEP, U8 bEPStatus);
-
diff --git a/sw/airborne/arch/lpc21/lpcusb/examples/msc_scsi.c b/sw/airborne/arch/lpc21/lpcusb/examples/msc_scsi.c
deleted file mode 100644
index ba9282b03d..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/examples/msc_scsi.c
+++ /dev/null
@@ -1,354 +0,0 @@
-/*
- LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/**
- @file
-
- This is the SCSI layer of the USB mass storage application example.
- This layer depends directly on the blockdev layer.
-
- Windows peculiarities:
- * Size of REQUEST SENSE CDB is 12 bytes instead of expected 6
- * Windows requires VERIFY(10) command to do a format.
- This command is not mandatory in the SBC/SBC-2 specification.
-*/
-
-
-#include // memcpy
-
-#include "type.h"
-#include "usbdebug.h"
-
-#include "blockdev.h"
-#include "msc_scsi.h"
-
-
-#define BLOCKSIZE 512
-
-// SBC2 mandatory SCSI commands
-#define SCSI_CMD_TEST_UNIT_READY 0x00
-#define SCSI_CMD_REQUEST_SENSE 0x03
-#define SCSI_CMD_FORMAT_UNIT 0x04
-#define SCSI_CMD_READ_6 0x08 /* not implemented yet */
-#define SCSI_CMD_INQUIRY 0x12
-#define SCSI_CMD_SEND_DIAGNOSTIC 0x1D /* not implemented yet */
-#define SCSI_CMD_READ_CAPACITY_10 0x25
-#define SCSI_CMD_READ_10 0x28
-#define SCSI_CMD_REPORT_LUNS 0xA0 /* not implemented yet */
-
-// SBC2 optional SCSI commands
-#define SCSI_CMD_WRITE_6 0x0A /* not implemented yet */
-#define SCSI_CMD_WRITE_10 0x2A
-#define SCSI_CMD_VERIFY_10 0x2F /* required for windows format */
-
-// sense codes
-#define WRITE_ERROR 0x030C00
-#define READ_ERROR 0x031100
-#define INVALID_CMD_OPCODE 0x052000
-#define INVALID_FIELD_IN_CDB 0x052400
-
-// Sense code, which is set on error conditions
-static U32 dwSense; // hex: 00aabbcc, where aa=KEY, bb=ASC, cc=ASCQ
-
-U8 abInquiry[] = {
- 0x00, // PDT = direct-access device
- 0x80, // removeable medium bit = set
- 0x05, // version = complies to SPC3
- 0x02, // response data format = SPC3
- 0x1F, // additional length
- 0x00,
- 0x00,
- 0x00,
- 'L','P','C','U','S','B',' ',' ', // vendor
- 'M','a','s','s',' ','s','t','o', // product
- 'r','a','g','e',' ',' ',' ',' ',
- '0','.','1',' ' // revision
-};
-
-// Data for "request sense" command. The 0xFF are filled in later
-static const U8 abSense[] = { 0x70, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x0A,
- 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
- 0x00, 0x00 };
-
-// Buffer for holding one block of disk data
-static U8 abBlockBuf[512];
-
-
-typedef struct {
- U8 bOperationCode;
- U8 abLBA[3];
- U8 bLength;
- U8 bControl;
-} TCDB6;
-
-
-/*************************************************************************
- SCSIReset
- =========
- Resets any SCSI state
-
-**************************************************************************/
-void SCSIReset(void)
-{
- dwSense = 0;
-}
-
-
-/*************************************************************************
- SCSIHandleCmd
- =============
- Verifies a SCSI CDB and indicates the direction and amount of data
- that the device wants to transfer.
-
- If this call fails, a sense code is set in dwSense.
-
- IN pbCDB Command data block
- iCDBLen Command data block len
- OUT *piRspLen Length of intended response data:
- *pfDevIn TRUE if data is transferred from device-to-host
-
- Returns a pointer to the data exchange buffer if successful,
- return NULL otherwise.
-**************************************************************************/
-U8 * SCSIHandleCmd(U8 *pbCDB, U8 iCDBLen, int *piRspLen, BOOL *pfDevIn)
-{
- static const U8 aiCDBLen[] = {6, 10, 10, 0, 16, 12, 0, 0};
- int i;
- TCDB6 *pCDB;
- U32 dwLen, dwLBA;
- U8 bGroupCode;
-
- pCDB = (TCDB6 *)pbCDB;
-
- // default direction is from device to host
- *pfDevIn = TRUE;
-
- // check CDB length
- bGroupCode = (pCDB->bOperationCode >> 5) & 0x7;
- if (iCDBLen < aiCDBLen[bGroupCode]) {
- DBG("Invalid CBD len (expected %d)!\n", aiCDBLen[bGroupCode]);
- return NULL;
- }
-
- switch (pCDB->bOperationCode) {
-
- // test unit ready (6)
- case SCSI_CMD_TEST_UNIT_READY:
- DBG("TEST UNIT READY\n");
- *piRspLen = 0;
- break;
-
- // request sense (6)
- case SCSI_CMD_REQUEST_SENSE:
- DBG("REQUEST SENSE (%06X)\n", dwSense);
- // check params
- *piRspLen = MIN(18, pCDB->bLength);
- break;
-
- case SCSI_CMD_FORMAT_UNIT:
- DBG("FORMAT UNIT %02X\n", pbCDB[1]);
- *piRspLen = 0;
- break;
-
- // inquiry (6)
- case SCSI_CMD_INQUIRY:
- DBG("INQUIRY\n");
- // see SPC3r23, 4.3.4.6
- *piRspLen = MIN(36, pCDB->bLength);
- break;
-
- // read capacity (10)
- case SCSI_CMD_READ_CAPACITY_10:
- DBG("READ CAPACITY\n");
- *piRspLen = 8;
- break;
-
- // read (10)
- case SCSI_CMD_READ_10:
- dwLBA = (pbCDB[2] << 24) | (pbCDB[3] << 16) | (pbCDB[4] << 8) | (pbCDB[5]);
- dwLen = (pbCDB[7] << 8) | pbCDB[8];
- DBG("READ10, LBA=%d, len=%d\n", dwLBA, dwLen);
- *piRspLen = dwLen * BLOCKSIZE;
- break;
-
- // write (10)
- case SCSI_CMD_WRITE_10:
- dwLBA = (pbCDB[2] << 24) | (pbCDB[3] << 16) | (pbCDB[4] << 8) | (pbCDB[5]);
- dwLen = (pbCDB[7] << 8) | pbCDB[8];
- DBG("WRITE10, LBA=%d, len=%d\n", dwLBA, dwLen);
- *piRspLen = dwLen * BLOCKSIZE;
- *pfDevIn = FALSE;
- break;
-
- case SCSI_CMD_VERIFY_10:
- DBG("VERIFY10\n");
- if ((pbCDB[1] & (1 << 1)) != 0) {
- // we don't support BYTCHK
- DBG("BYTCHK not supported\n");
- return NULL;
- }
- *piRspLen = 0;
- break;
-
- default:
- DBG("Unhandled SCSI: ");
- for (i = 0; i < iCDBLen; i++) {
- DBG(" %02X", pbCDB[i]);
- }
- DBG("\n");
- // unsupported command
- dwSense = INVALID_CMD_OPCODE;
- *piRspLen = 0;
- return NULL;
- }
-
-
- return abBlockBuf;
-}
-
-
-/*************************************************************************
- SCSIHandleData
- ==============
- Handles a block of SCSI data.
-
- IN pbCDB Command data block
- iCDBLen Command data block len
- IN/OUT pbData Data buffer
- IN dwOffset Offset in data
-
- Returns a pointer to the next data to be exchanged if successful,
- returns NULL otherwise.
-**************************************************************************/
-U8 * SCSIHandleData(U8 *pbCDB, U8 iCDBLen, U8 *pbData, U32 dwOffset)
-{
- TCDB6 *pCDB;
- U32 dwLBA;
- U32 dwBufPos, dwBlockNr;
- U32 dwDevSize, dwMaxBlock;
-
- pCDB = (TCDB6 *)pbCDB;
-
- switch (pCDB->bOperationCode) {
-
- // test unit ready
- case SCSI_CMD_TEST_UNIT_READY:
- if (dwSense != 0) {
- return NULL;
- }
- break;
-
- // request sense
- case SCSI_CMD_REQUEST_SENSE:
- memcpy(pbData, abSense, 18);
- // fill in KEY/ASC/ASCQ
- pbData[2] = (dwSense >> 16) & 0xFF;
- pbData[12] = (dwSense >> 8) & 0xFF;
- pbData[13] = (dwSense >> 0) & 0xFF;
- // reset sense data
- dwSense = 0;
- break;
-
- case SCSI_CMD_FORMAT_UNIT:
- // nothing to do, ignore this command
- break;
-
- // inquiry
- case SCSI_CMD_INQUIRY:
- memcpy(pbData, abInquiry, sizeof(abInquiry));
- break;
-
- // read capacity
- case SCSI_CMD_READ_CAPACITY_10:
- // get size of drive (bytes)
- BlockDevGetSize(&dwDevSize);
- // calculate highest LBA
- dwMaxBlock = (dwDevSize - 1) / 512;
-
- pbData[0] = (dwMaxBlock >> 24) & 0xFF;
- pbData[1] = (dwMaxBlock >> 16) & 0xFF;
- pbData[2] = (dwMaxBlock >> 8) & 0xFF;
- pbData[3] = (dwMaxBlock >> 0) & 0xFF;
- pbData[4] = (BLOCKSIZE >> 24) & 0xFF;
- pbData[5] = (BLOCKSIZE >> 16) & 0xFF;
- pbData[6] = (BLOCKSIZE >> 8) & 0xFF;
- pbData[7] = (BLOCKSIZE >> 0) & 0xFF;
- break;
-
- // read10
- case SCSI_CMD_READ_10:
- dwLBA = (pbCDB[2] << 24) | (pbCDB[3] << 16) | (pbCDB[4] << 8) | (pbCDB[5]);
-
- // copy data from block buffer
- dwBufPos = (dwOffset & (BLOCKSIZE - 1));
- if (dwBufPos == 0) {
- // read new block
- dwBlockNr = dwLBA + (dwOffset / BLOCKSIZE);
- DBG("R");
- if (BlockDevRead(dwBlockNr, abBlockBuf) < 0) {
- dwSense = READ_ERROR;
- DBG("BlockDevRead failed\n");
- return NULL;
- }
- }
- // return pointer to data
- return abBlockBuf + dwBufPos;
-
- // write10
- case SCSI_CMD_WRITE_10:
- dwLBA = (pbCDB[2] << 24) | (pbCDB[3] << 16) | (pbCDB[4] << 8) | (pbCDB[5]);
-
- // copy data to block buffer
- dwBufPos = ((dwOffset + 64) & (BLOCKSIZE - 1));
- if (dwBufPos == 0) {
- // write new block
- dwBlockNr = dwLBA + (dwOffset / BLOCKSIZE);
- DBG("W");
- if (BlockDevWrite(dwBlockNr, abBlockBuf) < 0) {
- dwSense = WRITE_ERROR;
- DBG("BlockDevWrite failed\n");
- return NULL;
- }
- }
- // return pointer to next data
- return abBlockBuf + dwBufPos;
-
- case SCSI_CMD_VERIFY_10:
- // dummy implementation
- break;
-
- default:
- // unsupported command
- dwSense = INVALID_CMD_OPCODE;
- return NULL;
- }
-
- // default: return pointer to start of block buffer
- return abBlockBuf;
-}
-
-
diff --git a/sw/airborne/arch/lpc21/lpcusb/examples/msc_scsi.h b/sw/airborne/arch/lpc21/lpcusb/examples/msc_scsi.h
deleted file mode 100644
index 38a07ed179..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/examples/msc_scsi.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include "type.h"
-
-void SCSIReset(void);
-U8 * SCSIHandleCmd(U8 *pbCDB, U8 bCDBLen, int *piRspLen, BOOL *pfDevIn);
-U8 * SCSIHandleData(U8 *pbCDB, U8 bCDBLen, U8 *pbData, U32 dwOffset);
diff --git a/sw/airborne/arch/lpc21/lpcusb/examples/printf.c b/sw/airborne/arch/lpc21/lpcusb/examples/printf.c
deleted file mode 100644
index 2ec4ef47f8..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/examples/printf.c
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- Copyright 2001, 2002 Georges Menie (www.menie.org)
- stdarg version contributed by Christian Ettinger
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-/*
- putchar is the only external dependency for this file,
- if you have a working putchar, leave it commented out.
- If not, uncomment the define below and
- replace outbyte(c) by your own function call.
-
-#define putchar(c) outbyte(c)
-*/
-
-#include
-#include "console.h"
-
-
-static void printchar(char **str, int c)
-{
- if (str) {
- **str = c;
- ++(*str);
- }
- else {
- putchar(c);
- }
-}
-
-#define PAD_RIGHT 1
-#define PAD_ZERO 2
-
-static int prints(char **out, const char *string, int width, int pad)
-{
- register int pc = 0, padchar = ' ';
-
- if (width > 0) {
- register int len = 0;
- register const char *ptr;
- for (ptr = string; *ptr; ++ptr) ++len;
- if (len >= width) width = 0;
- else width -= len;
- if (pad & PAD_ZERO) padchar = '0';
- }
- if (!(pad & PAD_RIGHT)) {
- for ( ; width > 0; --width) {
- printchar (out, padchar);
- ++pc;
- }
- }
- for ( ; *string ; ++string) {
- printchar (out, *string);
- ++pc;
- }
- for ( ; width > 0; --width) {
- printchar (out, padchar);
- ++pc;
- }
-
- return pc;
-}
-
-/* the following should be enough for 32 bit int */
-#define PRINT_BUF_LEN 12
-
-static int printi(char **out, int i, int b, int sg, int width, int pad, int letbase)
-{
- char print_buf[PRINT_BUF_LEN];
- register char *s;
- register int t, neg = 0, pc = 0;
- register unsigned int u = i;
-
- if (i == 0) {
- print_buf[0] = '0';
- print_buf[1] = '\0';
- return prints (out, print_buf, width, pad);
- }
-
- if (sg && b == 10 && i < 0) {
- neg = 1;
- u = -i;
- }
-
- s = print_buf + PRINT_BUF_LEN-1;
- *s = '\0';
-
- while (u) {
- t = u % b;
- if( t >= 10 )
- t += letbase - '0' - 10;
- *--s = t + '0';
- u /= b;
- }
-
- if (neg) {
- if( width && (pad & PAD_ZERO) ) {
- printchar (out, '-');
- ++pc;
- --width;
- }
- else {
- *--s = '-';
- }
- }
-
- return pc + prints (out, s, width, pad);
-}
-
-static int print(char **out, const char *format, va_list args )
-{
- register int width, pad;
- register int pc = 0;
- char scr[2];
-
- for (; *format != 0; ++format) {
- if (*format == '%') {
- ++format;
- width = pad = 0;
- if (*format == '\0') break;
- if (*format == '%') goto out;
- if (*format == '-') {
- ++format;
- pad = PAD_RIGHT;
- }
- while (*format == '0') {
- ++format;
- pad |= PAD_ZERO;
- }
- for ( ; *format >= '0' && *format <= '9'; ++format) {
- width *= 10;
- width += *format - '0';
- }
- if( *format == 's' ) {
- register char *s = (char *)va_arg( args, int );
- pc += prints (out, s?s:"(null)", width, pad);
- continue;
- }
- if( *format == 'd' ) {
- pc += printi (out, va_arg( args, int ), 10, 1, width, pad, 'a');
- continue;
- }
- if( *format == 'x' ) {
- pc += printi (out, va_arg( args, int ), 16, 0, width, pad, 'a');
- continue;
- }
- if( *format == 'X' ) {
- pc += printi (out, va_arg( args, int ), 16, 0, width, pad, 'A');
- continue;
- }
- if( *format == 'u' ) {
- pc += printi (out, va_arg( args, int ), 10, 0, width, pad, 'a');
- continue;
- }
- if( *format == 'c' ) {
- /* char are converted to int then pushed on the stack */
- scr[0] = (char)va_arg( args, int );
- scr[1] = '\0';
- pc += prints (out, scr, width, pad);
- continue;
- }
- }
- else {
- out:
- printchar (out, *format);
- ++pc;
- }
- }
- if (out) **out = '\0';
- va_end( args );
- return pc;
-}
-
-int printf(const char *format, ...)
-{
- va_list args;
-
- va_start( args, format );
- return print( 0, format, args );
-}
-
-int sprintf(char *out, const char *format, ...)
-{
- va_list args;
-
- va_start( args, format );
- return print( &out, format, args );
-}
-
-#ifdef TEST_PRINTF
-int main(void)
-{
- char *ptr = "Hello world!";
- char *np = 0;
- int i = 5;
- unsigned int bs = sizeof(int)*8;
- int mi;
- char buf[80];
-
- mi = (1 << (bs-1)) + 1;
- printf("%s\n", ptr);
- printf("printf test\n");
- printf("%s is null pointer\n", np);
- printf("%d = 5\n", i);
- printf("%d = - max int\n", mi);
- printf("char %c = 'a'\n", 'a');
- printf("hex %x = ff\n", 0xff);
- printf("hex %02x = 00\n", 0);
- printf("signed %d = unsigned %u = hex %x\n", -3, -3, -3);
- printf("%d %s(s)%", 0, "message");
- printf("\n");
- printf("%d %s(s) with %%\n", 0, "message");
- sprintf(buf, "justif: \"%-10s\"\n", "left"); printf("%s", buf);
- sprintf(buf, "justif: \"%10s\"\n", "right"); printf("%s", buf);
- sprintf(buf, " 3: %04d zero padded\n", 3); printf("%s", buf);
- sprintf(buf, " 3: %-4d left justif.\n", 3); printf("%s", buf);
- sprintf(buf, " 3: %4d right justif.\n", 3); printf("%s", buf);
- sprintf(buf, "-3: %04d zero padded\n", -3); printf("%s", buf);
- sprintf(buf, "-3: %-4d left justif.\n", -3); printf("%s", buf);
- sprintf(buf, "-3: %4d right justif.\n", -3); printf("%s", buf);
-
- return 0;
-}
-
-/*
- * if you compile this file with
- * gcc -Wall $(YOUR_C_OPTIONS) -DTEST_PRINTF -c printf.c
- * you will get a normal warning:
- * printf.c:214: warning: spurious trailing `%' in format
- * this line is testing an invalid % at the end of the format string.
- *
- * this should display (on 32bit int machine) :
- *
- * Hello world!
- * printf test
- * (null) is null pointer
- * 5 = 5
- * -2147483647 = - max int
- * char a = 'a'
- * hex ff = ff
- * hex 00 = 00
- * signed -3 = unsigned 4294967293 = hex fffffffd
- * 0 message(s)
- * 0 message(s) with %
- * justif: "left "
- * justif: " right"
- * 3: 0003 zero padded
- * 3: 3 left justif.
- * 3: 3 right justif.
- * -3: -003 zero padded
- * -3: -3 left justif.
- * -3: -3 right justif.
- */
-
-#endif
diff --git a/sw/airborne/arch/lpc21/lpcusb/examples/spi.h b/sw/airborne/arch/lpc21/lpcusb/examples/spi.h
deleted file mode 100644
index 89310ea9b5..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/examples/spi.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include "type.h"
-
-#define SPI_PRESCALE_MIN 2
-
-void SPIInit(void);
-void SPISetSpeed(U8 speed);
-
-U8 SPISend(U8 outgoing);
-void SPISendN(U8 *pbBuf, int iLen);
-void SPIRecvN(U8 *pbBuf, int iLen);
-
diff --git a/sw/airborne/arch/lpc21/lpcusb/examples/startup.c b/sw/airborne/arch/lpc21/lpcusb/examples/startup.c
deleted file mode 100644
index 311141258f..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/examples/startup.c
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
- Initialisation functions for exception handlers, PLL and MAM
-
- Partially copied from Jim Lynch's tutorial
-*/
-
-/**********************************************************
- Header files
- **********************************************************/
-
-#include "startup.h"
-
-
-#define MAMCR *(volatile unsigned int *)0xE01FC000
-#define MAMTIM *(volatile unsigned int *)0xE01FC004
-
-#define PLLCON *(volatile unsigned int *)0xE01FC080
-#define PLLCFG *(volatile unsigned int *)0xE01FC084
-#define PLLSTAT *(volatile unsigned int *)0xE01FC088
-#define PLLFEED *(volatile unsigned int *)0xE01FC08C
-
-#define VPBDIV *(volatile unsigned int *)0xE01FC100
-
-void IRQ_Routine (void) __attribute__ ((interrupt("IRQ")));
-void FIQ_Routine (void) __attribute__ ((interrupt("FIQ")));
-void SWI_Routine (void) __attribute__ ((interrupt("SWI")));
-void UNDEF_Routine (void) __attribute__ ((interrupt("UNDEF")));
-
-
-/* Stubs for various interrupts (may be replaced later) */
-/* ---------------------------------------------------- */
-
-void IRQ_Routine (void) {
- while (1) ;
-}
-
-void FIQ_Routine (void) {
- while (1) ;
-}
-
-
-void SWI_Routine (void) {
- while (1) ;
-}
-
-
-void UNDEF_Routine (void) {
- while (1) ;
-}
-
-
-/**********************************************************
- Initialize
-**********************************************************/
-
-#define PLOCK 0x400
-
-static void feed(void)
-{
- PLLFEED = 0xAA;
- PLLFEED = 0x55;
-}
-
-
-void Initialize(void)
-{
-
-
- // Setting the Phased Lock Loop (PLL)
- // ----------------------------------
- //
- // Olimex LPC-P2148 has a 12.0000 mhz crystal
- //
- // We'd like the LPC2148 to run at 60 mhz (has to be an even multiple of crystal)
- //
- // According to the Philips LPC2148 manual: M = cclk / Fosc where: M = PLL multiplier (bits 0-4 of PLLCFG)
- // cclk = 60000000 hz
- // Fosc = 12000000 hz
- //
- // Solving: M = 60000000 / 12000000 = 5
- //
- // Note: M - 1 must be entered into bits 0-4 of PLLCFG (assign 4 to these bits)
- //
- //
- // The Current Controlled Oscilator (CCO) must operate in the range 156 mhz to 320 mhz
- //
- // According to the Philips LPC2148 manual: Fcco = cclk * 2 * P where: Fcco = CCO frequency
- // cclk = 60000000 hz
- // P = PLL divisor (bits 5-6 of PLLCFG)
- //
- // Solving: Fcco = 60000000 * 2 * P
- // P = 2 (trial value)
- // Fcco = 60000000 * 2 * 2
- // Fcc0 = 240000000 hz (good choice for P since it's within the 156 mhz to 320 mhz range)
- //
- // From Table 22 (page 34) of Philips LPC2148 manual P = 2, PLLCFG bits 5-6 = 1 (assign 1 to these bits)
- //
- // Finally: PLLCFG = 0 01 00100 = 0x24
- //
- // Final note: to load PLLCFG register, we must use the 0xAA followed 0x55 write sequence to the PLLFEED register
- // this is done in the short function feed() below
- //
-
- // Setting Multiplier and Divider values
- PLLCFG = 0x24;
- feed();
-
- // Enabling the PLL */
- PLLCON = 0x1;
- feed();
-
- // Wait for the PLL to lock to set frequency
- while(!(PLLSTAT & PLOCK)) ;
-
- // Connect the PLL as the clock source
- PLLCON = 0x3;
- feed();
-
- // Enabling MAM and setting number of clocks used for Flash memory fetch
- MAMTIM = 0x3;
- MAMCR = 0x2;
-
- // Setting peripheral Clock (pclk) to System Clock (cclk)
- VPBDIV = 0x1;
-}
-
diff --git a/sw/airborne/arch/lpc21/lpcusb/examples/startup.h b/sw/airborne/arch/lpc21/lpcusb/examples/startup.h
deleted file mode 100644
index bf53516c39..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/examples/startup.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-void Initialize(void);
-
diff --git a/sw/airborne/arch/lpc21/lpcusb/type.h b/sw/airborne/arch/lpc21/lpcusb/type.h
deleted file mode 100644
index f028c8847c..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/type.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-
-/**
- @file
- primitive types used in the USB stack
- */
-
-
-#ifndef _TYPE_H_
-#define _TYPE_H_
-
-typedef unsigned char U8; /**< unsigned 8-bit */
-typedef unsigned short int U16; /**< unsigned 16-bit */
-typedef unsigned int U32; /**< unsigned 32-bit */
-
-typedef int BOOL; /**< #TRUE or #FALSE */
-
-#ifndef FALSE
-#define FALSE 0
-#endif
-#ifndef TRUE
-#define TRUE (!FALSE)
-#endif
-
-#ifndef NULL
-#define NULL ((void*)0) /**< NULL pointer */
-#endif
-
-/* some other useful macros */
-#define MIN(x,y) ((x)<(y)?(x):(y)) /**< MIN */
-#define MAX(x,y) ((x)>(y)?(x):(y)) /**< MAX */
-
-
-#endif /* _TYPE_H_ */
-
diff --git a/sw/airborne/arch/lpc21/lpcusb/usbapi.h b/sw/airborne/arch/lpc21/lpcusb/usbapi.h
deleted file mode 100644
index 388581c8aa..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/usbapi.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/**
- @file
-*/
-
-
-#include "type.h"
-#include "usbstruct.h" // for TSetupPacket
-
-/*************************************************************************
- USB configuration
-**************************************************************************/
-
-#define MAX_PACKET_SIZE0 64 /**< maximum packet size for EP 0 */
-
-/*************************************************************************
- USB hardware interface
-**************************************************************************/
-
-// endpoint status sent through callback
-#define EP_STATUS_DATA (1<<0) /**< EP has data */
-#define EP_STATUS_STALLED (1<<1) /**< EP is stalled */
-#define EP_STATUS_SETUP (1<<2) /**< EP received setup packet */
-#define EP_STATUS_ERROR (1<<3) /**< EP data was overwritten by setup packet */
-#define EP_STATUS_NACKED (1<<4) /**< EP sent NAK */
-
-// device status sent through callback
-#define DEV_STATUS_CONNECT (1<<0) /**< device just got connected */
-#define DEV_STATUS_SUSPEND (1<<2) /**< device entered suspend state */
-#define DEV_STATUS_RESET (1<<4) /**< device just got reset */
-
-// interrupt bits for NACK events in USBHwNakIntEnable
-// (these bits conveniently coincide with the LPC214x USB controller bit)
-#define INACK_CI (1<<1) /**< interrupt on NACK for control in */
-#define INACK_CO (1<<2) /**< interrupt on NACK for control out */
-#define INACK_II (1<<3) /**< interrupt on NACK for interrupt in */
-#define INACK_IO (1<<4) /**< interrupt on NACK for interrupt out */
-#define INACK_BI (1<<5) /**< interrupt on NACK for bulk in */
-#define INACK_BO (1<<6) /**< interrupt on NACK for bulk out */
-
-BOOL USBHwInit (void);
-void USBHwISR (void);
-
-void USBHwNakIntEnable (U8 bIntBits);
-
-void USBHwConnect (BOOL fConnect);
-
-void USBHwSetAddress (U8 bAddr);
-void USBHwConfigDevice (BOOL fConfigured);
-
-// endpoint operations
-void USBHwEPConfig (U8 bEP, U16 wMaxPacketSize);
-int USBHwEPRead (U8 bEP, U8 *pbBuf, int iMaxLen);
-int USBHwEPWrite (U8 bEP, U8 *pbBuf, int iLen);
-void USBHwEPStall (U8 bEP, BOOL fStall);
-U8 USBHwEPGetStatus (U8 bEP);
-
-/** Endpoint interrupt handler callback */
-typedef void (TFnEPIntHandler) (U8 bEP, U8 bEPStatus);
-void USBHwRegisterEPIntHandler (U8 bEP, TFnEPIntHandler *pfnHandler);
-
-/** Device status handler callback */
-typedef void (TFnDevIntHandler) (U8 bDevStatus);
-void USBHwRegisterDevIntHandler (TFnDevIntHandler *pfnHandler);
-
-/** Frame event handler callback */
-typedef void (TFnFrameHandler)(U16 wFrame);
-void USBHwRegisterFrameHandler(TFnFrameHandler *pfnHandler);
-
-
-/*************************************************************************
- USB application interface
-**************************************************************************/
-
-// initialise the complete stack, including HW
-BOOL USBInit(void);
-
-/** Request handler callback (standard, vendor, class) */
-typedef BOOL (TFnHandleRequest)(TSetupPacket *pSetup, int *piLen, U8 **ppbData);
-void USBRegisterRequestHandler(int iType, TFnHandleRequest *pfnHandler, U8 *pbDataStore);
-void USBRegisterCustomReqHandler(TFnHandleRequest *pfnHandler);
-
-/** Descriptor handler callback */
-typedef BOOL (TFnGetDescriptor)(U16 wTypeIndex, U16 wLangID, int *piLen, U8 **ppbData);
-
-/** Default standard request handler */
-BOOL USBHandleStandardRequest(TSetupPacket *pSetup, int *piLen, U8 **ppbData);
-
-/** Default EP0 handler */
-void USBHandleControlTransfer(U8 bEP, U8 bEPStat);
-
-/** Descriptor handling */
-void USBRegisterDescriptors(const U8 *pabDescriptors);
-BOOL USBGetDescriptor(U16 wTypeIndex, U16 wLangID, int *piLen, U8 **ppbData);
diff --git a/sw/airborne/arch/lpc21/lpcusb/usbcontrol.c b/sw/airborne/arch/lpc21/lpcusb/usbcontrol.c
deleted file mode 100644
index e5230a9ab9..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/usbcontrol.c
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-
-/** @file
- Control transfer handler.
-
- This module handles control transfers and is normally installed on the
- endpoint 0 callback.
-
- Control transfers can be of the following type:
- 0 Standard;
- 1 Class;
- 2 Vendor;
- 3 Reserved.
-
- A callback can be installed for each of these control transfers using
- USBRegisterRequestHandler.
- When an OUT request arrives, data is collected in the data store provided
- with the USBRegisterRequestHandler call. When the transfer is done, the
- callback is called.
- When an IN request arrives, the callback is called immediately to either
- put the control transfer data in the data store, or to get a pointer to
- control transfer data. The data is then packetised and sent to the host.
-*/
-
-#include "type.h"
-#include "usbdebug.h"
-
-#include "usbstruct.h"
-#include "usbapi.h"
-
-
-
-#define MAX_CONTROL_SIZE 128 /**< maximum total size of control transfer data */
-#define MAX_REQ_HANDLERS 4 /**< standard, class, vendor, reserved */
-
-static TSetupPacket Setup; /**< setup packet */
-
-static U8 *pbData; /**< pointer to data buffer */
-static int iResidue; /**< remaining bytes in buffer */
-static int iLen; /**< total length of control transfer */
-
-/** Array of installed request handler callbacks */
-static TFnHandleRequest *apfnReqHandlers[4] = {NULL, NULL, NULL, NULL};
-/** Array of installed request data pointers */
-static U8 *apbDataStore[4] = {NULL, NULL, NULL, NULL};
-
-/**
- Local function to handle a request by calling one of the installed
- request handlers.
-
- In case of data going from host to device, the data is at *ppbData.
- In case of data going from device to host, the handler can either
- choose to write its data at *ppbData or update the data pointer.
-
- @param [in] pSetup The setup packet
- @param [in,out] *piLen Pointer to data length
- @param [in,out] ppbData Data buffer.
-
- @return TRUE if the request was handles successfully
- */
-static BOOL _HandleRequest(TSetupPacket *pSetup, int *piLen, U8 **ppbData)
-{
- TFnHandleRequest *pfnHandler;
- int iType;
-
- iType = REQTYPE_GET_TYPE(pSetup->bmRequestType);
- pfnHandler = apfnReqHandlers[iType];
- if (pfnHandler == NULL) {
- DBG("No handler for reqtype %d\n", iType);
- return FALSE;
- }
-
- return pfnHandler(pSetup, piLen, ppbData);
-}
-
-
-/**
- Local function to stall the control endpoint
-
- @param [in] bEPStat Endpoint status
- */
-static void StallControlPipe(U8 bEPStat __attribute__ ((unused)))
-{
- U8 *pb __attribute__((unused));
- int i;
-
- USBHwEPStall(0x80, TRUE);
-
-// dump setup packet
- DBG("STALL on [");
- pb = (U8 *)&Setup;
- for (i = 0; i < 8; i++) {
- DBG(" %02x", *pb++);
- }
- DBG("] stat=%x\n", bEPStat);
-}
-
-
-/**
- Sends next chunk of data (possibly 0 bytes) to host
- */
-static void DataIn(void)
-{
- int iChunk;
-
- iChunk = MIN(MAX_PACKET_SIZE0, iResidue);
- USBHwEPWrite(0x80, pbData, iChunk);
- pbData += iChunk;
- iResidue -= iChunk;
-}
-
-
-/**
- * Handles IN/OUT transfers on EP0
- *
- * @param [in] bEP Endpoint address
- * @param [in] bEPStat Endpoint status
- */
-void USBHandleControlTransfer(U8 bEP, U8 bEPStat)
-{
- int iChunk, iType;
-
- if (bEP == 0x00) {
- // OUT transfer
- if (bEPStat & EP_STATUS_SETUP) {
- // setup packet, reset request message state machine
- USBHwEPRead(0x00, (U8 *)&Setup, sizeof(Setup));
- DBG("S%x", Setup.bRequest);
-
- // defaults for data pointer and residue
- iType = REQTYPE_GET_TYPE(Setup.bmRequestType);
- pbData = apbDataStore[iType];
- iResidue = Setup.wLength;
- iLen = Setup.wLength;
-
- if ((Setup.wLength == 0) ||
- (REQTYPE_GET_DIR(Setup.bmRequestType) == REQTYPE_DIR_TO_HOST)) {
- // ask installed handler to process request
- if (!_HandleRequest(&Setup, &iLen, &pbData)) {
- DBG("_HandleRequest1 failed\n");
- StallControlPipe(bEPStat);
- return;
- }
- // send smallest of requested and offered length
- iResidue = MIN(iLen, Setup.wLength);
- // send first part (possibly a zero-length status message)
- DataIn();
- }
- }
- else {
- if (iResidue > 0) {
- // store data
- iChunk = USBHwEPRead(0x00, pbData, iResidue);
- if (iChunk < 0) {
- StallControlPipe(bEPStat);
- return;
- }
- pbData += iChunk;
- iResidue -= iChunk;
- if (iResidue == 0) {
- // received all, send data to handler
- iType = REQTYPE_GET_TYPE(Setup.bmRequestType);
- pbData = apbDataStore[iType];
- if (!_HandleRequest(&Setup, &iLen, &pbData)) {
- DBG("_HandleRequest2 failed\n");
- StallControlPipe(bEPStat);
- return;
- }
- // send status to host
- DataIn();
- }
- }
- else {
- // absorb zero-length status message
- iChunk = USBHwEPRead(0x00, NULL, 0);
- DBG(iChunk > 0 ? "?" : "");
- }
- }
- }
- else if (bEP == 0x80) {
- // IN transfer
- // send more data if available (possibly a 0-length packet)
- DataIn();
- }
- else {
- ASSERT(FALSE);
- }
-}
-
-
-/**
- Registers a callback for handling requests
-
- @param [in] iType Type of request, e.g. REQTYPE_TYPE_STANDARD
- @param [in] *pfnHandler Callback function pointer
- @param [in] *pbDataStore Data storage area for this type of request
- */
-void USBRegisterRequestHandler(int iType, TFnHandleRequest *pfnHandler, U8 *pbDataStore)
-{
- ASSERT(iType >= 0);
- ASSERT(iType < 4);
- apfnReqHandlers[iType] = pfnHandler;
- apbDataStore[iType] = pbDataStore;
-}
-
diff --git a/sw/airborne/arch/lpc21/lpcusb/usbdebug.h b/sw/airborne/arch/lpc21/lpcusb/usbdebug.h
deleted file mode 100644
index e13f8a20e1..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/usbdebug.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-
-int printf(const char *format, ...);
-
-#ifdef USBDEBUG
-#define DBG printf
-#define ASSERT(x) if(!(x)){DBG("\nAssertion '%s' failed in %s:%s#%d!\n",#x,__FILE__,__FUNCTION__,__LINE__);while(1);}
-#else
-#define DBG(x ...)
-#define ASSERT(x)
-#endif
-
diff --git a/sw/airborne/arch/lpc21/lpcusb/usbhw_lpc.c b/sw/airborne/arch/lpc21/lpcusb/usbhw_lpc.c
deleted file mode 100644
index 6b5a1b3ac0..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/usbhw_lpc.c
+++ /dev/null
@@ -1,560 +0,0 @@
-/*
- LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-
-/** @file
- USB hardware layer
- */
-
-#include "type.h"
-#include "usbdebug.h"
-#include "usbhw_lpc.h"
-#include "usbapi.h"
-
-
-#ifdef USBDEBUG
-// comment out the following line if you don't want to use debug LEDs
-#define DEBUG_LED
-#endif
-
-#ifdef DEBUG_LED
-#define DEBUG_LED_ON(x) IOCLR0 = (1 << x);
-#define DEBUG_LED_OFF(x) IOSET0 = (1 << x);
-#define DEBUG_LED_INIT(x) PINSEL0 &= ~(0x3 << (2*x)); IODIR0 |= (1 << x); DEBUG_LED_OFF(x);
-#else
-#define DEBUG_LED_INIT(x) /**< LED initialisation macro */
-#define DEBUG_LED_ON(x) /**< turn LED on */
-#define DEBUG_LED_OFF(x) /**< turn LED off */
-#endif
-
-/** Installed device interrupt handler */
-static TFnDevIntHandler *_pfnDevIntHandler = NULL;
-/** Installed endpoint interrupt handlers */
-static TFnEPIntHandler *_apfnEPIntHandlers[16];
-/** Installed frame interrupt handlers */
-static TFnFrameHandler *_pfnFrameHandler = NULL;
-
-/** convert from endpoint address to endpoint index */
-#define EP2IDX(bEP) ((((bEP)&0xF)<<1)|(((bEP)&0x80)>>7))
-/** convert from endpoint index to endpoint address */
-#define IDX2EP(idx) ((((idx)<<7)&0x80)|(((idx)>>1)&0xF))
-
-
-
-/**
- Local function to wait for a device interrupt (and clear it)
-
- @param [in] dwIntr Interrupts to wait for
- */
-static void Wait4DevInt(U32 dwIntr)
-{
- while ((USBDevIntSt & dwIntr) != dwIntr);
- USBDevIntClr = dwIntr;
-}
-
-
-/**
- Local function to send a command to the USB protocol engine
-
- @param [in] bCmd Command to send
- */
-static void USBHwCmd(U8 bCmd)
-{
- // clear CDFULL/CCEMTY
- USBDevIntClr = CDFULL | CCEMTY;
- // write command code
- USBCmdCode = 0x00000500 | (bCmd << 16);
- Wait4DevInt(CCEMTY);
-}
-
-
-/**
- Local function to send a command + data to the USB protocol engine
-
- @param [in] bCmd Command to send
- @param [in] bData Data to send
- */
-static void USBHwCmdWrite(U8 bCmd, U16 bData)
-{
- // write command code
- USBHwCmd(bCmd);
-
- // write command data
- USBCmdCode = 0x00000100 | (bData << 16);
- Wait4DevInt(CCEMTY);
-}
-
-
-/**
- Local function to send a command to the USB protocol engine and read data
-
- @param [in] bCmd Command to send
-
- @return the data
- */
-static U8 USBHwCmdRead(U8 bCmd)
-{
- // write command code
- USBHwCmd(bCmd);
-
- // get data
- USBCmdCode = 0x00000200 | (bCmd << 16);
- Wait4DevInt(CDFULL);
- return USBCmdData;
-}
-
-
-/**
- 'Realizes' an endpoint, meaning that buffer space is reserved for
- it. An endpoint needs to be realised before it can be used.
-
- From experiments, it appears that a USB reset causes USBReEP to
- re-initialise to 3 (= just the control endpoints).
- However, a USB bus reset does not disturb the USBMaxPSize settings.
-
- @param [in] idx Endpoint index
- @param [in] wMaxPSize Maximum packet size for this endpoint
- */
-static void USBHwEPRealize(int idx, U16 wMaxPSize)
-{
- USBReEP |= (1 << idx);
- USBEpInd = idx;
- USBMaxPSize = wMaxPSize;
- Wait4DevInt(EP_RLZED);
-}
-
-
-/**
- Enables or disables an endpoint
-
- @param [in] idx Endpoint index
- @param [in] fEnable TRUE to enable, FALSE to disable
- */
-static void USBHwEPEnable(int idx, BOOL fEnable)
-{
- USBHwCmdWrite(CMD_EP_SET_STATUS | idx, fEnable ? 0 : EP_DA);
-}
-
-
-/**
- Configures an endpoint and enables it
-
- @param [in] bEP Endpoint number
- @param [in] wMaxPacketSize Maximum packet size for this EP
- */
-void USBHwEPConfig(U8 bEP, U16 wMaxPacketSize)
-{
- int idx;
-
- idx = EP2IDX(bEP);
-
- // realise EP
- USBHwEPRealize(idx, wMaxPacketSize);
-
- // enable EP
- USBHwEPEnable(idx, TRUE);
-}
-
-
-/**
- Registers an endpoint event callback
-
- @param [in] bEP Endpoint number
- @param [in] pfnHandler Callback function
- */
-void USBHwRegisterEPIntHandler(U8 bEP, TFnEPIntHandler *pfnHandler)
-{
- int idx;
-
- idx = EP2IDX(bEP);
-
- ASSERT(idx<32);
-
- /* add handler to list of EP handlers */
- _apfnEPIntHandlers[idx / 2] = pfnHandler;
-
- /* enable EP interrupt */
- USBEpIntEn |= (1 << idx);
- USBDevIntEn |= EP_SLOW;
-
- DBG("Registered handler for EP 0x%x\n", bEP);
-}
-
-
-/**
- Registers an device status callback
-
- @param [in] pfnHandler Callback function
- */
-void USBHwRegisterDevIntHandler(TFnDevIntHandler *pfnHandler)
-{
- _pfnDevIntHandler = pfnHandler;
-
- // enable device interrupt
- USBDevIntEn |= DEV_STAT;
-
- DBG("Registered handler for device status\n");
-}
-
-
-/**
- Registers the frame callback
-
- @param [in] pfnHandler Callback function
- */
-void USBHwRegisterFrameHandler(TFnFrameHandler *pfnHandler)
-{
- _pfnFrameHandler = pfnHandler;
-
- // enable device interrupt
- USBDevIntEn |= FRAME;
-
- DBG("Registered handler for frame\n");
-}
-
-
-/**
- Sets the USB address.
-
- @param [in] bAddr Device address to set
- */
-void USBHwSetAddress(U8 bAddr)
-{
- USBHwCmdWrite(CMD_DEV_SET_ADDRESS, DEV_EN | bAddr);
-}
-
-
-/**
- Connects or disconnects from the USB bus
-
- @param [in] fConnect If TRUE, connect, otherwise disconnect
- */
-void USBHwConnect(BOOL fConnect)
-{
- USBHwCmdWrite(CMD_DEV_STATUS, fConnect ? CON : 0);
-}
-
-
-/**
- Enables interrupt on NAK condition
-
- For IN endpoints a NAK is generated when the host wants to read data
- from the device, but none is available in the endpoint buffer.
- For OUT endpoints a NAK is generated when the host wants to write data
- to the device, but the endpoint buffer is still full.
-
- The endpoint interrupt handlers can distinguish regular (ACK) interrupts
- from NAK interrupt by checking the bits in their bEPStatus argument.
-
- @param [in] bIntBits Bitmap indicating which NAK interrupts to enable
- */
-void USBHwNakIntEnable(U8 bIntBits)
-{
- USBHwCmdWrite(CMD_DEV_SET_MODE, bIntBits);
-}
-
-
-/**
- Gets the status from a specific endpoint.
-
- @param [in] bEP Endpoint number
- @return Endpoint status byte (containing EP_STATUS_xxx bits)
- */
-U8 USBHwEPGetStatus(U8 bEP)
-{
- int idx = EP2IDX(bEP);
-
- return USBHwCmdRead(CMD_EP_SELECT | idx);
-}
-
-
-/**
- Sets the stalled property of an endpoint
-
- @param [in] bEP Endpoint number
- @param [in] fStall TRUE to stall, FALSE to unstall
- */
-void USBHwEPStall(U8 bEP, BOOL fStall)
-{
- int idx = EP2IDX(bEP);
-
- USBHwCmdWrite(CMD_EP_SET_STATUS | idx, fStall ? EP_ST : 0);
-}
-
-
-/**
- Writes data to an endpoint buffer
-
- @param [in] bEP Endpoint number
- @param [in] pbBuf Endpoint data
- @param [in] iLen Number of bytes to write
-
- @return TRUE if the data was successfully written or <0 in case of error.
-*/
-int USBHwEPWrite(U8 bEP, U8 *pbBuf, int iLen)
-{
- int idx;
-
- idx = EP2IDX(bEP);
-
-// DBG("<%d", iLen);
-// DBG("<");
-
- // set write enable for specific endpoint
- USBCtrl = WR_EN | ((bEP & 0xF) << 2);
-
- // set packet length
- USBTxPLen = iLen;
-
- // write data
- while (USBCtrl & WR_EN) {
- USBTxData = (pbBuf[3] << 24) | (pbBuf[2] << 16) | (pbBuf[1] << 8) | pbBuf[0];
- pbBuf += 4;
- }
-
- // select endpoint and validate buffer
- USBHwCmd(CMD_EP_SELECT | idx);
- USBHwCmd(CMD_EP_VALIDATE_BUFFER);
-
- return iLen;
-}
-
-
-/**
- Reads data from an endpoint buffer
-
- @param [in] bEP Endpoint number
- @param [in] pbBuf Endpoint data
- @param [in] iMaxLen Maximum number of bytes to read
-
- @return the number of bytes available in the EP (possibly more than iMaxLen),
- or <0 in case of error.
- */
-int USBHwEPRead(U8 bEP, U8 *pbBuf, int iMaxLen)
-{
- int i, idx;
- U32 dwData, dwLen;
-
- idx = EP2IDX(bEP);
-
- // set read enable bit for specific endpoint
- USBCtrl = RD_EN | ((bEP & 0xF) << 2);
-
- // wait for PKT_RDY
- do {
- dwLen = USBRxPLen;
- } while ((dwLen & PKT_RDY) == 0);
-
- // packet valid?
- if ((dwLen & DV) == 0) {
- return -1;
- }
-
- // get length
- dwLen &= PKT_LNGTH_MASK;
-
- // get data
- while (USBCtrl & RD_EN) {
- dwData = USBRxData;
- if (pbBuf != NULL) {
- for (i = 0; i < 4; i++) {
- if (iMaxLen-- != 0) {
- *pbBuf++ = dwData & 0xFF;
- }
- dwData >>= 8;
- }
- }
- }
-
- // select endpoint and clear buffer
- USBHwCmd(CMD_EP_SELECT | idx);
- USBHwCmd(CMD_EP_CLEAR_BUFFER);
-
-// DBG(">%d", dwLen);
-// DBG(">");
-
- return dwLen;
-}
-
-
-/**
- Sets the 'configured' state.
-
- All registered endpoints are 'realised' and enabled, and the
- 'configured' bit is set in the device status register.
-
- @param [in] fConfigured If TRUE, configure device, else unconfigure
- */
-void USBHwConfigDevice(BOOL fConfigured)
-{
- // set configured bit
- USBHwCmdWrite(CMD_DEV_CONFIG, fConfigured ? CONF_DEVICE : 0);
-}
-
-
-/**
- USB interrupt handler
-
- @todo Get all 11 bits of frame number instead of just 8
-
- Endpoint interrupts are mapped to the slow interrupt
- */
-void USBHwISR(void)
-{
- U32 dwStatus;
- U32 dwIntBit;
- U8 bEPStat, bDevStat, bStat;
- int i;
- U16 wFrame;
-
-// LED9 monitors total time in interrupt routine
-DEBUG_LED_ON(9);
-
- // handle device interrupts
- dwStatus = USBDevIntSt;
-
- // frame interrupt
- if (dwStatus & FRAME) {
- // clear int
- USBDevIntClr = FRAME;
- // call handler
- if (_pfnFrameHandler != NULL) {
- wFrame = USBHwCmdRead(CMD_DEV_READ_CUR_FRAME_NR);
- _pfnFrameHandler(wFrame);
- }
- }
-
- // device status interrupt
- if (dwStatus & DEV_STAT) {
- /* Clear DEV_STAT interrupt before reading DEV_STAT register.
- This prevents corrupted device status reads, see
- LPC2148 User manual revision 2, 25 july 2006.
- */
- USBDevIntClr = DEV_STAT;
- bDevStat = USBHwCmdRead(CMD_DEV_STATUS);
- if (bDevStat & (CON_CH | SUS_CH | RST)) {
- // convert device status into something HW independent
- bStat = ((bDevStat & CON) ? DEV_STATUS_CONNECT : 0) |
- ((bDevStat & SUS) ? DEV_STATUS_SUSPEND : 0) |
- ((bDevStat & RST) ? DEV_STATUS_RESET : 0);
- // call handler
- if (_pfnDevIntHandler != NULL) {
-DEBUG_LED_ON(8);
- _pfnDevIntHandler(bStat);
-DEBUG_LED_OFF(8);
- }
- }
- }
-
- // endpoint interrupt
- if (dwStatus & EP_SLOW) {
- // clear EP_SLOW
- USBDevIntClr = EP_SLOW;
- // check all endpoints
- for (i = 0; i < 32; i++) {
- dwIntBit = (1 << i);
- if (USBEpIntSt & dwIntBit) {
- // clear int (and retrieve status)
- USBEpIntClr = dwIntBit;
- Wait4DevInt(CDFULL);
- bEPStat = USBCmdData;
- // convert EP pipe stat into something HW independent
- bStat = ((bEPStat & EPSTAT_FE) ? EP_STATUS_DATA : 0) |
- ((bEPStat & EPSTAT_ST) ? EP_STATUS_STALLED : 0) |
- ((bEPStat & EPSTAT_STP) ? EP_STATUS_SETUP : 0) |
- ((bEPStat & EPSTAT_EPN) ? EP_STATUS_NACKED : 0) |
- ((bEPStat & EPSTAT_PO) ? EP_STATUS_ERROR : 0);
- // call handler
- if (_apfnEPIntHandlers[i / 2] != NULL) {
-DEBUG_LED_ON(10);
- _apfnEPIntHandlers[i / 2](IDX2EP(i), bStat);
-DEBUG_LED_OFF(10);
- }
- }
- }
- }
-
-DEBUG_LED_OFF(9);
-}
-
-
-
-/**
- Initialises the USB hardware
-
- This function assumes that the hardware is connected as shown in
- section 10.1 of the LPC2148 data sheet:
- * P0.31 controls a switch to connect a 1.5k pull-up to D+ if low.
- * P0.23 is connected to USB VCC.
-
- Embedded artists board: make sure to disconnect P0.23 LED as it
- acts as a pull-up and so prevents detection of USB disconnect.
-
- @return TRUE if the hardware was successfully initialised
- */
-BOOL USBHwInit(void)
-{
- // configure P0.23 for Vbus sense
- PINSEL1 = (PINSEL1 & ~(3 << 14)) | (1 << 14); // P0.23
- IODIR0 &= ~(1 << 23);
- // configure P0.31 for CONNECT
- PINSEL1 = (PINSEL1 & ~(3 << 30)) | (2 << 30); // P0.31
-
- // enable PUSB
- PCONP |= (1 << 31);
-
- // initialise PLL
- PLL1CON = 1; // enable PLL
- PLL1CFG = (1 << 5) | 3; // P = 2, M = 4
- PLL1FEED = 0xAA;
- PLL1FEED = 0x55;
- while ((PLL1STAT & (1 << 10)) == 0);
-
- PLL1CON = 3; // enable and connect
- PLL1FEED = 0xAA;
- PLL1FEED = 0x55;
-
- // disable/clear all interrupts for now
- USBDevIntEn = 0;
- USBDevIntClr = 0xFFFFFFFF;
- USBDevIntPri = 0;
-
- USBEpIntEn = 0;
- USBEpIntClr = 0xFFFFFFFF;
- USBEpIntPri = 0;
-
- // by default, only ACKs generate interrupts
- USBHwNakIntEnable(0);
-
- // init debug leds
- DEBUG_LED_INIT(8);
- DEBUG_LED_INIT(9);
- DEBUG_LED_INIT(10);
-
- return TRUE;
-}
-
diff --git a/sw/airborne/arch/lpc21/lpcusb/usbhw_lpc.h b/sw/airborne/arch/lpc21/lpcusb/usbhw_lpc.h
deleted file mode 100644
index 026f70e12f..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/usbhw_lpc.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-
-/**
- Hardware definitions for the LPC214x USB controller
-
- These are private to the usbhw module
-*/
-
-
-/* Common LPC2148 definitions, related to USB */
-#define PCONP *(volatile unsigned int *)0xE01FC0C4
-#define PLL1CON *(volatile unsigned int *)0xE01FC0A0
-#define PLL1CFG *(volatile unsigned int *)0xE01FC0A4
-#define PLL1STAT *(volatile unsigned int *)0xE01FC0A8
-#define PLL1FEED *(volatile unsigned int *)0xE01FC0AC
-
-#define PINSEL0 *(volatile unsigned int *)0xE002C000
-#define PINSEL1 *(volatile unsigned int *)0xE002C004
-#define IOPIN0 *(volatile unsigned int *)0xE0028000
-#define IOSET0 *(volatile unsigned int *)0xE0028004
-#define IODIR0 *(volatile unsigned int *)0xE0028008
-#define IOCLR0 *(volatile unsigned int *)0xE002800C
-
-/* USB register definitions */
-#define USBIntSt *(volatile unsigned int *)0xE01FC1C0
-
-#define USBDevIntSt *(volatile unsigned int *)0xE0090000
-#define USBDevIntEn *(volatile unsigned int *)0xE0090004
-#define USBDevIntClr *(volatile unsigned int *)0xE0090008
-#define USBDevIntSet *(volatile unsigned int *)0xE009000C
-#define USBDevIntPri *(volatile unsigned int *)0xE009002C
-
-#define USBEpIntSt *(volatile unsigned int *)0xE0090030
-#define USBEpIntEn *(volatile unsigned int *)0xE0090034
-#define USBEpIntClr *(volatile unsigned int *)0xE0090038
-#define USBEpIntSet *(volatile unsigned int *)0xE009003C
-#define USBEpIntPri *(volatile unsigned int *)0xE0090040
-
-#define USBReEP *(volatile unsigned int *)0xE0090044
-#define USBEpInd *(volatile unsigned int *)0xE0090048
-#define USBMaxPSize *(volatile unsigned int *)0xE009004C
-
-#define USBRxData *(volatile unsigned int *)0xE0090018
-#define USBRxPLen *(volatile unsigned int *)0xE0090020
-#define USBTxData *(volatile unsigned int *)0xE009001C
-#define USBTxPLen *(volatile unsigned int *)0xE0090024
-#define USBCtrl *(volatile unsigned int *)0xE0090028
-
-#define USBCmdCode *(volatile unsigned int *)0xE0090010
-#define USBCmdData *(volatile unsigned int *)0xE0090014
-
-/* USBIntSt bits */
-#define USB_INT_REQ_LP (1<<0)
-#define USB_INT_REQ_HP (1<<1)
-#define USB_INT_REQ_DMA (1<<2)
-#define USB_need_clock (1<<8)
-#define EN_USB_BITS (1<<31)
-
-/* USBDevInt... bits */
-#define FRAME (1<<0)
-#define EP_FAST (1<<1)
-#define EP_SLOW (1<<2)
-#define DEV_STAT (1<<3)
-#define CCEMTY (1<<4)
-#define CDFULL (1<<5)
-#define RxENDPKT (1<<6)
-#define TxENDPKT (1<<7)
-#define EP_RLZED (1<<8)
-#define ERR_INT (1<<9)
-
-/* USBRxPLen bits */
-#define PKT_LNGTH (1<<0)
-#define PKT_LNGTH_MASK 0x3FF
-#define DV (1<<10)
-#define PKT_RDY (1<<11)
-
-/* USBCtrl bits */
-#define RD_EN (1<<0)
-#define WR_EN (1<<1)
-#define LOG_ENDPOINT (1<<2)
-
-/* protocol engine command codes */
- /* device commands */
-#define CMD_DEV_SET_ADDRESS 0xD0
-#define CMD_DEV_CONFIG 0xD8
-#define CMD_DEV_SET_MODE 0xF3
-#define CMD_DEV_READ_CUR_FRAME_NR 0xF5
-#define CMD_DEV_READ_TEST_REG 0xFD
-#define CMD_DEV_STATUS 0xFE /* read/write */
-#define CMD_DEV_GET_ERROR_CODE 0xFF
-#define CMD_DEV_READ_ERROR_STATUS 0xFB
- /* endpoint commands */
-#define CMD_EP_SELECT 0x00
-#define CMD_EP_SELECT_CLEAR 0x40
-#define CMD_EP_SET_STATUS 0x40
-#define CMD_EP_CLEAR_BUFFER 0xF2
-#define CMD_EP_VALIDATE_BUFFER 0xFA
-
-/* set address command */
-#define DEV_ADDR (1<<0)
-#define DEV_EN (1<<7)
-
-/* configure device command */
-#define CONF_DEVICE (1<<0)
-
-/* set mode command */
-#define AP_CLK (1<<0)
-#define INAK_CI (1<<1)
-#define INAK_CO (1<<2)
-#define INAK_II (1<<3)
-#define INAK_IO (1<<4)
-#define INAK_BI (1<<5)
-#define INAK_BO (1<<6)
-
-/* set get device status command */
-#define CON (1<<0)
-#define CON_CH (1<<1)
-#define SUS (1<<2)
-#define SUS_CH (1<<3)
-#define RST (1<<4)
-
-/* get error code command */
-// ...
-
-/* Select Endpoint command read bits */
-#define EPSTAT_FE (1<<0)
-#define EPSTAT_ST (1<<1)
-#define EPSTAT_STP (1<<2)
-#define EPSTAT_PO (1<<3)
-#define EPSTAT_EPN (1<<4)
-#define EPSTAT_B1FULL (1<<5)
-#define EPSTAT_B2FULL (1<<6)
-
-/* CMD_EP_SET_STATUS command */
-#define EP_ST (1<<0)
-#define EP_DA (1<<5)
-#define EP_RF_MO (1<<6)
-#define EP_CND_ST (1<<7)
-
-/* read error status command */
-#define PID_ERR (1<<0)
-#define UEPKT (1<<1)
-#define DCRC (1<<2)
-#define TIMEOUT (1<<3)
-#define EOP (1<<4)
-#define B_OVRN (1<<5)
-#define BTSTF (1<<6)
-#define TGL_ERR (1<<7)
-
-
-
-
-
-
-
-
diff --git a/sw/airborne/arch/lpc21/lpcusb/usbinit.c b/sw/airborne/arch/lpc21/lpcusb/usbinit.c
deleted file mode 100644
index c29abdfbdb..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/usbinit.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-
-/** @file
- USB stack initialisation
- */
-
-#include "type.h"
-#include "usbdebug.h"
-#include "usbapi.h"
-
-
-/** data storage area for standard requests */
-static U8 abStdReqData[8];
-
-
-/**
- USB reset handler
-
- @param [in] bDevStatus Device status
- */
-static void HandleUsbReset(U8 bDevStatus)
-{
- if (bDevStatus & DEV_STATUS_RESET) {
- DBG("\n!");
- }
-}
-
-
-/**
- Initialises the USB hardware and sets up the USB stack by
- installing default callbacks.
-
- @return TRUE if initialisation was successful
- */
-BOOL USBInit(void)
-{
- // init hardware
- USBHwInit();
-
- // register bus reset handler
- USBHwRegisterDevIntHandler(HandleUsbReset);
-
- // register control transfer handler on EP0
- USBHwRegisterEPIntHandler(0x00, USBHandleControlTransfer);
- USBHwRegisterEPIntHandler(0x80, USBHandleControlTransfer);
-
- // setup control endpoints
- USBHwEPConfig(0x00, MAX_PACKET_SIZE0);
- USBHwEPConfig(0x80, MAX_PACKET_SIZE0);
-
- // register standard request handler
- USBRegisterRequestHandler(REQTYPE_TYPE_STANDARD, USBHandleStandardRequest, abStdReqData);
-
- return TRUE;
-}
-
diff --git a/sw/airborne/arch/lpc21/lpcusb/usbstdreq.c b/sw/airborne/arch/lpc21/lpcusb/usbstdreq.c
deleted file mode 100644
index 690666a1fc..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/usbstdreq.c
+++ /dev/null
@@ -1,434 +0,0 @@
-/*
- LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-
-/** @file
- Standard request handler.
-
- This modules handles the 'chapter 9' processing, specifically the
- standard device requests in table 9-3 from the universal serial bus
- specification revision 2.0
-
- Specific types of devices may specify additional requests (for example
- HID devices add a GET_DESCRIPTOR request for interfaces), but they
- will not be part of this module.
-
- @todo some requests have to return a request error if device not configured:
- @todo GET_INTERFACE, GET_STATUS, SET_INTERFACE, SYNCH_FRAME
- @todo this applies to the following if endpoint != 0:
- @todo SET_FEATURE, GET_FEATURE
-*/
-
-#include "type.h"
-#include "usbdebug.h"
-#include "usbstruct.h"
-#include "usbapi.h"
-
-#define MAX_DESC_HANDLERS 4 /**< device, interface, endpoint, other */
-
-
-/* general descriptor field offsets */
-#define DESC_bLength 0 /**< length offset */
-#define DESC_bDescriptorType 1 /**< descriptor type offset */
-
-/* config descriptor field offsets */
-#define CONF_DESC_wTotalLength 2 /**< total length offset */
-#define CONF_DESC_bConfigurationValue 5 /**< configuration value offset */
-#define CONF_DESC_bmAttributes 7 /**< configuration characteristics */
-
-/* interface descriptor field offsets */
-#define INTF_DESC_bAlternateSetting 3 /**< alternate setting offset */
-
-/* endpoint descriptor field offsets */
-#define ENDP_DESC_bEndpointAddress 2 /**< endpoint address offset */
-#define ENDP_DESC_wMaxPacketSize 4 /**< maximum packet size offset */
-
-
-/** Currently selected configuration */
-static U8 bConfiguration = 0;
-/** Installed custom request handler */
-static TFnHandleRequest *pfnHandleCustomReq = NULL;
-/** Pointer to registered descriptors */
-static const U8 *pabDescrip = NULL;
-
-
-/**
- Registers a pointer to a descriptor block containing all descriptors
- for the device.
-
- @param [in] pabDescriptors The descriptor byte array
- */
-void USBRegisterDescriptors(const U8 *pabDescriptors)
-{
- pabDescrip = pabDescriptors;
-}
-
-
-/**
- Parses the list of installed USB descriptors and attempts to find
- the specified USB descriptor.
-
- @param [in] wTypeIndex Type and index of the descriptor
- @param [in] wLangID Language ID of the descriptor (currently unused)
- @param [out] *piLen Descriptor length
- @param [out] *ppbData Descriptor data
-
- @return TRUE if the descriptor was found, FALSE otherwise
- */
-BOOL USBGetDescriptor(U16 wTypeIndex, U16 wLangID __attribute__ ((unused)), int *piLen, U8 **ppbData)
-{
- U8 bType, bIndex;
- const U8 *pab;
- int iCurIndex;
-
- ASSERT(pabDescrip != NULL);
-
- bType = GET_DESC_TYPE(wTypeIndex);
- bIndex = GET_DESC_INDEX(wTypeIndex);
-
- pab = pabDescrip;
- iCurIndex = 0;
-
- while (pab[DESC_bLength] != 0) {
- if (pab[DESC_bDescriptorType] == bType) {
- if (iCurIndex == bIndex) {
- // set data pointer
-#pragma GCC diagnostic push // require GCC 4.6
-#pragma GCC diagnostic ignored "-Wcast-qual"
- *ppbData = (U8*)pab;
-#pragma GCC diagnostic pop // require GCC 4.6
- // get length from structure
- if (bType == DESC_CONFIGURATION) {
- // configuration descriptor is an exception, length is at offset 2 and 3
- *piLen = (pab[CONF_DESC_wTotalLength]) |
- (pab[CONF_DESC_wTotalLength + 1] << 8);
- }
- else {
- // normally length is at offset 0
- *piLen = pab[DESC_bLength];
- }
- return TRUE;
- }
- iCurIndex++;
- }
- // skip to next descriptor
- pab += pab[DESC_bLength];
- }
- // nothing found
- DBG("Desc %x not found!\n", wTypeIndex);
- return FALSE;
-}
-
-
-/**
- Configures the device according to the specified configuration index and
- alternate setting by parsing the installed USB descriptor list.
- A configuration index of 0 unconfigures the device.
-
- @param [in] bConfigIndex Configuration index
- @param [in] bAltSetting Alternate setting number
-
- @todo function always returns TRUE, add stricter checking?
-
- @return TRUE if successfully configured, FALSE otherwise
- */
-static BOOL USBSetConfiguration(U8 bConfigIndex, U8 bAltSetting)
-{
- const U8 *pab;
- U8 bCurConfig, bCurAltSetting;
- U8 bEP;
- U16 wMaxPktSize;
-
- ASSERT(pabDescrip != NULL);
-
- if (bConfigIndex == 0) {
- // unconfigure device
- USBHwConfigDevice(FALSE);
- }
- else {
- // configure endpoints for this configuration/altsetting
- pab = (const U8 *)pabDescrip;
- bCurConfig = 0xFF;
- bCurAltSetting = 0xFF;
-
- while (pab[DESC_bLength] != 0) {
-
- switch (pab[DESC_bDescriptorType]) {
-
- case DESC_CONFIGURATION:
- // remember current configuration index
- bCurConfig = pab[CONF_DESC_bConfigurationValue];
- break;
-
- case DESC_INTERFACE:
- // remember current alternate setting
- bCurAltSetting = pab[INTF_DESC_bAlternateSetting];
- break;
-
- case DESC_ENDPOINT:
- if ((bCurConfig == bConfigIndex) &&
- (bCurAltSetting == bAltSetting)) {
- // endpoint found for desired config and alternate setting
- bEP = pab[ENDP_DESC_bEndpointAddress];
- wMaxPktSize = (pab[ENDP_DESC_wMaxPacketSize]) |
- (pab[ENDP_DESC_wMaxPacketSize + 1] << 8);
- // configure endpoint
- USBHwEPConfig(bEP, wMaxPktSize);
- }
- break;
-
- default:
- break;
- }
- // skip to next descriptor
- pab += pab[DESC_bLength];
- }
-
- // configure device
- USBHwConfigDevice(TRUE);
- }
-
- return TRUE;
-}
-
-
-/**
- Local function to handle a standard device request
-
- @param [in] pSetup The setup packet
- @param [in,out] *piLen Pointer to data length
- @param [in,out] ppbData Data buffer.
-
- @return TRUE if the request was handled successfully
- */
-static BOOL HandleStdDeviceReq(TSetupPacket *pSetup, int *piLen, U8 **ppbData)
-{
- U8 *pbData = *ppbData;
-
- switch (pSetup->bRequest) {
-
- case REQ_GET_STATUS:
- // bit 0: self-powered
- // bit 1: remote wakeup = not supported
- pbData[0] = 0;
- pbData[1] = 0;
- *piLen = 2;
- break;
-
- case REQ_SET_ADDRESS:
- USBHwSetAddress(pSetup->wValue);
- break;
-
- case REQ_GET_DESCRIPTOR:
- DBG("D%x", pSetup->wValue);
- return USBGetDescriptor(pSetup->wValue, pSetup->wIndex, piLen, ppbData);
-
- case REQ_GET_CONFIGURATION:
- // indicate if we are configured
- pbData[0] = bConfiguration;
- *piLen = 1;
- break;
-
- case REQ_SET_CONFIGURATION:
- if (!USBSetConfiguration(pSetup->wValue & 0xFF, 0)) {
- DBG("USBSetConfiguration failed!\n");
- return FALSE;
- }
- // configuration successful, update current configuration
- bConfiguration = pSetup->wValue & 0xFF;
- break;
-
- case REQ_CLEAR_FEATURE:
- case REQ_SET_FEATURE:
- if (pSetup->wValue == FEA_REMOTE_WAKEUP) {
- // put DEVICE_REMOTE_WAKEUP code here
- }
- if (pSetup->wValue == FEA_TEST_MODE) {
- // put TEST_MODE code here
- }
- return FALSE;
-
- case REQ_SET_DESCRIPTOR:
- DBG("Device req %d not implemented\n", pSetup->bRequest);
- return FALSE;
-
- default:
- DBG("Illegal device req %d\n", pSetup->bRequest);
- return FALSE;
- }
-
- return TRUE;
-}
-
-
-/**
- Local function to handle a standard interface request
-
- @param [in] pSetup The setup packet
- @param [in,out] *piLen Pointer to data length
- @param [in] ppbData Data buffer.
-
- @return TRUE if the request was handled successfully
- */
-static BOOL HandleStdInterfaceReq(TSetupPacket *pSetup, int *piLen, U8 **ppbData)
-{
- U8 *pbData = *ppbData;
-
- switch (pSetup->bRequest) {
-
- case REQ_GET_STATUS:
- // no bits specified
- pbData[0] = 0;
- pbData[1] = 0;
- *piLen = 2;
- break;
-
- case REQ_CLEAR_FEATURE:
- case REQ_SET_FEATURE:
- // not defined for interface
- return FALSE;
-
- case REQ_GET_INTERFACE: // TODO use bNumInterfaces
- // there is only one interface, return n-1 (= 0)
- pbData[0] = 0;
- *piLen = 1;
- break;
-
- case REQ_SET_INTERFACE: // TODO use bNumInterfaces
- // there is only one interface (= 0)
- if (pSetup->wValue != 0) {
- return FALSE;
- }
- *piLen = 0;
- break;
-
- default:
- DBG("Illegal interface req %d\n", pSetup->bRequest);
- return FALSE;
- }
-
- return TRUE;
-}
-
-
-/**
- Local function to handle a standard endpoint request
-
- @param [in] pSetup The setup packet
- @param [in,out] *piLen Pointer to data length
- @param [in] ppbData Data buffer.
-
- @return TRUE if the request was handled successfully
- */
-static BOOL HandleStdEndPointReq(TSetupPacket *pSetup, int *piLen, U8 **ppbData)
-{
- U8 *pbData = *ppbData;
-
- switch (pSetup->bRequest) {
- case REQ_GET_STATUS:
- // bit 0 = endpointed halted or not
- pbData[0] = (USBHwEPGetStatus(pSetup->wIndex) & EP_STATUS_STALLED) ? 1 : 0;
- pbData[1] = 0;
- *piLen = 2;
- break;
-
- case REQ_CLEAR_FEATURE:
- if (pSetup->wValue == FEA_ENDPOINT_HALT) {
- // clear HALT by unstalling
- USBHwEPStall(pSetup->wIndex, FALSE);
- break;
- }
- // only ENDPOINT_HALT defined for endpoints
- return FALSE;
-
- case REQ_SET_FEATURE:
- if (pSetup->wValue == FEA_ENDPOINT_HALT) {
- // set HALT by stalling
- USBHwEPStall(pSetup->wIndex, TRUE);
- break;
- }
- // only ENDPOINT_HALT defined for endpoints
- return FALSE;
-
- case REQ_SYNCH_FRAME:
- DBG("EP req %d not implemented\n", pSetup->bRequest);
- return FALSE;
-
- default:
- DBG("Illegal EP req %d\n", pSetup->bRequest);
- return FALSE;
- }
-
- return TRUE;
-}
-
-
-/**
- Default handler for standard ('chapter 9') requests
-
- If a custom request handler was installed, this handler is called first.
-
- @param [in] pSetup The setup packet
- @param [in,out] *piLen Pointer to data length
- @param [in] ppbData Data buffer.
-
- @return TRUE if the request was handled successfully
- */
-BOOL USBHandleStandardRequest(TSetupPacket *pSetup, int *piLen, U8 **ppbData)
-{
- // try the custom request handler first
- if ((pfnHandleCustomReq != NULL) && pfnHandleCustomReq(pSetup, piLen, ppbData)) {
- return TRUE;
- }
-
- switch (REQTYPE_GET_RECIP(pSetup->bmRequestType)) {
- case REQTYPE_RECIP_DEVICE: return HandleStdDeviceReq(pSetup, piLen, ppbData);
- case REQTYPE_RECIP_INTERFACE: return HandleStdInterfaceReq(pSetup, piLen, ppbData);
- case REQTYPE_RECIP_ENDPOINT: return HandleStdEndPointReq(pSetup, piLen, ppbData);
- default: return FALSE;
- }
-}
-
-
-/**
- Registers a callback for custom device requests
-
- In USBHandleStandardRequest, the custom request handler gets a first
- chance at handling the request before it is handed over to the 'chapter 9'
- request handler.
-
- This can be used for example in HID devices, where a REQ_GET_DESCRIPTOR
- request is sent to an interface, which is not covered by the 'chapter 9'
- specification.
-
- @param [in] pfnHandler Callback function pointer
- */
-void USBRegisterCustomReqHandler(TFnHandleRequest *pfnHandler)
-{
- pfnHandleCustomReq = pfnHandler;
-}
-
diff --git a/sw/airborne/arch/lpc21/lpcusb/usbstruct.h b/sw/airborne/arch/lpc21/lpcusb/usbstruct.h
deleted file mode 100644
index b4fddd050f..0000000000
--- a/sw/airborne/arch/lpc21/lpcusb/usbstruct.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-
-/**
- Definitions of structures of standard USB packets
-*/
-
-#ifndef _USBSTRUCT_H_
-#define _USBSTRUCT_H_
-
-
-#include "type.h"
-
-
-/** setup packet definitions */
-typedef struct {
- U8 bmRequestType; /**< characteristics of the specific request */
- U8 bRequest; /**< specific request */
- U16 wValue; /**< request specific parameter */
- U16 wIndex; /**< request specific parameter */
- U16 wLength; /**< length of data transfered in data phase */
-} TSetupPacket;
-
-
-#define REQTYPE_GET_DIR(x) (((x)>>7)&0x01)
-#define REQTYPE_GET_TYPE(x) (((x)>>5)&0x03)
-#define REQTYPE_GET_RECIP(x) ((x)&0x1F)
-
-#define REQTYPE_DIR_TO_DEVICE 0
-#define REQTYPE_DIR_TO_HOST 1
-
-#define REQTYPE_TYPE_STANDARD 0
-#define REQTYPE_TYPE_CLASS 1
-#define REQTYPE_TYPE_VENDOR 2
-#define REQTYPE_TYPE_RESERVED 3
-
-#define REQTYPE_RECIP_DEVICE 0
-#define REQTYPE_RECIP_INTERFACE 1
-#define REQTYPE_RECIP_ENDPOINT 2
-#define REQTYPE_RECIP_OTHER 3
-
-/* standard requests */
-#define REQ_GET_STATUS 0x00
-#define REQ_CLEAR_FEATURE 0x01
-#define REQ_SET_FEATURE 0x03
-#define REQ_SET_ADDRESS 0x05
-#define REQ_GET_DESCRIPTOR 0x06
-#define REQ_SET_DESCRIPTOR 0x07
-#define REQ_GET_CONFIGURATION 0x08
-#define REQ_SET_CONFIGURATION 0x09
-#define REQ_GET_INTERFACE 0x0A
-#define REQ_SET_INTERFACE 0x0B
-#define REQ_SYNCH_FRAME 0x0C
-
-/* class requests HID */
-#define HID_GET_REPORT 0x01
-#define HID_GET_IDLE 0x02
-#define HID_GET_PROTOCOL 0x03
-#define HID_SET_REPORT 0x09
-#define HID_SET_IDLE 0x0A
-#define HID_SET_PROTOCOL 0x0B
-
-/* feature selectors */
-#define FEA_ENDPOINT_HALT 0x00
-#define FEA_REMOTE_WAKEUP 0x01
-#define FEA_TEST_MODE 0x02
-
-/*
- USB descriptors
-*/
-
-/** USB descriptor header */
-typedef struct {
- U8 bLength; /**< descriptor length */
- U8 bDescriptorType; /**< descriptor type */
-} TUSBDescHeader;
-
-#define DESC_DEVICE 1
-#define DESC_CONFIGURATION 2
-#define DESC_STRING 3
-#define DESC_INTERFACE 4
-#define DESC_ENDPOINT 5
-#define DESC_DEVICE_QUALIFIER 6
-#define DESC_OTHER_SPEED 7
-#define DESC_INTERFACE_POWER 8
-
-#define DESC_HID_HID 0x21
-#define DESC_HID_REPORT 0x22
-#define DESC_HID_PHYSICAL 0x23
-
-#define GET_DESC_TYPE(x) (((x)>>8)&0xFF)
-#define GET_DESC_INDEX(x) ((x)&0xFF)
-
-#endif /* _USBSTRUCT_H_ */
-
diff --git a/sw/airborne/arch/lpc21/mcu_arch.c b/sw/airborne/arch/lpc21/mcu_arch.c
deleted file mode 100644
index f01e1ac3b8..0000000000
--- a/sw/airborne/arch/lpc21/mcu_arch.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (C) 2010 The Paparazzi team
- *
- * This file is part of Paparazzi.
- *
- * Paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * Paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/**
- * @file arch/lpc21/mcu_arch.c
- * @brief lpc21 arch dependant microcontroller initialisation functions.
- * @ingroup lpc21_arch
- */
-
-#include "mcu.h"
-
-
-#include
-#include BOARD_CONFIG
-#include "LPC21xx.h"
-
-
-/* declare functions and values from crt0.S & the linker control file */
-extern void reset(void);
-
-void mcu_arch_init(void)
-{
-
- /* set PLL multiplier & divisor. */
- /* values computed from config.h */
- PLLCFG = PLLCFG_MSEL | PLLCFG_PSEL;
- /* enable PLL */
- PLLCON = PLLCON_PLLE;
- /* commit changes */
- PLLFEED = 0xAA;
- PLLFEED = 0x55;
-
- /* wait for PLL lock */
- while (!(PLLSTAT & PLLSTAT_LOCK)) {
- continue;
- }
-
- /* enable & connect PLL */
- PLLCON = PLLCON_PLLE | PLLCON_PLLC;
- /* commit changes */
- PLLFEED = 0xAA;
- PLLFEED = 0x55;
-
- /* setup & enable the MAM */
- MAMTIM = MAMTIM_CYCLES;
- MAMCR = MAMCR_FULL;
-
- /* set the peripheral bus speed */
- /* value computed from config.h */
- VPBDIV = VPBDIV_VALUE;
-
- /* set the interrupt controller to flash */
- MEMMAP = MEMMAP_FLASH;
-
- /* clear all interrupts */
- VICIntEnClear = 0xFFFFFFFF;
- /* clear all FIQ selections */
- VICIntSelect = 0x00000000;
- /* point unvectored IRQs to reset() */
- VICDefVectAddr = (uint32_t)reset;
-
-}
diff --git a/sw/airborne/arch/lpc21/mcu_arch.h b/sw/airborne/arch/lpc21/mcu_arch.h
deleted file mode 100644
index 85a1ea701e..0000000000
--- a/sw/airborne/arch/lpc21/mcu_arch.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2010 The Paparazzi team
- *
- * This file is part of Paparazzi.
- *
- * Paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * Paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/**
- * @file arch/lpc21/mcu_arch.h
- * @brief lpc21 arch dependant microcontroller initialisation functions.
- * @addtogroup lpc21_arch LPC21 architecture
- */
-
-#ifndef LPC21_MCU_ARCH_H
-#define LPC21_MCU_ARCH_H
-
-extern void mcu_arch_init(void);
-
-#include "armVIC.h"
-
-#define mcu_int_enable() enableIRQ()
-#define mcu_int_disable() disableIRQ()
-
-#endif /* LPC21_MCU_ARCH_H */
diff --git a/sw/airborne/arch/lpc21/mcu_periph/adc_arch.c b/sw/airborne/arch/lpc21/mcu_periph/adc_arch.c
deleted file mode 100644
index 5ea4a19a50..0000000000
--- a/sw/airborne/arch/lpc21/mcu_periph/adc_arch.c
+++ /dev/null
@@ -1,282 +0,0 @@
-/*
- * Copyright (C) 2008 Pascal Brisset, Antoine Drouin
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/**
- * @file arch/lpc21/mcu_periph/adc_arch.c
- * @ingroup lpc21_arch
- *
- * Handling of ADC hardware for lpc21xx.
- */
-
-#include "mcu_periph/adc.h"
-
-#include "LPC21xx.h"
-#include "armVIC.h"
-#include BOARD_CONFIG
-
-
-#ifdef USE_AD0
-#ifndef AD0_VIC_SLOT
-#define AD0_VIC_SLOT 2
-#endif
-#endif
-
-#ifdef USE_AD1
-#ifndef AD1_VIC_SLOT
-#define AD1_VIC_SLOT 4
-#endif
-#endif
-
-
-/** First NB_ADC for bank 0, others for bank 2 */
-static struct adc_buf *buffers[NB_ADC * 2];
-
-volatile uint16_t adc0_val[NB_ADC] = {1, 2, 3, 4, 5, 6, 7, 8};
-volatile uint16_t adc1_val[NB_ADC] = {9, 10, 11, 12, 13, 14, 15, 16};
-
-void adcISR0(void) __attribute__((naked));
-void adcISR1(void) __attribute__((naked));
-
-void adc_buf_channel(uint8_t adc_channel, struct adc_buf *s, uint8_t av_nb_sample)
-{
- // check for out-of-bounds access
- if (adc_channel >= (NB_ADC * 2)) return;
- buffers[adc_channel] = s;
- s->av_nb_sample = av_nb_sample;
-}
-
-/*
-
-pin11 AD0.0 P0.27 PINSEL1 1 << 22
-pin13 AD0.1 P0.28 PINSEL1 1 << 24
-pin14 AD0.2 P0.29 PINSEL1 1 << 26
-pin15 AD0.3 P0.30 PINSEL1 1 << 28
-pin9 AD0.4 P0.25 PINSEL1 1 << 18
-pin10 AD0.5 P0.26 PINSEL1 1 << 20
-pin27 AD0.6 P0.4 PINSEL0 3 << 8
-pin29 AD0.7 P0.5 PINSEL0 3 << 10
-
-pin30 AD1.0 P0.6 PINSEL0 3 << 12
-pin33 AD1.1 P0.8 PINSEL0 3 << 16
-pin35 AD1.2 P0.10 PINSEL0 3 << 20
-pin38 AD1.3 P0.12 PINSEL0 3 << 24
-pin39 AD1.4 P0.13 PINSEL0 3 << 26
-pin45 AD1.5 P0.15 PINSEL0 3 << 30
-pin1 AD1.6 P0.21 PINSEL1 2 << 10
-pin2 AD1.7 P0.22 PINSEL1 1 << 12
-
-*/
-
-static const uint32_t ADC_PINSEL0_ONES = 0
-#if defined USE_AD0_6
- | 3 << 8
-#endif
-#if defined USE_AD0_7
- | 3 << 10
-#endif
-#if defined USE_AD1_0
- | 3 << 12
-#endif
-#if defined USE_AD1_1
- | 3 << 16
-#endif
-#if defined USE_AD1_2
- | 3 << 20
-#endif
-#if defined USE_AD1_3
- | 3 << 24
-#endif
-#if defined USE_AD1_4
- | 3 << 26
-#endif
-#if defined USE_AD1_5
- | 3 << 30
-#endif
- ;
-
-static const uint32_t ADC_PINSEL1_ONES = 0
-#if defined USE_AD0_0
- | 1 << 22
-#endif
-#if defined USE_AD0_1
- | 1 << 24
-#endif
-#if defined USE_AD0_2
- | 1 << 26
-#endif
-#if defined USE_AD0_3
- | 1 << 28
-#endif
-#if defined USE_AD0_4
- | 1 << 18
-#endif
-#if defined USE_AD0_5
- | 1 << 20
-#endif
-#if defined USE_AD1_6
- | 2 << 10
-#endif
-#if defined USE_AD1_7
- | 1 << 12
-#endif
- ;
-
-#ifdef USE_AD0
-static const uint32_t ADC_AD0CR_SEL_HW_SCAN = 0
-#if defined USE_AD0_0
- | 1 << 0
-#endif
-#if defined USE_AD0_1
- | 1 << 1
-#endif
-#if defined USE_AD0_2
- | 1 << 2
-#endif
-#if defined USE_AD0_3
- | 1 << 3
-#endif
-#if defined USE_AD0_4
- | 1 << 4
-#endif
-#if defined USE_AD0_5
- | 1 << 5
-#endif
-#if defined USE_AD0_6
- | 1 << 6
-#endif
-#if defined USE_AD0_7
- | 1 << 7
-#endif
- ;
-#endif
-
-#ifdef USE_AD1
-static const uint32_t ADC_AD1CR_SEL_HW_SCAN = 0
-#if defined USE_AD1_0
- | 1 << 0
-#endif
-#if defined USE_AD1_1
- | 1 << 1
-#endif
-#if defined USE_AD1_2
- | 1 << 2
-#endif
-#if defined USE_AD1_3
- | 1 << 3
-#endif
-#if defined USE_AD1_4
- | 1 << 4
-#endif
-#if defined USE_AD1_5
- | 1 << 5
-#endif
-#if defined USE_AD1_6
- | 1 << 6
-#endif
-#if defined USE_AD1_7
- | 1 << 7
-#endif
- ;
-#endif
-
-void adc_init(void)
-{
-
- /* connect pins for selected ADCs */
- PINSEL0 |= ADC_PINSEL0_ONES;
- PINSEL1 |= ADC_PINSEL1_ONES;
-
-#ifdef USE_AD0
- /* FIXME: this needs to be investigated, we should run just below 4.5MHz,
- but we are a lot slower (e.g. 58.6kHz with PCLK = 15MHz), see
- lpc_vor_convertions.c for right timing code */
- /* setup hw scan - PCLK/256 ( 58.6kHz/117.2kHz/234.4kHz ) - BURST ON */
- AD0CR = ADC_AD0CR_SEL_HW_SCAN | 0xFF << 8 | 1 << 16 | 0x01 << 21 ;
- /* AD0 selected as IRQ */
- VICIntSelect &= ~VIC_BIT(VIC_AD0);
- /* AD0 interrupt enabled */
- VICIntEnable = VIC_BIT(VIC_AD0);
- /* AD0 interrupt as VIC2 */
- _VIC_CNTL(AD0_VIC_SLOT) = VIC_ENABLE | VIC_AD0;
- _VIC_ADDR(AD0_VIC_SLOT) = (uint32_t)adcISR0;
-#endif
-
-#ifdef USE_AD1
- /* FIXME: this needs to be investigated, we should run just below 4.5MHz,
- but we are a lot slower (e.g. 58.6kHz with PCLK = 15MHz), see
- lpc_vor_convertions.c for right timing code */
- /* setup hw scan - PCLK/256 ( 58.6kHz/117.2kHz/234.4kHz ) - BURST ON */
- AD1CR = ADC_AD1CR_SEL_HW_SCAN | 0xFF << 8 | 1 << 16 | 0x01 << 21 ;
- /* AD1 selected as IRQ */
- VICIntSelect &= ~VIC_BIT(VIC_AD1);
- /* AD1 interrupt enabled */
- VICIntEnable = VIC_BIT(VIC_AD1);
- /* AD1 interrupt as VIC2 */
- _VIC_CNTL(AD1_VIC_SLOT) = VIC_ENABLE | VIC_AD1;
- _VIC_ADDR(AD1_VIC_SLOT) = (uint32_t)adcISR1;
-#endif
-
-}
-
-
-void adcISR0(void)
-{
- ISR_ENTRY();
- uint32_t tmp = AD0GDR;
- uint8_t channel = (uint8_t)(tmp >> 24) & 0x07;
- uint16_t value = (uint16_t)(tmp >> 6) & 0x03FF;
- adc0_val[channel] = value;
-
- struct adc_buf *buf = buffers[channel];
- if (buf) {
- uint8_t new_head = buf->head + 1;
- if (new_head >= buf->av_nb_sample) { new_head = 0; }
- buf->sum -= buf->values[new_head];
- buf->values[new_head] = value;
- buf->sum += value;
- buf->head = new_head;
- }
-
- VICVectAddr = 0x00000000; // clear this interrupt from the VIC
- ISR_EXIT(); // recover registers and return
-}
-
-void adcISR1(void)
-{
- ISR_ENTRY();
- uint32_t tmp = AD1GDR;
- uint8_t channel = (uint8_t)(tmp >> 24) & 0x07;
- uint16_t value = (uint16_t)(tmp >> 6) & 0x03FF;
- adc1_val[channel] = value;
- struct adc_buf *buf = buffers[channel + NB_ADC];
- if (buf) {
- uint8_t new_head = buf->head + 1;
- if (new_head >= buf->av_nb_sample) { new_head = 0; }
- buf->sum -= buf->values[new_head];
- buf->values[new_head] = value;
- buf->sum += value;
- buf->head = new_head;
- }
-
- VICVectAddr = 0x00000000; // clear this interrupt from the VIC
- ISR_EXIT(); // recover registers and return
-}
diff --git a/sw/airborne/arch/lpc21/mcu_periph/adc_arch.h b/sw/airborne/arch/lpc21/mcu_periph/adc_arch.h
deleted file mode 100644
index e056e92219..0000000000
--- a/sw/airborne/arch/lpc21/mcu_periph/adc_arch.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2008 Antoine Drouin
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/**
- * @file arch/lpc21/mcu_periph/adc_arch.h
- * @ingroup lpc21_arch
- *
- * Handling of ADC hardware for lpc21xx.
- */
-
-#ifndef ADC_ARCH_H
-#define ADC_ARCH_H
-
-#include BOARD_CONFIG
-
-/* Set the correct ADC resolution */
-#ifndef ADC_RESOLUTION
-#define ADC_RESOLUTION 1024
-#endif
-
-/** 8 ADCs for bank 0, others for bank 2 */
-#define NB_ADC 8
-
-#define AdcBank0(x) (x)
-#define AdcBank1(x) (x+NB_ADC)
-
-#endif /* ADC_ARCH_H */
diff --git a/sw/airborne/arch/lpc21/mcu_periph/dac_arch.c b/sw/airborne/arch/lpc21/mcu_periph/dac_arch.c
deleted file mode 100644
index d016bfbd87..0000000000
--- a/sw/airborne/arch/lpc21/mcu_periph/dac_arch.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2008 Pascal Brisset, Antoine Drouin
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/**
- * @file arch/lpc21/mcu_periph/dac_arch.c
- * @ingroup lpc21_arch
- *
- * Handling of DAC hardware for lpc21xx.
- */
-
-#include "mcu_periph/dac.h"
-
-/* turn on DAC pins */
-void dac_init(void)
-{
- PINSEL1 |= 2 << 18;
-}
diff --git a/sw/airborne/arch/lpc21/mcu_periph/dac_arch.h b/sw/airborne/arch/lpc21/mcu_periph/dac_arch.h
deleted file mode 100644
index be25cb93d4..0000000000
--- a/sw/airborne/arch/lpc21/mcu_periph/dac_arch.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2008 Pascal Brisset, Antoine Drouin
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/**
- * @file arch/lpc21/mcu_periph/dac_arch.h
- * @ingroup lpc21_arch
- *
- * Handling of DAC hardware for lpc21xx.
- */
-
-#ifndef LPC21_MCU_PERIPH_DAC_ARCH_H
-#define LPC21_MCU_PERIPH_DAC_ARCH_H
-
-#include "std.h"
-#include "LPC21xx.h"
-
-static inline void DACSet(uint16_t x)
-{
- DACR = x << 6;
-}
-
-
-#endif /* LPC21_MCU_PERIPH_DAC_ARCH_H */
diff --git a/sw/airborne/arch/lpc21/mcu_periph/gpio_arch.h b/sw/airborne/arch/lpc21/mcu_periph/gpio_arch.h
deleted file mode 100644
index 87b9029714..0000000000
--- a/sw/airborne/arch/lpc21/mcu_periph/gpio_arch.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright (C) 2013 Felix Ruess
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/**
- * @file arch/lpc21/mcu_periph/gpio_arch.h
- *
- * GPIO helper functions for LPC21xx.
- */
-
-#ifndef GPIO_ARCH_H
-#define GPIO_ARCH_H
-
-#include "std.h"
-#include "LPC21xx.h"
-
-typedef uint32_t gpio_port_t;
-
-#define GPIOA 0
-#define GPIOB 1
-
-#define GPIO0 (1 << 0)
-#define GPIO1 (1 << 1)
-#define GPIO2 (1 << 2)
-#define GPIO3 (1 << 3)
-#define GPIO4 (1 << 4)
-#define GPIO5 (1 << 5)
-#define GPIO6 (1 << 6)
-#define GPIO7 (1 << 7)
-#define GPIO8 (1 << 8)
-#define GPIO9 (1 << 9)
-#define GPIO10 (1 << 10)
-#define GPIO11 (1 << 11)
-#define GPIO12 (1 << 12)
-#define GPIO13 (1 << 13)
-#define GPIO14 (1 << 14)
-#define GPIO15 (1 << 15)
-#define GPIO16 (1 << 16)
-#define GPIO17 (1 << 17)
-#define GPIO18 (1 << 18)
-#define GPIO19 (1 << 19)
-#define GPIO20 (1 << 20)
-#define GPIO21 (1 << 21)
-#define GPIO22 (1 << 22)
-#define GPIO23 (1 << 23)
-#define GPIO24 (1 << 24)
-#define GPIO25 (1 << 25)
-#define GPIO26 (1 << 26)
-#define GPIO27 (1 << 27)
-#define GPIO28 (1 << 28)
-#define GPIO29 (1 << 29)
-#define GPIO30 (1 << 30)
-#define GPIO31 (1 << 31)
-
-
-/**
- * Setup one or more pins of the given GPIO port as outputs.
- * @param[in] port
- * @param[in] gpios If multiple pins are to be changed, use logical OR '|' to separate them.
- */
-static inline void gpio_setup_output(gpio_port_t port, uint32_t gpios)
-{
- if (port == 0) {
- IO0DIR |= gpios;
- } else if (port == 1) {
- IO1DIR |= gpios;
- }
-}
-
-/**
- * Setup one or more pins of the given GPIO port as inputs.
- * @param[in] port
- * @param[in] gpios If multiple pins are to be changed, use logical OR '|' to separate them.
- */
-static inline void gpio_setup_input(gpio_port_t port, uint32_t gpios)
-{
- if (port == 0) {
- IO0DIR &= ~gpios;
- } else if (port == 1) {
- IO1DIR &= ~gpios;
- }
-}
-
-/**
- * Set one or more pins of the given GPIO port to high level.
- * @param[in] port
- * @param[in] gpios If multiple pins are to be changed, use logical OR '|' to separate them.
- */
-static inline void gpio_set(gpio_port_t port, uint32_t gpios)
-{
- if (port == 0) {
- IO0SET = gpios;
- } else if (port == 1) {
- IO1SET = gpios;
- }
-}
-
-/**
- * Clear one or more pins of the given GPIO port to low level.
- * @param[in] port
- * @param[in] gpios If multiple pins are to be changed, use logical OR '|' to separate them.
- */
-static inline void gpio_clear(gpio_port_t port, uint32_t gpios)
-{
- if (port == 0) {
- IO0CLR = gpios;
- } else if (port == 1) {
- IO1CLR = gpios;
- }
-}
-
-/**
- * Toggle a one or more pins of the given GPIO port.
- * @param[in] port
- * @param[in] gpios If multiple pins are to be changed, use logical OR '|' to separate them.
- */
-static inline void gpio_toggle(gpio_port_t port, uint32_t gpios)
-{
- if (port == 0) {
- uint32_t set_gpios = IO0PIN;
- // clear selected gpio pins which are currently set
- IO0CLR = set_gpios & gpios;
- // set selected gpio pins which are currently cleared
- IO0SET = ~set_gpios & gpios;
- } else if (port == 1) {
- uint32_t set_gpios = IO1PIN;
- // clear selected gpio pins which are currently set
- IO1CLR = set_gpios & gpios;
- // set selected gpio pins which are currently cleared
- IO1SET = ~set_gpios & gpios;
- }
-}
-
-/**
- * Read the value of one or more pins of the given GPIO port.
- * @param[in] port GPIO port (0 or 1)
- * @param[in] gpios GPIO pin(s). If multiple pins are to be changed, use logical OR '|' to separate them.
- */
-static inline uint32_t gpio_get(gpio_port_t port, uint32_t gpios)
-{
- if (port == 0) {
- return IO0PIN & gpios;
- } else if (port == 1) {
- return IO1PIN & gpios;
- }
-}
-
-#endif /* GPIO_ARCH_H */
diff --git a/sw/airborne/arch/lpc21/mcu_periph/i2c_arch.c b/sw/airborne/arch/lpc21/mcu_periph/i2c_arch.c
deleted file mode 100644
index 2b13db730d..0000000000
--- a/sw/airborne/arch/lpc21/mcu_periph/i2c_arch.c
+++ /dev/null
@@ -1,427 +0,0 @@
-/*
- * Copyright (C) 2010-2012 The Paparazzi Team
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/**
- * @file arch/lpc21/mcu_periph/i2c_arch.c
- * @ingroup lpc21_arch
- *
- * Handling of I2C hardware for LPC21xx.
- */
-
-#include "mcu_periph/i2c.h"
-
-#include "std.h"
-#include BOARD_CONFIG
-#include "armVIC.h"
-
-
-static bool i2c_lpc21_idle(struct i2c_periph *p) __attribute__((unused));
-static bool i2c_lpc21_submit(struct i2c_periph *p, struct i2c_transaction *t) __attribute__((unused));
-static void i2c_lpc21_setbitrate(struct i2c_periph *p, int bitrate) __attribute__((unused));
-
-
-///////////////////
-// I2C Automaton //
-///////////////////
-
-__attribute__((always_inline)) static inline void I2cSendStart(struct i2c_periph *p)
-{
- p->status = I2CStartRequested;
- ((i2cRegs_t *)(p->reg_addr))->conset = _BV(STA);
-}
-
-__attribute__((always_inline)) static inline void I2cSendAck(void *reg)
-{
- ((i2cRegs_t *)reg)->conset = _BV(AA);
-}
-
-__attribute__((always_inline)) static inline void I2cEndOfTransaction(struct i2c_periph *p)
-{
- // handle fifo here
- p->trans_extract_idx++;
- if (p->trans_extract_idx >= I2C_TRANSACTION_QUEUE_LEN) {
- p->trans_extract_idx = 0;
- }
- // if no more transaction to process, stop here, else start next transaction
- if (p->trans_extract_idx == p->trans_insert_idx) {
- p->status = I2CIdle;
- } else {
- I2cSendStart(p);
- }
-}
-
-__attribute__((always_inline)) static inline void I2cSendStop(struct i2c_periph *p, struct i2c_transaction *t)
-{
- ((i2cRegs_t *)(p->reg_addr))->conset = _BV(STO);
- // transaction finished with success
- t->status = I2CTransSuccess;
- I2cEndOfTransaction(p);
-}
-
-__attribute__((always_inline)) static inline void I2cFail(struct i2c_periph *p, struct i2c_transaction *t)
-{
- ((i2cRegs_t *)(p->reg_addr))->conset = _BV(STO);
- // transaction failed
- t->status = I2CTransFailed;
- // FIXME I2C should be reseted here ?
- I2cEndOfTransaction(p);
-}
-
-__attribute__((always_inline)) static inline void I2cSendByte(void *reg, uint8_t b)
-{
- ((i2cRegs_t *)reg)->dat = b;
-}
-
-__attribute__((always_inline)) static inline void I2cReceive(void *reg, bool ack)
-{
- if (ack) { ((i2cRegs_t *)reg)->conset = _BV(AA); }
- else { ((i2cRegs_t *)reg)->conclr = _BV(AAC); }
-}
-
-__attribute__((always_inline)) static inline void I2cClearStart(void *reg)
-{
- ((i2cRegs_t *)reg)->conclr = _BV(STAC);
-}
-
-__attribute__((always_inline)) static inline void I2cClearIT(void *reg)
-{
- ((i2cRegs_t *)reg)->conclr = _BV(SIC);
-}
-
-__attribute__((always_inline)) static inline void I2cAutomaton(int32_t state, struct i2c_periph *p)
-{
- struct i2c_transaction *trans = p->trans[p->trans_extract_idx];
- switch (state) {
- case I2C_START:
- case I2C_RESTART:
- // Set R/W flag
- switch (trans->type) {
- case I2CTransRx :
- SetBit(trans->slave_addr, 0);
- break;
- case I2CTransTx:
- case I2CTransTxRx:
- ClearBit(trans->slave_addr, 0);
- break;
- default:
- break;
- }
- I2cSendByte(p->reg_addr, trans->slave_addr);
- I2cClearStart(p->reg_addr);
- p->idx_buf = 0;
- break;
- case I2C_MR_DATA_ACK:
- if (p->idx_buf < trans->len_r) {
- trans->buf[p->idx_buf] = ((i2cRegs_t *)(p->reg_addr))->dat;
- p->idx_buf++;
- I2cReceive(p->reg_addr, p->idx_buf < trans->len_r - 1);
- } else {
- /* error , we should have got NACK */
- I2cFail(p, trans);
- }
- break;
- case I2C_MR_DATA_NACK:
- if (p->idx_buf < trans->len_r) {
- trans->buf[p->idx_buf] = ((i2cRegs_t *)(p->reg_addr))->dat;
- }
- I2cSendStop(p, trans);
- break;
- case I2C_MR_SLA_ACK: /* At least one char */
- /* Wait and reply with ACK or NACK */
- I2cReceive(p->reg_addr, p->idx_buf < trans->len_r - 1);
- break;
- case I2C_MR_SLA_NACK:
- case I2C_MT_SLA_NACK:
- /* Slave is not responding, transaction is failed */
- I2cFail(p, trans);
- break;
- case I2C_MT_SLA_ACK:
- case I2C_MT_DATA_ACK:
- if (p->idx_buf < trans->len_w) {
- I2cSendByte(p->reg_addr, trans->buf[p->idx_buf]);
- p->idx_buf++;
- } else {
- if (trans->type == I2CTransTxRx) {
- trans->type = I2CTransRx; /* FIXME should not change type */
- p->idx_buf = 0;
- trans->slave_addr |= 1;
- I2cSendStart(p);
- } else {
- I2cSendStop(p, trans);
- }
- }
- break;
- default:
- I2cFail(p, trans);
- /* FIXME log error */
- break;
- }
-}
-
-
-#if USE_I2C0
-
-/* default clock speed 37.5KHz with our 15MHz PCLK
- I2C0_CLOCK = PCLK / (I2C0_SCLL + I2C0_SCLH) */
-#ifndef I2C0_SCLL
-#define I2C0_SCLL 200
-#endif
-
-#ifndef I2C0_SCLH
-#define I2C0_SCLH 200
-#endif
-
-/* adjust for other PCLKs */
-
-#if (PCLK == 15000000)
-#define I2C0_SCLL_D I2C0_SCLL
-#define I2C0_SCLH_D I2C0_SCLH
-#else
-
-#if (PCLK == 30000000)
-#define I2C0_SCLL_D (2*I2C0_SCLL)
-#define I2C0_SCLH_D (2*I2C0_SCLH)
-#else
-
-#if (PCLK == 60000000)
-#define I2C0_SCLL_D (4*I2C0_SCLL)
-#define I2C0_SCLH_D (4*I2C0_SCLH)
-#else
-
-#error unknown PCLK frequency
-#endif
-#endif
-#endif
-
-#ifndef I2C0_VIC_SLOT
-#define I2C0_VIC_SLOT 8
-#endif
-
-
-void i2c0_ISR(void) __attribute__((naked));
-
-void i2c0_ISR(void)
-{
- ISR_ENTRY();
-
- uint32_t state = I2C0STAT;
- I2cAutomaton(state, &i2c0);
- I2cClearIT(i2c0.reg_addr);
-
- VICVectAddr = 0x00000000; // clear this interrupt from the VIC
- ISR_EXIT(); // recover registers and return
-}
-
-uint8_t i2c0_vic_channel;
-
-/* SDA0 on P0.3 */
-/* SCL0 on P0.2 */
-void i2c0_hw_init(void)
-{
- i2c0.idle = i2c_lpc21_idle;
- i2c0.submit = i2c_lpc21_submit;
- i2c0.setbitrate = i2c_lpc21_setbitrate;
-
- i2c0.reg_addr = I2C0;
- i2c0_vic_channel = VIC_I2C0;
- i2c0.init_struct = (void *)(&i2c0_vic_channel);
-
- /* set P0.2 and P0.3 to I2C0 */
- PINSEL0 |= 1 << 4 | 1 << 6;
- /* clear all flags */
- I2C0CONCLR = _BV(AAC) | _BV(SIC) | _BV(STAC) | _BV(I2ENC);
- /* enable I2C */
- I2C0CONSET = _BV(I2EN);
- /* set bitrate */
- I2C0SCLL = I2C0_SCLL_D;
- I2C0SCLH = I2C0_SCLH_D;
-
- // initialize the interrupt vector
- VICIntSelect &= ~VIC_BIT(VIC_I2C0); // I2C0 selected as IRQ
- VICIntEnable = VIC_BIT(VIC_I2C0); // I2C0 interrupt enabled
- _VIC_CNTL(I2C0_VIC_SLOT) = VIC_ENABLE | VIC_I2C0;
- _VIC_ADDR(I2C0_VIC_SLOT) = (uint32_t)i2c0_ISR; // address of the ISR
-}
-
-#endif /* USE_I2C0 */
-
-
-
-#if USE_I2C1
-
-/* default clock speed 37.5KHz with our 15MHz PCLK
- I2C1_CLOCK = PCLK / (I2C1_SCLL + I2C1_SCLH) */
-#ifndef I2C1_SCLL
-#define I2C1_SCLL 200
-#endif
-
-#ifndef I2C1_SCLH
-#define I2C1_SCLH 200
-#endif
-
-/* adjust for other PCLKs */
-
-#if (PCLK == 15000000)
-#define I2C1_SCLL_D I2C1_SCLL
-#define I2C1_SCLH_D I2C1_SCLH
-#else
-
-#if (PCLK == 30000000)
-#define I2C1_SCLL_D (2*I2C1_SCLL)
-#define I2C1_SCLH_D (2*I2C1_SCLH)
-#else
-
-#if (PCLK == 60000000)
-#define I2C1_SCLL_D (4*I2C1_SCLL)
-#define I2C1_SCLH_D (4*I2C1_SCLH)
-#else
-
-#error unknown PCLK frequency
-#endif
-#endif
-#endif
-
-#ifndef I2C1_VIC_SLOT
-#define I2C1_VIC_SLOT 9
-#endif
-
-
-void i2c1_ISR(void) __attribute__((naked));
-
-void i2c1_ISR(void)
-{
- ISR_ENTRY();
-
- uint32_t state = I2C1STAT;
- I2cAutomaton(state, &i2c1);
- I2cClearIT(i2c1.reg_addr);
-
- VICVectAddr = 0x00000000; // clear this interrupt from the VIC
- ISR_EXIT(); // recover registers and return
-}
-
-uint8_t i2c1_vic_channel;
-
-/* SDA1 on P0.14 */
-/* SCL1 on P0.11 */
-void i2c1_hw_init(void)
-{
- i2c1.idle = i2c_lpc21_idle;
- i2c1.submit = i2c_lpc21_submit;
- i2c1.setbitrate = i2c_lpc21_setbitrate;
-
- i2c1.reg_addr = I2C1;
- i2c1_vic_channel = VIC_I2C1;
- i2c1.init_struct = (void *)(&i2c1_vic_channel);
-
- /* set P0.11 and P0.14 to I2C1 */
- PINSEL0 |= 3 << 22 | 3 << 28;
- /* clear all flags */
- I2C1CONCLR = _BV(AAC) | _BV(SIC) | _BV(STAC) | _BV(I2ENC);
- /* enable I2C */
- I2C1CONSET = _BV(I2EN);
- /* set bitrate */
- I2C1SCLL = I2C1_SCLL_D;
- I2C1SCLH = I2C1_SCLH_D;
-
- // initialize the interrupt vector
- VICIntSelect &= ~VIC_BIT(VIC_I2C1); // I2C1 selected as IRQ
- VICIntEnable = VIC_BIT(VIC_I2C1); // I2C1 interrupt enabled
- _VIC_CNTL(I2C1_VIC_SLOT) = VIC_ENABLE | VIC_I2C1;
- _VIC_ADDR(I2C1_VIC_SLOT) = (uint32_t)i2c1_ISR; // address of the ISR
-}
-
-#endif /* USE_I2C1 */
-
-
-static bool i2c_lpc21_idle(struct i2c_periph *p)
-{
- return p->status == I2CIdle;
-}
-
-static bool i2c_lpc21_submit(struct i2c_periph *p, struct i2c_transaction *t)
-{
-
- uint8_t idx;
- idx = p->trans_insert_idx + 1;
- if (idx >= I2C_TRANSACTION_QUEUE_LEN) { idx = 0; }
- if (idx == p->trans_extract_idx) {
- /* queue full */
- p->errors->queue_full_cnt++;
- t->status = I2CTransFailed;
- return false;
- }
- t->status = I2CTransPending;
-
- /* disable I2C interrupt */
- //uint8_t* vic = (uint8_t*)(p->init_struct);
- //VICIntEnClear = VIC_BIT(*vic);
- disableIRQ();
-
- p->trans[p->trans_insert_idx] = t;
- p->trans_insert_idx = idx;
- /* if peripheral is idle, start the transaction */
- if (p->status == I2CIdle) {
- I2cSendStart(p);
- }
- /* else it will be started by the interrupt handler */
- /* when the previous transactions completes */
-
- /* enable I2C interrupt again */
- //VICIntEnable = VIC_BIT(*vic);
- enableIRQ();
-
- return true;
-}
-
-void i2c_event(void) { }
-
-static void i2c_lpc21_setbitrate(struct i2c_periph *p, int bitrate)
-{
- int period = 15000000 / 2 / bitrate;
- // Max 400kpbs
- if (period < 19) {
- period = 19;
- }
- // Min 5kbps
- if (period > 1500) {
- period = 1500;
- }
-
-#if (PCLK == 30000000)
- period *= 2;
-#endif
-
-#if (PCLK == 60000000)
- period *= 4;
-#endif
-
- /* default clock speed 37.5KHz with our 15MHz PCLK
- * I2C_CLOCK = PCLK / (I2C_SCLL + I2C_SCLH)
- */
-
- /* set bitrate */
- ((i2cRegs_t *)(p->reg_addr))->scll = period;
- ((i2cRegs_t *)(p->reg_addr))->sclh = period;
-}
-
-
diff --git a/sw/airborne/arch/lpc21/mcu_periph/i2c_arch.h b/sw/airborne/arch/lpc21/mcu_periph/i2c_arch.h
deleted file mode 100644
index 7ce7d73220..0000000000
--- a/sw/airborne/arch/lpc21/mcu_periph/i2c_arch.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2010-2012 The Paparazzi Team
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/**
- * @file arch/lpc21/mcu_periph/i2c_arch.h
- * @ingroup lpc21_arch
- *
- * Handling of I2C hardware for LPC21xx.
- */
-
-#ifndef I2C_ARCH_H
-#define I2C_ARCH_H
-
-
-#include "LPC21xx.h"
-
-
-#define I2C_START 0x08
-#define I2C_RESTART 0x10
-#define I2C_MT_SLA_ACK 0x18
-#define I2C_MT_SLA_NACK 0x20
-#define I2C_MT_DATA_ACK 0x28
-#define I2C_MR_SLA_ACK 0x40
-#define I2C_MR_SLA_NACK 0x48
-#define I2C_MR_DATA_ACK 0x50
-#define I2C_MR_DATA_NACK 0x58
-
-
-#if USE_I2C0
-
-extern void i2c0_hw_init(void);
-
-#endif /* USE_I2C0 */
-
-
-
-#if USE_I2C1
-
-extern void i2c1_hw_init(void);
-
-#endif /* USE_I2C1 */
-
-
-#endif /* I2C_ARCH_H */
diff --git a/sw/airborne/arch/lpc21/mcu_periph/pwm_input_arch.c b/sw/airborne/arch/lpc21/mcu_periph/pwm_input_arch.c
deleted file mode 100644
index 6939a99131..0000000000
--- a/sw/airborne/arch/lpc21/mcu_periph/pwm_input_arch.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Copyright (C) 2011 The Paparazzi Team
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/**
- * @file arch/lpc21/mcu_periph/pwm_input_arch.c
- * @ingroup lpc21_arch
- *
- * handling of arm7 PWM input using a timer with capture.
- */
-
-#include "mcu_periph/pwm_input_arch.h"
-
-#include "LPC21xx.h"
-#include "armVIC.h"
-
-//UPDATE THESE TO BE MORE ACCESSIBLE AND BE WARY OF EXISTING USAGE
-//POSSIBLY MAKE MORE INPUTS ACCESSIBLE
-#ifdef USE_PWM_INPUT1
-//INPUT CAPTURE CAP0.3 on P0.29
-#define PWM_INPUT1_PINSEL PINSEL1
-#define PWM_INPUT1_PINSEL_BIT 26
-#define PWM_INPUT1_PINSEL_VAL (0x2 << PWM_INPUT1_PINSEL_BIT)
-#define PWM_INPUT1_PINSEL_MASK (0x3 <reg_addr))->cr0, CPOL);
-}
-
-__attribute__((always_inline)) static inline void SpiClearCPOL(struct spi_periph *p)
-{
- ClearBit(((sspRegs_t *)(p->reg_addr))->cr0, CPOL);
-}
-
-__attribute__((always_inline)) static inline void SpiSetCPHA(struct spi_periph *p)
-{
- SetBit(((sspRegs_t *)(p->reg_addr))->cr0, CPHA);
-}
-
-__attribute__((always_inline)) static inline void SpiClearCPHA(struct spi_periph *p)
-{
- ClearBit(((sspRegs_t *)(p->reg_addr))->cr0, CPHA);
-}
-///@}
-
-
-/**
- * Set the SPI data size to 8 or 16bit.
- * @param p SPI peripheral to set
- * @param dss data size
- */
-__attribute__((always_inline)) static inline void SpiSetDataSize(struct spi_periph *p, enum SPIDataSizeSelect dss)
-{
- switch (dss) {
- default:
- case SPIDss8bit:
- ((sspRegs_t *)(p->reg_addr))->cr0 = (((sspRegs_t *)(p->reg_addr))->cr0 & ~(0xF << DSS)) | (DSS_VAL8 << DSS);
- break;
- case SPIDss16bit:
- ((sspRegs_t *)(p->reg_addr))->cr0 = (((sspRegs_t *)(p->reg_addr))->cr0 & ~(0xF << DSS)) | (DSS_VAL16 << DSS);
- break;
- }
-}
-
-
-/** @name SPI control
- * Spi control functions.
- */
-///@{
-__attribute__((always_inline)) static inline void SpiEnable(struct spi_periph *p)
-{
- SetBit(((sspRegs_t *)(p->reg_addr))->cr1, SSE);
-}
-
-__attribute__((always_inline)) static inline void SpiDisable(struct spi_periph *p)
-{
- ClearBit(((sspRegs_t *)(p->reg_addr))->cr1, SSE);
-}
-
-__attribute__((always_inline)) static inline void SpiEnableRti(struct spi_periph *p)
-{
- SetBit(((sspRegs_t *)(p->reg_addr))->imsc, RTIM);
-}
-
-__attribute__((always_inline)) static inline void SpiDisableRti(struct spi_periph *p)
-{
- ClearBit(((sspRegs_t *)(p->reg_addr))->imsc, RTIM);
-}
-
-__attribute__((always_inline)) static inline void SpiClearRti(struct spi_periph *p)
-{
- SetBit(((sspRegs_t *)(p->reg_addr))->icr, RTIC);
-}
-
-__attribute__((always_inline)) static inline void SpiEnableTxi(struct spi_periph *p)
-{
- SetBit(((sspRegs_t *)(p->reg_addr))->imsc, TXIM);
-}
-
-__attribute__((always_inline)) static inline void SpiDisableTxi(struct spi_periph *p)
-{
- ClearBit(((sspRegs_t *)(p->reg_addr))->imsc, TXIM);
-}
-
-__attribute__((always_inline)) static inline void SpiEnableRxi(struct spi_periph *p)
-{
- SetBit(((sspRegs_t *)(p->reg_addr))->imsc, RXIM);
-}
-
-__attribute__((always_inline)) static inline void SpiDisableRxi(struct spi_periph *p)
-{
- ClearBit(((sspRegs_t *)(p->reg_addr))->imsc, RXIM);
-}
-
-__attribute__((always_inline)) static inline void SpiSend(struct spi_periph *p, uint16_t c)
-{
- ((sspRegs_t *)(p->reg_addr))->dr = c;
-}
-
-__attribute__((always_inline)) static inline void SpiRead(struct spi_periph *p, uint16_t *c)
-{
- *c = ((sspRegs_t *)(p->reg_addr))->dr;
-}
-
-
-__attribute__((always_inline)) static inline void SpiTransmit(struct spi_periph *p, struct spi_transaction *t)
-{
- // when all byte are sent, continue until tx_idx reach input_length
- // needed when input_length is bigger than output_length
- uint16_t max_idx = Max(t->output_length, t->input_length);
- while (p->tx_idx_buf < max_idx && bit_is_set(((sspRegs_t *)(p->reg_addr))->sr, TNF)) {
- if (p->tx_idx_buf < t->output_length) {
- if (t->dss == SPIDss8bit) {
- SpiSend(p, t->output_buf[p->tx_idx_buf]);
- } else if (t->dss == SPIDss16bit) {
- uint16_t tmp1 = t->output_buf[2 * p->tx_idx_buf]; // LSB
- uint16_t tmp2 = t->output_buf[2 * p->tx_idx_buf + 1] << 8; // MSB
- SpiSend(p, tmp1 | tmp2);
- }
- } else {
- SpiSend(p, 0);
- }
- p->tx_idx_buf++;
- }
- if (p->tx_idx_buf == max_idx) {
- SpiDisableTxi(p);
- }
-}
-
-__attribute__((always_inline)) static inline void SpiReceive(struct spi_periph *p, struct spi_transaction *t)
-{
- while (bit_is_set(((sspRegs_t *)(p->reg_addr))->sr, RNE)) {
- if (p->rx_idx_buf < t->input_length) {
- uint16_t r;
- SpiRead(p, &r);
- if (t->dss == SPIDss8bit) {
- t->input_buf[p->rx_idx_buf] = (uint8_t)r;
- } else if (t->dss == SPIDss16bit) {
- t->input_buf[2 * p->rx_idx_buf] = (uint8_t)r;
- t->input_buf[2 * p->rx_idx_buf + 1] = (uint8_t)(r >> 8);
- }
- p->rx_idx_buf++;
- } else {
- uint16_t foo;
- SpiRead(p, &foo);
- }
- }
-}
-
-__attribute__((always_inline)) static inline void SpiInitBuf(struct spi_periph *p, struct spi_transaction *t)
-{
- p->rx_idx_buf = 0;
- p->tx_idx_buf = 0;
- SpiTransmit(p, t); // fill fifo
-}
-
-
-__attribute__((always_inline)) static inline void SpiStart(struct spi_periph *p, struct spi_transaction *t)
-{
- p->status = SPIRunning;
- t->status = SPITransRunning;
-
- // handle spi options (CPOL, CPHA, data size,...)
- if (t->cpol == SPICpolIdleHigh) { SpiSetCPOL(p); }
- else { SpiClearCPOL(p); }
-
- if (t->cpha == SPICphaEdge2) { SpiSetCPHA(p); }
- else { SpiClearCPHA(p); }
-
- SpiSetDataSize(p, t->dss);
-
- // handle slave select
- if (t->select == SPISelectUnselect || t->select == SPISelect) {
- SpiSlaveSelect(t->slave_idx);
- }
-
- // callback function before transaction
- if (t->before_cb != 0) { t->before_cb(t); }
-
- // start spi transaction
- SpiEnable(p);
- SpiInitBuf(p, t);
- SpiEnableTxi(p); // enable tx fifo half empty interrupt
- SpiEnableRti(p); // enable rx timeout interrupt
-}
-
-__attribute__((always_inline)) static inline void SpiEndOfTransaction(struct spi_periph *p, struct spi_transaction *t)
-{
- // callback function after transaction
- if (t->after_cb != 0) { t->after_cb(t); }
-
- // handle slave unselect
- if (t->select == SPISelectUnselect || t->select == SPIUnselect) {
- SpiSlaveUnselect(t->slave_idx);
- }
-
- SpiDisable(p);
- // end transaction with success
- t->status = SPITransSuccess;
-
- // handle transaction fifo here
- p->trans_extract_idx++;
- if (p->trans_extract_idx >= SPI_TRANSACTION_QUEUE_LEN) {
- p->trans_extract_idx = 0;
- }
- // if no more transaction to process or locked, stop here, else start next transaction
- if (p->trans_extract_idx == p->trans_insert_idx || p->suspend) {
- p->status = SPIIdle;
- } else {
- SpiStart(p, p->trans[p->trans_extract_idx]);
- }
-
-}
-
-__attribute__((always_inline)) static inline void SpiAutomaton(struct spi_periph *p)
-{
- struct spi_transaction *trans = p->trans[p->trans_extract_idx];
-
- /* Tx fifo is half empty */
- if (bit_is_set(((sspRegs_t *)(p->reg_addr))->mis, TXMIS)) {
- SpiTransmit(p, trans);
- SpiReceive(p, trans);
- // tx_idx can be greater than output_length (when input_length > output_length)
- if (p->tx_idx_buf >= trans->output_length && p->rx_idx_buf == trans->input_length) {
- if (bit_is_set(((sspRegs_t *)(p->reg_addr))->sr, BSY)) {
- SpiEnableTxi(p); // FIXME in case Rti is not called
- } else {
- SpiDisableRti(p);
- SpiClearRti(p); /* clear interrupt */
- SpiEndOfTransaction(p, trans);
- }
- }
- }
-
- /* Rx fifo is not empty and no receive took place in the last 32 bits period */
- if (bit_is_set(((sspRegs_t *)(p->reg_addr))->mis, RTMIS)) {
- SpiReceive(p, trans);
- SpiDisableRti(p);
- SpiClearRti(p); /* clear interrupt */
- SpiEndOfTransaction(p, trans);
- }
-}
-
-__attribute__((always_inline)) static inline void SpiSlaveStart(struct spi_periph *p, struct spi_transaction *t)
-{
- p->status = SPIRunning;
- t->status = SPITransRunning;
-
- // callback function before transaction
- if (t->before_cb != 0) { t->before_cb(t); }
-
- // start spi transaction
- SpiEnable(p);
- SpiInitBuf(p, t);
- SpiEnableTxi(p); // enable tx fifo half empty interrupt
- //SpiEnableRti(p); // enable rx timeout interrupt
-}
-
-__attribute__((always_inline)) static inline void SpiSlaveAutomaton(struct spi_periph *p)
-{
- struct spi_transaction *trans = p->trans[p->trans_extract_idx];
-
- /* Tx fifo is half empty */
- if (bit_is_set(((sspRegs_t *)(p->reg_addr))->mis, TXMIS)) {
- SpiTransmit(p, trans);
- SpiReceive(p, trans);
- SpiEnableRti(p);
- }
-
- /* Rx fifo is not empty and no receive took place in the last 32 bits period */
- if (bit_is_set(((sspRegs_t *)(p->reg_addr))->mis, RTMIS)) {
- SpiReceive(p, trans);
- SpiClearRti(p); /* clear interrupt */
- SpiDisableRti(p);
-
- // callback function after transaction
- if (trans->after_cb != 0) { trans->after_cb(trans); }
-
- SpiDisable(p);
- // end transaction with success
- trans->status = SPITransSuccess;
- p->status = SPIIdle;
- }
-
-}
-///@}
-
-/* SSP (SPI1) pins (UM10120_1.pdf page 76)
- P0.17 SCK PINSEL1 2 << 2
- P0.18 MISO PINSEL1 2 << 4
- P0.19 MOSI PINSEL1 2 << 6
- P0.20 SS PINSEL1 2 << 8
-*/
-#define SSP_PINSEL1_SCK (2 << 2)
-#define SSP_PINSEL1_MISO (2 << 4)
-#define SSP_PINSEL1_MOSI (2 << 6)
-#define SSP_PINSEL1_SSEL (2 << 8)
-
-/** default initial settings */
-#ifndef SPI1_VIC_SLOT
-#define SPI1_VIC_SLOT 7
-#endif
-
-/*
- *
- * SPI Master code
- *
- *
- */
-
-#if SPI_MASTER
-
-#if USE_SPI0
-#error "SPI0 is currently not implemented in the mcu_periph/spi HAL for the LPC!"
-
-// void spi0_ISR(void) __attribute__((naked));
-//
-// void spi0_ISR(void) {
-// ISR_ENTRY();
-// VICVectAddr = 0x00000000;
-// ISR_EXIT();
-// }
-
-uint8_t spi0_vic_slot;
-
-void spi0_arch_init(void)
-{
-
- spi0.reg_addr = SPI0;
- spi0_vic_slot = VIC_SPI0;
- spi0.init_struct = (void *)(&spi0_vic_slot);
-
- // TODO set spi0 and interrupt vector
-}
-
-#endif
-
-
-#if USE_SPI1
-
-/* SSPCR0 settings */
-#define MASTER_SSP_DSS 0x07 << 0 ///< data size : 8 bits
-#define MASTER_SSP_FRF 0x00 << 4 ///< frame format : SPI
-#define MASTER_SSP_CPOL 0x00 << 6 ///< clock polarity : SCK idles low
-#define MASTER_SSP_CPHA 0x00 << 7 ///< clock phase : data captured on first clock transition
-#define MASTER_SSP_SCR 0x0F << 8 ///< serial clock rate : divide by 16
-
-/* SSPCR1 settings */
-#define MASTER_SSP_LBM 0x00 << 0 ///< loopback mode : disabled
-#define MASTER_SSP_SSE 0x00 << 1 ///< SSP enable : disabled
-#define MASTER_SSP_MS 0x00 << 2 ///< master slave mode : master
-#define MASTER_SSP_SOD 0x00 << 3 ///< slave output disable : don't care when master
-
-/** Clock prescaler.
- * SPI clock rate = PCLK / (CPSR*(SCR+1))
- * with PCLK = 30 MHz, CPSR = 2 and SCR = 15 -> clock ~ 1 MHz
- */
-#ifndef SSPCPSR_VAL
-#define SSPCPSR_VAL 0x02 /* clock prescale */
-#endif
-
-void spi1_ISR(void) __attribute__((naked));
-
-void spi1_ISR(void)
-{
- ISR_ENTRY();
-
- SpiAutomaton(&spi1);
-
- VICVectAddr = 0x00000000; /* clear this interrupt from the VIC */
- ISR_EXIT();
-}
-
-uint8_t spi1_vic_slot;
-
-void spi1_arch_init(void)
-{
-
- spi1.reg_addr = SPI1;
- spi1_vic_slot = VIC_SPI1;
- spi1.init_struct = (void *)(&spi1_vic_slot);
-
- /* setup pins for SSP (SCK, MISO, MOSI) */
- PINSEL1 |= SSP_PINSEL1_SCK | SSP_PINSEL1_MISO | SSP_PINSEL1_MOSI;
-
- /* setup SSP */
- SSPCR0 = MASTER_SSP_DSS | MASTER_SSP_FRF | MASTER_SSP_CPOL | MASTER_SSP_CPHA | MASTER_SSP_SCR;
- SSPCR1 = MASTER_SSP_LBM | MASTER_SSP_MS | MASTER_SSP_SOD;
- SSPCPSR = SSPCPSR_VAL; /* Prescaler */
-
- /* initialize interrupt vector */
- VICIntSelect &= ~VIC_BIT(VIC_SPI1); /* SPI1 selected as IRQ */
- VICIntEnable = VIC_BIT(VIC_SPI1); /* SPI1 interrupt enabled */
- _VIC_CNTL(SPI1_VIC_SLOT) = VIC_ENABLE | VIC_SPI1;
- _VIC_ADDR(SPI1_VIC_SLOT) = (uint32_t)spi1_ISR; /* address of the ISR */
-
-}
-
-#endif
-
-
-bool spi_submit(struct spi_periph *p, struct spi_transaction *t)
-{
- //unsigned cpsr;
-
- uint8_t idx;
- idx = p->trans_insert_idx + 1;
- if (idx >= SPI_TRANSACTION_QUEUE_LEN) { idx = 0; }
- if (idx == p->trans_extract_idx) {
- t->status = SPITransFailed;
- return false; /* queue full */
- }
- t->status = SPITransPending;
-
- // Disable interrupts
- //uint8_t* vic = (uint8_t*)(p->init_struct);
- //cpsr = disableIRQ(); // disable global interrupts
- //VICIntEnClear = VIC_BIT(*vic);
- //restoreIRQ(cpsr); // restore global interrupts
- disableIRQ();
-
- p->trans[p->trans_insert_idx] = t;
- p->trans_insert_idx = idx;
- /* if peripheral is idle and not locked, start the transaction */
- if (p->status == SPIIdle && !p->suspend) {
- SpiStart(p, p->trans[p->trans_extract_idx]);
- }
-
- //cpsr = disableIRQ(); // disable global interrupts
- //VICIntEnable = VIC_BIT(*vic);
- //restoreIRQ(cpsr); // restore global interrupts
- enableIRQ();
- return true;
-}
-
-
-void spi_init_slaves(void)
-{
-#if USE_SPI_SLAVE0
- /* setup slave0_select pin
- * slave0_select is output
- */
- SPI_SELECT_SLAVE0_PINSEL |= SPI_SELECT_SLAVE0_PINSEL_VAL << SPI_SELECT_SLAVE0_PINSEL_BIT;
- SPI_SELECT_SLAVE0_IODIR |= 1 << SPI_SELECT_SLAVE0_PIN;
- SpiSlaveUnselect(SPI_SLAVE0);
-#endif
-
-#if USE_SPI_SLAVE1
- /* setup slave1_select pin
- * slave1_select is output
- */
- SPI_SELECT_SLAVE1_PINSEL |= SPI_SELECT_SLAVE1_PINSEL_VAL << SPI_SELECT_SLAVE1_PINSEL_BIT;
- SPI_SELECT_SLAVE1_IODIR |= 1 << SPI_SELECT_SLAVE1_PIN;
- SpiSlaveUnselect(SPI_SLAVE1);
-#endif
-
-#if USE_SPI_SLAVE2
-#error SPI_SLAVE2 is not implemented yet, sorry
-#endif
-}
-
-void spi_slave_select(uint8_t slave)
-{
- SpiSlaveSelect(slave);
-}
-
-void spi_slave_unselect(uint8_t slave)
-{
- SpiSlaveUnselect(slave);
-}
-
-bool spi_lock(struct spi_periph *p, uint8_t slave)
-{
- uint8_t *vic = (uint8_t *)(p->init_struct);
- VICIntEnClear = VIC_BIT(*vic);
- if (slave < 254 && p->suspend == 0) {
- p->suspend = slave + 1; // 0 is reserved for unlock state
- VICIntEnable = VIC_BIT(*vic);
- return true;
- }
- VICIntEnable = VIC_BIT(*vic);
- return false;
-}
-
-bool spi_resume(struct spi_periph *p, uint8_t slave)
-{
- uint8_t *vic = (uint8_t *)(p->init_struct);
- VICIntEnClear = VIC_BIT(*vic);
- if (p->suspend == slave + 1) {
- // restart fifo
- p->suspend = 0;
- if (p->trans_extract_idx != p->trans_insert_idx && p->status == SPIIdle) {
- SpiStart(p, p->trans[p->trans_extract_idx]);
- }
- VICIntEnable = VIC_BIT(*vic);
- return true;
- }
- VICIntEnable = VIC_BIT(*vic);
- return false;
-}
-
-#endif /* SPI_MASTER */
-
-
-/*
- *
- * SPI Slave code
- *
- * FIXME it is probably not working at all right now
- *
- */
-#if SPI_SLAVE
-
-/* set SSP input clock, PCLK / CPSDVSR = 468.75kHz */
-
-#if (PCLK == 15000000)
-#define CPSDVSR 32
-#else
-
-#if (PCLK == 30000000)
-#define CPSDVSR 64
-#else
-
-#if (PCLK == 60000000)
-#define CPSDVSR 128
-#else
-
-#error unknown PCLK frequency
-#endif
-#endif
-#endif
-
-#if USE_SPI0_SLAVE
-#error SPI0 in slave mode is not implemented yet, sorry
-#endif
-
-#if USE_SPI1_SLAVE
-
-/* SSPCR0 settings */
-#define SLAVE_SSP_DSS 0x07 << 0 /* data size : 8 bits */
-#define SLAVE_SSP_FRF 0x00 << 4 /* frame format : SPI */
-#define SLAVE_SSP_CPOL 0x00 << 6 /* clock polarity : idle low */
-#define SLAVE_SSP_CPHA 0x01 << 7 /* clock phase : 1 */
-#define SLAVE_SSP_SCR 0x0F << 8 /* serial clock rate : 29.3kHz, SSP input clock / 16 */
-
-/* SSPCR1 settings */
-#define SLAVE_SSP_LBM 0x00 << 0 /* loopback mode : disabled */
-#define SLAVE_SSP_SSE 0x00 << 1 /* SSP enable : disabled */
-#define SLAVE_SSP_MS 0x01 << 2 /* master slave mode : slave */
-#define SLAVE_SSP_SOD 0x00 << 3 /* slave output disable : disabled */
-
-void spi1_slave_ISR(void) __attribute__((naked));
-
-void spi1_slave_ISR(void)
-{
- ISR_ENTRY();
-
- SpiSlaveAutomaton(&spi1);
-
- VICVectAddr = 0x00000000; /* clear this interrupt from the VIC */
- ISR_EXIT();
-}
-
-void spi1_slave_arch_init(void)
-{
-
- spi1.reg_addr = SPI1;
-
- /* setup pins for SSP (SCK, MISO, MOSI, SS) */
- PINSEL1 |= SSP_PINSEL1_SCK | SSP_PINSEL1_MISO | SSP_PINSEL1_MOSI | SSP_PINSEL1_SSEL;
-
- /* setup SSP */
- SSPCR0 = SLAVE_SSP_DSS | SLAVE_SSP_FRF | SLAVE_SSP_CPOL | SLAVE_SSP_CPHA | SLAVE_SSP_SCR;
- SSPCR1 = SLAVE_SSP_LBM | SLAVE_SSP_MS | SLAVE_SSP_SOD;
- SSPCPSR = CPSDVSR; /* Prescaler, UM10120_1.pdf page 167 */
-
- /* initialize interrupt vector */
- VICIntSelect &= ~VIC_BIT(VIC_SPI1); /* SPI1 selected as IRQ */
- VICIntEnable = VIC_BIT(VIC_SPI1); /* SPI1 interrupt enabled */
- _VIC_CNTL(SPI1_VIC_SLOT) = VIC_ENABLE | VIC_SPI1;
- _VIC_ADDR(SPI1_VIC_SLOT) = (uint32_t)spi1_slave_ISR; /* address of the ISR */
-
-}
-
-#endif
-
-/** Register one (and only one) transaction to use spi as slave */
-bool spi_slave_register(struct spi_periph *p, struct spi_transaction *t)
-{
-
- if (p->trans_insert_idx >= 1) {
- t->status = SPITransFailed;
- return false;
- }
- t->status = SPITransPending;
- p->status = SPIIdle;
- p->trans[p->trans_insert_idx] = t; // No need to disable interrupts, only one transaction
- p->trans_insert_idx = 1;
-
- // handle spi options (CPOL, CPHA, data size,...)
- if (t->cpol == SPICpolIdleHigh) { SpiSetCPOL(p); }
- else { SpiClearCPOL(p); }
-
- if (t->cpha == SPICphaEdge2) { SpiSetCPHA(p); }
- else { SpiClearCPHA(p); }
-
- SpiSetDataSize(p, t->dss);
-
- return true;
-}
-
-bool spi_slave_wait(struct spi_periph *p)
-{
- if (p->trans_insert_idx == 0) {
- // no transaction registered
- return false;
- }
- // Start waiting
- SpiSlaveStart(p, p->trans[p->trans_extract_idx]);
- return true;
-}
-
-#endif /* SPI_SLAVE */
diff --git a/sw/airborne/arch/lpc21/mcu_periph/spi_arch.h b/sw/airborne/arch/lpc21/mcu_periph/spi_arch.h
deleted file mode 100644
index 519e54a79e..0000000000
--- a/sw/airborne/arch/lpc21/mcu_periph/spi_arch.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2005-2012 The Paparazzi Team
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/**
- * @file arch/lpc21/mcu_periph/spi_arch.h
- * @ingroup lpc21_arch
- *
- * Handling of SPI hardware for lpc21xx.
- * for now only SPI1 ( aka SSP )
- */
-
-#ifndef SPI_ARCH_H
-#define SPI_ARCH_H
-
-#include "std.h"
-#include "LPC21xx.h"
-#include BOARD_CONFIG
-
-#endif /* SPI_ARCH_H */
diff --git a/sw/airborne/arch/lpc21/mcu_periph/spi_slave_hs_arch.c b/sw/airborne/arch/lpc21/mcu_periph/spi_slave_hs_arch.c
deleted file mode 100644
index 762e583d27..0000000000
--- a/sw/airborne/arch/lpc21/mcu_periph/spi_slave_hs_arch.c
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
- * Copyright (C) 2011 The Paparazzi Team
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/**
- * @file arch/lpc21/mcu_periph/spi_slave_hs_arch.c
- * @ingroup lpc21_arch
- *
- * Highspeed SPI Slave Interface.
- */
-
-#include "spi_slave_hs_arch.h"
-#include "mcu_periph/spi.h"
-
-#include BOARD_CONFIG
-#include "std.h"
-#include "mcu.h"
-#include "led.h"
-#include "LPC21xx.h"
-#include "ssp_hw.h"
-#include "pprz_debug.h"
-#include "armVIC.h"
-
-struct spi_slave_hs spi_slave_hs;
-
-/* High Speed SPI Slave Circular Buffer */
-uint16_t spi_slave_hs_rx_insert_idx, spi_slave_hs_rx_extract_idx;
-uint8_t spi_slave_hs_rx_buffer[SPI_SLAVE_HS_RX_BUFFER_SIZE];
-uint8_t spi_slave_hs_tx_insert_idx, spi_slave_hs_tx_extract_idx;
-uint8_t spi_slave_hs_tx_buffer[SPI_SLAVE_HS_TX_BUFFER_SIZE];
-
-/* Prototypes */
-static void SSP_ISR(void) __attribute__((naked));
-
-/* SSPCR0 settings */
-#define SSP_DDS 0x07 << 0 /* data size : 8 bits */
-//#define SSP_DDS 0x0F << 0 /* data size : 16 bits */
-#define SSP_FRF 0x00 << 4 /* frame format : SPI */
-#define SSP_CPOL 0x00 << 6 /* clock polarity : data captured on first clock transition */
-#define SSP_CPHA 0x00 << 7 /* clock phase : SCK idles low */
-#define SSP_SCR 0x00 << 8 /* serial clock rate : divide by 1 */
-
-#define SSPCR0_VAL (SSP_DDS | SSP_FRF | SSP_CPOL | SSP_CPHA | SSP_SCR )
-
-/* SSPCR1 settings */
-#define SSP_LBM 0x00 << 0 /* loopback mode : disabled */
-#define SSP_SSE 0x00 << 1 /* SSP enable : enable later when init ready */
-#define SSP_MS 0x01 << 2 /* master slave mode : slave */
-#define SSP_SOD 0x00 << 3 /* slave output disable : don't care when master */
-
-#define SSPCR1_VAL (SSP_LBM | SSP_SSE | SSP_MS | SSP_SOD )
-
-/* SSPCPSR settings
- * min value as master: 2
- * min value as slave: 12
- */
-#if (PCLK == 15000000)
-#define CPSDVSR 12
-#else
-
-#if (PCLK == 30000000)
-#define CPSDVSR 24
-#else
-
-#if (PCLK == 60000000)
-#define CPSDVSR 28
-#else
-
-#error unknown PCLK frequency
-#endif
-#endif
-#endif
-
-#define SSP_PINSEL1_SCK (2<<2)
-#define SSP_PINSEL1_MISO (2<<4)
-#define SSP_PINSEL1_MOSI (2<<6)
-#define SSP_PINSEL1_SSEL (2<<8)
-
-
-#define SSP_Write(X) SSPDR=(X)
-#define SSP_Read() SSPDR
-#define SSP_Status() SSPSR
-
-/** default initial settings */
-#ifndef SPI1_VIC_SLOT
-#define SPI1_VIC_SLOT 7
-#endif
-
-
-// Functions for the generic device API
-static int spi_slave_hs_check_free_space(struct spi_slave_hs *p __attribute__((unused)), long *fd __attribute__((unused)), uint16_t len __attribute__((unused)))
-{
- return true;
-}
-
-static void spi_slave_hs_transmit(struct spi_slave_hs *p __attribute__((unused)), long fd __attribute__((unused)), uint8_t byte)
-{
- uint8_t temp = (spi_slave_hs_tx_insert_idx + 1) % SPI_SLAVE_HS_TX_BUFFER_SIZE;
- if (temp != spi_slave_hs_tx_extract_idx) /* there is room left */
- {
- spi_slave_hs_tx_buffer[spi_slave_hs_tx_insert_idx] = byte;
- spi_slave_hs_tx_insert_idx = temp;
- }
-}
-
-static void spi_slave_hs_transmit_buffer(struct spi_slave_hs *p __attribute__((unused)), long fd, uint8_t *data, uint16_t len)
-{
- int i;
- for (i = 0; i < len; i++) {
- spi_slave_hs_transmit(p, fd, data[i]);
- }
-}
-
-static void spi_slave_hs_send(struct spi_slave_hs *p __attribute__((unused)), long fd __attribute__((unused))) { }
-
-static int spi_slave_hs_char_available(struct spi_slave_hs *p __attribute__((unused)))
-{
- return spi_slave_hs_rx_insert_idx != spi_slave_hs_rx_extract_idx;
-}
-
-static uint8_t spi_slave_hs_getch(struct spi_slave_hs *p __attribute__((unused)))
-{
- uint8_t ret = spi_slave_hs_rx_buffer[spi_slave_hs_rx_extract_idx];
- spi_slave_hs_rx_extract_idx = (spi_slave_hs_rx_extract_idx + 1)%SPI_SLAVE_HS_RX_BUFFER_SIZE;
- return ret;
-}
-
-void spi_slave_hs_init(void)
-{
-
- /* setup pins for SSP (SCK, MISO, MOSI) */
- PINSEL1 |= SSP_PINSEL1_SCK | SSP_PINSEL1_MISO | SSP_PINSEL1_MOSI | SSP_PINSEL1_SSEL;
-
- /* setup SSP */
- // Control Registers
- SSPCR0 = SSPCR0_VAL;
- SSPCR1 = SSPCR1_VAL;
- // Clock Prescale Registers
- SSPCPSR = CPSDVSR;
-
- /* initialize interrupt vector */
- VICIntSelect &= ~VIC_BIT(VIC_SPI1); /* SPI1 selected as IRQ */
- VICIntEnable = VIC_BIT(VIC_SPI1); /* enable it */
- _VIC_CNTL(SPI1_VIC_SLOT) = VIC_ENABLE | VIC_SPI1;
- _VIC_ADDR(SPI1_VIC_SLOT) = (uint32_t)SSP_ISR; /* address of the ISR */
-
-
- // Enable SPI Slave
- SetBit(SSPCR1, SSE);
-
- // Enable Receive interrupt
- SetBit(SSPIMSC, RXIM);
-
- // Configure generic device
- spi_slave_hs.device.periph = (void *)(&spi_slave_hs);
- spi_slave_hs.device.check_free_space = (check_free_space_t) spi_slave_hs_check_free_space;
- spi_slave_hs.device.put_byte = (put_byte_t) spi_slave_hs_transmit;
- spi_slave_hs.device.put_buffer = (put_buffer_t) spi_slave_hs_transmit_buffer;
- spi_slave_hs.device.send_message = (send_message_t) spi_slave_hs_send;
- spi_slave_hs.device.char_available = (char_available_t) spi_slave_hs_char_available;
- spi_slave_hs.device.get_byte = (get_byte_t) spi_slave_hs_getch;
-
-}
-
-/*
- * SSP Status:
- *
- * ROVR Read Overrun
- * WCOL Write Collision (send new byte during a transfer in progress
- * ABRT SSEL inactive before end of transfer
- *
- *
- */
-
-
-static void SSP_ISR(void)
-{
- ISR_ENTRY();
-
- //LED_TOGGLE(3);
-
- // If any TX bytes are pending
- if (spi_slave_hs_tx_insert_idx != spi_slave_hs_tx_extract_idx) {
- uint8_t ret = spi_slave_hs_tx_buffer[spi_slave_hs_tx_extract_idx];
- spi_slave_hs_tx_extract_idx = (spi_slave_hs_tx_extract_idx + 1) % SPI_SLAVE_HS_TX_BUFFER_SIZE;
- SSP_Write(ret);
- } else {
- SSP_Write(0x00);
- }
-
-
- //do
- {
- uint16_t temp;
-
- // calc next insert index & store character
- temp = (spi_slave_hs_rx_insert_idx + 1) % SPI_SLAVE_HS_RX_BUFFER_SIZE;
- spi_slave_hs_rx_buffer[ spi_slave_hs_rx_insert_idx] = SSP_Read();
-
- // check for more room in queue
- if (temp != spi_slave_hs_rx_extract_idx) {
- spi_slave_hs_rx_insert_idx = temp; // update insert index
- }
-
- // else overrun
- }
- // while FIFO not empty
- //while (SSPSR & RNE);
-
- /*
- // loop until not more interrupt sources
- while (((iid = U0IIR) & UIIR_NO_INT) == 0)
- while (U0LSR & ULSR_THRE)
- {
- // check if more data to send
- if (uart0_tx_insert_idx != uart0_tx_extract_idx)
- {
- U0THR = uart0_tx_buffer[uart0_tx_extract_idx];
- uart0_tx_extract_idx++;
- uart0_tx_extract_idx %= UART0_TX_BUFFER_SIZE;
- }
- else
- {
- // no
- uart0_tx_running = 0; // clear running flag
- break;
- }
- }
-
- */
- VICVectAddr = 0x00000000; /* clear this interrupt from the VIC */
- ISR_EXIT();
-}
-
diff --git a/sw/airborne/arch/lpc21/mcu_periph/spi_slave_hs_arch.h b/sw/airborne/arch/lpc21/mcu_periph/spi_slave_hs_arch.h
deleted file mode 100644
index 4cbf94d925..0000000000
--- a/sw/airborne/arch/lpc21/mcu_periph/spi_slave_hs_arch.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2008-2009 Antoine Drouin
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/**
- * @file arch/lpc21/mcu_periph/spi_slave_hs_arch.h
- * @ingroup lpc21_arch
- *
- * Highspeed SPI Slave Interface.
- * SS on P0.20
- * Circular Buffer
- */
-
-#ifndef SPI_SLAVE_HS_ARCH_H
-#define SPI_SLAVE_HS_ARCH_H
-
-#include "std.h"
-#include "pprzlink/pprzlink_device.h"
-
-struct spi_slave_hs {
- /** Generic device interface */
- struct link_device device;
-};
-
-extern struct spi_slave_hs spi_slave_hs;
-
-#define SpiEnable() { \
- SetBit(SSPCR1, SSE); \
- }
-
-#define SpiDisable() { \
- ClearBit(SSPCR1, SSE); \
- }
-
-
-#define SPI_SLAVE_HS_RX_BUFFER_SIZE 256
-
-extern uint16_t spi_slave_hs_rx_insert_idx, spi_slave_hs_rx_extract_idx;
-extern uint8_t spi_slave_hs_rx_buffer[SPI_SLAVE_HS_RX_BUFFER_SIZE];
-
-
-#define SPI_SLAVE_HS_TX_BUFFER_SIZE 64
-
-extern uint8_t spi_slave_hs_tx_insert_idx, spi_slave_hs_tx_extract_idx;
-extern uint8_t spi_slave_hs_tx_buffer[SPI_SLAVE_HS_TX_BUFFER_SIZE];
-
-
-#endif
diff --git a/sw/airborne/arch/lpc21/mcu_periph/sys_time_arch.c b/sw/airborne/arch/lpc21/mcu_periph/sys_time_arch.c
deleted file mode 100644
index b14e1282e9..0000000000
--- a/sw/airborne/arch/lpc21/mcu_periph/sys_time_arch.c
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
- *
- * Copyright (C) 2009-2011 The Paparazzi Team
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/**
- * @file arch/lpc21/mcu_periph/sys_time_arch.c
- * @ingroup lpc21_arch
- *
- * LPC21xx timing functions.
- */
-
-#include "mcu_periph/sys_time.h"
-
-#include "armVIC.h"
-
-#ifdef SYS_TIME_LED
-#include "led.h"
-#endif
-
-#define SYS_TICK_IT TIR_MR0I
-
-#if defined ACTUATORS && ( defined SERVOS_4017 || defined SERVOS_4015_MAT || defined SERVOS_PPM_MAT)
-#ifdef SERVOS_4015_MAT
-#include "subsystems/actuators/servos_4015_MAT_hw.h"
-#endif
-#ifdef SERVOS_4017
-#include "subsystems/actuators/servos_4017_hw.h"
-#endif
-#ifdef SERVOS_PPM_MAT
-#include "subsystems/actuators/servos_ppm_hw.h"
-#endif
-#else
-#define ACTUATORS_IT 0x00
-#endif /* ACTUATORS */
-
-#if defined RADIO_CONTROL && defined RADIO_CONTROL_TYPE_PPM
-#include "subsystems/radio_control.h"
-#else
-#define PPM_IT 0x00
-#endif
-
-#ifdef MB_SCALE
-#include "mb_scale.h"
-#else
-#define MB_SCALE_IT 0x00
-#endif
-
-#ifdef MB_TACHO
-#include "mb_tacho.h"
-#else
-#define MB_TACHO_IT 0x00
-#endif
-
-#ifdef USE_PWM_INPUT
-#include "mcu_periph/pwm_input.h"
-#endif
-#ifndef USE_PWM_INPUT1
-#define PWM_INPUT_IT1 0x00
-#endif
-#ifndef USE_PWM_INPUT2
-#define PWM_INPUT_IT2 0x00
-#endif
-
-#ifdef USE_AMI601
-#include "peripherals/ami601.h"
-#else
-#define AMI601_IT 0x00
-#endif
-
-#ifdef TRIGGER_EXT
-#include "core/trigger_ext_hw.h"
-#else
-#define TRIGGER_IT 0x00
-#endif
-
-#define TIMER0_IT_MASK (SYS_TICK_IT | \
- ACTUATORS_IT | \
- PPM_IT | \
- TRIGGER_IT | \
- MB_SCALE_IT | \
- MB_TACHO_IT | \
- PWM_INPUT_IT1 | \
- PWM_INPUT_IT2 | \
- AMI601_IT)
-
-
-void sys_time_arch_init(void)
-{
- sys_time.cpu_ticks_per_sec = PCLK / T0_PCLK_DIV;
- /* cpu ticks per desired sys_time timer step */
- sys_time.resolution_cpu_ticks = (uint32_t)(sys_time.resolution * sys_time.cpu_ticks_per_sec + 0.5);
-
- /* setup Timer 0 to count forever */
- /* reset & disable timer 0 */
- T0TCR = TCR_RESET;
- /* set the prescale divider */
- T0PR = T0_PCLK_DIV - 1;
- /* enable interrupt on match0 for sys_ticks */
- T0MCR = TMCR_MR0_I;
- /* disable capture registers */
- T0CCR = 0;
- /* disable external match register */
- T0EMR = 0;
-
- /* set first sys tick interrupt */
- /* We need to wait long enough to be sure
- * that all the init part is finished before
- * the first interrupt. Since the global
- * interrupts are enable at the end of the init
- * phase, if we miss the first one, the
- * sys_tick_handler is not called afterward
- */
- T0MR0 = 4 * sys_time.resolution_cpu_ticks;
-
- /* enable timer 0 */
- T0TCR = TCR_ENABLE;
-
- /* select TIMER0 as IRQ */
- VICIntSelect &= ~VIC_BIT(VIC_TIMER0);
- /* enable TIMER0 interrupt */
- VICIntEnable = VIC_BIT(VIC_TIMER0);
- /* on slot vic slot 1 */
- _VIC_CNTL(TIMER0_VIC_SLOT) = VIC_ENABLE | VIC_TIMER0;
- /* address of the ISR */
- _VIC_ADDR(TIMER0_VIC_SLOT) = (uint32_t)TIMER0_ISR;
-}
-
-
-// FIXME : nb_tick rollover ???
-//
-// 97 days at 512hz
-// 12 hours at 100khz
-//
-static inline void sys_tick_irq_handler(void)
-{
-
- /* set match register for next interrupt */
- T0MR0 += sys_time.resolution_cpu_ticks - 1;
-
- sys_time.nb_tick++;
- sys_time.nb_sec_rem += sys_time.resolution_cpu_ticks;
- if (sys_time.nb_sec_rem >= sys_time.cpu_ticks_per_sec) {
- sys_time.nb_sec_rem -= sys_time.cpu_ticks_per_sec;
- sys_time.nb_sec++;
-#ifdef SYS_TIME_LED
- LED_TOGGLE(SYS_TIME_LED);
-#endif
- }
- for (unsigned int i = 0; i < SYS_TIME_NB_TIMER; i++) {
- if (sys_time.timer[i].in_use &&
- sys_time.nb_tick >= sys_time.timer[i].end_time) {
- sys_time.timer[i].end_time += sys_time.timer[i].duration;
- sys_time.timer[i].elapsed = true;
- if (sys_time.timer[i].cb) {
- sys_time.timer[i].cb(i);
- }
- }
- }
-}
-
-void TIMER0_ISR(void)
-{
- ISR_ENTRY();
-
- while (T0IR & TIMER0_IT_MASK) {
-
- if (T0IR & SYS_TICK_IT) {
- sys_tick_irq_handler();
- T0IR = SYS_TICK_IT;
- }
-
-#if defined ACTUATORS && ( defined SERVOS_4017 || defined SERVOS_4015_MAT || defined SERVOS_PPM_MAT)
- if (T0IR & ACTUATORS_IT) {
-#ifdef SERVOS_4017
- SERVOS_4017_ISR();
-#endif
-#ifdef SERVOS_4015_MAT
- Servos4015Mat_ISR();
-#endif
-#ifdef SERVOS_PPM_MAT
- ServosPPMMat_ISR();
-#endif
- T0IR = ACTUATORS_IT;
- }
-#endif /* ACTUATORS && (SERVOS_4017 || SERVOS_4015_MAT || SERVOS_PPM_MAT) */
-
-#if defined RADIO_CONTROL && defined RADIO_CONTROL_TYPE_PPM
- if (T0IR & PPM_IT) {
- PPM_ISR();
- T0IR = PPM_IT;
- }
-#endif
-#ifdef TRIGGER_EXT
- if (T0IR & TRIGGER_IT) {
- TRIG_ISR();
- T0IR = TRIGGER_IT;
- LED_TOGGLE(3);
- }
-#endif
-#ifdef MB_SCALE
- if (T0IR & MB_SCALE_IT) {
- MB_SCALE_ICP_ISR();
- T0IR = MB_SCALE_IT;
- }
-#endif
-#ifdef MB_TACHO
- if (T0IR & MB_TACHO_IT) {
- MB_TACHO_ISR();
- T0IR = MB_TACHO_IT;
- }
-#endif
-#ifdef USE_PWM_INPUT1
- if (T0IR & PWM_INPUT_IT1) {
- PWM_INPUT_ISR_1();
- T0IR = PWM_INPUT_IT1;
- }
-#endif
-#ifdef USE_PWM_INPUT2
- if (T0IR & PWM_INPUT_IT2) {
- PWM_INPUT_ISR_2();
- T0IR = PWM_INPUT_IT2;
- }
-#endif
-#ifdef USE_AMI601
- if (T0IR & AMI601_IT) {
- AMI601_ISR();
- T0IR = AMI601_IT;
- }
-#endif
- }
- VICVectAddr = 0x00000000;
- ISR_EXIT();
-}
diff --git a/sw/airborne/arch/lpc21/mcu_periph/sys_time_arch.h b/sw/airborne/arch/lpc21/mcu_periph/sys_time_arch.h
deleted file mode 100644
index 404b097ae0..0000000000
--- a/sw/airborne/arch/lpc21/mcu_periph/sys_time_arch.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- *
- * Copyright (C) 2009-2011 The Paparazzi Team
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/**
- * @file arch/lpc21/mcu_periph/sys_time_arch.h
- * @ingroup lpc21_arch
- *
- * LPC21xx timing functions.
- */
-
-#ifndef SYS_TIME_ARCH_H
-#define SYS_TIME_ARCH_H
-
-#include "mcu_periph/sys_time.h"
-
-#include BOARD_CONFIG
-#include "LPC21xx.h"
-#include "armVIC.h"
-
-#include "std.h"
-
-void TIMER0_ISR(void) __attribute__((naked));
-
-/* T0 prescaler, set T0_CLK to 15MHz, T0_CLK = PCLK / T0PCLK_DIV */
-#if (PCLK == 15000000)
-#define T0_PCLK_DIV 1
-
-#elif (PCLK == 30000000)
-#define T0_PCLK_DIV 2
-
-#elif (PCLK == 60000000)
-#define T0_PCLK_DIV 4
-
-#else
-#error unknown PCLK frequency
-#endif
-
-#ifndef TIMER0_VIC_SLOT
-#define TIMER0_VIC_SLOT 1
-#endif /* TIMER0_VIC_SLOT */
-
-/**
- * Get the time in microseconds since startup.
- * WARNING: overflows after ??
- * @return microseconds since startup as uint32_t
- */
-static inline uint32_t get_sys_time_usec(void)
-{
- return usec_of_cpu_ticks(T0TC);
-}
-
-/**
- * Get the time in milliseconds since startup.
- * @return milliseconds since startup as uint32_t
- */
-static inline uint32_t get_sys_time_msec(void)
-{
- return msec_of_cpu_ticks(T0TC);
-}
-
-
-#define SysTickTimerStart(_t) { _t = T0TC; }
-#define SysTickTimer(_t) ((uint32_t)(T0TC - _t))
-#define SysTickTimerStop(_t) { _t = (T0TC - _t); }
-
-/** Busy wait, in microseconds */
-static inline void sys_time_usleep(uint32_t us)
-{
- uint32_t start = T0TC;
- uint32_t ticks = cpu_ticks_of_usec(us);
- while ((uint32_t)(T0TC - start) < ticks);
-}
-
-#endif /* SYS_TIME_ARCH_H */
diff --git a/sw/airborne/arch/lpc21/mcu_periph/uart_arch.c b/sw/airborne/arch/lpc21/mcu_periph/uart_arch.c
deleted file mode 100644
index 1a85092e18..0000000000
--- a/sw/airborne/arch/lpc21/mcu_periph/uart_arch.c
+++ /dev/null
@@ -1,291 +0,0 @@
-/*
- * Copyright (C) 2008-2010 The Paparazzi Team
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/**
- * @file arch/lpc21/mcu_periph/uart_arch.c
- * @ingroup lpc21_arch
- *
- * Handling of UART hardware for lpc21xx.
- */
-
-
-#include "mcu_periph/uart.h"
-#include "armVIC.h"
-
-static inline void uart_disable_interrupts(struct uart_periph *p)
-{
- // disable interrups
- ((uartRegs_t *)(p->reg_addr))->ier = 0x00; // disable all interrupts
- ((uartRegs_t *)(p->reg_addr))->iir; // clear interrupt ID
- ((uartRegs_t *)(p->reg_addr))->rbr; // clear receive register
- ((uartRegs_t *)(p->reg_addr))->lsr; // clear line status register
-}
-
-static inline void uart_enable_interrupts(struct uart_periph *p)
-{
- // enable receiver interrupts
- ((uartRegs_t *)(p->reg_addr))->ier = UIER_ERBFI;
-}
-
-static inline void uart_set_baudrate(struct uart_periph *p, uint32_t baud)
-{
- p->baudrate = baud;
-
- /* calculate the baudrate */
- uint32_t _baud_reg_val = (uint16_t)((PCLK / (((float)baud) * 16.0)) + 0.5);
- /* select divisor latches */
- ((uartRegs_t *)(p->reg_addr))->lcr = ULCR_DLAB_ENABLE;
- /* set for baud low byte */
- ((uartRegs_t *)(p->reg_addr))->dll = (uint8_t)_baud_reg_val;
- /* set for baud high byte */
- ((uartRegs_t *)(p->reg_addr))->dlm = (uint8_t)(_baud_reg_val >> 8);
-
- // set the number of characters and other
- // user specified operating parameters
- // For now: hard wired configuration 8 bits 1 stop no parity
- // fifo triger -> 8 bytes
- ((uartRegs_t *)(p->reg_addr))->lcr = (UART_8N1 & ~ULCR_DLAB_ENABLE);
- ((uartRegs_t *)(p->reg_addr))->fcr = UART_FIFO_8;
-}
-
-void uart_periph_set_baudrate(struct uart_periph *p, uint32_t baud)
-{
- uart_disable_interrupts(p);
- uart_set_baudrate(p, baud);
- uart_enable_interrupts(p);
-}
-
-void uart_periph_set_bits_stop_parity(struct uart_periph *p __attribute__((unused)),
- uint8_t bits __attribute__((unused)), uint8_t stop __attribute__((unused)), uint8_t __attribute__((unused)) parity)
-{
- // TBD
-}
-
-void uart_put_byte(struct uart_periph *p, long fd __attribute__((unused)), uint8_t data)
-{
- uint16_t temp;
- unsigned cpsr;
-
- temp = (p->tx_insert_idx + 1) % UART_TX_BUFFER_SIZE;
-
- if (temp == p->tx_extract_idx) {
- return; // no room
- }
-
- cpsr = disableIRQ(); // disable global interrupts
- ((uartRegs_t *)(p->reg_addr))->ier &= ~UIER_ETBEI; // disable TX interrupts
- restoreIRQ(cpsr); // restore global interrupts
-
- // check if in process of sending data
- if (p->tx_running) {
- // add to queue
- p->tx_buf[p->tx_insert_idx] = data;
- p->tx_insert_idx = temp;
- } else {
- // set running flag and write to output register
- p->tx_running = 1;
- ((uartRegs_t *)(p->reg_addr))->thr = data;
- }
-
- cpsr = disableIRQ(); // disable global interrupts
- ((uartRegs_t *)(p->reg_addr))->ier |= UIER_ETBEI; // enable TX interrupts
- restoreIRQ(cpsr); // restore global interrupts
-}
-
-static inline void uart_ISR(struct uart_periph *p)
-{
- uint8_t iid;
- // loop until not more interrupt sources
- while (((iid = ((uartRegs_t *)(p->reg_addr))->iir) & UIIR_NO_INT) == 0) {
- // identify & process the highest priority interrupt
- switch (iid & UIIR_ID_MASK) {
- case UIIR_RLS_INT: // Receive Line Status
- ((uartRegs_t *)(p->reg_addr))->lsr; // read LSR to clear
- break;
-
- case UIIR_CTI_INT: // Character Timeout Indicator
- case UIIR_RDA_INT: // Receive Data Available
- do {
- uint16_t temp;
-
- // calc next insert index & store character
- temp = (p->rx_insert_idx + 1) % UART_RX_BUFFER_SIZE;
- p->rx_buf[p->rx_insert_idx] = ((uartRegs_t *)(p->reg_addr))->rbr;
-
- // check for more room in queue
- if (temp != p->rx_extract_idx) {
- p->rx_insert_idx = temp; // update insert index
- }
- } while (((uartRegs_t *)(p->reg_addr))->lsr & ULSR_RDR);
-
- break;
-
- case UIIR_THRE_INT: // Transmit Holding Register Empty
- while (((uartRegs_t *)(p->reg_addr))->lsr & ULSR_THRE) {
- // check if more data to send
- if (p->tx_insert_idx != p->tx_extract_idx) {
- ((uartRegs_t *)(p->reg_addr))->thr = p->tx_buf[p->tx_extract_idx];
- p->tx_extract_idx++;
- p->tx_extract_idx %= UART_TX_BUFFER_SIZE;
- } else {
- // no
- p->tx_running = 0; // clear running flag
- break;
- }
- }
-
- break;
-
- default: // Unknown
- ((uartRegs_t *)(p->reg_addr))->lsr;
- ((uartRegs_t *)(p->reg_addr))->rbr;
- break;
- }
- }
-}
-
-#if USE_UART0
-
-#ifndef UART0_VIC_SLOT
-#define UART0_VIC_SLOT 5
-#endif
-
-/* by default enable UART Tx and Rx */
-#ifndef USE_UART0_TX
-#ifdef USE_UART0_RX_ONLY
-#warning "USE_UART0_RX_ONLY is deprecated, please set USE_UART0_TX=FALSE instead"
-#define USE_UART0_TX FALSE
-#else
-#define USE_UART0_TX TRUE
-#endif
-#endif
-#ifndef USE_UART0_RX
-#define USE_UART0_RX TRUE
-#endif
-
-void uart0_ISR(void) __attribute__((naked));
-
-void uart0_ISR(void)
-{
- // perform proper ISR entry so thumb-interwork works properly
- ISR_ENTRY();
-
- uart_ISR(&uart0);
-
- VICVectAddr = 0x00000000; // clear this interrupt from the VIC
- ISR_EXIT(); // recover registers and return
-}
-
-void uart0_init(void)
-{
-
- uart_periph_init(&uart0);
- uart0.reg_addr = UART0_BASE;
-
-#if USE_UART0_RX && USE_UART0_TX
- // set port pins for UART0
- PINSEL0 = (PINSEL0 & ~U0_PINMASK) | U0_PINSEL;
-#elif USE_UART0_RX
- // only use the RX0 P0.1 pin, no TX
- PINSEL0 = (PINSEL0 & ~U0_PINMASK_RX) | U0_PINSEL_RX;
-#elif USE_UART0_TX
- // only use tx
- PINSEL0 = (PINSEL0 & ~U0_PINMASK_TX) | U0_PINSEL_TX;
-#endif
-
- // initialize uart parameters
- uart_set_baudrate(&uart0, UART0_BAUD);
-
- // initialize the interrupt vector
- VICIntSelect &= ~VIC_BIT(VIC_UART0); // UART0 selected as IRQ
- VICIntEnable = VIC_BIT(VIC_UART0); // UART0 interrupt enabled
- _VIC_CNTL(UART0_VIC_SLOT) = VIC_ENABLE | VIC_UART0;
- _VIC_ADDR(UART0_VIC_SLOT) = (uint32_t)uart0_ISR; // address of the ISR
-
- uart_enable_interrupts(&uart0);
-}
-
-#endif /* USE_UART0 */
-
-#if USE_UART1
-
-#ifndef UART1_VIC_SLOT
-#define UART1_VIC_SLOT 6
-#endif
-
-/* by default enable UART Tx and Rx */
-#ifndef USE_UART1_TX
-#ifdef USE_UART1_RX_ONLY
-#warning "USE_UART1_RX_ONLY is deprecated, please set USE_UART1_TX=FALSE instead"
-#define USE_UART1_TX FALSE
-#else
-#define USE_UART1_TX TRUE
-#endif
-#endif
-#ifndef USE_UART1_RX
-#define USE_UART1_RX TRUE
-#endif
-
-void uart1_ISR(void) __attribute__((naked));
-
-void uart1_ISR(void)
-{
- // perform proper ISR entry so thumb-interwork works properly
- ISR_ENTRY();
-
- uart_ISR(&uart1);
-
- VICVectAddr = 0x00000000; // clear this interrupt from the VIC
- ISR_EXIT(); // recover registers and return
-}
-
-void uart1_init(void)
-{
-
- uart_periph_init(&uart1);
- uart1.reg_addr = UART1_BASE;
-
-#if USE_UART1_RX && USE_UART0_TX
- // set port pins for UART1
- PINSEL0 = (PINSEL0 & ~U1_PINMASK) | U1_PINSEL;
-#elif USE_UART1_RX
- // only use the RX0 P0.1 pin, no TX
- PINSEL0 = (PINSEL0 & ~U1_PINMASK_RX) | U1_PINSEL_RX;
-#elif USE_UART1_TX
- // only use tx
- PINSEL0 = (PINSEL0 & ~U1_PINMASK_TX) | U1_PINSEL_TX;
-#endif
-
- uart_set_baudrate(&uart1, UART1_BAUD);
-
- // initialize the interrupt vector
- VICIntSelect &= ~VIC_BIT(VIC_UART1); // UART1 selected as IRQ
- VICIntEnable = VIC_BIT(VIC_UART1); // UART1 interrupt enabled
- _VIC_CNTL(UART1_VIC_SLOT) = VIC_ENABLE | VIC_UART1;
- _VIC_ADDR(UART1_VIC_SLOT) = (uint32_t)uart1_ISR; // address of the ISR
-
- // enable receiver interrupts
- uart_enable_interrupts(&uart1);
-}
-
-#endif
-
diff --git a/sw/airborne/arch/lpc21/mcu_periph/uart_arch.h b/sw/airborne/arch/lpc21/mcu_periph/uart_arch.h
deleted file mode 100644
index 3d25b6ac87..0000000000
--- a/sw/airborne/arch/lpc21/mcu_periph/uart_arch.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2008 Pascal Brisset, Antoine Drouin
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/**
- * @file arch/lpc21/mcu_periph/uart_arch.h
- * @ingroup lpc21_arch
- *
- * Handling of UART hardware for lpc21xx.
- */
-
-#ifndef LPC21_UART_ARCH_H
-#define LPC21_UART_ARCH_H
-
-#include "types.h"
-#include "LPC21xx.h"
-#include BOARD_CONFIG
-
-#define B1200 1200
-#define B2400 2400
-#define B4800 4800
-#define B9600 9600
-#define B19200 19200
-#define B38400 38400
-#define B57600 57600
-#define B100000 100000
-#define B115200 115200
-#define B230400 230400
-#define UART_SPEED(_def) _def
-
-#define UART_8N1 (uint8_t)(ULCR_CHAR_8 + ULCR_PAR_NO + ULCR_STOP_1)
-#define UART_7N1 (uint8_t)(ULCR_CHAR_7 + ULCR_PAR_NO + ULCR_STOP_1)
-#define UART_8N2 (uint8_t)(ULCR_CHAR_8 + ULCR_PAR_NO + ULCR_STOP_2)
-#define UART_7N2 (uint8_t)(ULCR_CHAR_7 + ULCR_PAR_NO + ULCR_STOP_2)
-#define UART_8E1 (uint8_t)(ULCR_CHAR_8 + ULCR_PAR_EVEN + ULCR_STOP_1)
-#define UART_7E1 (uint8_t)(ULCR_CHAR_7 + ULCR_PAR_EVEN + ULCR_STOP_1)
-#define UART_8E2 (uint8_t)(ULCR_CHAR_8 + ULCR_PAR_EVEN + ULCR_STOP_2)
-#define UART_7E2 (uint8_t)(ULCR_CHAR_7 + ULCR_PAR_EVEN + ULCR_STOP_2)
-#define UART_8O1 (uint8_t)(ULCR_CHAR_8 + ULCR_PAR_ODD + ULCR_STOP_1)
-#define UART_7O1 (uint8_t)(ULCR_CHAR_7 + ULCR_PAR_ODD + ULCR_STOP_1)
-#define UART_8O2 (uint8_t)(ULCR_CHAR_8 + ULCR_PAR_ODD + ULCR_STOP_2)
-#define UART_7O2 (uint8_t)(ULCR_CHAR_7 + ULCR_PAR_ODD + ULCR_STOP_2)
-
-#define UART_FIFO_OFF (0x00)
-#define UART_FIFO_1 (uint8_t)(UFCR_FIFO_ENABLE + UFCR_FIFO_TRIG1)
-#define UART_FIFO_4 (uint8_t)(UFCR_FIFO_ENABLE + UFCR_FIFO_TRIG4)
-#define UART_FIFO_8 (uint8_t)(UFCR_FIFO_ENABLE + UFCR_FIFO_TRIG8)
-#define UART_FIFO_14 (uint8_t)(UFCR_FIFO_ENABLE + UFCR_FIFO_TRIG14)
-
-#endif /* LPC21_UART_ARCH_H */
diff --git a/sw/airborne/arch/lpc21/modules/adcs/max11040_hw.c b/sw/airborne/arch/lpc21/modules/adcs/max11040_hw.c
deleted file mode 100644
index b75fa59e0e..0000000000
--- a/sw/airborne/arch/lpc21/modules/adcs/max11040_hw.c
+++ /dev/null
@@ -1,314 +0,0 @@
-/*
- * Copyright (C) 2010 Martin Mueller
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/** \file max11040.c
- * \brief Maxim MAX11040 ADC hw interface
- *
- * SS on P0.20 (SSEL)
- * DRDY on P0.16 (EINT0)
- */
-
-#include "armVIC.h"
-#include "max11040_hw.h"
-#include "adcs/max11040.h"
-
-#ifdef LOGGER
-extern unsigned int getclock(void);
-#endif
-
-volatile uint8_t num_irqs = 0;
-
-static void SSP_ISR(void) __attribute__((naked));
-static void EXTINT_ISR(void) __attribute__((naked));
-
-#warning "This driver should be updated to use the new SPI peripheral"
-
-#ifndef SPI1_VIC_SLOT
-#define SPI1_VIC_SLOT 7
-#endif
-
-static void SSP_ISR(void)
-{
- int i;
- ISR_ENTRY();
-
- switch (max11040_status) {
-
- case MAX11040_RESET: {
- /* read dummy control byte reply */
- uint8_t foo __attribute__((unused));
- foo = SSPDR;
- foo = SSPDR;
- /* write configuration register */
- SSP_Send(0x60); /* wr conf */
- SSP_Send(0x30); /* adc0: en24bit, xtalen, no faultdis */
- for (i = 1; i < MAXM_NB_ADCS; i++) {
- SSP_Send(0x20); /* adcx: en24bit, no xtalen, no faultdis */
- }
- max11040_status = MAX11040_CONF;
- SSP_ClearRti();
- }
- break;
-
- case MAX11040_CONF: {
- /* read dummy control byte reply */
- uint8_t foo __attribute__((unused));
- foo = SSPDR;
- for (i = 0; i < MAXM_NB_ADCS; i++) {
- foo = SSPDR;
- }
- /* write sampling instant register */
- SSP_Send(0x40); /* wr instant */
- for (i = 0; i < MAXM_NB_ADCS; i++) {
- SSP_Send(0); /* adcx: no delay */
- SSP_Send(0);
- SSP_Send(0);
- SSP_Send(0);
- }
- max11040_status = MAX11040_INSTANT;
- SSP_ClearRti();
- }
- break;
-
- case MAX11040_INSTANT: {
- /* read dummy control byte reply */
- uint8_t foo __attribute__((unused));
- foo = SSPDR;
- for (i = 0; i < MAXM_NB_ADCS; i++) {
- foo = SSPDR;
- foo = SSPDR;
- foo = SSPDR;
- foo = SSPDR;
- }
- /* write data rate control register */
- SSP_Send(0x50); /* wr rate */
- SSP_Send(0x26); /* adc: 250.1 sps */
- SSP_Send(0x00);
- max11040_status = MAX11040_RATE;
- SSP_ClearRti();
- }
- break;
-
- case MAX11040_RATE: {
- uint8_t foo __attribute__((unused));
- foo = SSPDR;
- foo = SSPDR;
- foo = SSPDR;
- /* read data register */
- SSP_Send(0xF0); /* rd data */
- for (i = 0; i < MAXM_NB_ADCS; i++) {
- SSP_Send(0x00); /* adcx: data */
- SSP_Send(0x00);
- SSP_Send(0x00);
- SSP_Send(0x00);
- SSP_Send(0x00);
- SSP_Send(0x00);
- SSP_Send(0x00);
- SSP_Send(0x00);
- SSP_Send(0x00);
- SSP_Send(0x00);
- SSP_Send(0x00);
- SSP_Send(0x00);
- }
- max11040_status = MAX11040_DATA;
- SSP_ClearRti();
- }
- break;
-
- case MAX11040_DATA: {
- uint8_t foo __attribute__((unused));
- foo = SSPDR;
- for (i = 0; i < MAXM_NB_ADCS; i++) {
- foo = SSPDR;
- foo = SSPDR;
- foo = SSPDR;
- foo = SSPDR;
- foo = SSPDR;
- foo = SSPDR;
- foo = SSPDR;
- foo = SSPDR;
- foo = SSPDR;
- foo = SSPDR;
- foo = SSPDR;
- foo = SSPDR;
- }
-
- /* read data */
- /* read data register */
- SSP_Send(0xF0); /* rd data */
- for (i = 0; i < MAXM_NB_ADCS; i++) {
- SSP_Send(0x00); /* adc0: data */
- SSP_Send(0x00);
- SSP_Send(0x00);
- SSP_Send(0x00);
- SSP_Send(0x00);
- SSP_Send(0x00);
- SSP_Send(0x00);
- SSP_Send(0x00);
- SSP_Send(0x00);
- SSP_Send(0x00);
- SSP_Send(0x00);
- SSP_Send(0x00);
- }
-
- SSP_ClearRti();
- }
- break;
-
- case MAX11040_DATA2: {
- uint8_t foo __attribute__((unused));
-
- SSP_ClearRti();
- SSP_ClearRxi();
-
- if (max11040_count <= MAXM_NB_CHAN + 2) {
- SSP_Send(0x00);
- SSP_Send(0x00);
- SSP_Send(0x00);
- SSP_Send(0x00);
- SSP_Send(0x00);
- SSP_Send(0x00);
- }
-
- if (max11040_count == 0) { foo = SSPDR; }
-
- max11040_values[max11040_buf_in][max11040_count] = SSPDR << 16;
- max11040_values[max11040_buf_in][max11040_count] |= SSPDR << 8;
- max11040_values[max11040_buf_in][max11040_count] |= SSPDR;
- if (max11040_values[max11040_buf_in][max11040_count] & 0x800000) {
- max11040_values[max11040_buf_in][max11040_count] |= 0xFF000000;
- }
-
- max11040_count++;
-
- max11040_values[max11040_buf_in][max11040_count] = SSPDR << 16;
- max11040_values[max11040_buf_in][max11040_count] |= SSPDR << 8;
- max11040_values[max11040_buf_in][max11040_count] |= SSPDR;
- if (max11040_values[max11040_buf_in][max11040_count] & 0x800000) {
- max11040_values[max11040_buf_in][max11040_count] |= 0xFF000000;
- }
-
- max11040_count++;
-
- if (max11040_count == MAXM_NB_CHAN) {
- MaxmUnselect();
- max11040_data = MAX11040_DATA_AVAILABLE;
- i = max11040_buf_in + 1;
- if (i >= MAX11040_BUF_SIZE) { i = 0; }
- if (i != max11040_buf_out) {
- max11040_buf_in = i;
- } else {
- //throw error;
- }
- }
- }
- break;
-
- }
-
- VICVectAddr = 0x00000000; /* clear this interrupt from the VIC */
- ISR_EXIT();
-}
-
-void EXTINT_ISR(void)
-{
- ISR_ENTRY();
-
- if (num_irqs++ == 5) {
- /* switch SSEL P0.20 to be used as GPIO */
- PINSEL1 &= ~(3 << 8);
- IO0DIR |= 1 << 20;
- max11040_status = MAX11040_DATA2;
- }
-
- if (max11040_status == MAX11040_DATA2) {
-
-#ifdef LOGGER
- max11040_timestamp[max11040_buf_in] = getclock();
-#endif
-
- MaxmSelect();
-
- /* read data */
- SSP_Send(0xF0);
- SSP_Send(0x00);
- SSP_Send(0x00);
- SSP_Send(0x00);
- SSP_Send(0x00);
- SSP_Send(0x00);
- SSP_Send(0x00);
-
- max11040_count = 0;
- }
-
- /* clear EINT */
- SetBit(EXTINT, MAXM_DRDY_EINT);
-
- VICVectAddr = 0x00000000; /* clear this interrupt from the VIC */
- ISR_EXIT();
-}
-
-
-void max11040_hw_init(void)
-{
- int i;
-
- /* *** configure SPI *** */
- /* setup pins for SSP (SCK, MISO, MOSI, SSEL) */
- PINSEL1 |= SSP_PINSEL1_SCK | SSP_PINSEL1_MISO | SSP_PINSEL1_MOSI | SSP_PINSEL1_SSEL;
-
- /* setup SSP */
- SSPCR0 = SSPCR0_VAL;;
- SSPCR1 = SSPCR1_VAL;
- SSPCPSR = 0x02;
-
- /* initialize interrupt vector */
- VICIntSelect &= ~VIC_BIT(VIC_SPI1); /* SPI1 selected as IRQ */
- VICIntEnable = VIC_BIT(VIC_SPI1); /* enable it */
- _VIC_CNTL(SPI1_VIC_SLOT) = VIC_ENABLE | VIC_SPI1;
- _VIC_ADDR(SPI1_VIC_SLOT) = (uint32_t)SSP_ISR; /* address of the ISR */
-
-
- /* *** configure DRDY pin*** */
- /* connected pin to EXINT */
- MAXM_DRDY_PINSEL |= MAXM_DRDY_PINSEL_VAL << MAXM_DRDY_PINSEL_BIT;
- SetBit(EXTMODE, MAXM_DRDY_EINT); /* EINT is edge trigered */
- ClearBit(EXTPOLAR, MAXM_DRDY_EINT); /* EINT is trigered on falling edge */
- SetBit(EXTINT, MAXM_DRDY_EINT); /* clear pending EINT */
-
- /* initialize interrupt vector */
- VICIntSelect &= ~VIC_BIT(MAXM_DRDY_VIC_IT); /* select EINT as IRQ source */
- VICIntEnable = VIC_BIT(MAXM_DRDY_VIC_IT); /* enable it */
- _VIC_CNTL(MAX11040_DRDY_VIC_SLOT) = VIC_ENABLE | MAXM_DRDY_VIC_IT;
- _VIC_ADDR(MAX11040_DRDY_VIC_SLOT) = (uint32_t)EXTINT_ISR; /* address of the ISR */
-
-
- /* write configuration register */
- SSP_Send(0x60); /* wr conf */
- for (i = 0; i < MAXM_NB_ADCS; i++) {
- SSP_Send(0x40); /* adcx: reset */
- }
- SSP_Enable();
- SSP_ClearRti();
- SSP_EnableRti();
-}
-
diff --git a/sw/airborne/arch/lpc21/modules/adcs/max11040_hw.h b/sw/airborne/arch/lpc21/modules/adcs/max11040_hw.h
deleted file mode 100644
index f9c81776b7..0000000000
--- a/sw/airborne/arch/lpc21/modules/adcs/max11040_hw.h
+++ /dev/null
@@ -1,62 +0,0 @@
-
-#ifndef MAX11040_HW_H
-#define MAX11040_HW_H
-
-
-#include "LPC21xx.h"
-#include "ssp_hw.h"
-#include "generated/airframe.h"
-#include BOARD_CONFIG
-
-
-#define MAXM_DIVISOR_128 2
-#define MAXM_DIVISOR_256 3
-#define MAXM_DIVISOR_512 4
-#define MAXM_DIVISOR_1024 5
-
-#define MAXM_DIVISOR MAXM_DIVISOR_512
-
-/* ssp input clock 468.75kHz, clock that divided by SCR+1 */
-#define SSP_CLOCK 468750
-
-/* SSPCR0 settings */
-#define SSP_DDS 0x07 << 0 /* data size : 8 bits */
-#define SSP_FRF 0x00 << 4 /* frame format : SPI */
-#define SSP_CPOL 0x00 << 6 /* clock polarity : data captured on first clock transition */
-#define SSP_CPHA 0x01 << 7 /* clock phase : SCK idles low */
-#define SSP_SCR 0x00 << 8 /* serial clock rate : divide by 16 */
-
-/* SSPCR1 settings */
-#define SSP_LBM 0x00 << 0 /* loopback mode : disabled */
-#define SSP_SSE 0x00 << 1 /* SSP enable : disabled */
-#define SSP_MS 0x00 << 2 /* master slave mode : master */
-#define SSP_SOD 0x00 << 3 /* slave output disable : don't care when master */
-
-#define SSPCR0_VAL (SSP_DDS | SSP_FRF | SSP_CPOL | SSP_CPHA | SSP_SCR )
-#define SSPCR1_VAL (SSP_LBM | SSP_SSE | SSP_MS | SSP_SOD )
-
-#define SSP_PINSEL1_SCK (2<<2)
-#define SSP_PINSEL1_MISO (2<<4)
-#define SSP_PINSEL1_MOSI (2<<6)
-#define SSP_PINSEL1_SSEL (2<<8)
-
-#define SSP_Enable() SetBit(SSPCR1, SSE);
-#define SSP_Disable() ClearBit(SSPCR1, SSE);
-#define SSP_EnableRxi() SetBit(SSPIMSC, RXIM)
-#define SSP_DisableRxi() ClearBit(SSPIMSC, RXIM)
-#define SSP_ClearRxi() SetBit(SSPICR, RXIM);
-#define SSP_EnableTxi() SetBit(SSPIMSC, TXIM)
-#define SSP_DisableTxi() ClearBit(SSPIMSC, TXIM)
-#define SSP_ClearTxi() SetBit(SSPICR, TXIM);
-#define SSP_EnableRti() SetBit(SSPIMSC, RTIM);
-#define SSP_DisableRti() ClearBit(SSPIMSC, RTIM);
-#define SSP_ClearRti() SetBit(SSPICR, RTIC);
-
-#define MaxmSelect() SetBit(MAXM_SS_IOCLR, MAXM_SS_PIN)
-#define MaxmUnselect() SetBit(MAXM_SS_IOSET, MAXM_SS_PIN)
-
-
-void max11040_hw_init(void);
-
-#endif /* MAX11040_HW_H */
-
diff --git a/sw/airborne/arch/lpc21/modules/core/trigger_ext_hw.c b/sw/airborne/arch/lpc21/modules/core/trigger_ext_hw.c
deleted file mode 100644
index ffc44bc3fd..0000000000
--- a/sw/airborne/arch/lpc21/modules/core/trigger_ext_hw.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2010 Martin Mueller
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-
-#include "core/trigger_ext_hw.h"
-#include "std.h"
-#include "mcu_periph/sys_time.h"
-#include "LPC21xx.h"
-#include BOARD_CONFIG
-
-void TRIG_ISR()
-{
- static uint32_t last;
- uint32_t delta_t0_temp;
- trigger_t0 = TRIGGER_CR;
- delta_t0_temp = trigger_t0 - last;
- if (msec_of_cpu_ticks(delta_t0_temp) > 10) {
- trigger_delta_t0 = delta_t0_temp;
- last = trigger_t0;
- trigger_ext_valid = true;
- }
-}
-
-void trigger_ext_init(void)
-{
- /* select pin for capture */
- TRIG_EXT_PINSEL |= TRIG_EXT_PINSEL_VAL << TRIG_EXT_PINSEL_BIT;
- /* enable capture 0.2 on falling or rising edge + trigger interrupt */
-#if defined TRIG_EXT_PULSE_TYPE && TRIG_EXT_PULSE_TYPE == TRIG_EXT_PULSE_TYPE_RISING
- T0CCR |= TRIGGER_CRR | TRIGGER_CRI;
-#elif defined TRIG_EXT_PULSE_TYPE && TRIG_EXT_PULSE_TYPE == TRIG_EXT_PULSE_TYPE_FALLING
- T0CCR |= TRIGGER_CRF | TRIGGER_CRI;
-#else
-#error "trig_ext_hw.h: Unknown PULSE_TYPE"
-#endif
- trigger_ext_valid = false;
-}
-
diff --git a/sw/airborne/arch/lpc21/modules/core/trigger_ext_hw.h b/sw/airborne/arch/lpc21/modules/core/trigger_ext_hw.h
deleted file mode 100644
index 7ae5b867a8..0000000000
--- a/sw/airborne/arch/lpc21/modules/core/trigger_ext_hw.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2010 Martin Mueller
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-#ifndef TRIGGER_EXT_HW_H
-#define TRIGGER_EXT_HW_H
-
-#include "core/trigger_ext.h"
-
-// Default trigger Pin is PPM pin (Tiny2/Twog)
-// To use a custom trigger, you must set the flag USE_CUSTOM_TRIGGER
-// and define:
-// - PINSEL
-// - PINSEL_VAL
-// - PINSEL_BIT
-// - input capture CHANNEL
-#ifndef USE_CUSTOM_TRIGGER
-#define TRIG_EXT_PINSEL PPM_PINSEL
-#define TRIG_EXT_PINSEL_VAL PPM_PINSEL_VAL
-#define TRIG_EXT_PINSEL_BIT PPM_PINSEL_BIT
-#define TRIG_EXT_CHANNEL 2
-#endif
-
-#define __SelectCapReg(_c) T0CR ## _c
-#define _SelectCapReg(_c) __SelectCapReg(_c)
-#define SelectCapReg(_c) _SelectCapReg(_c)
-
-#define __SetIntFlag(_c) TIR_CR ## _c ## I
-#define _SetIntFlag(_c) __SetIntFlag(_c)
-#define SetIntFlag(_c) _SetIntFlag(_c)
-
-#define __EnableRise(_c) TCCR_CR ## _c ## _R
-#define _EnableRise(_c) __EnableRise(_c)
-#define EnableRise(_c) _EnableRise(_c)
-
-#define __EnableFall(_c) TCCR_CR ## _c ## _F
-#define _EnableFall(_c) __EnableFall(_c)
-#define EnableFall(_c) _EnableFall(_c)
-
-#define __EnableInt(_c) TCCR_CR ## _c ## _I
-#define _EnableInt(_c) __EnableInt(_c)
-#define EnableInt(_c) _EnableInt(_c)
-
-#define TRIGGER_CR SelectCapReg(TRIG_EXT_CHANNEL)
-#define TRIGGER_IT SetIntFlag(TRIG_EXT_CHANNEL)
-#define TRIGGER_CRR EnableRise(TRIG_EXT_CHANNEL)
-#define TRIGGER_CRF EnableFall(TRIG_EXT_CHANNEL)
-#define TRIGGER_CRI EnableInt(TRIG_EXT_CHANNEL)
-
-/* Interrupt function called by sys_time_hw.c */
-void TRIG_ISR(void);
-
-#endif /* TRIGGER_EXT_HW_H */
-
diff --git a/sw/airborne/arch/lpc21/modules/display/lcd_dogm_hw.c b/sw/airborne/arch/lpc21/modules/display/lcd_dogm_hw.c
deleted file mode 100644
index ff93459383..0000000000
--- a/sw/airborne/arch/lpc21/modules/display/lcd_dogm_hw.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (C) 2009 ENAC
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-#include "LPC21xx.h"
-#include "armVIC.h"
-#include "lcd_dogm_hw.h"
-
-
-static void SPI1_ISR(void) __attribute__((naked));
-
-#define PINSEL1_SCK (2 << 2)
-#define PINSEL1_MOSI (2 << 6)
-#define PINSEL1_SSEL (2 << 8)
-
-/* SSPCR0 settings */
-#define SSP_DSS 0x07 << 0 /* data size : 8 bits */
-#define SSP_FRF 0x00 << 4 /* frame format : SPI */
-#define SSP_CPOL 0x01 << 6 /* clock polarity : idle high */
-#define SSP_CPHA 0x01 << 7 /* clock phase : low->high */
-#define SSP_SCR 0x1F << 8 /* serial clock rate : 29.3kHz, SSP input clock / 16 */
-
-/* SSPCR1 settings */
-#define SSP_LBM 0x00 << 0 /* loopback mode : disabled */
-#define SSP_SSE 0x00 << 1 /* SSP enable : disabled */
-#define SSP_MS 0x00 << 2 /* master slave mode : master */
-#define SSP_SOD 0x00 << 3 /* slave output disable : don't care when master */
-
-#ifndef SSPCPSR_VAL
-#define SSPCPSR_VAL 0x04
-#endif
-
-#warning "This driver should be updated to use the new SPI peripheral"
-
-#ifndef SPI1_VIC_SLOT
-#define SPI1_VIC_SLOT 7
-#endif
-
-void lcd_spi_tx(uint8_t data)
-{
- SpiClearRti();
- SpiEnableRti();
- SpiEnable();
- SSPDR = data;
-}
-
-void lcd_dogm_init_hw(void)
-{
- /* setup pins for SSP (SCK, MOSI) */
- PINSEL1 |= PINSEL1_SCK | PINSEL1_MOSI;
-
- /* setup SSP */
- SSPCR0 = SSP_DSS | SSP_FRF | SSP_CPOL | SSP_CPHA | SSP_SCR;
- SSPCR1 = SSP_LBM | SSP_MS | SSP_SOD;
- SSPCPSR = SSPCPSR_VAL; /* Prescaler */
-
- /* SS, RS pin is output */
- SetBit(LCDDOGM_SS_IODIR, LCDDOGM_SS_PIN);
- SetBit(LCDDOGM_RS_IODIR, LCDDOGM_RS_PIN);
- /* unselected lcd */
- lcddogmUnselect();
-
- /* Configure interrupt vector for SPI */
- VICIntSelect &= ~VIC_BIT(VIC_SPI1); /* SPI1 selected as IRQ */
- VICIntEnable = VIC_BIT(VIC_SPI1); /* SPI1 interrupt enabled */
- _VIC_CNTL(SPI1_VIC_SLOT) = VIC_ENABLE | VIC_SPI1;
- _VIC_CNTL(SPI1_VIC_SLOT) = (uint32_t)SPI1_ISR; /* address of the ISR */
-}
-
-void SPI1_ISR(void)
-{
- ISR_ENTRY();
-
- while (bit_is_set(SSPSR, RNE)) {
- uint16_t foo __attribute__((unused));
- foo = SSPDR;
- }
- SpiClearRti(); /* clear interrupt */
- SpiDisableRti();
- SpiDisable();
- lcddogmUnselect();
-
- VICVectAddr = 0x00000000; /* clear this interrupt from the VIC */
- ISR_EXIT();
-}
-
diff --git a/sw/airborne/arch/lpc21/modules/display/lcd_dogm_hw.h b/sw/airborne/arch/lpc21/modules/display/lcd_dogm_hw.h
deleted file mode 100644
index f1ab52a0e5..0000000000
--- a/sw/airborne/arch/lpc21/modules/display/lcd_dogm_hw.h
+++ /dev/null
@@ -1,48 +0,0 @@
-#ifndef LCD_DOGM_HW_H
-#define LCD_DOGM_HW_H
-
-#include
-#include "std.h"
-#include "mcu_periph/spi.h"
-#include "led.h"
-
-
-#define LCDDOGM_SS_PORT 0
-#define LCDDOGM_SS_PIN 20
-
-#define LCDDOGM_RS_PORT 0
-#define LCDDOGM_RS_PIN 16
-
-#define LCDDOGM_IO__(port, reg) IO ## port ## reg
-#define LCDDOGM_IO_(port, reg) LCDDOGM_IO__(port, reg)
-
-#define LCDDOGM_SS_IOCLR LCDDOGM_IO_(LCDDOGM_SS_PORT, CLR)
-#define LCDDOGM_SS_IODIR LCDDOGM_IO_(LCDDOGM_SS_PORT, DIR)
-#define LCDDOGM_SS_IOSET LCDDOGM_IO_(LCDDOGM_SS_PORT, SET)
-
-#define LCDDOGM_RS_IOCLR LCDDOGM_IO_(LCDDOGM_RS_PORT, CLR)
-#define LCDDOGM_RS_IODIR LCDDOGM_IO_(LCDDOGM_RS_PORT, DIR)
-#define LCDDOGM_RS_IOSET LCDDOGM_IO_(LCDDOGM_RS_PORT, SET)
-
-#define lcddogmSelect() { \
- SetBit(LCDDOGM_SS_IOCLR, LCDDOGM_SS_PIN); \
- }
-
-#define lcddogmUnselect() { \
- SetBit(LCDDOGM_SS_IOSET, LCDDOGM_SS_PIN); \
- }
-
-#define lcddogmCmdMode() { \
- SetBit(LCDDOGM_RS_IOCLR, LCDDOGM_RS_PIN); \
- }
-
-#define lcddogmDataMode() { \
- SetBit(LCDDOGM_RS_IOSET, LCDDOGM_RS_PIN); \
- }
-
-extern void lcd_spi_tx(uint8_t data);
-extern void lcd_dogm_init_hw(void);
-
-
-#endif /* LCD_DOGM_HW_H */
-
diff --git a/sw/airborne/arch/lpc21/modules/sensors/mag_micromag_fw_hw.c b/sw/airborne/arch/lpc21/modules/sensors/mag_micromag_fw_hw.c
deleted file mode 100644
index d2b71064ae..0000000000
--- a/sw/airborne/arch/lpc21/modules/sensors/mag_micromag_fw_hw.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/* PNI micromag3 connected on SPI1 */
-/*
- Tiny2 (fixed wing)
- SS on P0.20 (SSEL)
- RESET on P0.29 (ADC5)
- DRDY on P0.16 ( EINT0 )
-*/
-
-#include "led.h"
-#include "modules/sensors/mag_micromag_fw_hw.h"
-#include "modules/sensors/mag_micromag_fw.h"
-
-volatile uint8_t micromag_cur_axe;
-
-static void SSP_ISR(void) __attribute__((naked));
-static void EXTINT_ISR(void) __attribute__((naked));
-
-#warning "This driver should be updated to use the new SPI peripheral"
-
-#ifndef SPI1_VIC_SLOT
-#define SPI1_VIC_SLOT 7
-#endif
-
-static void SSP_ISR(void)
-{
- ISR_ENTRY();
-
- MmOnSpiIt();
-
- VICVectAddr = 0x00000000; /* clear this interrupt from the VIC */
- ISR_EXIT();
-}
-
-void EXTINT_ISR(void)
-{
- ISR_ENTRY();
-//LED_TOGGLE(3);
-
- /* no, we won't do anything asynchronously, so just notify */
- micromag_status = MM_GOT_EOC;
- /* clear EINT */
- SetBit(EXTINT, MM_DRDY_EINT);
-// EXTINT = (1< // for abs
-
-#include "std.h"
-#include "LPC21xx.h"
-#include "mcu.h"
-
-#include "mcu_periph/spi.h"
-#include BOARD_CONFIG
-
-#include "generated/airframe.h"
-
-#define MM_DIVISOR_128 2
-#define MM_DIVISOR_256 3
-#define MM_DIVISOR_512 4
-#define MM_DIVISOR_1024 5
-
-#define MM_DIVISOR MM_DIVISOR_512
-
-
-extern volatile uint8_t micromag_cur_axe;
-
-#define MmSelect() SetBit(MM_SS_IOCLR,MM_SS_PIN)
-#define MmUnselect() SetBit(MM_SS_IOSET,MM_SS_PIN)
-
-#define MmReset() SetBit(MM_RESET_IOCLR,MM_RESET_PIN)
-#define MmSet() SetBit(MM_RESET_IOSET,MM_RESET_PIN)
-
-#define MmOnSpiIt() { \
- switch (micromag_status) { \
- case MM_SENDING_REQ: \
- { \
- /* read dummy control byte reply */ \
- uint8_t foo __attribute__ ((unused)) = SSPDR; \
- micromag_status = MM_WAITING_EOC; \
- MmUnselect(); \
- SpiClearRti(); \
- SpiDisableRti(); \
- SpiDisable(); \
- } \
- break; \
- case MM_READING_RES: \
- { \
- int16_t new_val; \
- new_val = SSPDR << 8; \
- new_val += SSPDR; \
- if (abs(new_val) < 2000) \
- micromag_values[micromag_cur_axe] = new_val; \
- MmUnselect(); \
- SpiClearRti(); \
- SpiDisableRti(); \
- SpiDisable(); \
- micromag_cur_axe++; \
- if (micromag_cur_axe > 2) { \
- micromag_cur_axe = 0; \
- micromag_status = MM_DATA_AVAILABLE; \
- } \
- else \
- micromag_status = MM_IDLE; \
- } \
- break; \
- } \
- }
-
-
-#define MmSendReq() { \
- MmSelect(); \
- micromag_status = MM_SENDING_REQ; \
- MmSet(); \
- SpiClearRti(); \
- SpiEnableRti(); \
- MmReset(); \
- uint8_t control_byte = (micromag_cur_axe+1) << 0 | MM_DIVISOR_1024 << 4; \
- SSPDR = control_byte; \
- SpiEnable(); \
- }
-
-#define MmReadRes() { \
- micromag_status = MM_READING_RES; \
- MmSelect(); \
- /* trigger 2 bytes read */ \
- SSPDR = 0; \
- SSPDR = 0; \
- SpiEnable(); \
- SpiClearRti(); \
- SpiEnableRti(); \
- }
-
-extern void micromag_hw_init(void);
-
-#endif /* MICROMAG_HW_H */
diff --git a/sw/airborne/arch/lpc21/modules/sensors/trig_ext_hw.c b/sw/airborne/arch/lpc21/modules/sensors/trig_ext_hw.c
deleted file mode 100644
index e0ede7b4ca..0000000000
--- a/sw/airborne/arch/lpc21/modules/sensors/trig_ext_hw.c
+++ /dev/null
@@ -1,40 +0,0 @@
-
-#include "std.h"
-#include "mcu_periph/sys_time.h"
-#include "LPC21xx.h"
-#include "trig_ext_hw.h"
-#include BOARD_CONFIG
-
-uint32_t trigger_t0;
-uint32_t delta_t0;
-volatile bool trig_ext_valid;
-
-
-void TRIG_ISR()
-{
- static uint32_t last;
- uint32_t delta_t0_temp;
- trigger_t0 = PPM_CR;
- delta_t0_temp = trigger_t0 - last;
- if (msec_of_cpu_ticks(delta_t0_temp) > 10) {
- delta_t0 = delta_t0_temp;
- last = trigger_t0;
- trig_ext_valid = true;
- }
-}
-
-void trig_ext_init(void)
-{
- /* select pin for capture */
- PPM_PINSEL |= PPM_PINSEL_VAL << PPM_PINSEL_BIT;
- /* enable capture 0.2 on falling or rising edge + trigger interrupt */
-#if defined TRIG_EXT_PULSE_TYPE && TRIG_EXT_PULSE_TYPE == TRIG_EXT_PULSE_TYPE_RISING
- T0CCR |= PPM_CCR_CRR | PPM_CCR_CRI;
-#elif defined TRIG_EXT_PULSE_TYPE && TRIG_EXT_PULSE_TYPE == TRIG_EXT_PULSE_TYPE_FALLING
- T0CCR |= PPM_CCR_CRF | PPM_CCR_CRI;
-#else
-#error "trig_ext_hw.h: Unknown PULSE_TYPE"
-#endif
- trig_ext_valid = false;
-}
-
diff --git a/sw/airborne/arch/lpc21/modules/sensors/trig_ext_hw.h b/sw/airborne/arch/lpc21/modules/sensors/trig_ext_hw.h
deleted file mode 100644
index b06f0801c4..0000000000
--- a/sw/airborne/arch/lpc21/modules/sensors/trig_ext_hw.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef TRIG_EXT_HW_H
-#define TRIG_EXT_HW_H
-
-#include "std.h"
-
-/**
- * falling/rising edge
- */
-#define TRIG_EXT_EDGE_RISING 1
-#define TRIG_EXT_EDGE_FALLING 0
-
-extern uint32_t trigger_t0;
-extern uint32_t delta_t0;
-extern volatile bool trig_ext_valid;
-
-void TRIG_ISR(void);
-void trig_ext_init(void);
-
-#endif /* TRIG_EXT_HW_H */
-
diff --git a/sw/airborne/arch/lpc21/peripherals/max1168_arch.c b/sw/airborne/arch/lpc21/peripherals/max1168_arch.c
deleted file mode 100644
index d61eed4102..0000000000
--- a/sw/airborne/arch/lpc21/peripherals/max1168_arch.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2008-2009 Antoine Drouin
- * Copyright (C) 2012 Gautier Hattenberger
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "peripherals/max1168.h"
-
-#include "LPC21xx.h"
-#include "armVIC.h"
-#include BOARD_CONFIG
-
-static void EXTINT0_ISR(void) __attribute__((naked));
-
-void max1168_arch_init(void)
-{
-
- /* connect P0.16 to extint0 (EOC) */
- MAX1168_EOC_PINSEL |= MAX1168_EOC_PINSEL_VAL << MAX1168_EOC_PINSEL_BIT;
- /* extint0 is edge trigered */
- SetBit(EXTMODE, MAX1168_EOC_EINT);
- /* extint0 is trigered on falling edge */
- ClearBit(EXTPOLAR, MAX1168_EOC_EINT);
- /* clear pending extint0 before enabling interrupts */
- SetBit(EXTINT, MAX1168_EOC_EINT);
-
- /* initialize interrupt vector */
- VICIntSelect &= ~VIC_BIT(MAX1168_EOC_VIC_IT); // EXTINT0 selected as IRQ
- VICIntEnable = VIC_BIT(MAX1168_EOC_VIC_IT); // EXTINT0 interrupt enabled
- _VIC_CNTL(MAX1168_EOC_VIC_SLOT) = VIC_ENABLE | MAX1168_EOC_VIC_IT;
- _VIC_ADDR(MAX1168_EOC_VIC_SLOT) = (uint32_t)EXTINT0_ISR; // address of the ISR
-}
-
-
-void EXTINT0_ISR(void)
-{
- ISR_ENTRY();
- //ASSERT((max1168_status == MAX1168_SENDING_REQ), DEBUG_MAX_1168, MAX1168_ERR_SPURIOUS_EOC);
-
- max1168_status = MAX1168_GOT_EOC;
-
- //SetBit(EXTINT, MAX1168_EOC_EINT); /* clear extint0 */
- EXTINT = (1 << MAX1168_EOC_EINT);
- VICVectAddr = 0x00000000; /* clear this interrupt from the VIC */
-
- ISR_EXIT();
-}
diff --git a/sw/airborne/arch/lpc21/peripherals/max1168_arch.h b/sw/airborne/arch/lpc21/peripherals/max1168_arch.h
deleted file mode 100644
index 85f8d89ba7..0000000000
--- a/sw/airborne/arch/lpc21/peripherals/max1168_arch.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2008-2009 Antoine Drouin
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-
-#ifndef MAX1168_ARCH_H
-#define MAX1168_ARCH_H
-
-
-#include "std.h"
-
-#include "pprz_debug.h"
-
-#define MAX1168_ERR_ISR_STATUS 0
-#define MAX1168_ERR_READ_OVERUN 1
-#define MAX1168_ERR_SPURIOUS_EOC 2
-
-
-#endif /* MAX1168_ARCH_H */
diff --git a/sw/airborne/arch/lpc21/peripherals/ms2100_arch.c b/sw/airborne/arch/lpc21/peripherals/ms2100_arch.c
deleted file mode 100644
index 95b19d57b5..0000000000
--- a/sw/airborne/arch/lpc21/peripherals/ms2100_arch.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2008-2009 Antoine Drouin
- * Copyright (C) 2012 Gautier Hattenberger
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/**
- * @file arch/lpc21/peripherals/ms2100_arch.c
- *
- * LPC21xx specific functions for the ms2100 magnetic sensor from PNI.
- */
-
-#include "peripherals/ms2100.h"
-
-#include "LPC21xx.h"
-#include "armVIC.h"
-#include "mcu_periph/sys_time.h"
-#include BOARD_CONFIG
-
-static void EXTINT_ISR(void) __attribute__((naked));
-
-void ms2100_arch_init(void)
-{
-
- /* configure RESET pin */
- Ms2100Reset(); /* pin idles low */
- SetBit(MS2100_RESET_IODIR, MS2100_RESET_PIN); /* pin is output */
-
- /* configure DRDY pin */
- /* connected pin to EXINT */
- MS2100_DRDY_PINSEL |= MS2100_DRDY_PINSEL_VAL << MS2100_DRDY_PINSEL_BIT;
- SetBit(EXTMODE, MS2100_DRDY_EINT); /* EINT is edge trigered */
- SetBit(EXTPOLAR, MS2100_DRDY_EINT); /* EINT is trigered on rising edge */
- SetBit(EXTINT, MS2100_DRDY_EINT); /* clear pending EINT */
-
- /* initialize interrupt vector */
- VICIntSelect &= ~VIC_BIT(MS2100_DRDY_VIC_IT); /* select EINT as IRQ source */
- VICIntEnable = VIC_BIT(MS2100_DRDY_VIC_IT); /* enable it */
- _VIC_CNTL(MS2100_DRDY_VIC_SLOT) = VIC_ENABLE | MS2100_DRDY_VIC_IT;
- _VIC_ADDR(MS2100_DRDY_VIC_SLOT) = (uint32_t)EXTINT_ISR; // address of the ISR
-
-}
-
-void EXTINT_ISR(void)
-{
- ISR_ENTRY();
- /* no, we won't do anything asynchronously, so just notify */
- ms2100.status = MS2100_GOT_EOC;
- /* clear EINT */
- EXTINT = (1 << MS2100_DRDY_EINT);
- VICVectAddr = 0x00000000; /* clear this interrupt from the VIC */
- ISR_EXIT();
-}
-
-void ms2100_reset_cb(struct spi_transaction *t __attribute__((unused)))
-{
- // set RESET pin high for at least 100 nsec
- // busy wait should not harm
- // storing start and dt is probably long enough...
- Ms2100Set();
- uint32_t start = T0TC;
- uint32_t dt = cpu_ticks_of_nsec(110);
- while ((uint32_t)(T0TC - start) < dt);
- Ms2100Reset();
-}
-
diff --git a/sw/airborne/arch/lpc21/peripherals/ms2100_arch.h b/sw/airborne/arch/lpc21/peripherals/ms2100_arch.h
deleted file mode 100644
index 3cf1f459c9..0000000000
--- a/sw/airborne/arch/lpc21/peripherals/ms2100_arch.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2008-2009 Antoine Drouin
- * Copyright (C) 2012 Gautier Hattenberger
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/**
- * @file arch/lpc21/peripherals/ms2100_arch.h
- *
- * LPC21xx specific functions for the ms2100 magnetic sensor from PNI.
- */
-
-#ifndef MS2100_ARCH_H
-#define MS2100_ARCH_H
-
-#include "mcu_periph/spi.h"
-
-#define Ms2100Reset() SetBit(MS2100_RESET_IOCLR,MS2100_RESET_PIN)
-#define Ms2100Set() SetBit(MS2100_RESET_IOSET,MS2100_RESET_PIN)
-
-/** Reset callback.
- * called before spi transaction and after slave select
- */
-extern void ms2100_reset_cb(struct spi_transaction *t);
-
-#endif /* MS2100_ARCH_H */
diff --git a/sw/airborne/arch/lpc21/ssp_hw.h b/sw/airborne/arch/lpc21/ssp_hw.h
deleted file mode 100644
index ee83ef7b25..0000000000
--- a/sw/airborne/arch/lpc21/ssp_hw.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef SSP_HW_H
-#define SSP_HW_H
-
-#include "LPC21xx.h"
-
-#define SSP_Enable() SetBit(SSPCR1, SSE);
-#define SSP_Disable() ClearBit(SSPCR1, SSE);
-#define SSP_EnableRxi() SetBit(SSPIMSC, RXIM)
-#define SSP_DisableRxi() ClearBit(SSPIMSC, RXIM)
-#define SSP_EnableTxi() SetBit(SSPIMSC, TXIM)
-#define SSP_DisableTxi() ClearBit(SSPIMSC, TXIM)
-#define SSP_EnableRti() SetBit(SSPIMSC, RTIM);
-#define SSP_DisableRti() ClearBit(SSPIMSC, RTIM);
-#define SSP_ClearRti() SetBit(SSPICR, RTIC);
-
-#define SSP_Send(_a) {SSPDR = (_a);}
-
-#endif /* SSP_HW_H */
-
diff --git a/sw/airborne/arch/lpc21/subsystems/actuators/actuators_pwm_arch.c b/sw/airborne/arch/lpc21/subsystems/actuators/actuators_pwm_arch.c
deleted file mode 100644
index b4bad10bc0..0000000000
--- a/sw/airborne/arch/lpc21/subsystems/actuators/actuators_pwm_arch.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (C) 2010-2012 The Paparazzi Team
- *
- * This file is part of Paparazzi.
- *
- * Paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * Paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "subsystems/actuators/actuators_pwm_arch.h"
-#include "subsystems/actuators/actuators_pwm.h"
-#include "std.h"
-#include BOARD_CONFIG
-#include "generated/airframe.h"
-
-/* 40 Hz */
-#ifndef SERVOS_PERIOD
-#define SERVOS_PERIOD SERVOS_TICS_OF_USEC(25000)
-#endif
-
-const uint8_t pwm_latch_value = 0
-#if defined PWM_SERVO_0
- | PWM_SERVO_0_LATCH
-#endif
-#if defined PWM_SERVO_1
- | PWM_SERVO_1_LATCH
-#endif
-#if defined PWM_SERVO_2
- | PWM_SERVO_2_LATCH
-#endif
-#if defined PWM_SERVO_3
- | PWM_SERVO_3_LATCH
-#endif
-#if defined PWM_SERVO_4
- | PWM_SERVO_4_LATCH
-#endif
-#if defined PWM_SERVO_5
- | PWM_SERVO_5_LATCH
-#endif
- ;
-
-void actuators_pwm_arch_init(void)
-{
-
- /* configure pins for PWM */
-#if defined PWM_SERVO_0
- PWM_SERVO_0_PINSEL = (PWM_SERVO_0_PINSEL & PWM_SERVO_0_PINSEL_MASK) | PWM_SERVO_0_PINSEL_VAL << PWM_SERVO_0_PINSEL_BIT;
-#endif
-#if defined PWM_SERVO_1
- PWM_SERVO_1_PINSEL = (PWM_SERVO_1_PINSEL & PWM_SERVO_1_PINSEL_MASK) | PWM_SERVO_1_PINSEL_VAL << PWM_SERVO_1_PINSEL_BIT;
-#endif
-#if defined PWM_SERVO_2
- PWM_SERVO_2_PINSEL = (PWM_SERVO_2_PINSEL & PWM_SERVO_2_PINSEL_MASK) | PWM_SERVO_2_PINSEL_VAL << PWM_SERVO_2_PINSEL_BIT;
-#endif
-#if defined PWM_SERVO_3
- PWM_SERVO_3_PINSEL = (PWM_SERVO_3_PINSEL & PWM_SERVO_3_PINSEL_MASK) | PWM_SERVO_3_PINSEL_VAL << PWM_SERVO_3_PINSEL_BIT;
-#endif
-#if defined PWM_SERVO_4
- PWM_SERVO_4_PINSEL = (PWM_SERVO_4_PINSEL & PWM_SERVO_4_PINSEL_MASK) | PWM_SERVO_4_PINSEL_VAL << PWM_SERVO_4_PINSEL_BIT;
-#endif
-#if defined PWM_SERVO_5
- PWM_SERVO_5_PINSEL = (PWM_SERVO_5_PINSEL & PWM_SERVO_5_PINSEL_MASK) | PWM_SERVO_5_PINSEL_VAL << PWM_SERVO_5_PINSEL_BIT;
-#endif
-
- /* set servo refresh rate */
- PWMMR0 = SERVOS_PERIOD;
-
- /* FIXME: For now, this prescaler needs to match the TIMER0 prescaler, as the
- higher level code treats them the same */
- PWMPR = 1;
-
- /* enable all 6 PWM outputs in single edge mode*/
- PWMPCR = 0
-#if defined PWM_SERVO_0
- | PWM_SERVO_0_ENA
-#endif
-#if defined PWM_SERVO_1
- | PWM_SERVO_1_ENA
-#endif
-#if defined PWM_SERVO_2
- | PWM_SERVO_2_ENA
-#endif
-#if defined PWM_SERVO_3
- | PWM_SERVO_3_ENA
-#endif
-#if defined PWM_SERVO_4
- | PWM_SERVO_4_ENA
-#endif
-#if defined PWM_SERVO_5
- | PWM_SERVO_5_ENA
-#endif
- ;
-
- /* commit PWMMRx changes */
- PWMLER = PWMLER_LATCH0;
-
- /* enable PWM timer in PWM mode */
- PWMTCR = PWMTCR_COUNTER_ENABLE | PWMTCR_PWM_ENABLE;
-
-
-}
diff --git a/sw/airborne/arch/lpc21/subsystems/actuators/actuators_pwm_arch.h b/sw/airborne/arch/lpc21/subsystems/actuators/actuators_pwm_arch.h
deleted file mode 100644
index 4a2df8b6c9..0000000000
--- a/sw/airborne/arch/lpc21/subsystems/actuators/actuators_pwm_arch.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (C) 2010 The Paparazzi Team
- *
- * This file is part of Paparazzi.
- *
- * Paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * Paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef ACTUATORS_PWM_ARCH_H
-#define ACTUATORS_PWM_ARCH_H
-
-#include "LPC21xx.h"
-#include "mcu_periph/sys_time.h"
-
-
-/*
- wiring on classix PWM connector
-connector LPC shared port
-PWM1 PWM5 AD1_6 CAP1_3 P0.21
-PWM2 PWM3 RXD0 EINT0 P0.1
-PWM3 PWM1 TXD0 P0.0
-PWM4 PWM6 RXD1 EINT3 P0.9
-PWM5 PWM4 TXD1 AD1_1 P0.8
-PWM6 PWM2 SSEL0 EINT2 P0.7
-
-*/
-
-#define SERVOS_TICS_OF_USEC(s) cpu_ticks_of_usec(s)
-
-/* default definition of servo (from classix order) */
-#ifndef SERVO_REG_0
-#define SERVO_REG_0 PWMMR5
-#endif
-#ifndef SERVO_REG_1
-#define SERVO_REG_1 PWMMR3
-#endif
-#ifndef SERVO_REG_2
-#define SERVO_REG_2 PWMMR1
-#endif
-#ifndef SERVO_REG_3
-#define SERVO_REG_3 PWMMR6
-#endif
-#ifndef SERVO_REG_4
-#define SERVO_REG_4 PWMMR4
-#endif
-#ifndef SERVO_REG_5
-#define SERVO_REG_5 PWMMR2
-#endif
-
-#define COMMAND_(i) SERVO_REG_ ## i
-/** Actuator set macro */
-#define ActuatorPwmSet(_i, _v) { COMMAND_(_i) = SERVOS_TICS_OF_USEC(_v); }
-
-#define PWM_PINSEL_MASK_VAL 3
-
-#define PWM_SERVO_1_PINSEL PINSEL0
-#define PWM_SERVO_1_PINSEL_VAL 2
-#define PWM_SERVO_1_PINSEL_BIT 0
-#define PWM_SERVO_1_PINSEL_MASK ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_1_PINSEL_BIT)
-#define PWM_SERVO_1_ENA PWMPCR_ENA1
-#define PWM_SERVO_1_LATCH PWMLER_LATCH1
-
-#define PWM_SERVO_2_PINSEL PINSEL0
-#define PWM_SERVO_2_PINSEL_VAL 2
-#define PWM_SERVO_2_PINSEL_BIT 14
-#define PWM_SERVO_2_PINSEL_MASK ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_2_PINSEL_BIT)
-#define PWM_SERVO_2_ENA PWMPCR_ENA2
-#define PWM_SERVO_2_LATCH PWMLER_LATCH2
-
-#define PWM_SERVO_3_PINSEL PINSEL0
-#define PWM_SERVO_3_PINSEL_VAL 2
-#define PWM_SERVO_3_PINSEL_BIT 2
-#define PWM_SERVO_3_PINSEL_MASK ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_3_PINSEL_BIT)
-#define PWM_SERVO_3_ENA PWMPCR_ENA3
-#define PWM_SERVO_3_LATCH PWMLER_LATCH3
-
-#define PWM_SERVO_4_PINSEL PINSEL0
-#define PWM_SERVO_4_PINSEL_VAL 2
-#define PWM_SERVO_4_PINSEL_BIT 16
-#define PWM_SERVO_4_PINSEL_MASK ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_4_PINSEL_BIT)
-#define PWM_SERVO_4_ENA PWMPCR_ENA4
-#define PWM_SERVO_4_LATCH PWMLER_LATCH4
-
-#define PWM_SERVO_5_PINSEL PINSEL1
-#define PWM_SERVO_5_PINSEL_VAL 1
-#define PWM_SERVO_5_PINSEL_BIT 10
-#define PWM_SERVO_5_PINSEL_MASK ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_5_PINSEL_BIT)
-#define PWM_SERVO_5_ENA PWMPCR_ENA5
-#define PWM_SERVO_5_LATCH PWMLER_LATCH5
-
-#define PWM_SERVO_6_PINSEL PINSEL0
-#define PWM_SERVO_6_PINSEL_VAL 2
-#define PWM_SERVO_6_PINSEL_BIT 18
-#define PWM_SERVO_6_PINSEL_MASK ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_6_PINSEL_BIT)
-#define PWM_SERVO_6_ENA PWMPCR_ENA6
-#define PWM_SERVO_6_LATCH PWMLER_LATCH6
-
-extern const uint8_t pwm_latch_value;
-
-/** Actuator commit macro */
-#define ActuatorsPwmCommit() { \
- PWMLER = pwm_latch_value; \
- }
-
-#endif /* ACTUATORS_PWM_ARCH_H */
diff --git a/sw/airborne/arch/lpc21/subsystems/actuators/servos_4015_MAT_hw.c b/sw/airborne/arch/lpc21/subsystems/actuators/servos_4015_MAT_hw.c
deleted file mode 100644
index 0846884c33..0000000000
--- a/sw/airborne/arch/lpc21/subsystems/actuators/servos_4015_MAT_hw.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (C) 2006 Antoine Drouin
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/** \file servos_4015_MAT_hw.c
- * \brief Servo driving MAT0.1 (SERVO_CLOCK_PIN) using TIMER0
- */
-
-
-#include "subsystems/actuators.h"
-#include "paparazzi.h"
-#include "generated/airframe.h"
-
-uint8_t servos_4015_idx;
-uint32_t servos_delay;
-
-#define START_TIMEOUT 0xFFFF;
-
-void actuators_4015_init(void)
-{
- /* select clock pin as MAT0.1 output */
- IO0DIR |= _BV(SERVO_CLOCK_PIN);
- SERVO_CLOCK_PINSEL |= SERVO_CLOCK_PINSEL_VAL << SERVO_CLOCK_PINSEL_BIT;
-
- /* select reset pin as GPIO output */
- IO1DIR |= _BV(SERVO_RESET_PIN);
- PINSEL2 &= ~(_BV(3)); /* P1.25-16 are used as GPIO */
- /* assert RESET */
- IO1SET = _BV(SERVO_RESET_PIN);
-
- /* DATA pin output */
- IO1DIR |= _BV(SERVO_DATA_PIN);
-
- /* enable match 1 interrupt */
- T0MCR |= TMCR_MR1_I;
-
- /* lower clock */
- T0EMR &= ~TEMR_EM1;
- /* set high on match 1 */
- T0EMR |= TEMR_EMC1_2;
-
- /* set first pulse in a while */
- T0MR1 = START_TIMEOUT;
- servos_4015_idx = _4015_NB_CHANNELS;
- /* Set all servos at their midpoints */
- /* compulsory for unaffected servos */
- uint8_t i;
- for (i = 0 ; i < _4015_NB_CHANNELS ; i++) {
- servos_values[i] = SERVOS_TICS_OF_USEC(1500);
- }
-
- servos_delay = SERVO_REFRESH_TICS;
-}
-
-
-uint16_t servos_values[_4015_NB_CHANNELS];
-
diff --git a/sw/airborne/arch/lpc21/subsystems/actuators/servos_4015_MAT_hw.h b/sw/airborne/arch/lpc21/subsystems/actuators/servos_4015_MAT_hw.h
deleted file mode 100644
index 53f5be61db..0000000000
--- a/sw/airborne/arch/lpc21/subsystems/actuators/servos_4015_MAT_hw.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2006 Antoine Drouin
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/** \file servos_4015_MAT_hw.c
- * \brief Servo driving on MAT0.1 (SERVO_CLOCK_PIN) using TIMER0
- */
-
-
-#ifndef SERVOS_4015_HW_H
-#define SERVOS_4015_HW_H
-
-
-#include "std.h"
-#include "LPC21xx.h"
-#include "mcu_periph/sys_time.h"
-
-#include BOARD_CONFIG
-
-#define SERVOS_TICS_OF_USEC(s) cpu_ticks_of_usec(s)
-#define ClipServo(x,a,b) Clip(x, a, b)
-
-#define _4015_NB_CHANNELS 8
-extern uint16_t servos_values[_4015_NB_CHANNELS];
-#define Actuator4015Set(_i, _v) { servos_values[_i] = SERVOS_TICS_OF_USEC(_v); }
-
-extern void actuators_4015_init(void);
-#define Actuators4015Commit() {}
-#define Actuators4015Init() actuators_4015_init()
-extern uint8_t servos_4015_idx;
-extern uint32_t servos_delay;
-
-#define SERVO_REFRESH_TICS SERVOS_TICS_OF_USEC(20000)
-
-#define ACTUATORS_IT TIR_MR1I
-#define Servos4015Mat_ISR() { \
- if (servos_4015_idx == 0) { \
- servos_delay = SERVO_REFRESH_TICS; \
- SetBit(IO1CLR, SERVO_DATA_PIN); \
- } \
- if (servos_4015_idx < _4015_NB_CHANNELS ) { \
- T0MR1 += servos_values[servos_4015_idx]; \
- servos_delay -= servos_values[servos_4015_idx]; \
- servos_4015_idx++; \
- } else if (servos_4015_idx == _4015_NB_CHANNELS) { \
- SetBit(IO1SET, SERVO_RESET_PIN); \
- servos_4015_idx++; \
- T0MR1 += servos_delay/2; \
- } else { \
- SetBit(IO1SET, SERVO_DATA_PIN); \
- SetBit(IO1CLR, SERVO_RESET_PIN); \
- servos_4015_idx = 0; \
- T0MR1 += servos_delay/2; \
- } \
- /* lower clock pin */ \
- T0EMR &= ~TEMR_EM1; \
- }
-
-#endif /* SERVOS_4015_HW_H */
diff --git a/sw/airborne/arch/lpc21/subsystems/actuators/servos_4015_hw.c b/sw/airborne/arch/lpc21/subsystems/actuators/servos_4015_hw.c
deleted file mode 100644
index 81f609070d..0000000000
--- a/sw/airborne/arch/lpc21/subsystems/actuators/servos_4015_hw.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (C) 2006 Antoine Drouin
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-#include "subsystems/actuators.h"
-#include "armVIC.h"
-
-#include "generated/airframe.h"
-#include "mcu_periph/sys_time.h"
-
-
-uint16_t servos_values[_4015_NB_CHANNELS];
-
-#define PWMMR_SERV0 PWMMR5
-#define PWMMR_SERV1 PWMMR2
-#define PWMLER_LATCH_SERV0 PWMLER_LATCH5
-#define PWMLER_LATCH_SERV1 PWMLER_LATCH2
-#define PWMMCR_MRI_SERV0 PWMMCR_MR5I
-#define PWMMCR_MRI_SERV1 PWMMCR_MR2I
-#define PWMPCR_ENA_SERV0 PWMPCR_ENA5
-#define PWMPCR_ENA_SERV1 PWMPCR_ENA2
-#define PWMIR_MRI_SERV0 PWMIR_MR5I
-#define PWMIR_MRI_SERV1 PWMIR_MR2I
-
-#ifndef PWM_VIC_SLOT
-#define PWM_VIC_SLOT 3
-#endif
-
-void actuators_4015_init(void)
-{
- /* PWM selected as IRQ */
- VICIntSelect &= ~VIC_BIT(VIC_PWM);
- /* PWM interrupt enabled */
- VICIntEnable = VIC_BIT(VIC_PWM);
- _VIC_CNTL(PWM_VIC_SLOT) = VIC_ENABLE | VIC_PWM;
- /* address of the ISR */
- _VIC_ADDR(PWM_VIC_SLOT) = (uint32_t)PWM_ISR;
- /* PW5 pin (P0.21) used for PWM */
- IO0DIR |= _BV(SERV1_CLOCK_PIN);
- IO1DIR |= _BV(SERV1_DATA_PIN) | _BV(SERV1_RESET_PIN);
- SERV1_CLOCK_PINSEL |= SERV1_CLOCK_PINSEL_VAL << SERV1_CLOCK_PINSEL_BIT;
-
- /* set match5 to go of a long time from now */
- PWMMR0 = 0XFFFFFF;
- PWMMR_SERV1 = 0XFFF;
- /* commit above change */
- PWMLER = PWMLER_LATCH0 | PWMLER_LATCH_SERV1;
- /* interrupt on PWMMR5 match */
- PWMMCR = PWMMCR_MR0R | PWMMCR_MRI_SERV1;
- /* enable PWM5 ouptput */
- PWMPCR = PWMPCR_ENA_SERV1;
-
- /* Prescaler */
- PWMPR = PWM_PRESCALER - 1;
-
- /* enable PWM timer counter and PWM mode */
- PWMTCR = PWMTCR_COUNTER_ENABLE | PWMTCR_PWM_ENABLE;
- /* Load failsafe values */
- /* Set all servos at their midpoints */
- /* compulsory for unaffected servos */
- uint8_t i;
- for (i = 0 ; i < _4015_NB_CHANNELS ; i++) {
- servos_values[i] = SERVOS_TICS_OF_USEC(1500);
- }
-#ifdef SERVO_MOTOR
- servos_values[SERVO_MOTOR] = SERVOS_TICS_OF_USEC(SERVO_MOTOR_NEUTRAL);
-#endif
-#ifdef SERVO_MOTOR_LEFT
- servos_values[SERVO_MOTOR_LEFT] = SERVOS_TICS_OF_USEC(SERVO_MOTOR_LEFT_NEUTRAL);
-#endif
-#ifdef SERVO_MOTOR_RIGHT
- servos_values[SERVO_RIGHT_MOTOR] = SERVOS_TICS_OF_USEC(SERVO_MOTOR_RIGHT_NEUTRAL);
-#endif
-#ifdef SERVO_HATCH
- servos_values[SERVO_HATCH] = SERVOS_TICS_OF_USEC(SERVO_HATCH_NEUTRAL);
-#endif
-}
-
-
-
-#define SERVO_REFRESH_TICS SERVOS_TICS_OF_USEC(25000)
-
-
-static uint8_t servos_idx = 0;
-static uint32_t servos_delay;
-
-void PWM_ISR(void)
-{
- ISR_ENTRY();
- // LED_TOGGLE(2);
- if (servos_idx == 0) {
- IO1CLR = _BV(SERV1_RESET_PIN);
- IO1SET = _BV(SERV1_DATA_PIN);
- PWMMR0 = servos_values[servos_idx];
- servos_delay = SERVO_REFRESH_TICS - servos_values[servos_idx];
- PWMLER = PWMLER_LATCH0;
- servos_idx++;
- } else if (servos_idx < _4015_NB_CHANNELS) {
- IO1CLR = _BV(SERV1_DATA_PIN);
- PWMMR0 = servos_values[servos_idx];
- servos_delay -= servos_values[servos_idx];
- PWMLER = PWMLER_LATCH0;
- servos_idx++;
- } else {
- IO1SET = _BV(SERV1_RESET_PIN);
- PWMMR0 = servos_delay;
- PWMLER = PWMLER_LATCH0;
- servos_idx = 0;
- }
- /* clear the interrupt */
- PWMIR = PWMIR_MRI_SERV1;
- VICVectAddr = 0x00000000;
- ISR_EXIT();
-}
diff --git a/sw/airborne/arch/lpc21/subsystems/actuators/servos_4015_hw.h b/sw/airborne/arch/lpc21/subsystems/actuators/servos_4015_hw.h
deleted file mode 100644
index f42c49ba72..0000000000
--- a/sw/airborne/arch/lpc21/subsystems/actuators/servos_4015_hw.h
+++ /dev/null
@@ -1,47 +0,0 @@
-#ifndef SERVOS_4015_HW_H
-#define SERVOS_4015_HW_H
-
-#include
-#include "std.h"
-
-#include "LPC21xx.h"
-#include "mcu_periph/sys_time.h"
-
-#include BOARD_CONFIG
-
-/* PWM prescaler, set PWM input clock to 15MHz, PWM_CLK = PCLK / PWM_PRESCALER */
-
-#if (PCLK == 15000000)
-#define PWM_PRESCALER 1
-#else
-
-#if (PCLK == 30000000)
-#define PWM_PRESCALER 2
-#else
-
-#if (PCLK == 60000000)
-#define PWM_PRESCALER 4
-#else
-
-#error unknown PCLK frequency
-#endif
-#endif
-#endif
-
-#define PWM_TICS_OF_USEC(us) (uint32_t)((us) *1e-6 * PCLK / PWM_PRESCALER + 0.5)
-
-#define SERVOS_TICS_OF_USEC(s) PWM_TICS_OF_USEC(s)
-#define ClipServo(x,a,b) Clip(x, a, b)
-
-#define _4015_NB_CHANNELS 8
-extern uint16_t servos_values[_4015_NB_CHANNELS];
-#define Actuator4015Set(_i, _v) { servos_values[_i] = SERVOS_TICS_OF_USEC(_v); }
-
-extern void actuators_4015_init(void);
-#define Actuators4015Commit() {}
-#define Actuators4015Init() actuators_4015_init()
-
-void PWM_ISR(void) __attribute__((naked));
-
-
-#endif /* SERVOS_4015_HW_H */
diff --git a/sw/airborne/arch/lpc21/subsystems/actuators/servos_4015_hw_new.c b/sw/airborne/arch/lpc21/subsystems/actuators/servos_4015_hw_new.c
deleted file mode 100644
index 2c10b48e38..0000000000
--- a/sw/airborne/arch/lpc21/subsystems/actuators/servos_4015_hw_new.c
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright (C) 2006 Antoine Drouin
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-#include "subsystems/actuators.h"
-#include "armVIC.h"
-
-#include "generated/airframe.h"
-#include "mcu_periph/sys_time.h"
-
-
-uint16_t servos_values[_4015_NB_CHANNELS];
-
-#define PWMMR_SERV0 PWMMR5
-#define PWMMR_SERV1 PWMMR2
-#define PWMLER_LATCH_SERV0 PWMLER_LATCH5
-#define PWMLER_LATCH_SERV1 PWMLER_LATCH2
-#define PWMMCR_MRI_SERV0 PWMMCR_MR5I
-#define PWMMCR_MRI_SERV1 PWMMCR_MR2I
-#define PWMPCR_ENA_SERV0 PWMPCR_ENA5
-#define PWMPCR_ENA_SERV1 PWMPCR_ENA2
-#define PWMIR_MRI_SERV0 PWMIR_MR5I
-#define PWMIR_MRI_SERV1 PWMIR_MR2I
-
-#ifndef PWM_VIC_SLOT
-#define PWM_VIC_SLOT 3
-#endif
-
-void actuators_4015_init(void)
-{
- /* PWM selected as IRQ */
- VICIntSelect &= ~VIC_BIT(VIC_PWM);
- /* PWM interrupt enabled */
- VICIntEnable = VIC_BIT(VIC_PWM);
- _VIC_CNTL(PWM_VIC_SLOT) = VIC_ENABLE | VIC_PWM;
- /* address of the ISR */
- _VIC_ADDR(PWM_VIC_SLOT) = (uint32_t)PWM_ISR;
- /* set clock, data and reset pins as output */
- IO0DIR |= _BV(SERV0_CLOCK_PIN);
- IO1DIR |= _BV(SERV0_DATA_PIN) | _BV(SERV0_RESET_PIN);
- IO0DIR |= _BV(SERV1_CLOCK_PIN);
- IO1DIR |= _BV(SERV1_DATA_PIN) | _BV(SERV1_RESET_PIN);
- /* Configure the two servo clocks as PWM */
- SERV0_CLOCK_PINSEL |= SERV0_CLOCK_PINSEL_VAL << SERV0_CLOCK_PINSEL_BIT;
- SERV1_CLOCK_PINSEL |= SERV1_CLOCK_PINSEL_VAL << SERV1_CLOCK_PINSEL_BIT;
-
- /* set first pulse to be very long */
- PWMMR0 = 0XFFFFFF;
- PWMMR_SERV1 = 0XFFF;
- PWMMR_SERV0 = 0X0;
- /* commit above changes */
- PWMLER = PWMLER_LATCH0 | PWMLER_LATCH_SERV0 | PWMLER_LATCH_SERV1;
- /* enable interrupt on serv1 PWM match */
- PWMMCR = PWMMCR_MR0R | PWMMCR_MRI_SERV1;
- /* enable PWM ouptputs */
- PWMPCR = PWMPCR_ENA_SERV0 | PWMPCR_ENA_SERV1;
-
- /* Prescaler */
- PWMPR = PWM_PRESCALER - 1;
-
- /* enable PWM timer counter and PWM mode */
- PWMTCR = PWMTCR_COUNTER_ENABLE | PWMTCR_PWM_ENABLE;
- /* Load failsafe values */
- /* Set all servos at their midpoints */
- /* compulsory for unaffected servos */
- uint8_t i;
- for (i = 0 ; i < _4015_NB_CHANNELS ; i++) {
- servos_values[i] = SERVOS_TICS_OF_USEC(1500);
- }
-#ifdef SERVO_MOTOR
- servos_values[SERVO_MOTOR] = SERVOS_TICS_OF_USEC(SERVO_MOTOR_NEUTRAL);
-#endif
-}
-
-
-
-#define SERVO_REFRESH_TICS SERVOS_TICS_OF_USEC(25000)
-
-
-static uint8_t servos_idx = 0;
-static uint32_t servos_delay;
-
-void PWM_ISR(void)
-{
- ISR_ENTRY();
- if (servos_idx == 0) {
- /* lower serv0 reset */
- IO1CLR = _BV(SERV0_RESET_PIN);
- /* raise serv0 data */
- IO1SET = _BV(SERV0_DATA_PIN);
- /* start pulsing serv0 */
- PWMMR_SERV0 = 0XFFF;
- /* stop pulsing serv1 */
- PWMMR_SERV1 = 0X0;
- PWMMR0 = servos_values[servos_idx];
- servos_delay = SERVO_REFRESH_TICS - servos_values[servos_idx];
- PWMLER = PWMLER_LATCH0 | PWMLER_LATCH_SERV0 | PWMLER_LATCH_SERV1;
- /* enable serv0 match interrupt, disable serv1 match interrupt */
- PWMMCR = PWMMCR_MR0R | PWMMCR_MRI_SERV0;
- servos_idx++;
- } else if (servos_idx < 4) {
- /* lower serv0 data */
- IO1CLR = _BV(SERV0_DATA_PIN);
- PWMMR0 = servos_values[servos_idx];
- servos_delay -= servos_values[servos_idx];
- PWMLER = PWMLER_LATCH0;
- servos_idx++;
- } else if (servos_idx == 4) {
- /* raise serv0 reset */
- IO1SET = _BV(SERV1_RESET_PIN);
- /* lower serv1 reset */
- IO1CLR = _BV(SERV1_RESET_PIN);
- /* raise serv1 data */
- IO1SET = _BV(SERV1_DATA_PIN);
- /* stop pulsing serv0 */
- PWMMR_SERV0 = 0;
- /* start pulsing serv1 */
- PWMMR_SERV1 = 0XFFF;
- /* disable serv0 interrupt, enable serv1 match interrupt */
- PWMMCR = PWMMCR_MR0R | PWMMCR_MRI_SERV1;
- /* fill next servo value */
- PWMMR0 = servos_values[servos_idx];
- servos_delay -= servos_values[servos_idx];
- /* latch PWM values */
- PWMLER = PWMLER_LATCH0 | PWMLER_LATCH_SERV0 | PWMLER_LATCH_SERV1;
- servos_idx++;
- } else if (servos_idx < _4015_NB_CHANNELS) {
- /* clear serv1 data */
- IO1CLR = _BV(SERV1_DATA_PIN);
- PWMMR0 = servos_values[servos_idx];
- servos_delay -= servos_values[servos_idx];
- PWMLER = PWMLER_LATCH0;
- servos_idx++;
- } else {
- /* raise serv1 reset */
- IO1SET = _BV(SERV1_RESET_PIN);
- /* command the delay */
- PWMMR0 = servos_delay;
- PWMLER = PWMLER_LATCH0;
- servos_idx = 0;
- }
- /* clear the interrupt */
- PWMIR = PWMIR_MRI_SERV1;
- PWMIR = PWMIR_MRI_SERV0;
- VICVectAddr = 0x00000000;
- ISR_EXIT();
-}
diff --git a/sw/airborne/arch/lpc21/subsystems/actuators/servos_4017_hw.c b/sw/airborne/arch/lpc21/subsystems/actuators/servos_4017_hw.c
deleted file mode 100644
index 597ca1c83b..0000000000
--- a/sw/airborne/arch/lpc21/subsystems/actuators/servos_4017_hw.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (C) 2006 Antoine Drouin
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-#include "subsystems/actuators.h"
-
-#include "paparazzi.h"
-#include "generated/airframe.h"
-
-uint8_t servos_4017_idx;
-
-#define START_TIMEOUT 0xFFFF;
-
-void actuators_4017_init(void)
-{
- /* select clock pin as MAT0.1 output */
- IO0DIR |= _BV(SERVO_CLOCK_PIN);
- SERVO_CLOCK_PINSEL |= SERVO_CLOCK_PINSEL_VAL << SERVO_CLOCK_PINSEL_BIT;
-
- /* select reset pin as GPIO output */
- IO1DIR |= _BV(SERVO_RESET_PIN);
- PINSEL2 &= ~(_BV(3)); /* P1.25-16 are used as GPIO */
- // SERVO_RESET_PINSEL |= SERVO_RESET_PINSEL_VAL << SERVO_RESET_PINSEL_BIT;
- /* assert RESET */
- IO1SET = _BV(SERVO_RESET_PIN);
-
- /* enable match 1 interrupt */
- T0MCR |= TMCR_MR1_I;
-
-#ifndef SERVOS_4017_CLOCK_FALLING
- /* lower clock */
- T0EMR &= ~TEMR_EM1;
- /* set high on match 1 */
- T0EMR |= TEMR_EMC1_2;
-#else
- /* assert clock */
- T0EMR |= TEMR_EM1;
- /* set low on match 1 */
- T0EMR |= TEMR_EMC1_1;
-#endif
- /* set first pulse in a while */
- T0MR1 = START_TIMEOUT;
- servos_4017_idx = _4017_NB_CHANNELS;
- /* Set all servos at their midpoints */
- /* compulsory for unaffected servos */
- uint8_t i;
- for (i = 0 ; i < _4017_NB_CHANNELS ; i++) {
- servos_values[i] = SERVOS_TICS_OF_USEC(1500);
- }
-#ifdef SERVO_MOTOR
- servos_values[SERVO_MOTOR] = SERVOS_TICS_OF_USEC(SERVO_MOTOR_NEUTRAL);
-#endif
-#ifdef SERVO_MOTOR_LEFT
- servos_values[SERVO_MOTOR_LEFT] = SERVOS_TICS_OF_USEC(SERVO_MOTOR_LEFT_NEUTRAL);
-#endif
-#ifdef SERVO_MOTOR_RIGHT
- servos_values[SERVO_MOTOR_RIGHT] = SERVOS_TICS_OF_USEC(SERVO_MOTOR_RIGHT_NEUTRAL);
-#endif
-#ifdef SERVO_HATCH
- servos_values[SERVO_HATCH] = SERVOS_TICS_OF_USEC(SERVO_HATCH_NEUTRAL);
-#endif
-}
-
-
-uint16_t servos_values[_4017_NB_CHANNELS];
-
diff --git a/sw/airborne/arch/lpc21/subsystems/actuators/servos_4017_hw.h b/sw/airborne/arch/lpc21/subsystems/actuators/servos_4017_hw.h
deleted file mode 100644
index 4cd41aff84..0000000000
--- a/sw/airborne/arch/lpc21/subsystems/actuators/servos_4017_hw.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (C) 2012 ENAC
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-#ifndef SERVOS_4017_HW_H
-#define SERVOS_4017_HW_H
-
-#include
-#include "std.h"
-
-#include "LPC21xx.h"
-#include "mcu_periph/sys_time.h"
-
-#include BOARD_CONFIG
-
-#define SERVOS_TICS_OF_USEC(s) cpu_ticks_of_usec(s)
-#define ClipServo(x,a,b) Clip(x, a, b)
-
-#if defined NB_CHANNELS
-#define _4017_NB_CHANNELS Clip(NB_CHANNELS,0,10)
-#else
-#define _4017_NB_CHANNELS 10
-#endif
-
-extern uint16_t servos_values[_4017_NB_CHANNELS];
-#define Actuator4017Set(_i, _v) { servos_values[_i] = SERVOS_TICS_OF_USEC(_v); }
-
-extern void actuators_4017_init(void);
-#define Actuators4017Commit() {}
-#define Actuators4017Init() actuators_4017_init()
-
-extern uint8_t servos_4017_idx;
-
-#define ACTUATORS_IT TIR_MR1I
-
-#ifndef SERVOS_4017_CLOCK_FALLING
-#define SERVOS_4017_ISR() { \
- if (servos_4017_idx >= _4017_NB_CHANNELS) { \
- SetBit(IO1SET, SERVO_RESET_PIN); \
- servos_4017_idx = 0; \
- SetBit(IO1CLR, SERVO_RESET_PIN); \
- } \
- \
- /* request clock high on next match */ \
- T0MR1 += servos_values[servos_4017_idx]; \
- /* lower clock pin */ \
- T0EMR &= ~TEMR_EM1; \
- servos_4017_idx++; \
- }
-#else /* SERVOS_4017_CLOCK_FALLING */
-
-#define SERVOS_4017_RESET_WIDTH SERVOS_TICS_OF_USEC(1000)
-#define SERVOS_4017_FIRST_PULSE_WIDTH SERVOS_TICS_OF_USEC(100)
-
-#define SERVOS_4017_ISR() { \
- if (servos_4017_idx == _4017_NB_CHANNELS) { \
- SetBit(IO1SET, SERVO_RESET_PIN); \
- /* Start a long 1ms reset, keep clock low */ \
- T0MR1 += SERVOS_4017_RESET_WIDTH; \
- servos_4017_idx++; \
- T0EMR &= ~TEMR_EM1; \
- } \
- else if (servos_4017_idx > _4017_NB_CHANNELS) { \
- /* Clear the reset*/ \
- SetBit(IO1CLR,SERVO_RESET_PIN); \
- /* assert clock */ \
- T0EMR |= TEMR_EM1; \
- /* Starts a short pulse-like period */ \
- T0MR1 += SERVOS_4017_FIRST_PULSE_WIDTH; \
- servos_4017_idx=0; /** Starts a new sequence next time */ \
- } \
- else { \
- /* request next match */ \
- T0MR1 += servos_values[servos_4017_idx]; \
- /* clock low if not last one, last is done with reset */ \
- if (servos_4017_idx != _4017_NB_CHANNELS-1) { \
- /* raise clock pin */ \
- T0EMR |= TEMR_EM1; \
- } \
- servos_4017_idx++; \
- } \
- }
-#endif /* SERVOS_4017_CLOCK_ON_RESET */
-
-#endif /* SERVOS_4017_HW_H */
diff --git a/sw/airborne/arch/lpc21/subsystems/actuators/servos_ppm_hw.c b/sw/airborne/arch/lpc21/subsystems/actuators/servos_ppm_hw.c
deleted file mode 100644
index 14441cf1b4..0000000000
--- a/sw/airborne/arch/lpc21/subsystems/actuators/servos_ppm_hw.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2008 Mark Griffin
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/**
- * @file arch/lpc21/subsystems/actuators/servos_ppm_hw.c
- *
- * Efficient driving of MAT0.1 (SERVO_CLOCK_PIN) using TIMER0 to produce PPM
- * for a R/C receiver which has a microcontroller to drive the servos
- * (not a 4015 or 4017 decade counter chip).
- */
-
-#include "subsystems/actuators.h"
-#include "paparazzi.h"
-#include "generated/airframe.h"
-
-uint8_t servos_PPM_idx;
-uint8_t ppm_pulse;
-uint32_t servos_delay;
-
-#define START_TIMEOUT 0xFFFF;
-
-void actuators_ppm_init(void)
-{
- /* select ppm output pin as MAT0.1 output */
- SERVO_CLOCK_PINSEL |= SERVO_CLOCK_PINSEL_VAL << SERVO_CLOCK_PINSEL_BIT;
-
- /* enable match 1 interrupt */
- T0MCR |= TMCR_MR1_I;
-
- /* lower clock */
- T0EMR &= ~TEMR_EM1;
- /* set high on match 1 */
- T0EMR |= TEMR_EMC1_2;
-
- /* set first pulse in a while */
- T0MR1 = START_TIMEOUT;
- servos_PPM_idx = _PPM_NB_CHANNELS;
- /* Set all servos to their midpoints */
- /* compulsory for unused servos */
- uint8_t i;
- for (i = 0 ; i < _PPM_NB_CHANNELS ; i++) {
- servos_values[i] = SERVOS_TICS_OF_USEC(1500);
- }
-
- servos_delay = SERVO_REFRESH_TICS;
-}
-uint16_t servos_values[_PPM_NB_CHANNELS];
-
diff --git a/sw/airborne/arch/lpc21/subsystems/actuators/servos_ppm_hw.h b/sw/airborne/arch/lpc21/subsystems/actuators/servos_ppm_hw.h
deleted file mode 100644
index 2ba1545dfb..0000000000
--- a/sw/airborne/arch/lpc21/subsystems/actuators/servos_ppm_hw.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (C) 2008 Mark Griffin
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/**
- * @file arch/lpc21/subsystems/actuators/servos_ppm_hw.h
- *
- * Efficient driving of MAT0.1 (SERVO_CLOCK_PIN) using TIMER0 to produce PPM
- * for a R/C receiver which has a microcontroller to drive the servos
- * (not a 4015 or 4017 decade counter chip).
- */
-
-#ifndef SERVOS_PPM_HW_H
-#define SERVOS_PPM_HW_H
-
-#include "std.h"
-#include "LPC21xx.h"
-#include "mcu_periph/sys_time.h"
-
-#include BOARD_CONFIG
-
-#define SERVOS_TICS_OF_USEC(s) cpu_ticks_of_usec(s)
-#define ClipServo(x,a,b) Clip(x, a, b)
-
-#define _PPM_NB_CHANNELS 8
-extern uint16_t servos_values[_PPM_NB_CHANNELS];
-#define ActuatorPpmSet(_i, _v) { servos_values[_i] = SERVOS_TICS_OF_USEC(_v); }
-
-extern void actuators_ppm_init(void);
-#define ActuatorsPpmCommit() {}
-#define ActuatorsPpmInit() actuators_ppm_init()
-extern uint8_t servos_PPM_idx;
-extern uint32_t servos_delay;
-extern uint8_t ppm_pulse; /* 1=start of pulse, 0=end of pulse */
-
-/* define the ppm frame rate. 22msec is typical for JR/Graupner */
-#define SERVO_REFRESH_TICS SERVOS_TICS_OF_USEC(22000)
-/* define the ppm pulse width. 550usec is typical for JR/Graupner */
-#define PPM_WIDTH SERVOS_TICS_OF_USEC(550)
-
-#define ACTUATORS_IT TIR_MR1I
-#define ServosPPMMat_ISR() { \
- if (servos_PPM_idx == 0) { \
- servos_delay = SERVO_REFRESH_TICS; \
- } \
- if (servos_PPM_idx < _PPM_NB_CHANNELS ) { \
- if (ppm_pulse) { \
- T0MR1 += PPM_WIDTH; \
- servos_delay -= PPM_WIDTH; \
- } else { \
- T0MR1 += servos_values[servos_PPM_idx] - PPM_WIDTH; \
- servos_delay -= servos_values[servos_PPM_idx] - PPM_WIDTH; \
- servos_PPM_idx++; \
- } \
- } else { /* servos_PPM_idx=_PPM_NB_CHANNELS */ \
- if (ppm_pulse) { \
- T0MR1 += PPM_WIDTH; \
- servos_delay -= PPM_WIDTH; \
- } else { \
- servos_PPM_idx = 0; \
- T0MR1 += servos_delay - PPM_WIDTH; \
- } \
- } \
- if (!ppm_pulse) { \
- /* lower clock pin */ \
- T0EMR &= ~TEMR_EM1; \
- } \
- /* toggle ppm_pulse flag */ \
- ppm_pulse ^= 1; \
- }
-#endif /* SERVOS_PPM_HW_H */
diff --git a/sw/airborne/arch/lpc21/subsystems/imu/imu_aspirin_arch.c b/sw/airborne/arch/lpc21/subsystems/imu/imu_aspirin_arch.c
deleted file mode 100644
index b23bf7171d..0000000000
--- a/sw/airborne/arch/lpc21/subsystems/imu/imu_aspirin_arch.c
+++ /dev/null
@@ -1,63 +0,0 @@
-#include "subsystems/imu.h"
-
-
-#include "LPC21xx.h"
-
-//#define ASPIRIN_GYRO_EOC_PINSEL PINSEL1
-//#define ASPIRIN_GYRO_EOC_PINSEL_BIT 0
-//#define ASPIRIN_GYRO_EOC_PINSEL_VAL 1
-
-
-void imu_aspirin_arch_int_enable(void)
-{
-}
-
-void imu_aspirin_arch_int_disable(void)
-{
-}
-
-void imu_aspirin_arch_init(void)
-{
- /* set input pin for gyro eoc */
- ClearBit(ASPIRIN_GYRO_EOC_IODIR, ASPIRIN_GYRO_EOC_PIN);
-
- //ASPIRIN_GYRO_EOC_PINSEL |= ASPIRIN_GYRO_EOC_PINSEL_VAL << ASPIRIN_GYRO_EOC_PINSEL_BIT;
-}
-
-
-/****** the interrupts should be handled in the peripheral drivers *******/
-
-/*
- * Gyro data ready
- */
-void exti15_10_irq_handler(void)
-{
-
- /* clear EXTI */
-// if(EXTI_GetITStatus(EXTI_Line14) != RESET)
-// EXTI_ClearITPendingBit(EXTI_Line14);
-
- //imu_aspirin.gyro_eoc = true;
- //imu_aspirin.status = AspirinStatusReadingGyro;
-}
-
-/*
- * Accel data ready
- */
-void exti2_irq_handler(void)
-{
-
- /* clear EXTI */
-// if(EXTI_GetITStatus(EXTI_Line2) != RESET)
-// EXTI_ClearITPendingBit(EXTI_Line2);
-
-}
-
-/*
- * Accel end of DMA transfer
- */
-void dma1_c4_irq_handler(void)
-{
-
- //imu_aspirin.accel_available = true;
-}
diff --git a/sw/airborne/arch/lpc21/subsystems/imu/imu_aspirin_arch.h b/sw/airborne/arch/lpc21/subsystems/imu/imu_aspirin_arch.h
deleted file mode 100644
index a4f5610a86..0000000000
--- a/sw/airborne/arch/lpc21/subsystems/imu/imu_aspirin_arch.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef IMU_ASPIRIN_ARCH_H
-#define IMU_ASPIRIN_ARCH_H
-
-#include "subsystems/imu.h"
-#include "std.h"
-#include "LPC21xx.h"
-
-#if !defined ASPIRIN_GYRO_EOC_IODIR && !defined ASPIRIN_GYRO_EOC_IOPIN && !defined ASPIRIN_GYRO_EOC_PIN
-#define ASPIRIN_GYRO_EOC_IODIR IO0DIR
-#define ASPIRIN_GYRO_EOC_IOPIN IO0PIN
-#define ASPIRIN_GYRO_EOC_PIN 16
-#endif
-
-extern void imu_aspirin_arch_int_enable(void);
-extern void imu_aspirin_arch_int_disable(void);
-
-// gyro eoc
-static inline int imu_aspirin_eoc(void)
-{
- return bit_is_set(ASPIRIN_GYRO_EOC_IOPIN, ASPIRIN_GYRO_EOC_PIN);
-}
-#endif /* IMU_ASPIRIN_ARCH_H */
diff --git a/sw/airborne/arch/lpc21/subsystems/radio_control/ppm_arch.c b/sw/airborne/arch/lpc21/subsystems/radio_control/ppm_arch.c
deleted file mode 100644
index 5d5cf4c6f9..0000000000
--- a/sw/airborne/arch/lpc21/subsystems/radio_control/ppm_arch.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2010-2014 The Paparazzi Team
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, see
- * .
- */
-
-/**
- * @file arch/lpc21/subsystems/radio_control/ppm_arch.c
- *
- * LPC21xx specific implementation for PPM radio control.
- *
- */
-
-#include "subsystems/radio_control.h"
-#include "subsystems/radio_control/ppm.h"
-
-
-void ppm_arch_init(void)
-{
- /* select pin for capture */
- PPM_PINSEL |= PPM_PINSEL_VAL << PPM_PINSEL_BIT;
- /* enable capture 0.2 on falling or rising edge + trigger interrupt */
-#if defined PPM_PULSE_TYPE && PPM_PULSE_TYPE == PPM_PULSE_TYPE_POSITIVE
- T0CCR |= PPM_CCR_CRR | PPM_CCR_CRI;
-#elif defined PPM_PULSE_TYPE && PPM_PULSE_TYPE == PPM_PULSE_TYPE_NEGATIVE
- T0CCR |= PPM_CCR_CRF | PPM_CCR_CRI;
-#else
-#error "Unknown PPM_PULSE_TYPE"
-#endif
-
-#ifdef USE_PPM_RSSI_GPIO
- /* select pin as GPIO (input) : should be default ?*/
- //PPM_RSSI_PINSEL |= PPM_RSSI_VAL << PPM_RSSI_PINSEL_BIT;
- //ClearBit(PPM_RSSI_IODIR, PPM_RSSI_BIT);
-#endif
-}
diff --git a/sw/airborne/arch/lpc21/subsystems/radio_control/ppm_arch.h b/sw/airborne/arch/lpc21/subsystems/radio_control/ppm_arch.h
deleted file mode 100644
index c239220147..0000000000
--- a/sw/airborne/arch/lpc21/subsystems/radio_control/ppm_arch.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2010-2014 The Paparazzi Team
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, see
- * .
- */
-
-/**
- * @file arch/lpc21/subsystems/radio_control/ppm_arch.h
- *
- * LPC21xx ppm decoder.
- *
- */
-
-#ifndef PPM_ARCH_H
-#define PPM_ARCH_H
-
-
-#include "LPC21xx.h"
-#include BOARD_CONFIG
-
-#include "mcu_periph/sys_time.h"
-
-/**
- * On tiny (and booz) the ppm counter is running at the same speed as
- * the systic counter. There is no reason for this to be true.
- * Let's add a pair of macros to make it possible for them to be different.
- *
- */
-#define RC_PPM_TICKS_OF_USEC(_v) cpu_ticks_of_usec(_v)
-#define RC_PPM_SIGNED_TICKS_OF_USEC(_v) signed_cpu_ticks_of_usec(_v)
-#define USEC_OF_RC_PPM_TICKS(_v) usec_of_cpu_ticks(_v)
-
-#define PPM_IT PPM_CRI
-
-#define PPM_ISR() { \
- uint32_t now = PPM_CR; \
- ppm_decode_frame(now); \
- }
-
-#ifdef USE_PPM_RSSI_GPIO
-#define RssiValid() (bit_is_set(PPM_RSSI_IOPIN, PPM_RSSI_PIN) == PPM_RSSI_VALID_LEVEL)
-#endif
-
-
-#endif /* PPM_ARCH_H */
diff --git a/sw/airborne/arch/lpc21/subsystems/settings_arch.c b/sw/airborne/arch/lpc21/subsystems/settings_arch.c
deleted file mode 100644
index 96cf107a7a..0000000000
--- a/sw/airborne/arch/lpc21/subsystems/settings_arch.c
+++ /dev/null
@@ -1,292 +0,0 @@
-/*
- * Copyright (C) 2011 Martin Mueller
- *
- * This file is part of Paparazzi.
- *
- * Paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * Paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/**
- * @file arch/lpc21/subsystems/settings_arch.c
- * Persistent settings low level flash routines lpc21.
- *
- * LPC2148 flash data is located in the last available page
- *
- * 0x00000000: Paparazzi bootloader (16k)
- * 0x00004000: Paparazzi code (480k)
- * 0x0007C000: persistent settings (4k)
- * 0x0007D000: Philips/NXP bootloader (12k)
- *
- * data flash_addr
- * data_size flash_end - FSIZ
- * checksum flash_end - FCHK
- *
- * LPC21: minimum write size 256 bytes, endurance 100k cycles,
- * max sector erase time 400ms, max prog time 1ms per 256 bytes
- */
-
-#include "subsystems/settings.h"
-
-#include "LPC21xx.h"
-#include BOARD_CONFIG
-#include "armVIC.h"
-
-#define IAP_LOCATION 0x7FFFFFF1
-
-#define IAP_PREPARE_SECTORS 50
-#define IAP_COPY_RAM_TO_FLASH 51
-#define IAP_ERASE_SECTORS 52
-#define IAP_BLANK_CHECK_SECTORS 53
-#define IAP_READ_PART_ID 54
-#define IAP_COMPARE 56
-
-/* we have to operate on 256 byte flash boundaries */
-#define BOUND 256
-
-#define FSIZ 8
-#define FCHK 4
-
-typedef void (*IAP)(uint32_t[], uint32_t[]);
-
-typedef struct {
- uint32_t addr;
- uint32_t total_size;
- uint32_t page_nr;
- uint32_t page_size;
-} FlashInfo;
-
-static uint32_t pflash_checksum(uint32_t ptr, uint32_t size);
-static int32_t flash_detect(FlashInfo *flash);
-static int32_t pflash_erase_page(FlashInfo *flash);
-static int32_t pflash_program_array(FlashInfo *flash,
- uint32_t dest,
- uint32_t src);
-static int32_t pflash_program_bytes(FlashInfo *flash,
- uint32_t src,
- uint32_t size,
- uint32_t chksum);
-
-
-static uint32_t pflash_checksum(uint32_t ptr, uint32_t size)
-{
- uint32_t i, sum = 0;
-
- /* do it cheap for now */
- for (i = 0; i < size; i++) {
- sum += *(uint8_t *)(ptr + i);
- }
-
- return sum;
-}
-
-static int32_t flash_detect(FlashInfo *flash)
-{
- uint32_t command[5], result[3];
- IAP iap_entry;
-
- iap_entry = (IAP) IAP_LOCATION;
-
- /* get part ID */
- command[0] = IAP_READ_PART_ID;
- disableIRQ();
- iap_entry(command, result);
- enableIRQ();
- if (result[0] != 0) { return result[0]; }
-
- switch (result[1]) {
- /* LPC2141, 32k Flash, 8k RAM */
- case 0x0402FF01:
- /* LPC2142, 64k Flash, 16k RAM */
- case 0x0402FF11:
- /* LPC2144, 128k Flash, 16k RAM */
- case 0x0402FF12:
- /* LPC2146, 256k Flash, 32k+8k RAM */
- case 0x0402FF23: {
- return -1;
- break;
- }
- /* have LPC2148 support only */
- /* LPC2148, 512k Flash, 32k+8k RAM */
- case 0x0402FF25: {
- flash->page_size = 0x1000;
- flash->page_nr = 26;
- flash->addr = 0x7C000;
- break;
- }
- default: return -1;
- }
-
- return 0;
-}
-
-static int32_t pflash_erase_page(FlashInfo *flash)
-{
- uint32_t command[5], result[3];
- IAP iap_entry;
-
- iap_entry = (IAP) IAP_LOCATION;
-
- /* prepare page/sector */
- command[0] = IAP_PREPARE_SECTORS;
- command[1] = flash->page_nr;
- command[2] = flash->page_nr;
- disableIRQ();
- iap_entry(command, result);
- enableIRQ();
- if (result[0] != 0) { return result[0]; }
-
- /* erase page/sector */
- command[0] = IAP_ERASE_SECTORS;
- command[1] = flash->page_nr;
- command[2] = flash->page_nr;
- disableIRQ();
- iap_entry(command, result);
- enableIRQ();
- if (result[0] != 0) { return result[0]; }
-
- /* verify erase */
- command[0] = IAP_BLANK_CHECK_SECTORS;
- command[1] = flash->page_nr;
- command[2] = flash->page_nr;
- iap_entry(command, result);
- if (result[0] != 0) { return result[0]; }
-
- return 0;
-}
-
-static int32_t pflash_program_array(FlashInfo *flash,
- uint32_t dest,
- uint32_t src)
-{
- uint32_t command[5], result[3];
- IAP iap_entry;
-
- iap_entry = (IAP) IAP_LOCATION;
-
- /* prepare page/sector */
- command[0] = IAP_PREPARE_SECTORS;
- command[1] = flash->page_nr;
- command[2] = flash->page_nr;
- disableIRQ();
- iap_entry(command, result);
- enableIRQ();
- if (result[0] != 0) { return result[0]; }
-
- /* flash from ram */
- command[0] = IAP_COPY_RAM_TO_FLASH;
- command[1] = dest;
- command[2] = src;
- command[3] = BOUND;
- command[4] = CCLK / 1000;
- disableIRQ();
- iap_entry(command, result);
- enableIRQ();
- if (result[0] != 0) { return result[0]; }
-
- return 0;
-}
-
-static int32_t pflash_program_bytes(FlashInfo *flash,
- uint32_t src,
- uint32_t size,
- uint32_t chksum)
-{
- uint32_t data[BOUND / 4], i, j, ret;
- uint32_t ptr = (uint32_t) &data;
-
- /* erase */
- if ((ret = pflash_erase_page(flash))) { return ret; }
-
- /* write data in arrays */
- for (i = 0; i < size; i += BOUND) {
- /* copy data to aligned memory */
- for (j = 0; j < BOUND; j++) {
- *(uint8_t *)(ptr + j) = *(uint8_t *)(src + i + j);
- }
- if (i == flash->page_size - BOUND) {
- data[(BOUND - FSIZ) / 4] = size;
- data[(BOUND - FCHK) / 4] = chksum;
- }
- if ((ret = pflash_program_array(flash, flash->addr + i, ptr))) { return ret; }
- }
-
- /* last array */
- if (i <= flash->page_size - BOUND) {
- data[(BOUND - FSIZ) / 4] = size;
- data[(BOUND - FCHK) / 4] = chksum;
- if ((ret = pflash_program_array(flash,
- flash->addr + flash->page_size - BOUND,
- ptr))) {
- return ret;
- }
- }
-
- /* verify data */
- for (i = 0; i < size; i++) {
- if ((*(uint8_t *)(flash->addr + i)) != (*(uint8_t *)(src + i))) { return -2; }
- }
- if (*(uint32_t *)(flash->addr + flash->page_size - FSIZ) != size) { return -3; }
- if (*(uint32_t *)(flash->addr + flash->page_size - FCHK) != chksum) { return -4; }
-
- return 0;
-}
-
-int32_t persistent_write(void *ptr, uint32_t size)
-{
- FlashInfo flash_info;
-
- if (flash_detect(&flash_info)) { return -1; }
- if ((size > flash_info.page_size - FSIZ) || (size == 0)) { return -2; }
-
- return pflash_program_bytes(&flash_info,
- (uint32_t)ptr,
- size,
- pflash_checksum((uint32_t)ptr, size));
-}
-
-int32_t persistent_read(void *ptr, uint32_t size)
-{
- FlashInfo flash;
- uint32_t i;
-
- /* check parameters */
- if (flash_detect(&flash)) { return -1; }
- if ((size > flash.page_size - FSIZ) || (size == 0)) { return -2; }
-
- /* check consistency */
- if (size != *(uint32_t *)(flash.addr + flash.page_size - FSIZ)) { return -3; }
- if (pflash_checksum(flash.addr, size) !=
- *(uint32_t *)(flash.addr + flash.page_size - FCHK)) {
- return -4;
- }
-
- /* copy data */
- for (i = 0; i < size; i++) {
- *(uint8_t *)((uint32_t)ptr + i) = *(uint8_t *)(flash.addr + i);
- }
-
- return 0;
-}
-
-int32_t persistent_clear(void)
-{
- FlashInfo flash;
-
- if (flash_detect(&flash)) { return -1; }
-
- return pflash_erase_page(&flash);
-}
diff --git a/sw/airborne/arch/lpc21/tacho_mb.c b/sw/airborne/arch/lpc21/tacho_mb.c
deleted file mode 100644
index cd01cf2fca..0000000000
--- a/sw/airborne/arch/lpc21/tacho_mb.c
+++ /dev/null
@@ -1,18 +0,0 @@
-#include "tacho_mb.h"
-
-#include "LPC21xx.h"
-
-uint32_t t_duration;
-
-/* INPUT CAPTURE CAP0.0 on P0.22*/
-#define TACHO_MB_PINSEL PINSEL1
-#define TACHO_MB_PINSEL_VAL 0x02
-#define TACHO_MB_PINSEL_BIT 12
-
-void tacho_mb_init(void)
-{
- /* select pin for capture */
- TACHO_MB_PINSEL |= TACHO_MB_PINSEL_VAL << TACHO_MB_PINSEL_BIT;
- /* enable capture 0.2 on falling edge + trigger interrupt */
- T0CCR |= TCCR_CR0_F | TCCR_CR0_I;
-}
diff --git a/sw/airborne/arch/lpc21/tacho_mb.h b/sw/airborne/arch/lpc21/tacho_mb.h
deleted file mode 100644
index 3593698dc0..0000000000
--- a/sw/airborne/arch/lpc21/tacho_mb.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef TACHO_MB_H
-#define TACHO_MB_H
-
-#include "std.h"
-
-extern void tacho_mb_init(void);
-
-extern uint32_t t_duration;
-
-#define TACHO_MB_ISR() { \
- static uint32_t tmb_last; \
- uint32_t t_now = T0CR0; \
- t_duration = t_now - tmb_last; \
- tmb_last = t_now; \
- LED_TOGGLE(1); \
- }
-
-#endif /* TACHO_MB_H */
diff --git a/sw/airborne/arch/lpc21/test/LPC2138-ROM-bl.ld b/sw/airborne/arch/lpc21/test/LPC2138-ROM-bl.ld
deleted file mode 100644
index 0ccef5bea9..0000000000
--- a/sw/airborne/arch/lpc21/test/LPC2138-ROM-bl.ld
+++ /dev/null
@@ -1,126 +0,0 @@
-/***********************************************************************/
-/* */
-/* ROM.ld: Linker Script File */
-/* */
-/***********************************************************************/
-ENTRY(_boot)
-STACK_SIZE = 0x400;
-
-/* Memory Definitions */
-/* lpc2129 mt */
-MEMORY
-{
- ROM (rx) : ORIGIN = 0x00004000, LENGTH = 512k
- RAM (rw) : ORIGIN = 0x40000000, LENGTH = 32k
-}
-
-/* Section Definitions */
-SECTIONS
-{
- /* first section is .text which is used for code */
- .text :
- {
- *crt0.o (.text) /* Startup code */
- *(.text) /* remaining code */
- *(.rodata) /* read-only data (constants) */
- *(.rodata*)
- *(.glue_7)
- *(.glue_7t)
- } > ROM
-
- . = ALIGN(4);
-
- /* .ctors .dtors are used for c++ constructors/destructors */
- /* added by Martin Thomas 4/2005 based on Anglia Design example */
- .ctors :
- {
- PROVIDE(__ctors_start__ = .);
- KEEP(*(SORT(.ctors.*)))
- KEEP(*(.ctors))
- PROVIDE(__ctors_end__ = .);
- } >ROM
-
- .dtors :
- {
- PROVIDE(__dtors_start__ = .);
- KEEP(*(SORT(.dtors.*)))
- KEEP(*(.dtors))
- PROVIDE(__dtors_end__ = .);
- } >ROM
-
- . = ALIGN(4);
- /* mthomas - end */
-
-
- _etext = . ;
- PROVIDE (etext = .);
-
- /* .data section which is used for initialized data */
- .data : AT (_etext)
- {
- _data = .;
- *(.data)
- SORT(CONSTRUCTORS) /* mt 4/2005 */
- } > RAM
-
- . = ALIGN(4);
- _edata = . ;
- PROVIDE (edata = .);
-
- /* .bss section which is used for uninitialized data */
- .bss (NOLOAD) :
- {
- __bss_start = . ;
- __bss_start__ = . ;
- *(.bss)
- *(COMMON)
- . = ALIGN(4);
- } > RAM
-
- . = ALIGN(4);
- __bss_end__ = . ;
- PROVIDE (__bss_end = .);
-
- .stack ALIGN(256) :
- {
- . += STACK_SIZE;
- PROVIDE (_stack = .);
- } > RAM
-
- _end = . ;
- PROVIDE (end = .);
-
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
-}
diff --git a/sw/airborne/arch/lpc21/test/LPC2138-ROM.ld b/sw/airborne/arch/lpc21/test/LPC2138-ROM.ld
deleted file mode 100644
index 92bee60231..0000000000
--- a/sw/airborne/arch/lpc21/test/LPC2138-ROM.ld
+++ /dev/null
@@ -1,126 +0,0 @@
-/***********************************************************************/
-/* */
-/* ROM.ld: Linker Script File */
-/* */
-/***********************************************************************/
-ENTRY(_boot)
-STACK_SIZE = 0x400;
-
-/* Memory Definitions */
-/* lpc2129 mt */
-MEMORY
-{
- ROM (rx) : ORIGIN = 0x00000000, LENGTH = 512k
- RAM (rw) : ORIGIN = 0x40000000, LENGTH = 32k
-}
-
-/* Section Definitions */
-SECTIONS
-{
- /* first section is .text which is used for code */
- .text :
- {
- *crt0.o (.text) /* Startup code */
- *(.text) /* remaining code */
- *(.rodata) /* read-only data (constants) */
- *(.rodata*)
- *(.glue_7)
- *(.glue_7t)
- } > ROM
-
- . = ALIGN(4);
-
- /* .ctors .dtors are used for c++ constructors/destructors */
- /* added by Martin Thomas 4/2005 based on Anglia Design example */
- .ctors :
- {
- PROVIDE(__ctors_start__ = .);
- KEEP(*(SORT(.ctors.*)))
- KEEP(*(.ctors))
- PROVIDE(__ctors_end__ = .);
- } >ROM
-
- .dtors :
- {
- PROVIDE(__dtors_start__ = .);
- KEEP(*(SORT(.dtors.*)))
- KEEP(*(.dtors))
- PROVIDE(__dtors_end__ = .);
- } >ROM
-
- . = ALIGN(4);
- /* mthomas - end */
-
-
- _etext = . ;
- PROVIDE (etext = .);
-
- /* .data section which is used for initialized data */
- .data : AT (_etext)
- {
- _data = .;
- *(.data)
- SORT(CONSTRUCTORS) /* mt 4/2005 */
- } > RAM
-
- . = ALIGN(4);
- _edata = . ;
- PROVIDE (edata = .);
-
- /* .bss section which is used for uninitialized data */
- .bss (NOLOAD) :
- {
- __bss_start = . ;
- __bss_start__ = . ;
- *(.bss)
- *(COMMON)
- . = ALIGN(4);
- } > RAM
-
- . = ALIGN(4);
- __bss_end__ = . ;
- PROVIDE (__bss_end = .);
-
- .stack ALIGN(256) :
- {
- . += STACK_SIZE;
- PROVIDE (_stack = .);
- } > RAM
-
- _end = . ;
- PROVIDE (end = .);
-
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
-}
diff --git a/sw/airborne/arch/lpc21/test/Makefile b/sw/airborne/arch/lpc21/test/Makefile
deleted file mode 100644
index 852607074f..0000000000
--- a/sw/airborne/arch/lpc21/test/Makefile
+++ /dev/null
@@ -1,426 +0,0 @@
-# Hey Emacs, this is a -*- makefile -*-
-#
-# WinARM template makefile
-# by Martin Thomas, Kaiserslautern, Germany
-#
-#
-# based on the WinAVR makefile written by Eric B. Weddington, Jörg Wunsch, et al.
-# Released to the Public Domain
-# Please read the make user manual!
-#
-#
-# On command line:
-#
-# make all = Make software.
-#
-# make clean = Clean out built project files.
-#
-# make upload = Download the hex file to the device, using lpc21isp
-#
-# (TODO: make filename.s = Just compile filename.c into the assembler code only)
-#
-# To rebuild project do "make clean" then "make all".
-#
-# Changelog:
-# - 17. Feb. 2005 - added thumb-interwork support (mth)
-# - 28. Apr. 2005 - added C++ support (mth)
-# - 29. Arp. 2005 - changed handling for lst-Filename (mth)
-#
-
-LPC21IAP = $(PAPARAZZI_SRC)/sw/ground_segment/lpc21iap/lpc21iap
-
-# MCU name and submodel
-MCU = arm7tdmi
-SUBMDL = LPC2138
-#THUMB = -mthumb
-#THUMB_IW = -mthumb-interwork
-
-
-## Create ROM-Image (final)
-RUN_MODE=ROM_RUN
-## Create RAM-Image (debugging)
-#RUN_MODE=RAM_RUN
-
-
-# Output format. (can be srec, ihex, binary)
-FORMAT = ihex
-
-
-# Target file name (without extension).
-TARGET = ledswitch
-
-timer.srcs = timer.c interrupt.c
-
-# List C source files here. (C dependencies are automatically generated.)
-# use file-extension c for "c-only"-files
-SRC = $(TARGET).c
-#SRC =
-
-# List C source files here which must be compiled in ARM-Mode.
-# use file-extension c for "c-only"-files
-SRCARM =
-
-# List C++ source files here.
-# use file-extension cpp for C++-files
-CPPSRC =
-
-# List C++ source files here which must be compiled in ARM-Mode.
-# use file-extension cpp for C++-files
-# CPPSRCARM = $(TARGET).cpp
-CPPSRCARM =
-
-# List Assembler source files here.
-# Make them always end in a capital .S. Files ending in a lowercase .s
-# will not be considered source files but generated files (assembler
-# output from the compiler), and will be deleted upon "make clean"!
-# Even though the DOS/Win* filesystem matches both .s and .S the same,
-# it will preserve the spelling of the filenames, and gcc itself does
-# care about how the name is spelled on its command-line.
-ASRC =
-
-# List Assembler source files here which must be assembled in ARM-Mode..
-ASRCARM = crt0.S
-
-# Optimization level, can be [0, 1, 2, 3, s].
-# 0 = turn off optimization. s = optimize for size.
-# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
-OPT = s
-
-# Debugging format.
-# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
-# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
-#DEBUG = stabs
-DEBUG = dwarf-2
-
-# List any extra directories to look for include files here.
-# Each directory must be seperated by a space.
-#EXTRAINCDIRS = ./include
-EXTRAINCDIRS =
-
-# Compiler flag to set the C Standard level.
-# c89 - "ANSI" C
-# gnu89 - c89 plus GCC extensions
-# c99 - ISO C99 standard (not yet fully implemented)
-# gnu99 - c99 plus GCC extensions
-CSTANDARD = -std=gnu99
-
-# Place -D or -U options for C here
-CDEFS = -D$(RUN_MODE)
-
-# Place -I options here
-CINCS =
-
-# Place -D or -U options for ASM here
-ADEFS = -D$(RUN_MODE)
-
-
-# Compiler flags.
-# -g*: generate debugging information
-# -O*: optimization level
-# -f...: tuning, see GCC manual and avr-libc documentation
-# -Wall...: warning level
-# -Wa,...: tell GCC to pass this to the assembler.
-# -adhlns...: create assembler listing
-#
-# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
-CFLAGS = -g$(DEBUG)
-CFLAGS += $(CDEFS) $(CINCS)
-CFLAGS += -O$(OPT)
-CFLAGS += -Wall -Wcast-align -Wcast-qual -Wimplicit
-CFLAGS += -Wpointer-arith -Wswitch
-CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused
-#CFLAGS += -Wa,-adhlns=$(<:.c=.lst)
-CFLAGS += -Wa,-adhlns=$(subst $(suffix $<),.lst,$<)
-CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
-
-# flags only for C
-CONLYFLAGS = -Wstrict-prototypes -Wmissing-declarations
-CONLYFLAGS += -Wmissing-prototypes -Wnested-externs
-CONLYFLAGS += $(CSTANDARD)
-
-# flags only for C++ (arm-elf-g++)
-CPPFLAGS =
-
-# Assembler flags.
-# -Wa,...: tell GCC to pass this to the assembler.
-# -ahlms: create listing
-# -gstabs: have the assembler create line number information; note that
-# for use in COFF files, additional information about filenames
-# and function names needs to be present in the assembler source
-# files -- see avr-libc docs [FIXME: not yet described there]
-##ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
-ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:.S=.lst),-g$(DEBUG)
-
-#Additional libraries.
-
-#Support for newlibc-lpc (file: libnewlibc-lpc.a)
-#NEWLIBLPC = -lnewlib-lpc
-NEWLIBCLPC =
-
-MATH_LIB = -lm
-
-# Linker flags.
-# -Wl,...: tell GCC to pass this to linker.
-# -Map: create map file
-# --cref: add cross reference to map file
-LDFLAGS = -nostartfiles -Wl,-Map=$(TARGET).map,--cref
-LDFLAGS += -lc
-LDFLAGS += $(NEWLIBLPC) $(MATH_LIB)
-LDFLAGS += -lc -lgcc
-# for bootloader, don't use 0x8000 alignment
-LDFLAGS += -n
-
-# Set Linker-Script Depending On Selected Memory
-ifeq ($(RUN_MODE),RAM_RUN)
-LDFLAGS +=-T$(SUBMDL)-RAM.ld
-else
-LDFLAGS +=-T$(SUBMDL)-ROM-bl.ld
-endif
-
-
-# ---------------------------------------------------------------------------
-# Define directories, if needed.
-DIRARM = /usr
-DIRARMBIN = $(DIRARM)/bin/
-
-# ---------------------------------------------------------------------------
-# Flash-Programming support using lpc21isp by Martin Maurer
-
-# Settings and variables:
-LPC21ISP = $(DIRARMBIN)/lpc21isp
-#LPC21ISP = $(DIRARMBIN)/lpc21isp_beta
-LPC21ISP_PORT = /dev/ttyS0
-#LPC21ISP_BAUD = 115200
-LPC21ISP_BAUD = 38400
-#LPC21ISP_XTAL = 14746
-LPC21ISP_XTAL = 12000
-LPC21ISP_FLASHFILE = $(TARGET).hex
-# verbose output:
-## LPC21ISP_DEBUG = -debug
-# enter bootloader via RS232 DTR/RTS (only if hardware supports this
-# feature - see Philips AppNote):
-LPC21ISP_CONTROL = -control
-
-
-# ---------------------------------------------------------------------------
-# Define programs and commands.
-SHELL = sh
-CC = $(DIRARMBIN)/arm-elf-gcc
-CPP = arm-elf-g++
-OBJCOPY = $(DIRARMBIN)/arm-elf-objcopy
-OBJDUMP = $(DIRARMBIN)/arm-elf-objdump
-SIZE = $(DIRARMBIN)/arm-elf-size
-NM = $(DIRARMBIN)/arm-elf-nm
-REMOVE = rm -f
-COPY = cp
-
-
-# Define Messages
-# English
-MSG_ERRORS_NONE = Errors: none
-MSG_BEGIN = -------- begin --------
-MSG_END = -------- end --------
-MSG_SIZE_BEFORE = Size before:
-MSG_SIZE_AFTER = Size after:
-MSG_FLASH = Creating load file for Flash:
-MSG_EXTENDED_LISTING = Creating Extended Listing:
-MSG_SYMBOL_TABLE = Creating Symbol Table:
-MSG_LINKING = Linking:
-MSG_COMPILING = Compiling C:
-MSG_COMPILING_ARM = "Compiling C (ARM-only):"
-MSG_COMPILINGCPP = Compiling C++:
-MSG_COMPILINGCPP_ARM = "Compiling C++ (ARM-only):"
-MSG_ASSEMBLING = Assembling:
-MSG_ASSEMBLING_ARM = "Assembling (ARM-only):"
-MSG_CLEANING = Cleaning project:
-MSG_LPC21_RESETREMINDER = You may have to bring the target in bootloader-mode now.
-
-
-# Define all object files.
-COBJ = $(SRC:.c=.o)
-AOBJ = $(ASRC:.S=.o)
-COBJARM = $(SRCARM:.c=.o)
-AOBJARM = $(ASRCARM:.S=.o)
-CPPOBJ = $(CPPSRC:.cpp=.o)
-CPPOBJARM = $(CPPSRCARM:.cpp=.o)
-
-# Define all listing files.
-LST = $(ASRC:.S=.lst) $(ASRCARM:.S=.lst) $(SRC:.c=.lst) $(SRCARM:.c=.lst)
-LST += $(CPPSRC:.cpp=.lst) $(CPPSRCARM:.cpp=.lst)
-
-# Compiler flags to generate dependency files.
-### GENDEPFLAGS = -Wp,-M,-MP,-MT,$(*F).o,-MF,.dep/$(@F).d
-GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d
-
-# Combine all necessary flags and optional flags.
-# Add target processor to flags.
-ALL_CFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. $(CFLAGS) $(GENDEPFLAGS)
-ALL_ASFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. -x assembler-with-cpp $(ASFLAGS)
-
-
-# Default target.
-all: begin gccversion sizebefore build sizeafter finished end
-
-build: elf hex lss sym
-
-elf: $(TARGET).elf
-hex: $(TARGET).hex
-lss: $(TARGET).lss
-sym: $(TARGET).sym
-
-# Eye candy.
-begin:
- @echo
- @echo $(MSG_BEGIN)
-
-finished:
- @echo $(MSG_ERRORS_NONE)
-
-end:
- @echo $(MSG_END)
- @echo
-
-
-# Display size of file.
-HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) -A $(TARGET).elf
-sizebefore:
- @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
-
-sizeafter:
- @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
-
-
-# Display compiler version information.
-gccversion :
- @$(CC) --version
-
-
-# Program the device.
-upload program: $(TARGET).hex
-ifeq ($(FLASH_MODE),IAP)
- $(LPC21IAP) $(TARGET).elf
-else
- @echo
- @echo $(MSG_LPC21_RESETREMINDER)
- $(LPC21ISP) $(LPC21ISP_CONTROL) $(LPC21ISP_DEBUG) $(LPC21ISP_FLASHFILE) $(LPC21ISP_PORT) $(LPC21ISP_BAUD) $(LPC21ISP_XTAL)
-endif
-
-# Create final output files (.hex, .eep) from ELF output file.
-# TODO: handling the .eeprom-section should be redundant
-%.hex: %.elf
- @echo
- @echo $(MSG_FLASH) $@
- $(OBJCOPY) -O $(FORMAT) $< $@
-
-
-# Create extended listing file from ELF output file.
-# testing: option -C
-%.lss: %.elf
- @echo
- @echo $(MSG_EXTENDED_LISTING) $@
- $(OBJDUMP) -h -S -C $< > $@
-
-
-# Create a symbol table from ELF output file.
-%.sym: %.elf
- @echo
- @echo $(MSG_SYMBOL_TABLE) $@
- $(NM) -n $< > $@
-
-
-# Link: create ELF output file from object files.
-.SECONDARY : $(TARGET).elf
-.PRECIOUS : $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
-%.elf: $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
- @echo
- @echo $(MSG_LINKING) $@
- $(CC) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
-# $(CPP) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
-
-# Compile: create object files from C source files. ARM/Thumb
-$(COBJ) : %.o : %.c
- @echo
- @echo $(MSG_COMPILING) $<
- $(CC) -c $(THUMB) $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
-
-# Compile: create object files from C source files. ARM-only
-$(COBJARM) : %.o : %.c
- @echo
- @echo $(MSG_COMPILING_ARM) $<
- $(CC) -c $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
-
-# Compile: create object files from C++ source files. ARM/Thumb
-$(CPPOBJ) : %.o : %.cpp
- @echo
- @echo $(MSG_COMPILINGCPP) $<
- $(CPP) -c $(THUMB) $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
-
-# Compile: create object files from C++ source files. ARM-only
-$(CPPOBJARM) : %.o : %.cpp
- @echo
- @echo $(MSG_COMPILINGCPP_ARM) $<
- $(CPP) -c $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
-
-
-# Compile: create assembler files from C source files. ARM/Thumb
-## does not work - TODO - hints welcome
-##$(COBJ) : %.s : %.c
-## $(CC) $(THUMB) -S $(ALL_CFLAGS) $< -o $@
-
-
-# Assemble: create object files from assembler source files. ARM/Thumb
-$(AOBJ) : %.o : %.S
- @echo
- @echo $(MSG_ASSEMBLING) $<
- $(CC) -c $(THUMB) $(ALL_ASFLAGS) $< -o $@
-
-
-# Assemble: create object files from assembler source files. ARM-only
-$(AOBJARM) : %.o : %.S
- @echo
- @echo $(MSG_ASSEMBLING_ARM) $<
- $(CC) -c $(ALL_ASFLAGS) $< -o $@
-
-
-# Target: clean project.
-clean: begin clean_list finished end
-
-
-clean_list :
- @echo
- @echo $(MSG_CLEANING)
- $(REMOVE) $(TARGET).hex
- $(REMOVE) $(TARGET).obj
- $(REMOVE) $(TARGET).elf
- $(REMOVE) $(TARGET).map
- $(REMOVE) $(TARGET).obj
- $(REMOVE) $(TARGET).a90
- $(REMOVE) $(TARGET).sym
- $(REMOVE) $(TARGET).lnk
- $(REMOVE) $(TARGET).lss
- $(REMOVE) $(COBJ)
- $(REMOVE) $(CPPOBJ)
- $(REMOVE) $(AOBJ)
- $(REMOVE) $(COBJARM)
- $(REMOVE) $(CPPOBJARM)
- $(REMOVE) $(AOBJARM)
- $(REMOVE) $(LST)
- $(REMOVE) $(SRC:.c=.s)
- $(REMOVE) $(SRC:.c=.d)
- $(REMOVE) $(SRCARM:.c=.s)
- $(REMOVE) $(SRCARM:.c=.d)
- $(REMOVE) $(CPPSRC:.cpp=.s)
- $(REMOVE) $(CPPSRC:.cpp=.d)
- $(REMOVE) $(CPPSRCARM:.cpp=.s)
- $(REMOVE) $(CPPSRCARM:.cpp=.d)
- $(REMOVE) -r .dep
- $(REMOVE) *~
-
-# Include the dependency files.
--include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
-
-
-# Listing of phony targets.
-.PHONY : all begin finish end sizebefore sizeafter gccversion \
-build elf hex lss sym clean clean_list
diff --git a/sw/airborne/arch/lpc21/test/bootloader/Makefile b/sw/airborne/arch/lpc21/test/bootloader/Makefile
deleted file mode 100644
index c32d867c97..0000000000
--- a/sw/airborne/arch/lpc21/test/bootloader/Makefile
+++ /dev/null
@@ -1,88 +0,0 @@
-# Quiet compilation
-Q=@
-
-#PROC_AP PROC_FBW PROC_TINY PROC_TINYJ
-#PROC = TINYJ
-ALLFLAGS = -DPROC_$(PROC)
-
-LIBNAME = usbstack
-APPNAME = bl
-APPNAME_RAM = $(APPNAME)_ram
-
-# Package definitions
-PKG_NAME = target
-DATE = $$(date +%Y%m%d)
-DATEL = $$(date +%Y%m%d-%H%M)
-
-LINKFILE = lpc2148-rom.ld
-LINKFILE_RAM = lpc2148-ram.ld
-
-
-#
-# try to find the paparazzi multilib toolchain
-#
-include $(PAPARAZZI_SRC)/conf/Makefile.arm-embedded-toolchain
-
-TAR = tar
-
-CFLAGS = -I./ -c -W -Wall -Os -g -mcpu=arm7tdmi -mthumb-interwork $(ALLFLAGS)
-# -DDEBUG
-ASFLAGS = $(ALLFLAGS)
-LFLAGS = -T $(LINKFILE) -nostartfiles -n
-LFLAGS_RAM = -T $(LINKFILE_RAM) -nostartfiles -n
-CPFLAGS = -O ihex
-ODFLAGS = -x --syms
-
-OBJS = crt.o startup.o printf.o console.o bootloader.o
-
-LIBOBJS = usbhw_lpc.o usbcontrol.o usbstdreq.o usbinit.o usbdescrip.o
-
-all: lib app app_ram
-
-clean:
- $(Q)$(RM) -f $(LIBNAME).a $(LIBOBJS)
- $(Q)$(RM) -f $(APPNAME).hex $(APPNAME).elf $(OBJS) *.lst $(APPNAME).dmp $(APPNAME).map
- $(Q)$(RM) -f $(APPNAME_RAM).hex $(APPNAME_RAM).elf $(APPNAME_RAM).dmp $(APPNAME_RAM).map
-
-# build lib
-lib: $(LIBOBJS)
- $(RM) -f $(LIBNAME).a
- $(AR) -r $(LIBNAME).a $(LIBOBJS)
-
-app: $(APPNAME).elf
- $(Q)echo "...copying"
- $(CP) $(CPFLAGS) $(APPNAME).elf $(APPNAME).hex
- $(DMP) $(ODFLAGS) $(APPNAME).elf > $(APPNAME).dmp
-# $(Q)echo "....loading"
-# ./lpc21isp -control bl.hex com4 38400 12000
-# ./lpc21isp -control -termonly bl.hex com4 115200 12000
-
-app_ram: $(APPNAME_RAM).elf
- $(Q)echo "...copying"
- $(CP) $(CPFLAGS) $(APPNAME_RAM).elf $(APPNAME_RAM).hex
- $(DMP) $(ODFLAGS) $(APPNAME_RAM).elf > $(APPNAME_RAM).dmp
-
-$(APPNAME).elf: $(OBJS) $(LIBNAME).a $(LINKFILE)
- $(Q)echo "..linking"
- $(CC) $(OBJS) $(LIBNAME).a $(LFLAGS) -o $(APPNAME).elf -Wl,-Map,$(APPNAME).map
-
-$(APPNAME_RAM).elf: $(OBJS) $(LIBNAME).a $(LINKFILE_RAM)
- $(Q)echo "..linking RAM"
- $(CC) $(OBJS) $(LIBNAME).a $(LFLAGS_RAM) -o $(APPNAME_RAM).elf -Wl,-Map,$(APPNAME_RAM).map
-
-crt.o: crt.S
- $(Q)echo ".assembling"
- $(CC) -c $(ASFLAGS) -Wa,-ahlms=crt.lst crt.S -o crt.o
-
-# Builds archive tar file
-arch: clean
- cd .. && $(TAR) --exclude={CVS,cvs} -cvzf $(PKG_NAME)-$(DATEL).tar.gz $(PKG_NAME)
-
-# Builds release tar file
-dist: clean
- cd .. && $(TAR) --exclude={CVS,cvs} -cvzf $(PKG_NAME)-$(DATE).tar.gz $(PKG_NAME)
-
-# recompile if the Makefile changes
-$(OBJS) $(LIBOBJS): Makefile
-
-.PHONY: all clean lib app app_ram arch dist
diff --git a/sw/airborne/arch/lpc21/test/bootloader/bootloader.c b/sw/airborne/arch/lpc21/test/bootloader/bootloader.c
deleted file mode 100644
index 95183f3889..0000000000
--- a/sw/airborne/arch/lpc21/test/bootloader/bootloader.c
+++ /dev/null
@@ -1,494 +0,0 @@
-/*
- LPCUSB Bootloader, an USB programming utility for LPC microcontrollers
- Copyright (C) 2006 Martin Mueller (martinmm@pfump.org)
-
- based on LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
-
- This software is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This software is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#include
-
-#include "type.h"
-#include "usbdebug.h"
-
-#include "lpc21iap.h"
-#include "console.h"
-#include "usbapi.h"
-#include "startup.h"
-
-#ifndef BOOTLOADER_VERSION
-#define BOOTLOADER_VERSION 0x0103
-#endif
-
-#define BAUD_RATE 115200
-#define CCLK 60000000
-#define RAM_ADDR 0x40004000
-
-
-#define LE_WORD(x) (x&0xFF),(x>>8)
-
-typedef void (*IAP)(unsigned int [], unsigned int[]);
-typedef void (*GO)(void);
-
-static unsigned int rescmd[8];
-static unsigned int cmd[5];
-static unsigned int write_ram_adr;
-static unsigned int read_mem_adr;
-static int write_ram_len;
-static int read_mem_len;
-static char unlocked;
-static char bEcho;
-
-static unsigned int start_app;
-static unsigned int start_adr;
-
-static const U8 abDescriptors[] = {
-
-// device descriptor
- 0x12,
- DESC_DEVICE,
- LE_WORD(0x0110), // bcdUSB
- 0x00, // bDeviceClass
- 0x00, // bDeviceSubClass
- 0x00, // bDeviceProtocol
- MAX_PACKET_SIZE0, // bMaxPacketSize
- LE_WORD(VENDOR_ID), // idVendor
- LE_WORD(DEVICE_ID), // idProduct
- LE_WORD(0x0100), // bcdDevice
- 0x01, // iManufacturer
- 0x02, // iProduct
- 0x03, // iSerialNumber
- 0x01, // bNumConfigurations
-
-// configuration descriptor
- 0x09,
- DESC_CONFIGURATION,
- LE_WORD(0x12), // wTotalLength
- 0x01, // bNumInterfaces
- 0x01, // bConfigurationValue
- 0x00, // iConfiguration
- 0xC0, // bmAttributes
- 0x32, // bMaxPower
-
-// interface
- 0x09,
- DESC_INTERFACE,
- 0x00, // bInterfaceNumber
- 0x00, // bAlternateSetting
- 0x00, // bNumEndPoints
- 0xFF, // bInterfaceClass
- 0xFF, // bInterfaceSubClass
- 0xFF, // bInterfaceProtocol
- 0x00, // iInterface
-
-// string descriptors
- 0x04,
- DESC_STRING,
- LE_WORD(0x0409),
-
- 0x0E,
- DESC_STRING,
- 'L', 0, 'P', 0, 'C', 0, 'U', 0, 'S', 0, 'B', 0,
-
- 0x16,
- DESC_STRING,
- 'B', 0, 'o', 0, 'o', 0, 't', 0, 'l', 0, 'o', 0, 'a', 0, 'd', 0, 'e', 0, 'r', 0,
-
-#ifdef PROC_TINYJ
- 0x26,
- DESC_STRING,
- 'T', 0, 'I', 0, 'N', 0, 'Y', 0, 'J', 0, ' ', 0,
- '0', 0, '1', 0, '2', 0, '3', 0,
- '4', 0, '5', 0, '6', 0, '7', 0,
- '8', 0, '9', 0, 'A', 0, 'B', 0,
-#else
-#ifdef PROC_TINY
- 0x24,
- DESC_STRING,
- 'T', 0, 'I', 0, 'N', 0, 'Y', 0, ' ', 0,
- '0', 0, '1', 0, '2', 0, '3', 0,
- '4', 0, '5', 0, '6', 0, '7', 0,
- '8', 0, '9', 0, 'A', 0, 'B', 0,
-#else
-#ifdef PROC_AP
- 0x20,
- DESC_STRING,
- 'A', 0, 'P', 0, ' ', 0,
- 'F', 0, 'E', 0, 'D', 0, 'C', 0,
- 'B', 0, 'A', 0, '9', 0, '8', 0,
- '7', 0, '6', 0, '5', 0, '4', 0,
-#else
-#ifdef PROC_FBW
- 0x22,
- DESC_STRING,
- 'F', 0, 'B', 0, 'W', 0, ' ', 0,
- 'F', 0, 'E', 0, 'D', 0, 'C', 0,
- 'B', 0, 'A', 0, '9', 0, '8', 0,
- '7', 0, '6', 0, '5', 0, '4', 0,
-#else
- 0x2A,
- DESC_STRING,
- 'G', 0, 'E', 0, 'N', 0, 'E', 0, 'R', 0,'I', 0, 'C', 0, ' ', 0,
- '1', 0, '1', 0, '2', 0, '2', 0,
- '4', 0, '4', 0, '5', 0, '5', 0,
- '6', 0, '6', 0, '7', 0, '7', 0,
-#endif
-#endif
-#endif
-#endif
-
-// terminating zero
- 0
-};
-
-
-/*************************************************************************
- isp_entry
- =========
-**************************************************************************/
-void isp_entry(unsigned int command[5], unsigned int result[3])
-{
- IAP iap_entry;
-
- memcpy(cmd, command, 20);
-
- iap_entry = (IAP) IAP_LOCATION;
-
- // everything should be fine
- result[0] = CMD_SUCCESS;
-
- switch (command[0]) {
-
- case ISP_UNLOCK:
- if (command[1] == UNLOCK_CODE) {
- unlocked = 1;
- }
- else {
- result[0] = INVALID_CODE;
- }
- break;
-
- case ISP_SET_BAUD_RATE:
- // we don't care
- break;
-
- case ISP_ECHO:
- if (command[1] > 1) {
- result[0] = PARAM_ERROR;
- }
- else {
- bEcho = command[1];
- }
- break;
-
- case ISP_WRITE_TO_RAM:
- if (command[1] & 3) result[0] = ADDR_ERROR;
- // TODO ADDR_NOT_MAPPED
- if (command[2] & 3) result[0] = COUNT_ERROR;
-// if (*(CODE_PROTECT_ADDR) == CODE_PROTECT_DATA) {
-// result[0] = CODE_READ_PROTECTION_ENABLED;
-// }
- if (result[0] == CMD_SUCCESS)
- {
- write_ram_adr = command[1];
- write_ram_len = command[2];
- }
- break;
-
- case ISP_READ_MEMORY:
- if (command[1] & 3) result[0] = ADDR_ERROR;
- // TODO ADDR_NOT_MAPPED
- if (command[2] & 3) result[0] = COUNT_ERROR;
-// if (*(CODE_PROTECT_ADDR) == CODE_PROTECT_DATA) {
-// result[0] = CODE_READ_PROTECTION_ENABLED;
-// }
- if (result[0] == CMD_SUCCESS)
- {
- read_mem_adr = command[1];
- read_mem_len = command[2];
- }
- break;
-
- case ISP_GO:
- if (command[1] & 3) result[0] = ADDR_ERROR;
- // TODO ADDR_NOT_MAPPED
- if (!unlocked) result[0] = CMD_LOCKED;
- if ((command[2] != ARM_CODE) &&
- (command[2] != THUMB_CODE)) {
- result[0] = PARAM_ERROR;
- }
-// if (*(CODE_PROTECT_ADDR) == CODE_PROTECT_DATA) {
-// result[0] = CODE_READ_PROTECTION_ENABLED;
-// }
- if (result[0] == CMD_SUCCESS) {
- start_app = 1;
- start_adr = (command[1] | (command[2] == THUMB_CODE ? 1:0));
- }
- break;
-
- case ISP_PREPARE_SECTORS:
- cmd[0] = IAP_PREPARE_SECTORS;
- iap_entry(cmd, result);
- break;
- case ISP_COPY_RAM_TO_FLASH:
- if (unlocked) {
- cmd[0] = IAP_COPY_RAM_TO_FLASH;
- cmd[4] = CCLK/1000;
- iap_entry(cmd, result);
- }
- else {
- result[0] = CMD_LOCKED;
- }
-DBG("%X\n",*(unsigned int*) (0x40004624+4));
- break;
- case ISP_ERASE_SECTORS:
- if (unlocked) {
- cmd[0] = IAP_ERASE_SECTORS;
- cmd[3] = CCLK/1000;
- iap_entry(cmd, result);
- }
- else {
- result[0] = CMD_LOCKED;
- }
- break;
- case ISP_BLANK_CHECK_SECTORS:
- cmd[0] = IAP_BLANK_CHECK_SECTORS;
- iap_entry(cmd, result);
- break;
- case ISP_READ_PART_ID:
- cmd[0] = IAP_READ_PART_ID;
- iap_entry(cmd, result);
- break;
- case ISP_READ_BOOT_CODE_VERSION:
- cmd[0] = IAP_READ_BOOT_CODE_VERSION;
- iap_entry(cmd, result);
- break;
- case ISP_COMPARE:
- cmd[0] = IAP_COMPARE;
- iap_entry(cmd, result);
-DBG("%X\n",*(unsigned int*) (0xA624-20));
-DBG("%X\n",*(unsigned int*) (0xA624-16));
-DBG("%X\n",*(unsigned int*) (0xA624-12));
-DBG("%X\n",*(unsigned int*) (0xA624-8));
-DBG("%X\n",*(unsigned int*) (0xA624-4));
-DBG(" %X\n",*(unsigned int*) 0xA624);
-DBG("%X\n",*(unsigned int*) (0xA624+4));
-DBG("%X\n",*(unsigned int*) (0xA624+8));
-DBG("%X\n",*(unsigned int*) (0xA624+12));
-DBG("%X\n",*(unsigned int*) (0xA624+16));
-DBG("%X\n",*(unsigned int*) (0xA624+20));
- break;
-
- default:
- result[0] = INVALID_COMMAND;
- break;
- }
-}
-
-
-/*************************************************************************
- btl_entry
- =========
-**************************************************************************/
-void btl_entry(unsigned int command[5], unsigned int result[3])
-{
- // everything should be fine
- result[0] = CMD_SUCCESS;
-
- switch (command[0]) {
-
- case BTL_READ_VERSION:
- result[1] = BOOTLOADER_VERSION;
- break;
-
- case BTL_READ_LOCATION:
- if ((unsigned int) btl_entry < 0x40000000) {
- result[1] = RUN_ROM;
- }
- else {
- result[1] = RUN_RAM;
- }
- break;
-
- case BTL_READ_RAM_ADDR:
- result[1] = RAM_ADDR;
- break;
-
- default:
- result[0] = INVALID_COMMAND;
- break;
- }
-}
-
-
-
-/*************************************************************************
- HandleVendorRequest
- ===================
-**************************************************************************/
-static BOOL HandleVendorRequest(TSetupPacket *pSetup, int *piLen, U8 **ppbData)
-{
- IAP func_entry;
-
- func_entry = (IAP) IAP_LOCATION;
-
- if (pSetup->wIndex != 0) {
- DBG("Invalid idx %X\n", pSetup->wIndex);
- return FALSE;
- }
- if (pSetup->wValue != 0) {
- DBG("Invalid val %X\n", pSetup->wValue);
- return FALSE;
- }
-
- switch (pSetup->bRequest) {
-
- // commands
- case REQ_IAP_COMMAND:
- /* fallthrough */
- case REQ_ISP_COMMAND:
- /* fallthrough */
- case REQ_BTL_COMMAND:
- if (pSetup->bRequest == REQ_IAP_COMMAND) func_entry = (IAP) IAP_LOCATION;
- if (pSetup->bRequest == REQ_ISP_COMMAND) func_entry = isp_entry;
- if (pSetup->bRequest == REQ_BTL_COMMAND) func_entry = btl_entry;
-
- if (REQTYPE_GET_DIR(pSetup->bmRequestType) == REQTYPE_DIR_TO_HOST) {
- // send result
- *ppbData = (U8*) rescmd;
- *piLen = 32; // TODO remove
- if (*piLen != 32) return FALSE;
- }
- else {
- // start command
- if (*piLen != 20) return FALSE;
- memcpy(&rescmd[3], *ppbData, 20);
- func_entry(&rescmd[3], rescmd);
- }
- break;
-
- // data transfer
- case REQ_DATA_TRANSFER:
- if (REQTYPE_GET_DIR(pSetup->bmRequestType) == REQTYPE_DIR_TO_HOST) {
- // check if data to read
- if (*piLen > read_mem_len) return FALSE;
- *ppbData = (U8*) read_mem_adr;
- read_mem_adr += *piLen;
- read_mem_len -= *piLen;
- }
- else {
- // data is already written, adjust pointers
- if (*piLen > write_ram_len) return FALSE;
- write_ram_adr += *piLen;
- write_ram_len -= *piLen;
- }
- break;
-
- default:
- DBG("Unhandled vendor\n");
- return FALSE;
- }
- return TRUE;
-}
-
-
-/*************************************************************************
- PreHandleRequest
- ================
- Change data pointer for data out request
-
- Returns TRUE if the pointer was changed
-**************************************************************************/
-static BOOL PreHandleRequest(TSetupPacket *pSetup, int *piLen, U8 **ppbData)
-{
- if ((pSetup->wLength != 0) &&
- (REQTYPE_GET_DIR(pSetup->bmRequestType) == REQTYPE_DIR_TO_DEVICE) &&
- (pSetup->bRequest == REQ_DATA_TRANSFER) &&
- (*piLen <= write_ram_len)) {
- // directly write to the location given by WRITE_TO_RAM
- *ppbData = (U8*) write_ram_adr;
- return TRUE;
- }
- return FALSE;
-}
-
-
-/*************************************************************************
- main
- ====
-**************************************************************************/
-int main(void)
-{
- GO go_entry;
-
- // PLL and MAM
- Initialize();
-
- // init DBG
- ConsoleInit(CCLK / (16 * BAUD_RATE));
-
- DBG("Initialising USB stack\n");
-
- write_ram_len=0;
- read_mem_len=0;
- unlocked=0;
- bEcho=1;
-
- // initialise stack
- USBInit();
-
- // register descriptors
- USBRegisterDescriptors(abDescriptors);
-
- // register vendor request handler
- USBRegisterRequestHandler(REQTYPE_TYPE_VENDOR, HandleVendorRequest);
-
- // register pre request handler
- USBRegisterPreRequestHandler(PreHandleRequest);
-
- DBG("Starting USB communication\n");
-
- // connect to bus
- USBHwConnect(TRUE);
-
- start_app = 0;
-
- // call USB interrupt handler continuously
- while (1)
- {
- USBHwISR();
-
- if (start_app == 1)
- {
- volatile unsigned int count;
-
- // wait some time until response is sent
- for (count=0;count<10000;count++) USBHwISR();
-
- // disconnect from bus
- USBHwConnect(FALSE);
-
- // wait some ms so that called app might safely re-connect usb
- for (count=0;count<300000;count++) count=count;
-
- go_entry = (GO) (start_adr);
- go_entry();
- }
- }
-
- return 0;
-}
diff --git a/sw/airborne/arch/lpc21/test/bootloader/console.c b/sw/airborne/arch/lpc21/test/bootloader/console.c
deleted file mode 100644
index 9779dc6e39..0000000000
--- a/sw/airborne/arch/lpc21/test/bootloader/console.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- Simple console input/output, over serial port #0
-
- Partially copied from Jim Lynch's tutorial
-*/
-
-#include "console.h"
-
-#define PINSEL0 *(volatile unsigned int *)0xE002C000
-
-#define U0THR *(volatile unsigned int *)0xE000C000
-#define U0RBR *(volatile unsigned int *)0xE000C000
-#define U0DLL *(volatile unsigned int *)0xE000C000
-#define U0DLM *(volatile unsigned int *)0xE000C004
-#define U0FCR *(volatile unsigned int *)0xE000C008
-#define U0LCR *(volatile unsigned int *)0xE000C00C
-#define U0LSR *(volatile unsigned int *)0xE000C014
-
-
-/* Initialize Serial Interface */
-void ConsoleInit(int iDivider)
-{
- PINSEL0 = (PINSEL0 & ~0x0000000F) | 0x00000005; /* Enable RxD0 and TxD0 */
- U0LCR = 0x83; /* 8 bits, no Parity, 1 Stop bit */
- U0DLL = iDivider & 0xFF; /* set divider / baud rate */
- U0DLM = iDivider >> 8;
- U0LCR = 0x03; /* DLAB = 0 */
-
- // enable FIFO
- U0FCR = 1;
-}
-
-
-/* Write character to Serial Port */
-int putchar(int ch)
-{
- if (ch == '\n') {
- while (!(U0LSR & 0x20));
- U0THR = '\r';
- }
- while (!(U0LSR & 0x20));
- U0THR = ch;
-
- return ch;
-}
-
-
-int getchar (void) { /* Read character from Serial Port */
-
- while (!(U0LSR & 0x01));
-
- return (U0RBR);
-}
-
-
-int puts(char *s)
-{
- while (*s) {
- putchar(*s++);
- }
- putchar('\n');
- return 1;
-}
-
-
diff --git a/sw/airborne/arch/lpc21/test/bootloader/console.h b/sw/airborne/arch/lpc21/test/bootloader/console.h
deleted file mode 100644
index ef6d4025e5..0000000000
--- a/sw/airborne/arch/lpc21/test/bootloader/console.h
+++ /dev/null
@@ -1,5 +0,0 @@
-void ConsoleInit(int iDivider);
-int putchar(int c);
-int puts(char *s);
-
-
diff --git a/sw/airborne/arch/lpc21/test/bootloader/crt.S b/sw/airborne/arch/lpc21/test/bootloader/crt.S
deleted file mode 100644
index c7bfadd2d3..0000000000
--- a/sw/airborne/arch/lpc21/test/bootloader/crt.S
+++ /dev/null
@@ -1,204 +0,0 @@
-/* ***************************************************************************************************************
-
- crt.S STARTUP ASSEMBLY CODE
- -----------------------
-
-
- Module includes the interrupt vectors and start-up code.
-
- *************************************************************************************************************** */
-
-/* use the four first sectors for bootloader */
-.set APP_START, 0x00004000
-
-.set IOPIN0, 0xE0028000
-.set IOPIN1, 0xE0028010
-.set PINSEL2, 0xE002C014
-
-#ifdef PROC_AP
-#define BOARD_CLASSIX
-#endif
-#ifdef PROC_FBW
-#define BOARD_CLASSIX
-#endif
-#ifdef PROC_TINY
-#define BOARD_TINY
-#endif
-#ifdef PROC_TINYJ
-#define BOARD_TINYJ
-#endif
-#ifdef PROC_LPCH2148
-#define BOARD_LPCH2148
-#endif
-#ifdef PROC_LOGGER
-#define BOARD_LOGGER
-#endif
-
-#ifdef BOARD_TINYJ
-/* TINY Jeremy old MOSI P0.19 */
-/* .set BOOT_PIN, 0x00080000 */
-/* TINY Jeremy old SCK P0.17 */
-.set BOOT_PIN, 0x00020000
-#else
-#ifdef BOARD_TINY
-/* TINY old LPC_SSEL P0.20 */
-.set BOOT_PIN, 0x00100000
-#else
-#ifdef BOARD_CLASSIX
-/* CLASSIX old I2C_SDA P0.03 */
-.set BOOT_PIN, 0x00000008
-#else
-#ifdef BOARD_LPCH2148
-/* Olimex LPC-H2148 P1.24 */
-.set BOOT_PIN, 0x04000000
-#else
-#ifdef BOARD_LOGGER
-/* SD-Logger P0.29 */
-.set BOOT_PIN, 0x20000000
-#else
-/* Vbus P0.23 */
-.set BOOT_PIN, 0x00800000
-#endif
-#endif
-#endif
-#endif
-#endif
-
-/* Stack Sizes */
-.set UND_STACK_SIZE, 0x00000040 /* stack for "undefined instruction" interrupts is 4 bytes */
-.set ABT_STACK_SIZE, 0x00000040 /* stack for "abort" interrupts is 4 bytes */
-.set FIQ_STACK_SIZE, 0x00000040 /* stack for "FIQ" interrupts is 4 bytes */
-.set IRQ_STACK_SIZE, 0X00000040 /* stack for "IRQ" normal interrupts is 4 bytes */
-.set SVC_STACK_SIZE, 0x00000400 /* stack for "SVC" supervisor mode is 4 bytes */
-
-
-
-/* Standard definitions of Mode bits and Interrupt (I & F) flags in PSRs (program status registers) */
-.set MODE_USR, 0x10 /* Normal User Mode */
-.set MODE_FIQ, 0x11 /* FIQ Processing Fast Interrupts Mode */
-.set MODE_IRQ, 0x12 /* IRQ Processing Standard Interrupts Mode */
-.set MODE_SVC, 0x13 /* Supervisor Processing Software Interrupts Mode */
-.set MODE_ABT, 0x17 /* Abort Processing memory Faults Mode */
-.set MODE_UND, 0x1B /* Undefined Processing Undefined Instructions Mode */
-.set MODE_SYS, 0x1F /* System Running Priviledged Operating System Tasks Mode */
-
-.set I_BIT, 0x80 /* when I bit is set, IRQ is disabled (program status registers) */
-.set F_BIT, 0x40 /* when F bit is set, FIQ is disabled (program status registers) */
-
-
-.text
-.arm
-
-.global Reset_Handler
-.global _startup
-.func _startup
-
-_startup:
-
-# Exception Vectors
-
-_vectors: ldr PC, Reset_Addr
- /*b _vectors*/
- ldr PC, Undef_Addr
- ldr PC, SWI_Addr
- ldr PC, PAbt_Addr
- ldr PC, DAbt_Addr
- nop /* Reserved Vector (holds Philips ISP checksum) */
- ldr PC, [PC,#-0xFF0] /* see page 71 of "Insiders Guide" Trevor Martin */
- ldr PC, FIQ_Addr
-
-Reset_Addr: .word Reset_Handler /* defined in this module below */
-Undef_Addr: .word APP_START+0x04
-SWI_Addr: .word APP_START+0x08
-PAbt_Addr: .word APP_START+0x0C
-DAbt_Addr: .word APP_START+0x10
-Resvd_Addr: .word APP_START+0x14
-IRQ_Addr: .word APP_START+0x18
-FIQ_Addr: .word APP_START+0x1C
-
-AppS_Addr: .word APP_START
-
-# Reset Handler
-
-Reset_Handler:
-#ifndef BOARD_LPCH2148
-#ifndef BOARD_LOGGER
- /* check status of the USB in P0.xx */
- ldr r0, =IOPIN0 /* load gpio addr */
- ldr r1,[r0] /* get data */
- ldr r2, =BOOT_PIN /* get boot pin */
- and r1, r1, r2 /* clear all other bits */
- cmp r1, r2 /* compare bits */
- beq Bootloader /* beq */
- ldr PC, AppS_Addr
-#else
- /* check status of the USB in P0.xx */
- ldr r0, =IOPIN0 /* load gpio addr */
- ldr r1,[r0] /* get data */
- ldr r2, =BOOT_PIN /* get boot pin */
- and r1, r1, r2 /* clear all other bits */
- cmp r1, r2 /* compare bits */
- bne Bootloader /* beq */
- ldr PC, AppS_Addr
-#endif
-#else
- /* check status of the USB in P1.24 */
- ldr r0, =PINSEL2 /* load mode addr */
- mov r3, #8 /* Pins P1.25-16 are used as GPIO pins */
- str r3, [r0]
- ldr r0, =IOPIN1 /* load gpio addr */
- ldr r1,[r0] /* get data */
- ldr r2, =BOOT_PIN /* get boot pin */
- ldr r0, =PINSEL2 /* load mode addr */
- mov r3, #0 /* Pins P1.25-16 default */
- str r3, [r0]
- and r1, r1, r2 /* clear all other bits */
- cmp r1, r2 /* compare bits */
- beq Bootloader /* beq */
- ldr PC, AppS_Addr
-#endif
-
- /* Setup a stack for each mode - note that this only sets up a usable stack
- for User mode. Also each mode is setup with interrupts initially disabled. */
-Bootloader:
- ldr r0, =_stack_end
- msr CPSR_c, #MODE_UND|I_BIT|F_BIT /* Undefined Instruction Mode */
- mov sp, r0
- sub r0, r0, #UND_STACK_SIZE
- msr CPSR_c, #MODE_ABT|I_BIT|F_BIT /* Abort Mode */
- mov sp, r0
- sub r0, r0, #ABT_STACK_SIZE
- msr CPSR_c, #MODE_FIQ|I_BIT|F_BIT /* FIQ Mode */
- mov sp, r0
- sub r0, r0, #FIQ_STACK_SIZE
- msr CPSR_c, #MODE_IRQ|I_BIT|F_BIT /* IRQ Mode */
- mov sp, r0
- sub r0, r0, #IRQ_STACK_SIZE
- msr CPSR_c, #MODE_SVC|I_BIT|F_BIT /* Supervisor Mode */
- mov sp, r0
- sub r0, r0, #SVC_STACK_SIZE
- msr CPSR_c, #MODE_SYS|I_BIT|F_BIT /* User Mode */
- mov sp, r0
-
- /* copy .data section (Copy from ROM to RAM) */
- ldr R1, =_etext
- ldr R2, =_data
- ldr R3, =_edata
-1: cmp R2, R3
- ldrlo R0, [R1], #4
- strlo R0, [R2], #4
- blo 1b
-
- /* Clear .bss section (Zero init) */
- mov R0, #0
- ldr R1, =_bss_start
- ldr R2, =_bss_end
-2: cmp R1, R2
- strlo R0, [R1], #4
- blo 2b
-
- /* Enter the C code */
- b main
-
-.endfunc
-.end
diff --git a/sw/airborne/arch/lpc21/test/bootloader/flash.sh b/sw/airborne/arch/lpc21/test/bootloader/flash.sh
deleted file mode 100644
index a342b272ff..0000000000
--- a/sw/airborne/arch/lpc21/test/bootloader/flash.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-../lpc21iap/lpc21iap $*
-
-if [ $? = 2 ]
- then
- ../lpc21iap/lpc21iap bl_ram.elf
- ../lpc21iap/lpc21iap $*
-fi
diff --git a/sw/airborne/arch/lpc21/test/bootloader/lpc2148-ram.ld b/sw/airborne/arch/lpc21/test/bootloader/lpc2148-ram.ld
deleted file mode 100644
index 94b9a18e9a..0000000000
--- a/sw/airborne/arch/lpc21/test/bootloader/lpc2148-ram.ld
+++ /dev/null
@@ -1,198 +0,0 @@
-/* ****************************************************************************************************** */
-/* demo2148_blink_flash.cmd LINKER SCRIPT */
-/* */
-/* */
-/* The Linker Script defines how the code and data emitted by the GNU C compiler and assembler are */
-/* to be loaded into memory (code goes into FLASH, variables go into RAM). */
-/* */
-/* Any symbols defined in the Linker Script are automatically global and available to the rest of the */
-/* program. */
-/* */
-/* To force the linker to use this LINKER SCRIPT, just add the -T demo2148_blink_flash.cmd directive */
-/* to the linker flags in the makefile. */
-/* */
-/* LFLAGS = -Map main.map -nostartfiles -T demo2148_blink_flash.cmd */
-/* */
-/* */
-/* The Philips boot loader supports the ISP (In System Programming) via the serial port and the IAP */
-/* (In Application Programming) for flash programming from within your application. */
-/* */
-/* The boot loader uses RAM memory and we MUST NOT load variables or code in these areas. */
-/* */
-/* RAM used by boot loader: 0x40000120 - 0x400001FF (223 bytes) for ISP variables */
-/* 0x40007FE0 - 0x4000FFFF (32 bytes) for ISP and IAP variables */
-/* 0x40007EE0 - 0x40007FE0 (256 bytes) stack for ISP and IAP */
-/* */
-/* */
-/* MEMORY MAP */
-/* | |0x40008000 */
-/* .-------->|---------------------------------| */
-/* . | variables and stack |0x40007FFF */
-/* ram_isp_high | for Philips boot loader | */
-/* . | 32 + 256 = 288 bytes | */
-/* . | | */
-/* . | Do not put anything here |0x40007EE0 */
-/* .-------->|---------------------------------| */
-/* | UDF Stack 4 bytes |0x40007EDC <---------- _stack_end */
-/* .-------->|---------------------------------| */
-/* | ABT Stack 4 bytes |0x40007ED8 */
-/* .-------->|---------------------------------| */
-/* | FIQ Stack 4 bytes |0x40007ED4 */
-/* .-------->|---------------------------------| */
-/* | IRQ Stack 4 bytes |0x40007ED0 */
-/* .-------->|---------------------------------| */
-/* | SVC Stack 4 bytes |0x40007ECC */
-/* .-------->|---------------------------------| */
-/* . | |0x40007EC8 */
-/* . | stack area for user program | */
-/* . | | | */
-/* . | | | */
-/* . | | | */
-/* . | V | */
-/* . | | */
-/* . | | */
-/* . | | */
-/* . | free ram | */
-/* ram | | */
-/* . | | */
-/* . | | */
-/* . |.................................|0x40000234 <---------- _bss_end */
-/* . | | */
-/* . | .bss uninitialized variables | */
-/* . |.................................|0x40000218 <---------- _bss_start, _edata */
-/* . | | */
-/* . | .data initialized variables | */
-/* . | |0x40000200 <---------- _data */
-/* .-------->|---------------------------------| */
-/* . | variables used by |0x400001FF */
-/* ram_isp_low | Philips boot loader | */
-/* . | 223 bytes |0x40000120 */
-/* .-------->|---------------------------------| */
-/* . | |0x4000011F */
-/* ram_vectors | free ram | */
-/* . |---------------------------------|0x40000040 */
-/* . | |0x4000003F */
-/* . | Interrupt Vectors (re-mapped) | */
-/* . | 64 bytes |0x40000000 */
-/* .-------->|---------------------------------| */
-/* | | */
-/* */
-/* */
-/* */
-/* | | */
-/* .--------> |---------------------------------| */
-/* . | |0x0001FFFF */
-/* . | | */
-/* . | | */
-/* . | | */
-/* . | | */
-/* . | | */
-/* . | unused flash eprom | */
-/* . | | */
-/* . |.................................|0x0000032c */
-/* . | | */
-/* . | copy of .data area | */
-/* flash | | */
-/* . |---------------------------------|0x00000314 <----------- _etext */
-/* . | | */
-/* . | |0x00000180 main */
-/* . | |0x00000278 feed */
-/* . | main() |0x000002c4 FIQ_Routine */
-/* . | |0x000002d8 SWI_Routine */
-/* . | |0x000002ec UNDEF_Routine */
-/* . | |0x000002b0 IRQ_routine */
-/* . |---------------------------------|0x000001cc initialize */
-/* . | |0x000000D4 */
-/* . | Startup Code | */
-/* . | (assembler) | */
-/* . | | */
-/* . |---------------------------------|0x00000040 Reset_Handler */
-/* . | |0x0000003F */
-/* . | Interrupt Vector Table (unused) | */
-/* . | 64 bytes | */
-/* .--------->|---------------------------------|0x00000000 _startup *
-/* */
-/* */
-/* The easy way to prevent the linker from loading anything into a memory area is to define */
-/* a MEMORY region for it and then avoid assigning any .text, .data or .bss sections into it. */
-/* */
-/* */
-/* MEMORY */
-/* { */
-/* ram_isp_low(A) : ORIGIN = 0x40000120, LENGTH = 223 */
-/* */
-/* } */
-/* */
-/* */
-/* Author: James P. Lynch */
-/* */
-/* ****************************************************************************************************** */
-
-
-/* identify the Entry Point */
-
-ENTRY(_startup)
-
-
-
-/* specify the LPC2148 memory areas */
-
-MEMORY
-{
- flash : ORIGIN = 0, LENGTH = 512K /* FLASH ROM */
- ram_isp_low(A) : ORIGIN = 0x40000120, LENGTH = 223 /* variables used by Philips ISP bootloader */
- ram : ORIGIN = 0x40000200, LENGTH = 26369 /* free RAM area */
-/* ram : ORIGIN = 0x40001200, LENGTH = 32513 free RAM area */
- ram_isp_high(A) : ORIGIN = 0x40007FE0, LENGTH = 32 /* variables used by Philips ISP bootloader */
- ram_usb_dma : ORIGIN = 0x7FD00000, LENGTH = 8192 /* on-chip USB DMA RAM area (not used) */
-}
-
-
-
-/* define a global symbol _stack_end */
-
-_stack_end = 0x40007EDC;
-
-
-
-/* now define the output sections */
-
-SECTIONS
-{
- . = 0; /* set location counter to address zero */
-
- startup : { *(.startup)} >ram /* the startup code goes into FLASH */
-
-
-
- .text : /* collect all sections that should go into FLASH after startup */
- {
- *(.text) /* all .text sections (code) */
- *(.rodata) /* all .rodata sections (constants, strings, etc.) */
- *(.rodata*) /* all .rodata* sections (constants, strings, etc.) */
- *(.glue_7) /* all .glue_7 sections (no idea what these are) */
- *(.glue_7t) /* all .glue_7t sections (no idea what these are) */
- _etext = .; /* define a global symbol _etext just after the last code byte */
- } >ram /* put all the above into FLASH */
-
-
-
-
- .data : /* collect all initialized .data sections that go into RAM */
- {
- _data = .; /* create a global symbol marking the start of the .data section */
- *(.data) /* all .data sections */
- _edata = .; /* define a global symbol marking the end of the .data section */
- } >ram AT >ram /* put all the above into RAM (but load the LMA copy into FLASH) */
-
- .bss : /* collect all uninitialized .bss sections that go into RAM */
- {
- _bss_start = .; /* define a global symbol marking the start of the .bss section */
- *(.bss) /* all .bss sections */
- } >ram /* put all the above in RAM (it will be cleared in the startup code */
-
- . = ALIGN(4); /* advance location counter to the next 32-bit boundary */
- _bss_end = . ; /* define a global symbol marking the end of the .bss section */
-}
- _end = .; /* define a global symbol marking the end of application RAM */
-
diff --git a/sw/airborne/arch/lpc21/test/bootloader/lpc2148-rom-hi.ld b/sw/airborne/arch/lpc21/test/bootloader/lpc2148-rom-hi.ld
deleted file mode 100644
index 77fe563e55..0000000000
--- a/sw/airborne/arch/lpc21/test/bootloader/lpc2148-rom-hi.ld
+++ /dev/null
@@ -1,198 +0,0 @@
-/* ****************************************************************************************************** */
-/* demo2148_blink_flash.cmd LINKER SCRIPT */
-/* */
-/* */
-/* The Linker Script defines how the code and data emitted by the GNU C compiler and assembler are */
-/* to be loaded into memory (code goes into FLASH, variables go into RAM). */
-/* */
-/* Any symbols defined in the Linker Script are automatically global and available to the rest of the */
-/* program. */
-/* */
-/* To force the linker to use this LINKER SCRIPT, just add the -T demo2148_blink_flash.cmd directive */
-/* to the linker flags in the makefile. */
-/* */
-/* LFLAGS = -Map main.map -nostartfiles -T demo2148_blink_flash.cmd */
-/* */
-/* */
-/* The Philips boot loader supports the ISP (In System Programming) via the serial port and the IAP */
-/* (In Application Programming) for flash programming from within your application. */
-/* */
-/* The boot loader uses RAM memory and we MUST NOT load variables or code in these areas. */
-/* */
-/* RAM used by boot loader: 0x40000120 - 0x400001FF (223 bytes) for ISP variables */
-/* 0x40007FE0 - 0x4000FFFF (32 bytes) for ISP and IAP variables */
-/* 0x40007EE0 - 0x40007FE0 (256 bytes) stack for ISP and IAP */
-/* */
-/* */
-/* MEMORY MAP */
-/* | |0x40008000 */
-/* .-------->|---------------------------------| */
-/* . | variables and stack |0x40007FFF */
-/* ram_isp_high | for Philips boot loader | */
-/* . | 32 + 256 = 288 bytes | */
-/* . | | */
-/* . | Do not put anything here |0x40007EE0 */
-/* .-------->|---------------------------------| */
-/* | UDF Stack 4 bytes |0x40007EDC <---------- _stack_end */
-/* .-------->|---------------------------------| */
-/* | ABT Stack 4 bytes |0x40007ED8 */
-/* .-------->|---------------------------------| */
-/* | FIQ Stack 4 bytes |0x40007ED4 */
-/* .-------->|---------------------------------| */
-/* | IRQ Stack 4 bytes |0x40007ED0 */
-/* .-------->|---------------------------------| */
-/* | SVC Stack 4 bytes |0x40007ECC */
-/* .-------->|---------------------------------| */
-/* . | |0x40007EC8 */
-/* . | stack area for user program | */
-/* . | | | */
-/* . | | | */
-/* . | | | */
-/* . | V | */
-/* . | | */
-/* . | | */
-/* . | | */
-/* . | free ram | */
-/* ram | | */
-/* . | | */
-/* . | | */
-/* . |.................................|0x40000234 <---------- _bss_end */
-/* . | | */
-/* . | .bss uninitialized variables | */
-/* . |.................................|0x40000218 <---------- _bss_start, _edata */
-/* . | | */
-/* . | .data initialized variables | */
-/* . | |0x40000200 <---------- _data */
-/* .-------->|---------------------------------| */
-/* . | variables used by |0x400001FF */
-/* ram_isp_low | Philips boot loader | */
-/* . | 223 bytes |0x40000120 */
-/* .-------->|---------------------------------| */
-/* . | |0x4000011F */
-/* ram_vectors | free ram | */
-/* . |---------------------------------|0x40000040 */
-/* . | |0x4000003F */
-/* . | Interrupt Vectors (re-mapped) | */
-/* . | 64 bytes |0x40000000 */
-/* .-------->|---------------------------------| */
-/* | | */
-/* */
-/* */
-/* */
-/* | | */
-/* .--------> |---------------------------------| */
-/* . | |0x0001FFFF */
-/* . | | */
-/* . | | */
-/* . | | */
-/* . | | */
-/* . | | */
-/* . | unused flash eprom | */
-/* . | | */
-/* . |.................................|0x0000032c */
-/* . | | */
-/* . | copy of .data area | */
-/* flash | | */
-/* . |---------------------------------|0x00000314 <----------- _etext */
-/* . | | */
-/* . | |0x00000180 main */
-/* . | |0x00000278 feed */
-/* . | main() |0x000002c4 FIQ_Routine */
-/* . | |0x000002d8 SWI_Routine */
-/* . | |0x000002ec UNDEF_Routine */
-/* . | |0x000002b0 IRQ_routine */
-/* . |---------------------------------|0x000001cc initialize */
-/* . | |0x000000D4 */
-/* . | Startup Code | */
-/* . | (assembler) | */
-/* . | | */
-/* . |---------------------------------|0x00000040 Reset_Handler */
-/* . | |0x0000003F */
-/* . | Interrupt Vector Table (unused) | */
-/* . | 64 bytes | */
-/* .--------->|---------------------------------|0x00000000 _startup *
-/* */
-/* */
-/* The easy way to prevent the linker from loading anything into a memory area is to define */
-/* a MEMORY region for it and then avoid assigning any .text, .data or .bss sections into it. */
-/* */
-/* */
-/* MEMORY */
-/* { */
-/* ram_isp_low(A) : ORIGIN = 0x40000120, LENGTH = 223 */
-/* */
-/* } */
-/* */
-/* */
-/* Author: James P. Lynch */
-/* */
-/* ****************************************************************************************************** */
-
-
-/* identify the Entry Point */
-
-ENTRY(_startup)
-
-
-
-/* specify the LPC2148 memory areas */
-
-MEMORY
-{
- flash : ORIGIN = 0x4000, LENGTH = 500K /* FLASH ROM */
- ram_isp_low(A) : ORIGIN = 0x40000120, LENGTH = 223 /* variables used by Philips ISP bootloader */
-/* ram : ORIGIN = 0x40000200, LENGTH = 32513 free RAM area */
- ram : ORIGIN = 0x40006000, LENGTH = 20513 /* free RAM area */
- ram_isp_high(A) : ORIGIN = 0x40007FE0, LENGTH = 32 /* variables used by Philips ISP bootloader */
- ram_usb_dma : ORIGIN = 0x7FD00000, LENGTH = 8192 /* on-chip USB DMA RAM area (not used) */
-}
-
-
-
-/* define a global symbol _stack_end */
-
-_stack_end = 0x40007EDC;
-
-
-
-/* now define the output sections */
-
-SECTIONS
-{
- . = 0x3000; /* set location counter to address zero */
-
- startup : { *(.startup)} >flash /* the startup code goes into FLASH */
-
-
-
- .text : /* collect all sections that should go into FLASH after startup */
- {
- *(.text) /* all .text sections (code) */
- *(.rodata) /* all .rodata sections (constants, strings, etc.) */
- *(.rodata*) /* all .rodata* sections (constants, strings, etc.) */
- *(.glue_7) /* all .glue_7 sections (no idea what these are) */
- *(.glue_7t) /* all .glue_7t sections (no idea what these are) */
- _etext = .; /* define a global symbol _etext just after the last code byte */
- } >flash /* put all the above into FLASH */
-
-
-
-
- .data : /* collect all initialized .data sections that go into RAM */
- {
- _data = .; /* create a global symbol marking the start of the .data section */
- *(.data) /* all .data sections */
- _edata = .; /* define a global symbol marking the end of the .data section */
- } >ram AT >flash /* put all the above into RAM (but load the LMA copy into FLASH) */
-
- .bss : /* collect all uninitialized .bss sections that go into RAM */
- {
- _bss_start = .; /* define a global symbol marking the start of the .bss section */
- *(.bss) /* all .bss sections */
- } >ram /* put all the above in RAM (it will be cleared in the startup code */
-
- . = ALIGN(4); /* advance location counter to the next 32-bit boundary */
- _bss_end = . ; /* define a global symbol marking the end of the .bss section */
-}
- _end = .; /* define a global symbol marking the end of application RAM */
-
diff --git a/sw/airborne/arch/lpc21/test/bootloader/lpc2148-rom.ld b/sw/airborne/arch/lpc21/test/bootloader/lpc2148-rom.ld
deleted file mode 100644
index 0f860475a2..0000000000
--- a/sw/airborne/arch/lpc21/test/bootloader/lpc2148-rom.ld
+++ /dev/null
@@ -1,198 +0,0 @@
-/* ****************************************************************************************************** */
-/* demo2148_blink_flash.cmd LINKER SCRIPT */
-/* */
-/* */
-/* The Linker Script defines how the code and data emitted by the GNU C compiler and assembler are */
-/* to be loaded into memory (code goes into FLASH, variables go into RAM). */
-/* */
-/* Any symbols defined in the Linker Script are automatically global and available to the rest of the */
-/* program. */
-/* */
-/* To force the linker to use this LINKER SCRIPT, just add the -T demo2148_blink_flash.cmd directive */
-/* to the linker flags in the makefile. */
-/* */
-/* LFLAGS = -Map main.map -nostartfiles -T demo2148_blink_flash.cmd */
-/* */
-/* */
-/* The Philips boot loader supports the ISP (In System Programming) via the serial port and the IAP */
-/* (In Application Programming) for flash programming from within your application. */
-/* */
-/* The boot loader uses RAM memory and we MUST NOT load variables or code in these areas. */
-/* */
-/* RAM used by boot loader: 0x40000120 - 0x400001FF (223 bytes) for ISP variables */
-/* 0x40007FE0 - 0x4000FFFF (32 bytes) for ISP and IAP variables */
-/* 0x40007EE0 - 0x40007FE0 (256 bytes) stack for ISP and IAP */
-/* */
-/* */
-/* MEMORY MAP */
-/* | |0x40008000 */
-/* .-------->|---------------------------------| */
-/* . | variables and stack |0x40007FFF */
-/* ram_isp_high | for Philips boot loader | */
-/* . | 32 + 256 = 288 bytes | */
-/* . | | */
-/* . | Do not put anything here |0x40007EE0 */
-/* .-------->|---------------------------------| */
-/* | UDF Stack 4 bytes |0x40007EDC <---------- _stack_end */
-/* .-------->|---------------------------------| */
-/* | ABT Stack 4 bytes |0x40007ED8 */
-/* .-------->|---------------------------------| */
-/* | FIQ Stack 4 bytes |0x40007ED4 */
-/* .-------->|---------------------------------| */
-/* | IRQ Stack 4 bytes |0x40007ED0 */
-/* .-------->|---------------------------------| */
-/* | SVC Stack 4 bytes |0x40007ECC */
-/* .-------->|---------------------------------| */
-/* . | |0x40007EC8 */
-/* . | stack area for user program | */
-/* . | | | */
-/* . | | | */
-/* . | | | */
-/* . | V | */
-/* . | | */
-/* . | | */
-/* . | | */
-/* . | free ram | */
-/* ram | | */
-/* . | | */
-/* . | | */
-/* . |.................................|0x40000234 <---------- _bss_end */
-/* . | | */
-/* . | .bss uninitialized variables | */
-/* . |.................................|0x40000218 <---------- _bss_start, _edata */
-/* . | | */
-/* . | .data initialized variables | */
-/* . | |0x40000200 <---------- _data */
-/* .-------->|---------------------------------| */
-/* . | variables used by |0x400001FF */
-/* ram_isp_low | Philips boot loader | */
-/* . | 223 bytes |0x40000120 */
-/* .-------->|---------------------------------| */
-/* . | |0x4000011F */
-/* ram_vectors | free ram | */
-/* . |---------------------------------|0x40000040 */
-/* . | |0x4000003F */
-/* . | Interrupt Vectors (re-mapped) | */
-/* . | 64 bytes |0x40000000 */
-/* .-------->|---------------------------------| */
-/* | | */
-/* */
-/* */
-/* */
-/* | | */
-/* .--------> |---------------------------------| */
-/* . | |0x0001FFFF */
-/* . | | */
-/* . | | */
-/* . | | */
-/* . | | */
-/* . | | */
-/* . | unused flash eprom | */
-/* . | | */
-/* . |.................................|0x0000032c */
-/* . | | */
-/* . | copy of .data area | */
-/* flash | | */
-/* . |---------------------------------|0x00000314 <----------- _etext */
-/* . | | */
-/* . | |0x00000180 main */
-/* . | |0x00000278 feed */
-/* . | main() |0x000002c4 FIQ_Routine */
-/* . | |0x000002d8 SWI_Routine */
-/* . | |0x000002ec UNDEF_Routine */
-/* . | |0x000002b0 IRQ_routine */
-/* . |---------------------------------|0x000001cc initialize */
-/* . | |0x000000D4 */
-/* . | Startup Code | */
-/* . | (assembler) | */
-/* . | | */
-/* . |---------------------------------|0x00000040 Reset_Handler */
-/* . | |0x0000003F */
-/* . | Interrupt Vector Table (unused) | */
-/* . | 64 bytes | */
-/* .--------->|---------------------------------|0x00000000 _startup *
-/* */
-/* */
-/* The easy way to prevent the linker from loading anything into a memory area is to define */
-/* a MEMORY region for it and then avoid assigning any .text, .data or .bss sections into it. */
-/* */
-/* */
-/* MEMORY */
-/* { */
-/* ram_isp_low(A) : ORIGIN = 0x40000120, LENGTH = 223 */
-/* */
-/* } */
-/* */
-/* */
-/* Author: James P. Lynch */
-/* */
-/* ****************************************************************************************************** */
-
-
-/* identify the Entry Point */
-
-ENTRY(_startup)
-
-
-
-/* specify the LPC2148 memory areas */
-
-MEMORY
-{
- flash : ORIGIN = 0, LENGTH = 512K /* FLASH ROM */
- ram_isp_low(A) : ORIGIN = 0x40000120, LENGTH = 223 /* variables used by Philips ISP bootloader */
-/* ram : ORIGIN = 0x40000200, LENGTH = 32513 free RAM area */
- ram : ORIGIN = 0x40006000, LENGTH = 20513 /* free RAM area */
- ram_isp_high(A) : ORIGIN = 0x40007FE0, LENGTH = 32 /* variables used by Philips ISP bootloader */
- ram_usb_dma : ORIGIN = 0x7FD00000, LENGTH = 8192 /* on-chip USB DMA RAM area (not used) */
-}
-
-
-
-/* define a global symbol _stack_end */
-
-_stack_end = 0x40007EDC;
-
-
-
-/* now define the output sections */
-
-SECTIONS
-{
- . = 0; /* set location counter to address zero */
-
- startup : { *(.startup)} >flash /* the startup code goes into FLASH */
-
-
-
- .text : /* collect all sections that should go into FLASH after startup */
- {
- *(.text) /* all .text sections (code) */
- *(.rodata) /* all .rodata sections (constants, strings, etc.) */
- *(.rodata*) /* all .rodata* sections (constants, strings, etc.) */
- *(.glue_7) /* all .glue_7 sections (no idea what these are) */
- *(.glue_7t) /* all .glue_7t sections (no idea what these are) */
- _etext = .; /* define a global symbol _etext just after the last code byte */
- } >flash /* put all the above into FLASH */
-
-
-
-
- .data : /* collect all initialized .data sections that go into RAM */
- {
- _data = .; /* create a global symbol marking the start of the .data section */
- *(.data) /* all .data sections */
- _edata = .; /* define a global symbol marking the end of the .data section */
- } >ram AT >flash /* put all the above into RAM (but load the LMA copy into FLASH) */
-
- .bss : /* collect all uninitialized .bss sections that go into RAM */
- {
- _bss_start = .; /* define a global symbol marking the start of the .bss section */
- *(.bss) /* all .bss sections */
- } >ram /* put all the above in RAM (it will be cleared in the startup code */
-
- . = ALIGN(4); /* advance location counter to the next 32-bit boundary */
- _bss_end = . ; /* define a global symbol marking the end of the .bss section */
-}
- _end = .; /* define a global symbol marking the end of application RAM */
-
diff --git a/sw/airborne/arch/lpc21/test/bootloader/lpc21iap.h b/sw/airborne/arch/lpc21/test/bootloader/lpc21iap.h
deleted file mode 100644
index 52178cd8d3..0000000000
--- a/sw/airborne/arch/lpc21/test/bootloader/lpc21iap.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* $Id$
- *
- * lpc21iap, an USB download application for Philips LPC processors
- * Copyright (C) 2006 Martin Mueller
- *
- * This file is part of paparazzi.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/* Philips proprietary defines */
-
-#define CMD_SUCCESS 0
-#define INVALID_COMMAND 1
-#define SRC_ADDR_ERROR 2
-#define DST_ADDR_ERROR 3
-#define SRC_ADDR_NOT_MAPPED 4
-#define DST_ADDR_NOT_MAPPED 5
-#define COUNT_ERROR 6
-#define INVALID_SECTOR 7
-#define SECTOR_NOT_BLANK 8
-#define SECTOR_NOT_PREPARED_FOR_WRITE_OPERATION 9
-#define COMPARE_ERROR 10
-#define BUSY 11
-#define PARAM_ERROR 12
-#define ADDR_ERROR 13
-#define ADDR_NOT_MAPPED 14
-#define CMD_LOCKED 15
-#define INVALID_CODE 16
-#define INVALID_BAUD_RATE 17
-#define INVALID_STOP_BIT 18
-#define CODE_READ_PROTECTION_ENABLED 19
-
-#define ISP_UNLOCK 'U'
-#define ISP_SET_BAUD_RATE 'B'
-#define ISP_ECHO 'A'
-#define ISP_WRITE_TO_RAM 'W'
-#define ISP_READ_MEMORY 'R'
-#define ISP_PREPARE_SECTORS 'P'
-#define ISP_COPY_RAM_TO_FLASH 'C'
-#define ISP_GO 'G'
-#define ISP_ERASE_SECTORS 'E'
-#define ISP_BLANK_CHECK_SECTORS 'I'
-#define ISP_READ_PART_ID 'J'
-#define ISP_READ_BOOT_CODE_VERSION 'K'
-#define ISP_COMPARE 'M'
-
-#define IAP_PREPARE_SECTORS 50
-#define IAP_COPY_RAM_TO_FLASH 51
-#define IAP_ERASE_SECTORS 52
-#define IAP_BLANK_CHECK_SECTORS 53
-#define IAP_READ_PART_ID 54
-#define IAP_READ_BOOT_CODE_VERSION 55
-#define IAP_COMPARE 56
-#define IAP_REINVOKE_ISP 57
-
-#define ARM_CODE 'A'
-#define THUMB_CODE 'T'
-
-#define UNLOCK_CODE 23130
-#define CODE_PROTECT_ADDR 0x1FC
-#define CODE_PROTECT_DATA 0x87654321
-#define IAP_LOCATION 0x7FFFFFF1
-
-
-/* our own proprietary defines */
-
-#define REQ_ISP_COMMAND 0xF0
-#define REQ_IAP_COMMAND 0xF1
-#define REQ_BTL_COMMAND 0xF2
-#define REQ_DATA_TRANSFER 0xF3
-
-#define BTL_READ_VERSION 10
-#define BTL_READ_LOCATION 11
-#define BTL_READ_RAM_ADDR 12
-
-#define RUN_ROM 0
-#define RUN_RAM 1
-
-/* this USB vendor/device ID is fake - someone willing to donate one? */
-#define VENDOR_ID 0x7070
-#define DEVICE_ID 0x1234
-
-
diff --git a/sw/airborne/arch/lpc21/test/bootloader/printf.c b/sw/airborne/arch/lpc21/test/bootloader/printf.c
deleted file mode 100644
index 2ec4ef47f8..0000000000
--- a/sw/airborne/arch/lpc21/test/bootloader/printf.c
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- Copyright 2001, 2002 Georges Menie (www.menie.org)
- stdarg version contributed by Christian Ettinger
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-/*
- putchar is the only external dependency for this file,
- if you have a working putchar, leave it commented out.
- If not, uncomment the define below and
- replace outbyte(c) by your own function call.
-
-#define putchar(c) outbyte(c)
-*/
-
-#include
-#include "console.h"
-
-
-static void printchar(char **str, int c)
-{
- if (str) {
- **str = c;
- ++(*str);
- }
- else {
- putchar(c);
- }
-}
-
-#define PAD_RIGHT 1
-#define PAD_ZERO 2
-
-static int prints(char **out, const char *string, int width, int pad)
-{
- register int pc = 0, padchar = ' ';
-
- if (width > 0) {
- register int len = 0;
- register const char *ptr;
- for (ptr = string; *ptr; ++ptr) ++len;
- if (len >= width) width = 0;
- else width -= len;
- if (pad & PAD_ZERO) padchar = '0';
- }
- if (!(pad & PAD_RIGHT)) {
- for ( ; width > 0; --width) {
- printchar (out, padchar);
- ++pc;
- }
- }
- for ( ; *string ; ++string) {
- printchar (out, *string);
- ++pc;
- }
- for ( ; width > 0; --width) {
- printchar (out, padchar);
- ++pc;
- }
-
- return pc;
-}
-
-/* the following should be enough for 32 bit int */
-#define PRINT_BUF_LEN 12
-
-static int printi(char **out, int i, int b, int sg, int width, int pad, int letbase)
-{
- char print_buf[PRINT_BUF_LEN];
- register char *s;
- register int t, neg = 0, pc = 0;
- register unsigned int u = i;
-
- if (i == 0) {
- print_buf[0] = '0';
- print_buf[1] = '\0';
- return prints (out, print_buf, width, pad);
- }
-
- if (sg && b == 10 && i < 0) {
- neg = 1;
- u = -i;
- }
-
- s = print_buf + PRINT_BUF_LEN-1;
- *s = '\0';
-
- while (u) {
- t = u % b;
- if( t >= 10 )
- t += letbase - '0' - 10;
- *--s = t + '0';
- u /= b;
- }
-
- if (neg) {
- if( width && (pad & PAD_ZERO) ) {
- printchar (out, '-');
- ++pc;
- --width;
- }
- else {
- *--s = '-';
- }
- }
-
- return pc + prints (out, s, width, pad);
-}
-
-static int print(char **out, const char *format, va_list args )
-{
- register int width, pad;
- register int pc = 0;
- char scr[2];
-
- for (; *format != 0; ++format) {
- if (*format == '%') {
- ++format;
- width = pad = 0;
- if (*format == '\0') break;
- if (*format == '%') goto out;
- if (*format == '-') {
- ++format;
- pad = PAD_RIGHT;
- }
- while (*format == '0') {
- ++format;
- pad |= PAD_ZERO;
- }
- for ( ; *format >= '0' && *format <= '9'; ++format) {
- width *= 10;
- width += *format - '0';
- }
- if( *format == 's' ) {
- register char *s = (char *)va_arg( args, int );
- pc += prints (out, s?s:"(null)", width, pad);
- continue;
- }
- if( *format == 'd' ) {
- pc += printi (out, va_arg( args, int ), 10, 1, width, pad, 'a');
- continue;
- }
- if( *format == 'x' ) {
- pc += printi (out, va_arg( args, int ), 16, 0, width, pad, 'a');
- continue;
- }
- if( *format == 'X' ) {
- pc += printi (out, va_arg( args, int ), 16, 0, width, pad, 'A');
- continue;
- }
- if( *format == 'u' ) {
- pc += printi (out, va_arg( args, int ), 10, 0, width, pad, 'a');
- continue;
- }
- if( *format == 'c' ) {
- /* char are converted to int then pushed on the stack */
- scr[0] = (char)va_arg( args, int );
- scr[1] = '\0';
- pc += prints (out, scr, width, pad);
- continue;
- }
- }
- else {
- out:
- printchar (out, *format);
- ++pc;
- }
- }
- if (out) **out = '\0';
- va_end( args );
- return pc;
-}
-
-int printf(const char *format, ...)
-{
- va_list args;
-
- va_start( args, format );
- return print( 0, format, args );
-}
-
-int sprintf(char *out, const char *format, ...)
-{
- va_list args;
-
- va_start( args, format );
- return print( &out, format, args );
-}
-
-#ifdef TEST_PRINTF
-int main(void)
-{
- char *ptr = "Hello world!";
- char *np = 0;
- int i = 5;
- unsigned int bs = sizeof(int)*8;
- int mi;
- char buf[80];
-
- mi = (1 << (bs-1)) + 1;
- printf("%s\n", ptr);
- printf("printf test\n");
- printf("%s is null pointer\n", np);
- printf("%d = 5\n", i);
- printf("%d = - max int\n", mi);
- printf("char %c = 'a'\n", 'a');
- printf("hex %x = ff\n", 0xff);
- printf("hex %02x = 00\n", 0);
- printf("signed %d = unsigned %u = hex %x\n", -3, -3, -3);
- printf("%d %s(s)%", 0, "message");
- printf("\n");
- printf("%d %s(s) with %%\n", 0, "message");
- sprintf(buf, "justif: \"%-10s\"\n", "left"); printf("%s", buf);
- sprintf(buf, "justif: \"%10s\"\n", "right"); printf("%s", buf);
- sprintf(buf, " 3: %04d zero padded\n", 3); printf("%s", buf);
- sprintf(buf, " 3: %-4d left justif.\n", 3); printf("%s", buf);
- sprintf(buf, " 3: %4d right justif.\n", 3); printf("%s", buf);
- sprintf(buf, "-3: %04d zero padded\n", -3); printf("%s", buf);
- sprintf(buf, "-3: %-4d left justif.\n", -3); printf("%s", buf);
- sprintf(buf, "-3: %4d right justif.\n", -3); printf("%s", buf);
-
- return 0;
-}
-
-/*
- * if you compile this file with
- * gcc -Wall $(YOUR_C_OPTIONS) -DTEST_PRINTF -c printf.c
- * you will get a normal warning:
- * printf.c:214: warning: spurious trailing `%' in format
- * this line is testing an invalid % at the end of the format string.
- *
- * this should display (on 32bit int machine) :
- *
- * Hello world!
- * printf test
- * (null) is null pointer
- * 5 = 5
- * -2147483647 = - max int
- * char a = 'a'
- * hex ff = ff
- * hex 00 = 00
- * signed -3 = unsigned 4294967293 = hex fffffffd
- * 0 message(s)
- * 0 message(s) with %
- * justif: "left "
- * justif: " right"
- * 3: 0003 zero padded
- * 3: 3 left justif.
- * 3: 3 right justif.
- * -3: -003 zero padded
- * -3: -3 left justif.
- * -3: -3 right justif.
- */
-
-#endif
diff --git a/sw/airborne/arch/lpc21/test/bootloader/startup.c b/sw/airborne/arch/lpc21/test/bootloader/startup.c
deleted file mode 100644
index 6d4146dfa3..0000000000
--- a/sw/airborne/arch/lpc21/test/bootloader/startup.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- Initialisation functions for exception handlers, PLL and MAM
-
- Partially copied from Jim Lynch's tutorial
-*/
-
-/**********************************************************
- Header files
- **********************************************************/
-
-#include "startup.h"
-
-
-#define MAMCR *(volatile unsigned int *)0xE01FC000
-#define MAMTIM *(volatile unsigned int *)0xE01FC004
-
-#define PLLCON *(volatile unsigned int *)0xE01FC080
-#define PLLCFG *(volatile unsigned int *)0xE01FC084
-#define PLLSTAT *(volatile unsigned int *)0xE01FC088
-#define PLLFEED *(volatile unsigned int *)0xE01FC08C
-
-#define VPBDIV *(volatile unsigned int *)0xE01FC100
-
-void IRQ_Routine (void) __attribute__ ((interrupt("IRQ")));
-void FIQ_Routine (void) __attribute__ ((interrupt("FIQ")));
-void SWI_Routine (void) __attribute__ ((interrupt("SWI")));
-void UNDEF_Routine (void) __attribute__ ((interrupt("UNDEF")));
-
-
-/* Stubs for various interrupts (may be replaced later) */
-/* ---------------------------------------------------- */
-
-void IRQ_Routine (void) {
- while (1) ;
-}
-
-void FIQ_Routine (void) {
- while (1) ;
-}
-
-
-void SWI_Routine (void) {
- while (1) ;
-}
-
-
-void UNDEF_Routine (void) {
- while (1) ;
-}
-
-
-/**********************************************************
- Initialize
-**********************************************************/
-
-#define PLOCK 0x400
-
-static void feed(void)
-{
- PLLFEED = 0xAA;
- PLLFEED = 0x55;
-}
-
-
-void Initialize(void)
-{
-
-
- // Setting the Phased Lock Loop (PLL)
- // ----------------------------------
- //
- // Olimex LPC-P2148 has a 12.0000 mhz crystal
- //
- // We'd like the LPC2148 to run at 60 mhz (has to be an even multiple of crystal)
- //
- // According to the Philips LPC2148 manual: M = cclk / Fosc where: M = PLL multiplier (bits 0-4 of PLLCFG)
- // cclk = 60000000 hz
- // Fosc = 12000000 hz
- //
- // Solving: M = 60000000 / 12000000 = 5
- //
- // Note: M - 1 must be entered into bits 0-4 of PLLCFG (assign 4 to these bits)
- //
- //
- // The Current Controlled Oscilator (CCO) must operate in the range 156 mhz to 320 mhz
- //
- // According to the Philips LPC2148 manual: Fcco = cclk * 2 * P where: Fcco = CCO frequency
- // cclk = 60000000 hz
- // P = PLL divisor (bits 5-6 of PLLCFG)
- //
- // Solving: Fcco = 60000000 * 2 * P
- // P = 2 (trial value)
- // Fcco = 60000000 * 2 * 2
- // Fcc0 = 240000000 hz (good choice for P since it's within the 156 mhz to 320 mhz range)
- //
- // From Table 22 (page 34) of Philips LPC2148 manual P = 2, PLLCFG bits 5-6 = 1 (assign 1 to these bits)
- //
- // Finally: PLLCFG = 0 01 00100 = 0x24
- //
- // Final note: to load PLLCFG register, we must use the 0xAA followed 0x55 write sequence to the PLLFEED register
- // this is done in the short function feed() below
- //
-
- // Setting Multiplier and Divider values
- PLLCFG = 0x24;
- feed();
-
- // Enabling the PLL */
- PLLCON = 0x1;
- feed();
-
- // Wait for the PLL to lock to set frequency
- while(!(PLLSTAT & PLOCK)) ;
-
- // Connect the PLL as the clock source
- PLLCON = 0x3;
- feed();
-
- // Enabling MAM and setting number of clocks used for Flash memory fetch (4 cclks in this case)
- MAMTIM = 0x3;
- MAMCR = 0x2;
-
- // Setting peripheral Clock (pclk) to System Clock (cclk)
- VPBDIV = 0x1;
-}
-
diff --git a/sw/airborne/arch/lpc21/test/bootloader/startup.h b/sw/airborne/arch/lpc21/test/bootloader/startup.h
deleted file mode 100644
index a9e617ea0b..0000000000
--- a/sw/airborne/arch/lpc21/test/bootloader/startup.h
+++ /dev/null
@@ -1,2 +0,0 @@
-void Initialize(void);
-
diff --git a/sw/airborne/arch/lpc21/test/bootloader/type.h b/sw/airborne/arch/lpc21/test/bootloader/type.h
deleted file mode 100644
index de0245abf8..0000000000
--- a/sw/airborne/arch/lpc21/test/bootloader/type.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- (c) 2006, Bertrik Sikken, bertrik@sikken.nl
-*/
-
-/* primitive types used in the USB stack */
-
-#ifndef _TYPE_H_
-#define _TYPE_H_
-
-typedef unsigned char U8;
-typedef unsigned short int U16;
-typedef unsigned int U32;
-
-typedef int BOOL;
-
-#define TRUE 1
-#define FALSE 0
-
-#ifndef NULL
-#define NULL ((void*)0)
-#endif
-
-/* some other useful macros */
-#define MIN(x,y) ((x)<(y)?(x):(y))
-#define MAX(x,y) ((x)>(y)?(x):(y))
-
-
-#endif /* _TYPE_H_ */
-
diff --git a/sw/airborne/arch/lpc21/test/bootloader/usbapi.h b/sw/airborne/arch/lpc21/test/bootloader/usbapi.h
deleted file mode 100644
index accf0a802b..0000000000
--- a/sw/airborne/arch/lpc21/test/bootloader/usbapi.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- (c) 2006, Bertrik Sikken, bertrik@sikken.nl
-*/
-
-
-#include "type.h"
-#include "usbstruct.h" // for TSetupPacket
-
-/*************************************************************************
- USB configuration
-**************************************************************************/
-
-#define MAX_PACKET_SIZE0 64
-
-/*************************************************************************
- USB hardware interface
-**************************************************************************/
-
-// endpoint status sent through callback
-#define EP_STATUS_DATA (1<<0) // EP has data
-#define EP_STATUS_STALLED (1<<1) // EP is stalled
-#define EP_STATUS_SETUP (1<<2) // EP received setup packet
-#define EP_STATUS_NACKED (1<<3) // EP sent NAK
-#define EP_STATUS_ERROR (1<<4) // EP data was overwritten by setup packet
-
-// device status send through callback
-#define DEV_STATUS_CONNECT (1<<0)
-#define DEV_STATUS_SUSPEND (1<<2)
-#define DEV_STATUS_RESET (1<<4)
-
-BOOL USBHwInit (void);
-void USBHwReset (void);
-void USBHwISR (void);
-
-void USBHwConnect (BOOL fConnect);
-
-void USBHwSetAddress (U8 addr);
-void USBHwConfigDevice (BOOL fConfigured);
-
-// endpoint operations
-BOOL USBHwEPRead (U8 bEP, U8 *pbBuf, int *piLen);
-BOOL USBHwEPWrite (U8 bEP, U8 *pbBuf, int iLen);
-void USBHwEPStall (U8 bEP, BOOL fStall);
-BOOL USBHwGetEPStall (U8 bEP);
-
-// register a callback for endpoint events
-typedef void (TFnEPIntHandler) (U8 bEP, U8 bEPStatus);
-void USBHwRegisterEPIntHandler (U8 bEP, U16 wMaxPacketSize, TFnEPIntHandler *pfnHandler);
-
-// register a callback for device status events
-typedef void (TFnDevIntHandler) (U8 bDevStatus);
-void USBHwRegisterDevIntHandler (TFnDevIntHandler *pfnHandler);
-
-// register a callback for frame event
-typedef void (TFnFrameHandler)(U16 wFrame);
-void USBHwRegisterFrameHandler(TFnFrameHandler *pfnHandler);
-
-
-/*************************************************************************
- USB application interface
-**************************************************************************/
-
-// initialise the complete stack, including HW
-BOOL USBInit(void);
-
-// register a callback for requests (vendor, class)
-typedef BOOL (TFnHandleRequest)(TSetupPacket *pSetup, int *piLen, U8 **ppbData);
-void USBRegisterRequestHandler(int iType, TFnHandleRequest *pfnHandler);
-void USBRegisterPreRequestHandler(TFnHandleRequest *pfnHandler);
-
-// register a callback for descriptors
-typedef BOOL (TFnGetDescriptor)(U16 wTypeIndex, U16 wLangID, int *piLen, U8 **ppbData);
-void USBRegisterDescriptorHandler(TFnGetDescriptor *pfnGetDesc);
-
-// default standard request handler
-BOOL USBHandleStandardRequest(TSetupPacket *pSetup, int *piLen, U8 **ppbData);
-
-// default EP0 handler
-void USBHandleControlTransfer(U8 bEP, U8 bEPStat);
-
-// default descriptor handler
-void USBRegisterDescriptors(const U8 *pabDescriptors);
-BOOL USBHandleDescriptor(U16 wTypeIndex, U16 wLangID, int *piLen, U8 **ppbData);
-
diff --git a/sw/airborne/arch/lpc21/test/bootloader/usbcontrol.c b/sw/airborne/arch/lpc21/test/bootloader/usbcontrol.c
deleted file mode 100644
index ba3966f147..0000000000
--- a/sw/airborne/arch/lpc21/test/bootloader/usbcontrol.c
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-/*
- Control transfer handler.
-
- In case of a control-write (host-to-device), this module collects the full
- control message in a local buffer, then sends it off to an installed
- request handler.
-
- In case of a control-read (device-to-host), an installed request handler
- is asked to handle the request and provide return data. The handler can
- either put the data in the control data buffer through the supplied pointer,
- or it can supply a new data pointer. In both cases, the handler is required
- to update the data length in *piLen;
-
-
- Currently, control transfers are handled in a very simple way, keeping
- almost no state about the control transfer progress (setup stage, data
- stage, status stage). We simply follow the host: if it sends data, we store
- it in the control data buffer and if it asks for data, we just send the next
- block.
-
-*/
-
-#include "type.h"
-#include "usbdebug.h"
-
-#include "usbstruct.h"
-#include "usbapi.h"
-
-
-// maximum total size of control transfer data
-#define MAX_CONTROL_SIZE 128
-
-#define MAX_REQ_HANDLERS 4 // standard, class, vendor, reserved
-
-static TSetupPacket Setup;
-static U8 abControlData[MAX_CONTROL_SIZE];
-
-static U8 *pbData; // pointer to data buffer
-static int iResidue; // remaining bytes in buffer
-static int iLen; // total length of control transfer
-
-static TFnHandleRequest *apfnReqHandlers[4] = {NULL, NULL, NULL, NULL};
-static TFnHandleRequest *apfnPreReqHandler = NULL;
-
-
-/*************************************************************************
- _PreHandleRequest
- =================
- Local function to handle a request before data arrived by calling
- a special installed request handler.
-
- Called in case of data going from host to device, the handler can
- update the data pointer *ppbData.
-
- IN pSetup The setup packet
- IN/OUT *piLen Pointer to data length
- ppbData Data buffer.
-
- Returns TRUE if the request was handles successfully
-**************************************************************************/
-static BOOL _PreHandleRequest(TSetupPacket *pSetup, int *piLen, U8 **ppbData)
-{
- TFnHandleRequest *pfnHandler;
-
- pfnHandler = apfnPreReqHandler;
- if (pfnHandler == NULL) {
- // no pre-handler installed
- return FALSE;
- }
-
- return pfnHandler(pSetup, piLen, ppbData);
-}
-
-
-/*************************************************************************
- _HandleRequest
- ==============
- Local function to handle a request by calling one of the installed
- request handlers.
-
- In case of data going from host to device, the data is at *ppbData.
- In case of data going from device to host, the handler can either
- choose to write its data at *ppbData or update the data pointer.
-
- IN pSetup The setup packet
- IN/OUT *piLen Pointer to data length
- ppbData Data buffer.
-
- Returns TRUE if the request was handles successfully
-**************************************************************************/
-static BOOL _HandleRequest(TSetupPacket *pSetup, int *piLen, U8 **ppbData)
-{
- TFnHandleRequest *pfnHandler;
- int iType;
-
- iType = REQTYPE_GET_TYPE(pSetup->bmRequestType);
- pfnHandler = apfnReqHandlers[iType];
- if (pfnHandler == NULL) {
- DBG("No handler for reqtype %d\n", iType);
- return FALSE;
- }
-
- return pfnHandler(pSetup, piLen, ppbData);
-}
-
-
-/*************************************************************************
- StallControlPipe
- ================
- Local function to stall the control endpoint
-
-**************************************************************************/
-static void StallControlPipe(U8 bEPStat)
-{
- U8 *pb;
- int i;
-
- DBG("STALL on [");
-// dump setup packet
- pb = (U8 *)&Setup;
- for (i = 0; i < 8; i++) {
- DBG(" %02x", *pb++);
- }
- DBG("] stat=%x\n", bEPStat);
- USBHwEPStall(0x80, TRUE);
-}
-
-
-/*************************************************************************
- DataIn
- ======
- Sends next chunk of data (possibly 0 bytes) to host
-
-**************************************************************************/
-static void DataIn(void)
-{
- int iChunk;
-
- iChunk = MIN(MAX_PACKET_SIZE0, iResidue);
- USBHwEPWrite(0x80, pbData, iChunk);
- pbData += iChunk;
- iResidue -= iChunk;
-}
-
-
-/*************************************************************************
- USBHandleControlTransfer
- ========================
- Handles IN/OUT transfers on EP0
-
-**************************************************************************/
-void USBHandleControlTransfer(U8 bEP, U8 bEPStat)
-{
- int iChunk;
-
- if (bEP == 0x00) {
- // OUT transfer
- if (bEPStat & EP_STATUS_SETUP) {
- // setup packet, reset request message state machine
- USBHwEPRead(0x00, (U8 *)&Setup, &iLen);
-//mmmm DBG("S%x", Setup.bRequest);
-
- // defaults for data pointer and residue
- pbData = abControlData;
- iResidue = Setup.wLength;
- iLen = Setup.wLength;
-
- // ask installed handler to pre process request
- if (!_PreHandleRequest(&Setup, &iLen, &pbData)) {
- // silently ignore non installed handler
- }
-
- if ((Setup.wLength == 0) ||
- (REQTYPE_GET_DIR(Setup.bmRequestType) == REQTYPE_DIR_TO_HOST)) {
- // ask installed handler to process request
- if (!_HandleRequest(&Setup, &iLen, &pbData)) {
- DBG("_HandleRequest1 failed\n");
- StallControlPipe(bEPStat);
- return;
- }
- // send smallest of requested and offered length
- iResidue = MIN(iLen, Setup.wLength);
- // send first part (possibly a zero-length status message)
- DataIn();
- }
-
- if ((Setup.wLength != 0) &&
- (REQTYPE_GET_DIR(Setup.bmRequestType) == REQTYPE_DIR_TO_DEVICE)) {
- if (!_PreHandleRequest(&Setup, &iLen, &pbData)) {
- // this is not a must, might fail
- }
- }
- }
- else {
- if (iResidue > 0) {
- // store data
- iChunk = 0;
- USBHwEPRead(0x00, pbData, &iChunk);
- pbData += iChunk;
- iResidue -= iChunk;
- if (iResidue == 0) {
- // received all, send data to handler
- // TODO set pointer correctly
- pbData = abControlData;
- if (!_HandleRequest(&Setup, &iLen, &pbData)) {
- StallControlPipe(bEPStat);
- DBG("_HandleRequest2 failed\n");
- return;
- }
- // send status to host
- DataIn();
- }
- }
- else {
- // absorb zero-length status message
- USBHwEPRead(0x00, NULL, &iChunk);
- DBG(iChunk > 0 ? "?" : "");
- }
- }
- }
- else if (bEP == 0x80) {
- // IN transfer
- // send more data if available (possibly a 0-length packet)
- DataIn();
- }
- else {
- ASSERT(FALSE);
- }
-}
-
-
-/*************************************************************************
- USBRegisterPreRequestHandler
- ============================
- Registers a callback for pre-handling requests
-
- IN *pfnHandler Callback function pointer
-
-**************************************************************************/
-void USBRegisterPreRequestHandler(TFnHandleRequest *pfnHandler)
-{
- apfnPreReqHandler = pfnHandler;
-}
-
-
-/*************************************************************************
- USBRegisterRequestHandler
- =========================
- Registers a callback for handling requests
-
- IN iType Type of request, e.g. REQTYPE_TYPE_STANDARD
- *pfnHandler Callback function pointer
-
-**************************************************************************/
-void USBRegisterRequestHandler(int iType, TFnHandleRequest *pfnHandler)
-{
- ASSERT(iType >= 0);
- ASSERT(iType < 4);
- apfnReqHandlers[iType] = pfnHandler;
-}
-
diff --git a/sw/airborne/arch/lpc21/test/bootloader/usbdebug.h b/sw/airborne/arch/lpc21/test/bootloader/usbdebug.h
deleted file mode 100644
index 6a2f477098..0000000000
--- a/sw/airborne/arch/lpc21/test/bootloader/usbdebug.h
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-int printf(const char *format, ...);
-
-#ifdef DEBUG
-#define DBG(x ...) printf(x)
-#define ASSERT(x) if(!(x)){DBG("\nAssertion '%s' failed in %s:%s#%d!\n",#x,__FILE__,__FUNCTION__,__LINE__);while(1);}
-#else
-#define DBG(x ...)
-#define ASSERT(x)
-#endif
-
diff --git a/sw/airborne/arch/lpc21/test/bootloader/usbdescrip.c b/sw/airborne/arch/lpc21/test/bootloader/usbdescrip.c
deleted file mode 100644
index a66c26be1c..0000000000
--- a/sw/airborne/arch/lpc21/test/bootloader/usbdescrip.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-/*
- Default descriptor handler.
-*/
-
-
-#include "type.h"
-#include "usbdebug.h"
-
-#include "usbapi.h"
-
-static const U8 *pabDescrip = NULL;
-
-
-/*************************************************************************
- USBRegisterDescriptors
- ======================
- Registers a pointer to a descriptor block containing all descriptors
- for the device.
-
- IN pabDescriptors The descriptor byte array
-
-**************************************************************************/
-void USBRegisterDescriptors(const U8 *pabDescriptors)
-{
- pabDescrip = pabDescriptors;
-}
-
-
-/*************************************************************************
- USBHandleDescriptor
- ===================
- Parses a previously installed descriptor block and attempts to find
- the specified USB descriptor.
-
- IN wTypeIndex Type and index of the descriptor
- wLangID Language ID of the descriptor (currently unused)
- OUT *piLen Descriptor length
- *ppbData Descriptor data
-
-**************************************************************************/
-BOOL USBHandleDescriptor(U16 wTypeIndex, U16 wLangID, int *piLen, U8 **ppbData)
-{
- U8 bType, bIndex;
- U8 *pab;
- int iCurIndex;
-
- ASSERT(pabDescrip != NULL);
-
- bType = GET_DESC_TYPE(wTypeIndex);
- bIndex = GET_DESC_INDEX(wTypeIndex);
-
- pab = (U8 *)pabDescrip;
- iCurIndex = 0;
-
- while (pab[0] != 0) {
- if (pab[1] == bType) {
- if (iCurIndex == bIndex) {
- // set data pointer
- *ppbData = pab;
- // get length from structure
- if (bType == DESC_CONFIGURATION) {
- // interface descriptor is an exception, length is at offset 2 and 3
- *piLen = (pab[3] << 8) | pab[2];
- }
- else {
- // normally length is at offset 0
- *piLen = pab[0];
- }
- return TRUE;
- }
- iCurIndex++;
- }
- // skip to next descriptor
- pab += pab[0];
- }
- // nothing found
- DBG("Desc %x not found!\n", wTypeIndex);
- return FALSE;
-}
-
-
diff --git a/sw/airborne/arch/lpc21/test/bootloader/usbhw_lpc.c b/sw/airborne/arch/lpc21/test/bootloader/usbhw_lpc.c
deleted file mode 100644
index 96edd8e842..0000000000
--- a/sw/airborne/arch/lpc21/test/bootloader/usbhw_lpc.c
+++ /dev/null
@@ -1,587 +0,0 @@
-/*
- LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#include "type.h"
-#include "usbdebug.h"
-#include "usbhw_lpc.h"
-#include "usbapi.h"
-
-
-#ifdef DEBUG
-// comment out the following line if you don't want to use debug LEDs
-#define DEBUG_LED
-#endif
-
-#ifdef DEBUG_LED
-#define DEBUG_LED_ON(x) IOCLR0 = (1 << x);
-#define DEBUG_LED_OFF(x) IOSET0 = (1 << x);
-#define DEBUG_LED_INIT(x) PINSEL0 &= ~(0x3 << (2*x)); IODIR0 |= (1 << x); DEBUG_LED_OFF(x);
-#else
-#define DEBUG_LED_INIT(x)
-#define DEBUG_LED_ON(x)
-#define DEBUG_LED_OFF(x)
-#endif
-
-// local data
-
-static TFnDevIntHandler *_pfnDevIntHandler = NULL;
-static TFnEPIntHandler *_apfnEPIntHandlers[16];
-static TFnFrameHandler *_pfnFrameHandler = NULL;
-
-// convert from endpoint address to endpoint index (and vice versa)
-#define EP2IDX(bEP) ((((bEP)&0xF)<<1)|(((bEP)&0x80)>>7))
-#define IDX2EP(idx) ((((idx)<<7)&0x80)|(((idx)>>1)&0xF))
-
-
-
-/*************************************************************************
- Wait4DevInt
- ===========
- Local function to wait for a device interrupt (and clear it)
-
- IN dwIntr Interrupts to wait for
-
-**************************************************************************/
-static void Wait4DevInt(U32 dwIntr)
-{
- while ((USBDevIntSt & dwIntr) != dwIntr);
- USBDevIntClr = dwIntr;
-}
-
-
-/*************************************************************************
- USBHwCmd
- ========
- Local function to send a command to the USB protocol engine
-
- IN bCmd Command to send
-
-**************************************************************************/
-static void USBHwCmd(U8 bCmd)
-{
- // clear CDFULL/CCEMTY
- USBDevIntClr = CDFULL | CCEMTY;
- // write command code
- USBCmdCode = 0x00000500 | (bCmd << 16);
- Wait4DevInt(CCEMTY);
-}
-
-
-/*************************************************************************
- USBHwCmdWrite
- =============
- Local function to send a command + data to the USB protocol engine
-
- IN bCmd Command to send
- bData Data to send
-
-**************************************************************************/
-static void USBHwCmdWrite(U8 bCmd, U16 bData)
-{
- // write command code
- USBHwCmd(bCmd);
-
- // write command data
- USBCmdCode = 0x00000100 | (bData << 16);
- Wait4DevInt(CCEMTY);
-}
-
-
-/*************************************************************************
- USBHwCmdRead
- ============
- Local function to send a command to the USB protocol engine
- and read data
-
- IN bCmd Command to send
-
- Returns the data
-**************************************************************************/
-static U8 USBHwCmdRead(U8 bCmd)
-{
- // write command code
- USBHwCmd(bCmd);
-
- // get data
- USBCmdCode = 0x00000200 | (bCmd << 16);
- Wait4DevInt(CDFULL);
- return USBCmdData;
-}
-
-
-/*************************************************************************
- USBHwEPRealize
- ==============
- 'Realizes' an endpoint, meaning that buffer space is reserved for
- it. An endpoint needs to be realised before it can be used.
-
- From experiments, it appears that a USB reset causes USBReEP to
- re-initialise to 3 (= just the control endpoints).
- However, a USB bus reset does not disturb the USBMaxPSize settings.
-
- IN bEP Endpoint number
-
-**************************************************************************/
-static void USBHwEPRealize(int idx, U16 wMaxPSize)
-{
- USBReEP |= (1 << idx);
- USBEpInd = idx;
- USBMaxPSize = wMaxPSize;
- Wait4DevInt(EP_RLZED);
-}
-
-
-/*************************************************************************
- USBHwEPEnable
- =============
- Enables or disables an endpoint
-
- IN bEP Endpoint number
- fEnable TRUE to enable, FALSE to disable
-
-**************************************************************************/
-static void USBHwEPEnable(int idx, BOOL fEnable)
-{
- USBHwCmdWrite(CMD_EP_SET_STATUS | idx, fEnable ? 0 : EP_DA);
-}
-
-
-/*************************************************************************
- USBHwRegisterEPIntHandler
- =========================
- Registers an endpoint event callback
-
- IN bEP Endpoint number
- wMaxPacketSize Maximum packet size for this endpoint
- pfnHandler Callback function
-
-**************************************************************************/
-void USBHwRegisterEPIntHandler(U8 bEP, U16 wMaxPacketSize, TFnEPIntHandler *pfnHandler)
-{
- int idx;
-
- idx = EP2IDX(bEP);
-
- ASSERT(idx<32);
-
- /* add handler to list of EP handlers */
- _apfnEPIntHandlers[idx / 2] = pfnHandler;
-
- /* enable EP interrupt*/
- USBEpIntEn |= (1 << idx);
- USBDevIntEn |= EP_SLOW;
-
- // realise endpoint
- USBHwEPRealize(idx, wMaxPacketSize);
-
- DBG("Registered handler for EP 0x%x\n", bEP);
-}
-
-
-/*************************************************************************
- USBHwRegisterDevIntHandler
- ==========================
- Registers an device status callback
-
- IN pfnHandler Callback function
-
-**************************************************************************/
-void USBHwRegisterDevIntHandler(TFnDevIntHandler *pfnHandler)
-{
- _pfnDevIntHandler = pfnHandler;
-
- // enable device interrupt
- USBDevIntEn |= DEV_STAT;
-
- DBG("Registered handler for device status\n");
-}
-
-
-/*************************************************************************
- USBHwRegisterFrameHandler
- =========================
- Registers the frame callback
-
- IN pfnHandler Callback function
-
-**************************************************************************/
-void USBHwRegisterFrameHandler(TFnFrameHandler *pfnHandler)
-{
- _pfnFrameHandler = pfnHandler;
-
- // enable device interrupt
- USBDevIntEn |= FRAME;
-
- DBG("Registered handler for frame\n");
-}
-
-
-/*************************************************************************
- USBHwSetAddress
- ===============
- Sets the USB address.
-
- IN bAddr Device address to set
-
-**************************************************************************/
-void USBHwSetAddress(U8 bAddr)
-{
- USBHwCmdWrite(CMD_DEV_SET_ADDRESS, DEV_EN | bAddr);
-}
-
-
-/*************************************************************************
- USBHwConnect
- ===============
-
-**************************************************************************/
-void USBHwConnect(BOOL fConnect)
-{
- USBHwCmdWrite(CMD_DEV_STATUS, fConnect ? CON : 0);
-}
-
-
-/*************************************************************************
- USBHwGetEPStall
- ============
- Gets the stalled property of an endpoint
-
- IN bEP Endpoint number
-
- Returns TRUE if stalled, FALSE if unstalled
-**************************************************************************/
-BOOL USBHwGetEPStall(U8 bEP)
-{
- int idx = EP2IDX(bEP);
-
- return (USBHwCmdRead(CMD_EP_SELECT | idx) & 2 ? TRUE : FALSE);
-}
-
-
-/*************************************************************************
- USBHwEPStall
- ============
- Sets the stalled property of an endpoint
-
- IN bEP Endpoint number
- fStall TRUE to stall, FALSE to unstall
-
-**************************************************************************/
-void USBHwEPStall(U8 bEP, BOOL fStall)
-{
- int idx = EP2IDX(bEP);
-
- USBHwCmdWrite(CMD_EP_SET_STATUS | idx, fStall ? EP_ST : 0);
-}
-
-
-/*************************************************************************
- USBHwEPWrite
- ============
- Writes data to an endpoint buffer
-
- IN bEP Endpoint number
- pbBuf Endpoint data
- iLen Number of bytes to write
-
- Returns TRUE if the data was successfully written
-**************************************************************************/
-BOOL USBHwEPWrite(U8 bEP, U8 *pbBuf, int iLen)
-{
- int idx;
-
- idx = EP2IDX(bEP);
-
-// DBG("<%d", iLen);
- DBG("<");
-
- // set write enable for specific endpoint
- USBCtrl = WR_EN | ((bEP & 0xF) << 2);
-
- // set packet length
- USBTxPLen = iLen;
-
- // write data
- while (USBCtrl & WR_EN) {
- USBTxData = (pbBuf[3] << 24) | (pbBuf[2] << 16) | (pbBuf[1] << 8) | pbBuf[0];
- pbBuf += 4;
- }
-
- // select endpoint and validate buffer
- USBHwCmd(CMD_EP_SELECT | idx);
- USBHwCmd(CMD_EP_VALIDATE_BUFFER);
-
- return TRUE;
-}
-
-
-/*************************************************************************
- USBHwEPRead
- ============
- Reads data from an endpoint buffer
-
- IN bEP Endpoint number
- pbBuf Endpoint data
- iLen Number of bytes to write
-
- Returns TRUE if the data was successfully read
-**************************************************************************/
-BOOL USBHwEPRead(U8 bEP, U8 *pbBuf, int *piLen)
-{
- int idx;
- U32 dwData, dwLen;
-
- idx = EP2IDX(bEP);
-
- // set read enable bit for specific endpoint
- USBCtrl = RD_EN | ((bEP & 0xF) << 2);
-
- // wait for PKT_RDY
- do {
- dwLen = USBRxPLen;
- } while ((dwLen & PKT_RDY) == 0);
-
- // packet valid?
- if ((dwLen & DV) == 0) {
- *piLen = 0;
- return FALSE;
- }
-
- // get length
- dwLen &= PKT_LNGTH_MASK;
-
- // get data in 4-byte units
- while (USBCtrl & RD_EN) {
- dwData = USBRxData;
- if (pbBuf != NULL) {
- *pbBuf++ = dwData >> 0;
- *pbBuf++ = dwData >> 8;
- *pbBuf++ = dwData >> 16;
- *pbBuf++ = dwData >> 24;
- }
- }
-
- // select endpoint and clear buffer
- USBHwCmd(CMD_EP_SELECT | idx);
- USBHwCmd(CMD_EP_CLEAR_BUFFER);
-
- *piLen = dwLen;
-
-// DBG(">%d", dwLen);
-// DBG(">");
-
- return TRUE;
-}
-
-
-/*************************************************************************
- USBHwConfigDevice
- =================
- Sets the 'configured' state.
-
- All registered endpoints are 'realised' and enabled, and the
- 'configured' bit is set in the device status register.
-
- IN fConfigure If TRUE, configure device, else unconfigure
-
-**************************************************************************/
-void USBHwConfigDevice(BOOL fConfigured)
-{
- int i;
-
- // realise endpoints (copied from enabled interrupts)
- USBReEP = USBEpIntEn;
-
- // enable all installed endpoints
- for (i = 0; i < 32; i++) {
- if (USBEpIntEn & (1 << i)) {
- USBHwEPEnable(i, TRUE);
- }
- }
-
- // set configured bit
- USBHwCmdWrite(CMD_DEV_CONFIG, fConfigured ? CONF_DEVICE : 0);
-}
-
-
-/*************************************************************************
- USBHwISR
- ========
- USB interrupt handler
-
- Interrupt mapping:
- * endpoint interrupts are mapped to the slow interrupt
-
- TODO: should we cause interrupt on NAK?
-
-**************************************************************************/
-void USBHwISR(void)
-{
- U32 dwStatus, dwEPIntStat;
- U32 dwIntBit;
- U8 bEPStat, bDevStat, bStat;
- int i;
-
- dwStatus = USBDevIntSt;
-
- // handle device dwStatus interrupts
- if (dwStatus & DEV_STAT) {
-DEBUG_LED_ON(8);
- bDevStat = USBHwCmdRead(CMD_DEV_STATUS);
- if (bDevStat & (CON_CH | SUS_CH | RST)) {
- // convert device status into something HW independent
- bStat = ((bDevStat & CON) ? DEV_STATUS_CONNECT : 0) |
- ((bDevStat & SUS) ? DEV_STATUS_SUSPEND : 0) |
- ((bDevStat & RST) ? DEV_STATUS_RESET : 0);
- // call handler
- if (_pfnDevIntHandler != NULL) {
- _pfnDevIntHandler(bStat);
- }
- }
- // clear DEV_STAT;
- USBDevIntClr = DEV_STAT;
-DEBUG_LED_OFF(8);
- }
-
- // check endpoint interrupts
- if (dwStatus & EP_SLOW) {
-DEBUG_LED_ON(9);
- dwEPIntStat = USBEpIntSt;
- for (i = 0; i < 32; i++) {
- dwIntBit = (1 << i);
- if (dwEPIntStat & dwIntBit) {
- // clear int (and retrieve status)
- USBEpIntClr = dwIntBit;
- Wait4DevInt(CDFULL);
- bEPStat = USBCmdData;
- // convert EP pipe stat into something HW independent
- bStat = ((bEPStat & EPSTAT_FE) ? EP_STATUS_DATA : 0) |
- ((bEPStat & EPSTAT_ST) ? EP_STATUS_STALLED : 0) |
- ((bEPStat & EPSTAT_STP) ? EP_STATUS_SETUP : 0) |
- ((bEPStat & EPSTAT_EPN) ? EP_STATUS_NACKED : 0) |
- ((bEPStat & EPSTAT_PO) ? EP_STATUS_ERROR : 0);
- // call handler
- if (_apfnEPIntHandlers[i / 2] != NULL) {
- _apfnEPIntHandlers[i / 2](IDX2EP(i), bStat);
- }
- }
- }
- // clear EP_SLOW
- USBDevIntClr = EP_SLOW;
-DEBUG_LED_OFF(9);
- }
-
- // handle frame interrupt
- if (dwStatus & FRAME) {
-DEBUG_LED_ON(10);
- if (_pfnFrameHandler != NULL) {
- _pfnFrameHandler(0); // implement counter later
- }
- // clear int
- USBDevIntClr = FRAME;
-DEBUG_LED_OFF(10);
- }
-}
-
-
-
-/*************************************************************************
- USBHwInit
- =========
- Initialises the USB hardware
-
- This function assumes that the hardware is connected as shown in
- section 10.1 of the LPC2148 data sheet:
- * P0.31 controls a switch to connect a 1.5k pull-up to D+ if low.
- * P0.23 is connected to USB VCC.
-
- Embedded artists board: make sure to disconnect P0.23 LED as it
- acts as a pull-up and so prevents detection of USB disconnect.
-
- Returns TRUE if the hardware was successfully initialised
-**************************************************************************/
-BOOL USBHwInit(void)
-{
-#ifdef PROC_TINYJ
- /* turn on Vbus as not connected in hardware */
- IOPIN0 |= (1 << 23); //TODO FIXME
-#endif
-
-#ifdef PROC_TINY
- /* turn on Vbus as not connected in hardware */
- IOPIN0 |= (1 << 23); //TODO FIXME
-#endif
-
-#ifdef PROC_FBW
- /* turn on Vbus as not connected in hardware */
- IOPIN0 |= (1 << 23); //TODO FIXME
-#endif
-
-#ifdef PROC_AP
- /* turn on Vbus as not connected in hardware */
- IOPIN0 |= (1 << 23); //TODO FIXME
-#endif
-
- // configure P0.23 for Vbus sense
- PINSEL1 = (PINSEL1 & ~(3 << 14)) | (1 << 14); // P0.23
- IODIR0 &= ~(1 << 23);
- // configure P0.31 for CONNECT
- PINSEL1 = (PINSEL1 & ~(3 << 30)) | (2 << 30); // P0.31
-
- // enable PUSB
- PCONP |= (1 << 31);
-
- // initialise USB PLL
- PLL1CON = 1; // enable USB PLL
- PLL1CFG = (1 << 5) | 3; // P = 2, M = 3 (48MHz)
- PLL1FEED = 0xAA;
- PLL1FEED = 0x55;
- while ((PLL1STAT & (1 << 10)) == 0);
-
- PLL1CON = 3; // enable and connect
- PLL1FEED = 0xAA;
- PLL1FEED = 0x55;
-
- // disable/clear all interrupts for now
- USBDevIntEn = 0;
- USBEpIntEn = 0;
- USBDevIntClr = 0xFFFFFFFF;
- USBEpIntClr = 0xFFFFFFFF;
-
- // setup control endpoints
- USBHwEPRealize(0, MAX_PACKET_SIZE0);
- USBHwEPRealize(1, MAX_PACKET_SIZE0);
-
- // enable/clear control endpoints
- USBHwEPEnable(0, TRUE);
- USBHwEPEnable(1, TRUE);
-
- // init debug leds
- DEBUG_LED_INIT(8);
- DEBUG_LED_INIT(9);
- DEBUG_LED_INIT(10);
-
- return TRUE;
-}
-
-
-void USBHwReset(void)
-{
-}
-
diff --git a/sw/airborne/arch/lpc21/test/bootloader/usbhw_lpc.h b/sw/airborne/arch/lpc21/test/bootloader/usbhw_lpc.h
deleted file mode 100644
index 82f2ecdbd8..0000000000
--- a/sw/airborne/arch/lpc21/test/bootloader/usbhw_lpc.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- (c) 2006, Bertrik Sikken, bertrik@sikken.nl
-
- Hardware definitions for the LPC214x USB controller
-
- These are private to the usbhw module
-*/
-
-
-/* Common LPC2148 definitions, related to USB */
-#define PCONP *(volatile unsigned int *)0xE01FC0C4
-#define PLL1CON *(volatile unsigned int *)0xE01FC0A0
-#define PLL1CFG *(volatile unsigned int *)0xE01FC0A4
-#define PLL1STAT *(volatile unsigned int *)0xE01FC0A8
-#define PLL1FEED *(volatile unsigned int *)0xE01FC0AC
-
-#define PINSEL0 *(volatile unsigned int *)0xE002C000
-#define PINSEL1 *(volatile unsigned int *)0xE002C004
-#define IOPIN0 *(volatile unsigned int *)0xE0028000
-#define IOSET0 *(volatile unsigned int *)0xE0028004
-#define IODIR0 *(volatile unsigned int *)0xE0028008
-#define IOCLR0 *(volatile unsigned int *)0xE002800C
-
-/* USB register definitions */
-#define USBIntSt *(volatile unsigned int *)0xE01FC1C0
-
-#define USBDevIntSt *(volatile unsigned int *)0xE0090000
-#define USBDevIntEn *(volatile unsigned int *)0xE0090004
-#define USBDevIntClr *(volatile unsigned int *)0xE0090008
-#define USBDevIntSet *(volatile unsigned int *)0xE009000C
-#define USBDevIntPri *(volatile unsigned int *)0xE009002C
-
-#define USBEpIntSt *(volatile unsigned int *)0xE0090030
-#define USBEpIntEn *(volatile unsigned int *)0xE0090034
-#define USBEpIntClr *(volatile unsigned int *)0xE0090038
-#define USBEpIntSet *(volatile unsigned int *)0xE009003C
-#define USBEpIntPri *(volatile unsigned int *)0xE0090040
-
-#define USBReEP *(volatile unsigned int *)0xE0090044
-#define USBEpInd *(volatile unsigned int *)0xE0090048
-#define USBMaxPSize *(volatile unsigned int *)0xE009004C
-
-#define USBRxData *(volatile unsigned int *)0xE0090018
-#define USBRxPLen *(volatile unsigned int *)0xE0090020
-#define USBTxData *(volatile unsigned int *)0xE009001C
-#define USBTxPLen *(volatile unsigned int *)0xE0090024
-#define USBCtrl *(volatile unsigned int *)0xE0090028
-
-#define USBCmdCode *(volatile unsigned int *)0xE0090010
-#define USBCmdData *(volatile unsigned int *)0xE0090014
-
-/* USBIntSt bits */
-#define USB_INT_REQ_LP (1<<0)
-#define USB_INT_REQ_HP (1<<1)
-#define USB_INT_REQ_DMA (1<<2)
-#define USB_need_clock (1<<8)
-#define EN_USB_BITS (1<<31)
-
-/* USBDevInt... bits */
-#define FRAME (1<<0)
-#define EP_FAST (1<<1)
-#define EP_SLOW (1<<2)
-#define DEV_STAT (1<<3)
-#define CCEMTY (1<<4)
-#define CDFULL (1<<5)
-#define RxENDPKT (1<<6)
-#define TxENDPKT (1<<7)
-#define EP_RLZED (1<<8)
-#define ERR_INT (1<<9)
-
-/* USBRxPLen bits */
-#define PKT_LNGTH (1<<0)
-#define PKT_LNGTH_MASK 0x3FF
-#define DV (1<<10)
-#define PKT_RDY (1<<11)
-
-/* USBCtrl bits */
-#define RD_EN (1<<0)
-#define WR_EN (1<<1)
-#define LOG_ENDPOINT (1<<2)
-
-/* protocol engine command codes */
- /* device commands */
-#define CMD_DEV_SET_ADDRESS 0xD0
-#define CMD_DEV_CONFIG 0xD8
-#define CMD_DEV_SET_MODE 0xF3
-#define CMD_DEV_READ_CUR_FRAME_NR 0xF5
-#define CMD_DEV_READ_TEST_REG 0xFD
-#define CMD_DEV_STATUS 0xFE /* read/write */
-#define CMD_DEV_GET_ERROR_CODE 0xFF
-#define CMD_DEV_READ_ERROR_STATUS 0xFB
- /* endpoint commands */
-#define CMD_EP_SELECT 0x00
-#define CMD_EP_SELECT_CLEAR 0x40
-#define CMD_EP_SET_STATUS 0x40
-#define CMD_EP_CLEAR_BUFFER 0xF2
-#define CMD_EP_VALIDATE_BUFFER 0xFA
-
-/* set address command */
-#define DEV_ADDR (1<<0)
-#define DEV_EN (1<<7)
-
-/* configure device command */
-#define CONF_DEVICE (1<<0)
-
-/* set mode command */
-#define AP_CLK (1<<0)
-#define INAK_CI (1<<1)
-#define INAK_CO (1<<2)
-#define INAK_II (1<<3)
-#define INAK_IO (1<<4)
-#define INAK_BI (1<<5)
-#define INAK_BO (1<<6)
-
-/* set get device status command */
-#define CON (1<<0)
-#define CON_CH (1<<1)
-#define SUS (1<<2)
-#define SUS_CH (1<<3)
-#define RST (1<<4)
-
-/* get error code command */
-// ...
-
-/* Select Endpoint command read bits */
-#define EPSTAT_FE (1<<0)
-#define EPSTAT_ST (1<<1)
-#define EPSTAT_STP (1<<2)
-#define EPSTAT_PO (1<<3)
-#define EPSTAT_EPN (1<<4)
-#define EPSTAT_B1FULL (1<<5)
-#define EPSTAT_B2FULL (1<<6)
-
-/* CMD_EP_SET_STATUS command */
-#define EP_ST (1<<0)
-#define EP_DA (1<<5)
-#define EP_RF_MO (1<<6)
-#define EP_CND_ST (1<<7)
-
-/* read error status command */
-#define PID_ERR (1<<0)
-#define UEPKT (1<<1)
-#define DCRC (1<<2)
-#define TIMEOUT (1<<3)
-#define EOP (1<<4)
-#define B_OVRN (1<<5)
-#define BTSTF (1<<6)
-#define TGL_ERR (1<<7)
-
-
-
-
-
-
-
-
diff --git a/sw/airborne/arch/lpc21/test/bootloader/usbinit.c b/sw/airborne/arch/lpc21/test/bootloader/usbinit.c
deleted file mode 100644
index 036385a05c..0000000000
--- a/sw/airborne/arch/lpc21/test/bootloader/usbinit.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#include "type.h"
-#include "usbdebug.h"
-#include "usbapi.h"
-
-
-/*************************************************************************
- HandleUsbReset
- ==============
-**************************************************************************/
-static void HandleUsbReset(U8 bDevStatus)
-{
- if (bDevStatus & DEV_STATUS_RESET) {
- USBHwReset();
- DBG("\n!");
- }
-}
-
-
-/*************************************************************************
- USBInit
- =======
- Initialises the USB hardware and sets up the USB stack by
- installing default callbacks.
-
-**************************************************************************/
-BOOL USBInit(void)
-{
- // init hardware
- USBHwInit();
-
- // register bus reset handler
- USBHwRegisterDevIntHandler(HandleUsbReset);
-
- // register control transfer handler on EP0
- USBHwRegisterEPIntHandler(0x00, MAX_PACKET_SIZE0, USBHandleControlTransfer);
- USBHwRegisterEPIntHandler(0x80, MAX_PACKET_SIZE0, USBHandleControlTransfer);
-
- // register standard request handler
- USBRegisterRequestHandler(REQTYPE_TYPE_STANDARD, USBHandleStandardRequest);
-
- // register
- USBRegisterDescriptorHandler(USBHandleDescriptor);
-
- return TRUE;
-}
-
diff --git a/sw/airborne/arch/lpc21/test/bootloader/usbstdreq.c b/sw/airborne/arch/lpc21/test/bootloader/usbstdreq.c
deleted file mode 100644
index 60d7d58812..0000000000
--- a/sw/airborne/arch/lpc21/test/bootloader/usbstdreq.c
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
- LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-/*
- Standard request handler.
-
- This modules handles the 'chapter 9' processing, specifically the
- standard device requests in table 9-3 from the universal serial bus
- specification revision 2.0
-
- Specific types of devices may specify additional requests (for example
- HID devices add a GET_DESCRIPTOR request for interfaces), but they
- will not be part of this module.
-*/
-
-// TODO some requests have to return a request error if device not configured:
-// TODO GET_INTERFACE, GET_STATUS, SET_INTERFACE, SYNCH_FRAME
-// TODO this applies to the following if endpoint != 0:
-// TODO SET_FEATURE, GET_FEATURE
-
-#include "type.h"
-#include "usbdebug.h"
-#include "usbstruct.h"
-#include "usbapi.h"
-
-#define MAX_DESC_HANDLERS 4 // device, interface, endpoint, other
-
-// device state info
-static U8 bConfiguration = 0;
-static TFnGetDescriptor *pfnGetDescriptor = NULL;
-
-/*************************************************************************
- HandleStdDeviceReq
- ==================
- Local function to handle a standard device request
-
- IN pSetup The setup packet
- IN/OUT *piLen Pointer to data length
- ppbData Data buffer.
-
- Returns TRUE if the request was handled successfully
-**************************************************************************/
-static BOOL HandleStdDeviceReq(TSetupPacket *pSetup, int *piLen, U8 **ppbData)
-{
- U8 *pbData = *ppbData;
-
- switch (pSetup->bRequest) {
-
- case REQ_GET_STATUS:
- // bit 0: self-powered
- // bit 1: remote wakeup
- pbData[0] = 0; // TODO use bmAttributes according to configuration
- pbData[1] = 0;
- *piLen = 2;
- break;
-
- case REQ_SET_ADDRESS:
- USBHwSetAddress(pSetup->wValue);
- break;
-
- case REQ_GET_DESCRIPTOR:
- DBG("D%x", pSetup->wValue);
- if (pfnGetDescriptor == NULL) {
- return FALSE;
- }
- return pfnGetDescriptor(pSetup->wValue, pSetup->wIndex, piLen, ppbData);
-
- case REQ_GET_CONFIGURATION:
- // indicate if we are configured
- pbData[0] = bConfiguration;
- *piLen = 1;
- break;
-
- case REQ_SET_CONFIGURATION:
- bConfiguration = pSetup->wValue & 0xFF; // TODO use bConfigurationValue(s)
- USBHwConfigDevice((pSetup->wValue & 0xFF) != 0);
- break;
-
- case REQ_CLEAR_FEATURE:
- case REQ_SET_FEATURE:
- if (pSetup->wValue == FEA_REMOTE_WAKEUP) {
- // put DEVICE_REMOTE_WAKEUP code here
- }
- if (pSetup->wValue == FEA_TEST_MODE) {
- // put TEST_MODE code here
- }
- return FALSE;
-
- case REQ_SET_DESCRIPTOR:
- DBG("Device req %d not implemented\n", pSetup->bRequest);
- return FALSE;
-
- default:
- DBG("Illegal device req %d\n", pSetup->bRequest);
- return FALSE;
- }
-
- return TRUE;
-}
-
-
-/*************************************************************************
- HandleStdInterfaceReq
- =====================
- Local function to handle a standard interface request
-
- IN pSetup The setup packet
- IN/OUT *piLen Pointer to data length
- ppbData Data buffer.
-
- Returns TRUE if the request was handled successfully
-**************************************************************************/
-static BOOL HandleStdInterfaceReq(TSetupPacket *pSetup, int *piLen, U8 **ppbData)
-{
- U8 *pbData = *ppbData;
-
- switch (pSetup->bRequest) {
-
- case REQ_GET_STATUS:
- // no bits specified
- pbData[0] = 0;
- pbData[1] = 0;
- *piLen = 2;
- break;
-
- case REQ_CLEAR_FEATURE:
- case REQ_SET_FEATURE:
- // not defined for interface
- return FALSE;
-
- case REQ_GET_INTERFACE: // TODO use bNumInterfaces
- // there is only one interface, return n-1 (= 0)
- pbData[0] = 0;
- *piLen = 1;
- break;
-
- case REQ_SET_INTERFACE: // TODO use bNumInterfaces
- // there is only one interface (= 0)
- if (pSetup->wValue == 0) {
- // ACK (zero packet) will be sent automatically
- }
- else {
- return FALSE;
- }
- break;
-
- default:
- DBG("Illegal interface req %d\n", pSetup->bRequest);
- return FALSE;
- }
-
- return TRUE;
-}
-
-
-/*************************************************************************
- HandleStdEndPointReq
- ====================
- Local function to handle a standard endpoint request
-
- IN pSetup The setup packet
- IN/OUT *piLen Pointer to data length
- ppbData Data buffer.
-
- Returns TRUE if the request was handled successfully
-**************************************************************************/
-static BOOL HandleStdEndPointReq(TSetupPacket *pSetup, int *piLen, U8 **ppbData)
-{
- U8 *pbData = *ppbData;
-
- switch (pSetup->bRequest) {
- case REQ_GET_STATUS:
- // bit 0 = endpointed halted or not
- pbData[0] = USBHwGetEPStall(pSetup->wIndex) ? 1 : 0;
- pbData[1] = 0;
- *piLen = 2;
- break;
-
- case REQ_CLEAR_FEATURE:
- if (pSetup->wValue == FEA_ENDPOINT_HALT) {
- // clear HALT by unstalling
- USBHwEPStall(pSetup->wIndex, FALSE);
- break;
- }
- // only ENDPOINT_HALT defined for endpoints
- return FALSE;
-
- case REQ_SET_FEATURE:
- if (pSetup->wValue == FEA_ENDPOINT_HALT) {
- // set HALT by stalling
- USBHwEPStall(pSetup->wIndex, TRUE);
- break;
- }
- // only ENDPOINT_HALT defined for endpoints
- return FALSE;
-
- case REQ_SYNCH_FRAME:
- DBG("EP req %d not implemented\n", pSetup->bRequest);
- return FALSE;
-
- default:
- DBG("Illegal EP req %d\n", pSetup->bRequest);
- return FALSE;
- }
-
- return TRUE;
-}
-
-
-/*************************************************************************
- USBHandleStandardRequest
- ===================
- Local function to handle a standard request
-
- IN pSetup The setup packet
- IN/OUT *piLen Pointer to data length
- ppbData Data buffer.
-
- Returns TRUE if the request was handled successfully
-**************************************************************************/
-BOOL USBHandleStandardRequest(TSetupPacket *pSetup, int *piLen, U8 **ppbData)
-{
- switch (REQTYPE_GET_RECIP(pSetup->bmRequestType)) {
- case REQTYPE_RECIP_DEVICE: return HandleStdDeviceReq(pSetup, piLen, ppbData);
- case REQTYPE_RECIP_INTERFACE: return HandleStdInterfaceReq(pSetup, piLen, ppbData);
- case REQTYPE_RECIP_ENDPOINT: return HandleStdEndPointReq(pSetup, piLen, ppbData);
- default: return FALSE;
- }
-}
-
-
-/*************************************************************************
- USBRegisterDescriptorHandler
- =========================
- Registers a callback for handling descriptors
-
- IN pfnGetDesc Callback function pointer
-
-**************************************************************************/
-void USBRegisterDescriptorHandler(TFnGetDescriptor *pfnGetDesc)
-{
- pfnGetDescriptor = pfnGetDesc;
-}
-
-
diff --git a/sw/airborne/arch/lpc21/test/bootloader/usbstruct.h b/sw/airborne/arch/lpc21/test/bootloader/usbstruct.h
deleted file mode 100644
index 9ad868bea6..0000000000
--- a/sw/airborne/arch/lpc21/test/bootloader/usbstruct.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- (c) 2006, Bertrik Sikken, bertrik@sikken.nl
-
- definitions of structure of standard USB packets
-*/
-
-#ifndef _USBSTRUCT_H_
-#define _USBSTRUCT_H_
-
-
-#include "type.h"
-
-
-/*
- setup packet definitions
-*/
-typedef struct {
- U8 bmRequestType;
- U8 bRequest;
- U16 wValue;
- U16 wIndex;
- U16 wLength;
-} TSetupPacket;
-
-
-#define EP_XFER_CONTROL 0
-#define EP_XFER_ISOC 1
-#define EP_XFER_BULK 2
-#define EP_XFER_INT 3
-
-#define REQTYPE_GET_DIR(x) (((x)>>7)&0x01)
-#define REQTYPE_GET_TYPE(x) (((x)>>5)&0x03)
-#define REQTYPE_GET_RECIP(x) ((x)&0x1F)
-
-#define REQTYPE_DIR_TO_DEVICE 0
-#define REQTYPE_DIR_TO_HOST 1
-
-#define REQTYPE_TYPE_STANDARD 0
-#define REQTYPE_TYPE_CLASS 1
-#define REQTYPE_TYPE_VENDOR 2
-#define REQTYPE_TYPE_RESERVED 3
-
-#define REQTYPE_RECIP_DEVICE 0
-#define REQTYPE_RECIP_INTERFACE 1
-#define REQTYPE_RECIP_ENDPOINT 2
-#define REQTYPE_RECIP_OTHER 3
-
-/* standard requests */
-#define REQ_GET_STATUS 0x00
-#define REQ_CLEAR_FEATURE 0x01
-#define REQ_SET_FEATURE 0x03
-#define REQ_SET_ADDRESS 0x05
-#define REQ_GET_DESCRIPTOR 0x06
-#define REQ_SET_DESCRIPTOR 0x07
-#define REQ_GET_CONFIGURATION 0x08
-#define REQ_SET_CONFIGURATION 0x09
-#define REQ_GET_INTERFACE 0x0A
-#define REQ_SET_INTERFACE 0x0B
-#define REQ_SYNCH_FRAME 0x0C
-
-#define CLASS_PER_INTERFACE 0x00
-#define CLASS_COMM 0x02
-#define CLASS_HID 0x03
-#define CLASS_PHYSICAL 0x05
-#define CLASS_STILL_IMAGE 0x06
-#define CLASS_PRINTER 0x07
-#define CLASS_MASS_STORAGE 0x08
-#define CLASS_HUB 0x09
-#define CLASS_CDC_DATA 0x0A
-#define CLASS_CSCID 0x0B
-#define CLASS_CONTENT_SEC 0x0D
-#define CLASS_VIDEO 0x0E
-#define CLASS_APP_SPEC 0xFE
-#define CLASS_VENDOR_SPEC 0xFF
-
-/* class requests HID */
-#define HID_GET_REPORT 0x01
-#define HID_GET_IDLE 0x02
-#define HID_GET_PROTOCOL 0x03
-#define HID_SET_REPORT 0x09
-#define HID_SET_IDLE 0x0A
-#define HID_SET_PROTOCOL 0x0B
-
-/* class requests mass storage */
-#define MSC_GET_MAX_LUN 0xFE
-#define MSC_BULK_RESET 0xFF
-
-/* feature selectors */
-#define FEA_ENDPOINT_HALT 0x00
-#define FEA_REMOTE_WAKEUP 0x01
-#define FEA_TEST_MODE 0x02
-
-/*
- USB descriptors
-*/
-
-typedef struct {
- U8 bLength;
- U8 bDescriptorType;
-} TUSBDescHeader;
-
-#define DESC_DEVICE 1
-#define DESC_CONFIGURATION 2
-#define DESC_STRING 3
-#define DESC_INTERFACE 4
-#define DESC_ENDPOINT 5
-#define DESC_DEVICE_QUALIFIER 6
-#define DESC_OTHER_SPEED 7
-#define DESC_INTERFACE_POWER 8
-
-#define DESC_HID_HID 0x21
-#define DESC_HID_REPORT 0x22
-#define DESC_HID_PHYSICAL 0x23
-
-#define GET_DESC_TYPE(x) (((x)>>8)&0xFF)
-#define GET_DESC_INDEX(x) ((x)&0xFF)
-
-#endif /* _USBSTRUCT_H_ */
-
diff --git a/sw/airborne/arch/lpc21/test/crt0.S b/sw/airborne/arch/lpc21/test/crt0.S
deleted file mode 100644
index f94df25b2b..0000000000
--- a/sw/airborne/arch/lpc21/test/crt0.S
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- crt0.S for LPC2xxx
- - based on examples from R O Software
- - based on examples from newlib-lpc
- - based on an example from Anglia Designs
-
- collected and modified by Martin Thomas
-*/
-
- .global _etext // -> .data initial values in ROM
- .global _data // -> .data area in RAM
- .global _edata // end of .data area
- .global __bss_start // -> .bss area in RAM
- .global __bss_end__ // end of .bss area
- .global _stack // top of stack
-
-// Stack Sizes
- .set UND_STACK_SIZE, 0x00000004
- .set ABT_STACK_SIZE, 0x00000004
- .set FIQ_STACK_SIZE, 0x00000004
- .set IRQ_STACK_SIZE, 0X00000080
- .set SVC_STACK_SIZE, 0x00000004
-
-// Standard definitions of Mode bits and Interrupt (I & F) flags in PSRs
- .set MODE_USR, 0x10 // User Mode
- .set MODE_FIQ, 0x11 // FIQ Mode
- .set MODE_IRQ, 0x12 // IRQ Mode
- .set MODE_SVC, 0x13 // Supervisor Mode
- .set MODE_ABT, 0x17 // Abort Mode
- .set MODE_UND, 0x1B // Undefined Mode
- .set MODE_SYS, 0x1F // System Mode
-
- .equ I_BIT, 0x80 // when I bit is set, IRQ is disabled
- .equ F_BIT, 0x40 // when F bit is set, FIQ is disabled
-
- .text
- .arm
- .section .init, "ax"
-
- .code 32
- .align 2
-
- .global _boot
- .func _boot
-_boot:
-
-// Runtime Interrupt Vectors
-// -------------------------
-Vectors:
- b _start // reset - _start
- ldr pc,_undf // undefined - _undf
- ldr pc,_swi // SWI - _swi
- ldr pc,_pabt // program abort - _pabt
- ldr pc,_dabt // data abort - _dabt
- nop // reserved
- ldr pc,[pc,#-0xFF0] // IRQ - read the VIC
- ldr pc,_fiq // FIQ - _fiq
-
-#if 0
-// Use this group for production
-_undf: .word _reset // undefined - _reset
-_swi: .word _reset // SWI - _reset
-_pabt: .word _reset // program abort - _reset
-_dabt: .word _reset // data abort - _reset
-_irq: .word _reset // IRQ - _reset
-_fiq: .word _reset // FIQ - _reset
-
-#else
-// Use this group for development
-_undf: .word __undf // undefined
-_swi: .word __swi // SWI
-_pabt: .word __pabt // program abort
-_dabt: .word __dabt // data abort
-_irq: .word __irq // IRQ
-_fiq: .word __fiq // FIQ
-
-__undf: b . // undefined
-__swi: b . // SWI
-__pabt: b . // program abort
-__dabt: b . // data abort
-__irq: b . // IRQ
-__fiq: b . // FIQ
-#endif
- .size _boot, . - _boot
- .endfunc
-
-
-// Setup the operating mode & stack.
-// ---------------------------------
- .global _start, start, _mainCRTStartup
- .func _start
-
-_start:
-start:
-_mainCRTStartup:
-
-// Initialize Interrupt System
-// - Set stack location for each mode
-// - Leave in System Mode with Interrupts Disabled
-// -----------------------------------------------
- ldr r0,=_stack
- msr CPSR_c,#MODE_UND|I_BIT|F_BIT // Undefined Instruction Mode
- mov sp,r0
- sub r0,r0,#UND_STACK_SIZE
- msr CPSR_c,#MODE_ABT|I_BIT|F_BIT // Abort Mode
- mov sp,r0
- sub r0,r0,#ABT_STACK_SIZE
- msr CPSR_c,#MODE_FIQ|I_BIT|F_BIT // FIQ Mode
- mov sp,r0
- sub r0,r0,#FIQ_STACK_SIZE
- msr CPSR_c,#MODE_IRQ|I_BIT|F_BIT // IRQ Mode
- mov sp,r0
- sub r0,r0,#IRQ_STACK_SIZE
- msr CPSR_c,#MODE_SVC|I_BIT|F_BIT // Supervisor Mode
- mov sp,r0
- sub r0,r0,#SVC_STACK_SIZE
- msr CPSR_c,#MODE_SYS|I_BIT|F_BIT // System Mode
- mov sp,r0
-
-// Copy initialized data to its execution address in RAM
-// -----------------------------------------------------
-#ifdef ROM_RUN
- ldr r1,=_etext // -> ROM data start
- ldr r2,=_data // -> data start
- ldr r3,=_edata // -> end of data
-1: cmp r2,r3 // check if data to move
- ldrlo r0,[r1],#4 // copy it
- strlo r0,[r2],#4
- blo 1b // loop until done
-#endif
-// Clear .bss
-// ----------
- mov r0,#0 // get a zero
- ldr r1,=__bss_start // -> bss start
- ldr r2,=__bss_end__ // -> bss end
-2: cmp r1,r2 // check if data to clear
- strlo r0,[r1],#4 // clear 4 bytes
- blo 2b // loop until done
-
-/*
- Call C++ constructors (for objects in "global scope")
- ctor loop added by Martin Thomas 4/2005
- based on a Anglia Design example-application for ST ARM
-*/
-
- LDR r0, =__ctors_start__
- LDR r1, =__ctors_end__
-ctor_loop:
- CMP r0, r1
- BEQ ctor_end
- LDR r2, [r0], #4
- STMFD sp!, {r0-r1}
- MOV lr, pc
- MOV pc, r2
- LDMFD sp!, {r0-r1}
- B ctor_loop
-ctor_end:
-
-// Call main program: main(0)
-// --------------------------
- mov r0,#0 // no arguments (argc = 0)
- mov r1,r0
- mov r2,r0
- mov fp,r0 // null frame pointer
- mov r7,r0 // null frame pointer for thumb
- ldr r10,=main
- mov lr,pc
-
-/* Enter the C code, use BX instruction so as to never return */
-/* use BLX (?) main if you want to use c++ destructors below */
-
- bx r10 // enter main()
-
-/* "global object"-dtors are never called and it should not be
- needed since there is no OS to exit to. */
-/* Call destructors */
-# LDR r0, =__dtors_start__
-# LDR r1, =__dtors_end__
-dtor_loop:
-# CMP r0, r1
-# BEQ dtor_end
-# LDR r2, [r0], #4
-# STMFD sp!, {r0-r1}
-# MOV lr, pc
-# MOV pc, r2
-# LDMFD sp!, {r0-r1}
-# B dtor_loop
-dtor_end:
-
- .size _start, . - _start
- .endfunc
-
- .global _reset, reset, exit, abort
- .func _reset
-_reset:
-reset:
-exit:
-abort:
-#if 0
-// Disable interrupts, then force a hardware reset by driving P23 low
-// -------------------------------------------------------------------
- mrs r0,cpsr // get PSR
- orr r0,r0,#I_BIT|F_BIT // disable IRQ and FIQ
- msr cpsr,r0 // set up status register
-
- ldr r1,=(PS_BASE) // PS Base Address
- ldr r0,=(PS_PIO) // PIO Module
- str r0,[r1,#PS_PCER_OFF] // enable its clock
- ldr r1,=(PIO_BASE) // PIO Base Address
- ldr r0,=(1<<23) // P23
- str r0,[r1,#PIO_PER_OFF] // make sure pin is contolled by PIO
- str r0,[r1,#PIO_CODR_OFF] // set the pin low
- str r0,[r1,#PIO_OER_OFF] // make it an output
-#endif
- b . // loop until reset
-
- .size _reset, . - _reset
- .endfunc
-
- .end
diff --git a/sw/airborne/arch/lpc21/test/dev_board.h b/sw/airborne/arch/lpc21/test/dev_board.h
deleted file mode 100644
index c3cbc3c3b9..0000000000
--- a/sw/airborne/arch/lpc21/test/dev_board.h
+++ /dev/null
@@ -1,49 +0,0 @@
-#ifndef DEV_BOARD_H
-#define DEV_BOARD_H
-
-// olimex LPC-P2138:
-
-#define FOSC 14745600
-#define PLL_MUL 4
-
-#if 1 // DEV_BOARD_TYPE
-// OLIMEX
-
-// LEDs on P0.12/P0.13 (active low)
-#define LED1PIN 12
-#define LED2PIN 13
-
-// define LED-Pins as outputs
-#define LED_INIT() { IODIR0 |= (1<> 8) & 0xFF;
- U0LCR &= ~0x80;
-
- PINSEL0 = PINSEL0 & ~0xF | 0x5;
-}
-
-void uart0_print_hex(const unsigned char c)
-{
- const unsigned char hex[16] = { '0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
- };
- unsigned char high = (c & 0xF0) >> 4;
- unsigned char low = c & 0x0F;
- uart0_transmit(hex[high]);
- uart0_transmit(hex[low]);
-}
-
-void uart0_transmit(unsigned char ch0)
-{
- //when U0LSR_bit.THRE is 0 - U0THR contains valid data.
- // while (U0LSR_bit.THRE == 0);
- while (!(U0LSR & (1 << 5)));
- U0THR = ch0;
-}
-
diff --git a/sw/airborne/arch/lpc21/test/uart_tunnel.c b/sw/airborne/arch/lpc21/test/uart_tunnel.c
deleted file mode 100644
index cb32afa7e8..0000000000
--- a/sw/airborne/arch/lpc21/test/uart_tunnel.c
+++ /dev/null
@@ -1,29 +0,0 @@
-
-#include "lpc2138.h"
-
-#define TXD0_PIN 0
-#define RXD0_PIN 1
-#define TXD1_PIN 8
-#define RXD1_PIN 9
-
-int main(int argc, char **argv)
-{
- /* TXD0 and TXD1 output */
- IODIR0 |= (1 << TXD0_PIN) | (1 << TXD1_PIN);
- /* RXD0 and RXD1 input */
- IODIR0 &= ~((1 << RXD0_PIN) | (1 << RXD1_PIN));
-
- while (1) {
- if (IOPIN0 & (1 << RXD0_PIN)) {
- IOSET0 = (1 << TXD1_PIN);
- } else {
- IOCLR0 = (1 << TXD1_PIN);
- }
- if (IOPIN0 & (1 << RXD1_PIN)) {
- IOSET0 = (1 << TXD0_PIN);
- } else {
- IOCLR0 = (1 << TXD0_PIN);
- }
- }
- return 0;
-}
diff --git a/sw/airborne/arch/lpc21/test/welcome.h b/sw/airborne/arch/lpc21/test/welcome.h
deleted file mode 100644
index c394c7841b..0000000000
--- a/sw/airborne/arch/lpc21/test/welcome.h
+++ /dev/null
@@ -1,2939 +0,0 @@
-unsigned short dat_len = 29349;
-static const unsigned short dat_short[29349] = {
- 552 ,
- 532 , 532 , 567 , 477 , 442 , 502 , 492 , 482 , 607 , 557 ,
- 437 , 492 , 512 , 497 , 552 , 577 , 502 , 462 , 482 , 487 ,
- 492 , 587 , 562 , 542 , 562 , 397 , 402 , 532 , 502 , 512 ,
- 587 , 592 , 537 , 537 , 542 , 487 , 482 , 497 , 492 , 527 ,
- 502 , 537 , 572 , 477 , 602 , 532 , 432 , 507 , 432 , 442 ,
- 542 , 577 , 497 , 487 , 487 , 427 , 512 , 587 , 542 , 487 ,
- 432 , 372 , 447 , 577 , 597 , 582 , 527 , 442 , 432 , 487 ,
- 507 , 527 , 577 , 572 , 502 , 462 , 442 , 432 , 522 , 597 ,
- 582 , 587 , 522 , 387 , 452 , 532 , 557 , 572 , 522 , 542 ,
- 507 , 517 , 492 , 482 , 392 , 517 , 897 , 567 , 162 , 277 ,
- 337 , 522 , 802 , 877 , 662 , 412 , 277 , 237 , 372 , 627 ,
- 587 , 487 , 567 , 562 , 557 , 607 , 602 , 472 , 422 , 447 ,
- 467 , 562 , 627 , 592 , 567 , 537 , 482 , 437 , 407 , 377 ,
- 382 , 452 , 527 , 562 , 567 , 557 , 507 , 477 , 472 , 457 ,
- 472 , 522 , 512 , 517 , 587 , 577 , 537 , 517 , 507 , 492 ,
- 472 , 472 , 497 , 597 , 547 , 407 , 492 , 512 , 537 , 642 ,
- 607 , 472 , 392 , 432 , 462 , 527 , 607 , 552 , 527 , 557 ,
- 512 , 452 , 447 , 462 , 497 , 562 , 557 , 492 , 467 , 432 ,
- 462 , 587 , 567 , 467 , 502 , 517 , 547 , 562 , 487 , 487 ,
- 512 , 587 , 537 , 457 , 532 , 467 , 387 , 562 , 857 , 612 ,
- 227 , 337 , 362 , 437 , 752 , 812 , 592 , 402 , 397 , 307 ,
- 327 , 562 , 497 , 462 , 592 , 587 , 532 , 522 , 527 , 447 ,
- 477 , 537 , 452 , 452 , 512 , 527 , 587 , 622 , 562 , 477 ,
- 447 , 447 , 452 , 492 , 532 , 537 , 577 , 612 , 582 , 537 ,
- 507 , 482 , 482 , 502 , 527 , 532 , 547 , 542 , 512 , 517 ,
- 572 , 537 , 362 , 347 , 497 , 547 , 587 , 607 , 477 , 392 ,
- 442 , 467 , 467 , 512 , 532 , 542 , 607 , 572 , 462 , 442 ,
- 482 , 517 , 557 , 542 , 427 , 382 , 482 , 542 , 562 , 577 ,
- 522 , 457 , 517 , 502 , 392 , 477 , 587 , 547 , 577 , 582 ,
- 477 , 472 , 592 , 557 , 477 , 482 , 487 , 732 , 682 , 267 ,
- 307 , 462 , 512 , 712 , 792 , 587 , 377 , 407 , 402 , 297 ,
- 447 , 502 , 482 , 642 , 672 , 552 , 437 , 482 , 527 , 492 ,
- 507 , 422 , 397 , 517 , 582 , 602 , 547 , 502 , 502 , 472 ,
- 487 , 442 , 432 , 482 , 512 , 582 , 592 , 562 , 572 , 547 ,
- 517 , 497 , 477 , 482 , 527 , 582 , 562 , 582 , 507 , 337 ,
- 462 , 577 , 527 , 567 , 527 , 417 , 392 , 457 , 462 , 442 ,
- 547 , 587 , 547 , 552 , 487 , 462 , 517 , 537 , 527 , 532 ,
- 522 , 497 , 487 , 532 , 522 , 512 , 537 , 532 , 462 , 472 ,
- 497 , 447 , 497 , 547 , 502 , 567 , 602 , 462 , 452 , 527 ,
- 437 , 577 , 652 , 502 , 432 , 507 , 712 , 722 , 257 , 217 ,
- 457 , 472 , 637 , 762 , 672 , 522 , 512 , 477 , 227 , 267 ,
- 412 , 417 , 612 , 702 , 602 , 497 , 537 , 587 , 487 , 437 ,
- 392 , 377 , 467 , 532 , 557 , 572 , 582 , 582 , 532 , 447 ,
- 387 , 392 , 472 , 562 , 562 , 577 , 622 , 612 , 592 , 557 ,
- 492 , 482 , 502 , 587 , 572 , 562 , 522 , 407 , 512 , 582 ,
- 542 , 517 , 467 , 472 , 432 , 402 , 412 , 412 , 517 , 567 ,
- 547 , 512 , 432 , 457 , 512 , 542 , 512 , 502 , 507 , 482 ,
- 522 , 527 , 467 , 542 , 557 , 477 , 482 , 517 , 512 , 512 ,
- 492 , 507 , 487 , 532 , 497 , 502 , 567 , 502 , 587 , 607 ,
- 522 , 472 , 362 , 532 , 812 , 612 , 197 , 382 , 612 , 482 ,
- 642 , 722 , 522 , 542 , 612 , 397 , 247 , 407 , 462 , 497 ,
- 607 , 567 , 522 , 572 , 617 , 537 , 462 , 432 , 372 , 437 ,
- 487 , 432 , 507 , 592 , 577 , 542 , 482 , 437 , 397 , 427 ,
- 462 , 447 , 507 , 617 , 617 , 622 , 602 , 557 , 532 , 502 ,
- 532 , 492 , 472 , 562 , 507 , 487 , 642 , 577 , 512 , 497 ,
- 422 , 362 , 372 , 462 , 412 , 467 , 622 , 562 , 547 , 547 ,
- 437 , 482 , 522 , 502 , 497 , 527 , 537 , 572 , 552 , 512 ,
- 507 , 487 , 522 , 517 , 477 , 482 , 507 , 557 , 577 , 497 ,
- 427 , 537 , 552 , 432 , 552 , 602 , 477 , 577 , 512 , 387 ,
- 552 , 857 , 457 , 122 , 547 , 527 , 432 , 642 , 607 , 557 ,
- 537 , 562 , 337 , 217 , 517 , 487 , 437 , 622 , 552 , 532 ,
- 607 , 602 , 497 , 422 , 482 , 412 , 442 , 492 , 442 , 562 ,
- 582 , 547 , 527 , 432 , 507 , 457 , 432 , 522 , 447 , 542 ,
- 632 , 552 , 602 , 582 , 552 , 617 , 577 , 497 , 472 , 562 ,
- 597 , 477 , 452 , 502 , 552 , 572 , 527 , 487 , 412 , 432 ,
- 432 , 397 , 432 , 487 , 522 , 577 , 537 , 492 , 567 , 552 ,
- 477 , 462 , 457 , 507 , 512 , 492 , 502 , 532 , 537 , 472 ,
- 502 , 547 , 422 , 462 , 577 , 487 , 482 , 492 , 577 , 507 ,
- 442 , 647 , 487 , 447 , 712 , 477 , 377 , 742 , 782 , 337 ,
- 257 , 592 , 497 , 472 , 642 , 562 , 562 , 607 , 552 , 347 ,
- 327 , 502 , 452 , 472 , 547 , 492 , 582 , 632 , 592 , 512 ,
- 442 , 467 , 422 , 427 , 432 , 427 , 527 , 577 , 532 , 512 ,
- 512 , 507 , 457 , 462 , 447 , 422 , 512 , 582 , 577 , 597 ,
- 637 , 627 , 577 , 532 , 477 , 492 , 527 , 492 , 502 , 492 ,
- 482 , 577 , 567 , 472 , 477 , 477 , 432 , 412 , 422 , 457 ,
- 497 , 562 , 587 , 517 , 537 , 577 , 502 , 497 , 477 , 467 ,
- 527 , 527 , 492 , 512 , 537 , 472 , 507 , 527 , 437 , 442 ,
- 557 , 572 , 447 , 492 , 552 , 462 , 527 , 617 , 507 , 472 ,
- 577 , 547 , 497 , 792 , 602 , 197 , 492 , 557 , 392 , 587 ,
- 647 , 567 , 557 , 642 , 467 , 237 , 417 , 422 , 412 , 547 ,
- 547 , 522 , 552 , 672 , 602 , 442 , 452 , 412 , 417 , 447 ,
- 412 , 452 , 477 , 572 , 587 , 497 , 512 , 482 , 477 , 487 ,
- 437 , 457 , 487 , 572 , 617 , 597 , 632 , 602 , 587 , 567 ,
- 532 , 562 , 512 , 472 , 477 , 477 , 517 , 527 , 522 , 532 ,
- 487 , 467 , 457 , 427 , 432 , 477 , 507 , 527 , 572 , 582 ,
- 567 , 577 , 542 , 512 , 477 , 462 , 472 , 452 , 467 , 507 ,
- 497 , 502 , 502 , 477 , 457 , 452 , 477 , 452 , 462 , 522 ,
- 502 , 502 , 562 , 547 , 532 , 562 , 567 , 532 , 467 , 572 ,
- 702 , 502 , 407 , 487 , 447 , 477 , 587 , 652 , 577 , 497 ,
- 552 , 517 , 402 , 417 , 447 , 437 , 432 , 512 , 582 , 527 ,
- 592 , 627 , 532 , 492 , 507 , 507 , 452 , 452 , 497 , 447 ,
- 437 , 507 , 497 , 487 , 497 , 512 , 502 , 477 , 522 , 542 ,
- 532 , 587 , 607 , 562 , 572 , 582 , 542 , 542 , 542 , 547 ,
- 532 , 487 , 497 , 477 , 452 , 467 , 467 , 452 , 432 , 432 ,
- 452 , 447 , 457 , 497 , 497 , 512 , 522 , 547 , 572 , 537 ,
- 542 , 567 , 557 , 552 , 522 , 512 , 512 , 482 , 467 , 472 ,
- 482 , 477 , 487 , 482 , 477 , 457 , 462 , 512 , 507 , 497 ,
- 537 , 532 , 567 , 587 , 557 , 587 , 592 , 572 , 562 , 527 ,
- 567 , 587 , 502 , 462 , 522 , 507 , 447 , 527 , 552 , 472 ,
- 452 , 497 , 487 , 417 , 467 , 497 , 437 , 457 , 462 , 437 ,
- 452 , 512 , 567 , 522 , 507 , 552 , 492 , 467 , 552 , 497 ,
- 487 , 547 , 537 , 527 , 502 , 497 , 517 , 462 , 472 , 507 ,
- 492 , 522 , 527 , 532 , 572 , 567 , 552 , 592 , 597 , 582 ,
- 567 , 587 , 602 , 537 , 537 , 527 , 462 , 457 , 452 , 432 ,
- 427 , 437 , 437 , 412 , 422 , 432 , 417 , 437 , 492 , 487 ,
- 517 , 567 , 582 , 577 , 577 , 602 , 592 , 552 , 557 , 587 ,
- 542 , 537 , 567 , 502 , 462 , 467 , 432 , 412 , 442 , 432 ,
- 402 , 442 , 492 , 472 , 467 , 512 , 527 , 507 , 552 , 587 ,
- 557 , 567 , 582 , 622 , 622 , 552 , 532 , 547 , 547 , 502 ,
- 537 , 572 , 472 , 452 , 487 , 442 , 407 , 467 , 497 , 432 ,
- 432 , 512 , 487 , 447 , 517 , 512 , 472 , 497 , 532 , 517 ,
- 482 , 547 , 582 , 527 , 537 , 552 , 527 , 502 , 502 , 512 ,
- 462 , 462 , 512 , 512 , 512 , 527 , 537 , 542 , 567 , 587 ,
- 577 , 582 , 607 , 592 , 577 , 572 , 562 , 512 , 472 , 502 ,
- 467 , 432 , 432 , 407 , 392 , 362 , 382 , 382 , 372 , 402 ,
- 417 , 442 , 467 , 492 , 532 , 547 , 572 , 597 , 612 , 612 ,
- 607 , 627 , 627 , 612 , 607 , 587 , 552 , 517 , 487 , 472 ,
- 457 , 462 , 462 , 437 , 442 , 457 , 442 , 452 , 467 , 492 ,
- 512 , 537 , 572 , 562 , 582 , 627 , 597 , 577 , 557 , 547 ,
- 602 , 547 , 467 , 502 , 507 , 492 , 467 , 502 , 477 , 402 ,
- 432 , 452 , 412 , 432 , 482 , 467 , 427 , 462 , 512 , 452 ,
- 457 , 557 , 547 , 512 , 547 , 542 , 492 , 492 , 532 , 497 ,
- 472 , 517 , 522 , 532 , 542 , 552 , 547 , 502 , 527 , 522 ,
- 497 , 552 , 567 , 587 , 622 , 602 , 637 , 637 , 587 , 627 ,
- 597 , 527 , 532 , 547 , 517 , 447 , 452 , 447 , 337 , 337 ,
- 362 , 297 , 307 , 362 , 372 , 357 , 402 , 482 , 442 , 462 ,
- 572 , 557 , 557 , 617 , 652 , 637 , 637 , 702 , 652 , 612 ,
- 622 , 592 , 552 , 537 , 497 , 472 , 447 , 452 , 432 , 412 ,
- 422 , 422 , 452 , 442 , 457 , 552 , 522 , 507 , 582 , 532 ,
- 492 , 557 , 612 , 577 , 537 , 587 , 557 , 617 , 592 , 432 ,
- 487 , 527 , 452 , 462 , 557 , 557 , 427 , 447 , 542 , 417 ,
- 412 , 517 , 432 , 402 , 482 , 532 , 437 , 457 , 587 , 467 ,
- 417 , 512 , 482 , 442 , 477 , 522 , 492 , 467 , 557 , 552 ,
- 512 , 577 , 572 , 572 , 587 , 557 , 622 , 637 , 582 , 597 ,
- 637 , 637 , 557 , 612 , 732 , 497 , 387 , 592 , 497 , 372 ,
- 457 , 452 , 317 , 327 , 482 , 327 , 207 , 377 , 337 , 267 ,
- 407 , 432 , 427 , 487 , 622 , 627 , 532 , 602 , 582 , 582 ,
- 672 , 622 , 612 , 627 , 612 , 637 , 622 , 622 , 607 , 532 ,
- 532 , 487 , 382 , 417 , 462 , 442 , 537 , 592 , 522 , 487 ,
- 572 , 507 , 432 , 447 , 317 , 407 , 532 , 597 , 672 , 527 ,
- 542 , 492 , 412 , 617 , 562 , 247 , 277 , 592 , 587 , 512 ,
- 722 , 617 , 482 , 582 , 477 , 297 , 267 , 397 , 452 , 457 ,
- 577 , 462 , 427 , 562 , 492 , 472 , 462 , 432 , 422 , 527 ,
- 617 , 482 , 557 , 692 , 547 , 597 , 702 , 497 , 472 , 657 ,
- 627 , 517 , 672 , 682 , 537 , 672 , 617 , 462 , 542 , 567 ,
- 417 , 482 , 602 , 347 , 377 , 562 , 327 , 367 , 487 , 297 ,
- 307 , 442 , 402 , 287 , 422 , 497 , 407 , 537 , 552 , 457 ,
- 577 , 562 , 492 , 552 , 582 , 587 , 607 , 657 , 577 , 572 ,
- 642 , 552 , 587 , 602 , 497 , 492 , 462 , 457 , 462 , 647 ,
- 587 , 502 , 582 , 492 , 482 , 382 , 447 , 442 , 327 , 622 ,
- 522 , 437 , 682 , 552 , 422 , 567 , 532 , 217 , 432 , 702 ,
- 407 , 587 , 812 , 447 , 477 , 592 , 517 , 327 , 417 , 612 ,
- 347 , 482 , 582 , 407 , 527 , 547 , 442 , 382 , 437 , 437 ,
- 347 , 552 , 587 , 512 , 647 , 637 , 537 , 497 , 582 , 562 ,
- 467 , 607 , 547 , 467 , 622 , 627 , 522 , 527 , 577 , 522 ,
- 497 , 502 , 477 , 562 , 542 , 427 , 577 , 567 , 422 , 462 ,
- 472 , 497 , 442 , 407 , 442 , 407 , 447 , 497 , 452 , 387 ,
- 482 , 487 , 387 , 482 , 512 , 487 , 557 , 602 , 592 , 552 ,
- 592 , 542 , 577 , 682 , 537 , 567 , 577 , 507 , 637 , 637 ,
- 537 , 462 , 512 , 517 , 347 , 512 , 647 , 387 , 417 , 532 ,
- 502 , 382 , 427 , 542 , 407 , 617 , 562 , 277 , 477 , 487 ,
- 467 , 467 , 592 , 622 , 387 , 647 , 547 , 377 , 572 , 492 ,
- 442 , 587 , 587 , 432 , 462 , 627 , 562 , 427 , 577 , 582 ,
- 417 , 587 , 522 , 277 , 522 , 567 , 397 , 557 , 577 , 432 ,
- 532 , 562 , 447 , 552 , 562 , 482 , 582 , 577 , 497 , 567 ,
- 607 , 557 , 497 , 597 , 512 , 422 , 607 , 457 , 442 , 692 ,
- 487 , 412 , 547 , 517 , 357 , 477 , 657 , 307 , 362 , 702 ,
- 392 , 412 , 612 , 432 , 427 , 547 , 442 , 297 , 517 , 567 ,
- 437 , 577 , 527 , 512 , 592 , 477 , 447 , 552 , 567 , 487 ,
- 587 , 672 , 462 , 572 , 732 , 532 , 502 , 597 , 487 , 467 ,
- 597 , 462 , 452 , 652 , 587 , 372 , 432 , 557 , 372 , 412 ,
- 522 , 447 , 497 , 442 , 517 , 522 , 582 , 537 , 277 , 447 ,
- 587 , 347 , 597 , 702 , 492 , 662 , 527 , 397 , 562 , 712 ,
- 477 , 287 , 792 , 522 , 142 , 632 , 722 , 267 , 452 , 802 ,
- 407 , 382 , 692 , 327 , 267 , 622 , 532 , 277 , 482 , 632 ,
- 472 , 597 , 622 , 452 , 557 , 592 , 472 , 442 , 527 , 532 ,
- 527 , 622 , 557 , 452 , 587 , 612 , 432 , 457 , 602 , 482 ,
- 417 , 532 , 507 , 472 , 582 , 602 , 452 , 427 , 547 , 467 ,
- 427 , 542 , 507 , 482 , 537 , 517 , 427 , 432 , 522 , 512 ,
- 522 , 577 , 467 , 487 , 577 , 487 , 442 , 527 , 557 , 507 ,
- 537 , 502 , 437 , 567 , 597 , 522 , 552 , 517 , 527 , 482 ,
- 357 , 492 , 557 , 517 , 547 , 512 , 562 , 427 , 437 , 552 ,
- 442 , 492 , 577 , 612 , 442 , 377 , 587 , 492 , 487 , 637 ,
- 432 , 412 , 702 , 622 , 347 , 552 , 672 , 337 , 587 , 762 ,
- 327 , 372 , 607 , 527 , 452 , 617 , 587 , 422 , 567 , 567 ,
- 327 , 412 , 537 , 382 , 497 , 572 , 462 , 472 , 547 , 527 ,
- 507 , 532 , 517 , 582 , 492 , 367 , 577 , 572 , 392 , 527 ,
- 647 , 517 , 452 , 582 , 487 , 357 , 622 , 652 , 357 , 462 ,
- 682 , 507 , 467 , 627 , 437 , 452 , 672 , 467 , 372 , 537 ,
- 522 , 442 , 497 , 477 , 437 , 527 , 527 , 442 , 472 , 527 ,
- 502 , 522 , 532 , 507 , 542 , 602 , 537 , 507 , 567 , 567 ,
- 557 , 552 , 527 , 522 , 532 , 507 , 547 , 522 , 452 , 527 ,
- 537 , 412 , 447 , 422 , 437 , 632 , 387 , 382 , 672 , 442 ,
- 447 , 692 , 427 , 287 , 547 , 572 , 477 , 552 , 572 , 522 ,
- 612 , 692 , 437 , 297 , 567 , 562 , 507 , 637 , 622 , 532 ,
- 562 , 547 , 367 , 397 , 432 , 387 , 457 , 502 , 477 , 502 ,
- 627 , 552 , 452 , 547 , 517 , 337 , 437 , 542 , 467 , 562 ,
- 672 , 587 , 517 , 532 , 522 , 492 , 457 , 487 , 572 , 562 ,
- 567 , 587 , 552 , 562 , 532 , 502 , 527 , 472 , 542 , 552 ,
- 407 , 552 , 602 , 417 , 387 , 442 , 467 , 432 , 417 , 452 ,
- 472 , 507 , 522 , 487 , 447 , 467 , 532 , 517 , 517 , 552 ,
- 597 , 632 , 547 , 567 , 537 , 497 , 572 , 492 , 527 , 562 ,
- 427 , 547 , 542 , 422 , 472 , 467 , 467 , 542 , 492 , 567 ,
- 572 , 287 , 552 , 557 , 237 , 602 , 632 , 507 , 702 , 522 ,
- 317 , 447 , 802 , 792 , 297 , 297 , 522 , 502 , 602 , 622 ,
- 607 , 622 , 702 , 522 , 267 , 387 , 337 , 452 , 567 , 387 ,
- 477 , 607 , 552 , 462 , 487 , 457 , 347 , 482 , 462 , 307 ,
- 532 , 637 , 507 , 532 , 587 , 522 , 452 , 517 , 487 , 497 ,
- 607 , 637 , 602 , 587 , 587 , 562 , 567 , 517 , 557 , 622 ,
- 512 , 467 , 592 , 472 , 287 , 582 , 567 , 327 , 537 , 552 ,
- 327 , 417 , 522 , 357 , 392 , 602 , 492 , 457 , 587 , 542 ,
- 512 , 567 , 492 , 467 , 582 , 547 , 497 , 607 , 592 , 502 ,
- 547 , 492 , 432 , 502 , 592 , 512 , 482 , 547 , 492 , 467 ,
- 412 , 437 , 527 , 492 , 557 , 572 , 557 , 502 , 472 , 507 ,
- 452 , 522 , 447 , 297 , 802 , 917 , 227 , 277 , 587 , 402 ,
- 512 , 752 , 632 , 522 , 692 , 552 , 182 , 387 , 482 , 412 ,
- 562 , 587 , 497 , 502 , 602 , 517 , 422 , 497 , 412 , 412 ,
- 512 , 467 , 467 , 557 , 602 , 547 , 517 , 527 , 417 , 472 ,
- 547 , 447 , 512 , 672 , 612 , 577 , 682 , 587 , 462 , 557 ,
- 557 , 447 , 507 , 587 , 517 , 537 , 567 , 437 , 397 , 527 ,
- 457 , 347 , 427 , 432 , 462 , 522 , 467 , 402 , 482 , 537 ,
- 412 , 447 , 562 , 537 , 577 , 607 , 512 , 507 , 582 , 542 ,
- 482 , 532 , 532 , 487 , 537 , 537 , 492 , 492 , 527 , 542 ,
- 482 , 547 , 537 , 482 , 492 , 527 , 577 , 537 , 637 , 522 ,
- 467 , 642 , 397 , 472 , 627 , 417 , 367 , 702 , 837 , 277 ,
- 257 , 532 , 317 , 547 , 682 , 497 , 517 , 602 , 507 , 207 ,
- 347 , 432 , 367 , 622 , 612 , 527 , 577 , 612 , 572 , 447 ,
- 497 , 412 , 422 , 567 , 477 , 517 , 597 , 602 , 587 , 507 ,
- 462 , 427 , 462 , 482 , 452 , 547 , 582 , 602 , 642 , 602 ,
- 562 , 507 , 512 , 517 , 472 , 517 , 557 , 532 , 557 , 507 ,
- 492 , 482 , 347 , 462 , 512 , 437 , 522 , 492 , 437 , 432 ,
- 452 , 457 , 457 , 522 , 557 , 582 , 592 , 537 , 502 , 502 ,
- 517 , 507 , 502 , 527 , 542 , 532 , 512 , 502 , 492 , 482 ,
- 497 , 502 , 492 , 492 , 547 , 512 , 442 , 517 , 607 , 607 ,
- 537 , 522 , 482 , 517 , 572 , 447 , 512 , 562 , 337 , 507 ,
- 897 , 537 , 207 , 467 , 492 , 382 , 642 , 662 , 407 , 537 ,
- 712 , 392 , 227 , 422 , 427 , 402 , 587 , 597 , 432 , 587 ,
- 722 , 542 , 497 , 502 , 397 , 422 , 537 , 492 , 467 , 592 ,
- 657 , 577 , 527 , 482 , 407 , 462 , 542 , 532 , 517 , 577 ,
- 617 , 577 , 582 , 532 , 462 , 512 , 597 , 497 , 447 , 592 ,
- 517 , 417 , 457 , 497 , 482 , 472 , 517 , 457 , 407 , 437 ,
- 397 , 392 , 447 , 492 , 517 , 547 , 562 , 532 , 537 , 537 ,
- 487 , 502 , 512 , 492 , 542 , 562 , 537 , 512 , 512 , 552 ,
- 542 , 512 , 517 , 542 , 517 , 512 , 502 , 512 , 592 , 532 ,
- 512 , 582 , 567 , 527 , 542 , 502 , 447 , 547 , 617 , 482 ,
- 447 , 662 , 662 , 337 , 307 , 477 , 422 , 487 , 657 , 602 ,
- 512 , 522 , 527 , 387 , 287 , 362 , 362 , 377 , 507 , 582 ,
- 582 , 572 , 607 , 587 , 492 , 457 , 402 , 402 , 457 , 497 ,
- 532 , 552 , 562 , 577 , 557 , 547 , 507 , 472 , 517 , 532 ,
- 567 , 612 , 617 , 612 , 582 , 587 , 567 , 522 , 522 , 512 ,
- 512 , 512 , 512 , 492 , 477 , 492 , 492 , 442 , 442 , 447 ,
- 442 , 432 , 427 , 447 , 462 , 482 , 497 , 492 , 487 , 507 ,
- 542 , 537 , 512 , 507 , 502 , 507 , 527 , 527 , 507 , 502 ,
- 527 , 532 , 522 , 517 , 517 , 532 , 537 , 532 , 497 , 482 ,
- 497 , 512 , 507 , 517 , 542 , 547 , 557 , 552 , 547 , 532 ,
- 542 , 527 , 522 , 557 , 557 , 532 , 537 , 547 , 517 , 502 ,
- 502 , 462 , 447 , 457 , 432 , 392 , 432 , 447 , 432 , 472 ,
- 507 , 487 , 502 , 537 , 497 , 492 , 537 , 527 , 517 , 537 ,
- 532 , 532 , 542 , 542 , 542 , 532 , 517 , 507 , 507 , 517 ,
- 527 , 512 , 532 , 557 , 552 , 527 , 532 , 532 , 527 , 542 ,
- 527 , 532 , 537 , 542 , 542 , 532 , 537 , 497 , 477 , 477 ,
- 452 , 447 , 452 , 432 , 452 , 467 , 447 , 442 , 467 , 467 ,
- 442 , 482 , 487 , 482 , 512 , 527 , 517 , 517 , 537 , 522 ,
- 527 , 542 , 557 , 552 , 557 , 552 , 542 , 552 , 557 , 547 ,
- 542 , 552 , 552 , 557 , 542 , 527 , 527 , 542 , 532 , 512 ,
- 522 , 517 , 517 , 517 , 497 , 482 , 482 , 492 , 467 , 467 ,
- 492 , 497 , 487 , 467 , 462 , 447 , 462 , 462 , 447 , 472 ,
- 492 , 492 , 502 , 487 , 477 , 472 , 482 , 507 , 507 , 527 ,
- 517 , 512 , 527 , 522 , 522 , 532 , 552 , 557 , 557 , 547 ,
- 542 , 532 , 542 , 547 , 542 , 542 , 547 , 567 , 547 , 527 ,
- 507 , 497 , 507 , 512 , 517 , 507 , 522 , 522 , 507 , 497 ,
- 477 , 482 , 487 , 497 , 497 , 492 , 487 , 497 , 497 , 487 ,
- 467 , 477 , 492 , 482 , 492 , 487 , 487 , 502 , 492 , 482 ,
- 502 , 522 , 502 , 512 , 532 , 507 , 497 , 497 , 512 , 517 ,
- 522 , 537 , 527 , 537 , 527 , 507 , 502 , 507 , 502 , 517 ,
- 542 , 537 , 542 , 547 , 537 , 517 , 502 , 512 , 527 , 527 ,
- 522 , 512 , 502 , 517 , 512 , 487 , 502 , 507 , 492 , 502 ,
- 512 , 502 , 482 , 492 , 497 , 502 , 502 , 512 , 522 , 522 ,
- 527 , 522 , 512 , 497 , 502 , 517 , 517 , 517 , 512 , 507 ,
- 512 , 507 , 492 , 502 , 517 , 522 , 527 , 527 , 517 , 512 ,
- 507 , 492 , 487 , 492 , 492 , 492 , 507 , 497 , 482 , 487 ,
- 482 , 482 , 487 , 507 , 512 , 507 , 512 , 517 , 497 , 497 ,
- 507 , 527 , 532 , 532 , 542 , 547 , 532 , 517 , 507 , 507 ,
- 527 , 527 , 522 , 527 , 512 , 517 , 517 , 502 , 502 , 522 ,
- 537 , 537 , 542 , 537 , 537 , 512 , 502 , 497 , 502 , 517 ,
- 517 , 517 , 512 , 522 , 502 , 472 , 477 , 492 , 492 , 497 ,
- 507 , 492 , 502 , 502 , 477 , 477 , 487 , 492 , 487 , 492 ,
- 497 , 497 , 492 , 472 , 477 , 497 , 497 , 507 , 517 , 512 ,
- 527 , 527 , 512 , 507 , 522 , 537 , 537 , 542 , 537 , 542 ,
- 537 , 507 , 507 , 517 , 532 , 542 , 547 , 552 , 537 , 532 ,
- 512 , 482 , 502 , 522 , 517 , 527 , 532 , 517 , 507 , 497 ,
- 477 , 467 , 482 , 502 , 502 , 492 , 512 , 502 , 467 , 482 ,
- 472 , 467 , 507 , 502 , 487 , 527 , 527 , 497 , 502 , 502 ,
- 492 , 517 , 537 , 512 , 532 , 527 , 502 , 517 , 487 , 497 ,
- 527 , 512 , 522 , 557 , 532 , 522 , 527 , 487 , 497 , 542 ,
- 532 , 512 , 547 , 552 , 502 , 497 , 487 , 482 , 497 , 517 ,
- 507 , 532 , 512 , 482 , 482 , 462 , 487 , 477 , 497 , 557 ,
- 562 , 457 , 512 , 552 , 462 , 467 , 492 , 517 , 522 , 532 ,
- 507 , 502 , 522 , 512 , 512 , 517 , 527 , 517 , 537 , 552 ,
- 517 , 507 , 512 , 487 , 447 , 542 , 522 , 497 , 557 , 537 ,
- 507 , 497 , 482 , 467 , 542 , 552 , 532 , 537 , 512 , 532 ,
- 462 , 462 , 497 , 482 , 512 , 527 , 487 , 487 , 492 , 427 ,
- 447 , 492 , 462 , 497 , 592 , 527 , 482 , 582 , 502 , 467 ,
- 522 , 522 , 527 , 587 , 582 , 472 , 532 , 557 , 472 , 472 ,
- 527 , 542 , 497 , 557 , 547 , 482 , 537 , 522 , 472 , 472 ,
- 542 , 552 , 512 , 532 , 527 , 507 , 507 , 497 , 462 , 487 ,
- 537 , 537 , 477 , 457 , 497 , 462 , 437 , 432 , 547 , 552 ,
- 482 , 497 , 532 , 512 , 462 , 482 , 507 , 492 , 547 , 562 ,
- 482 , 512 , 537 , 477 , 502 , 447 , 527 , 577 , 537 , 552 ,
- 517 , 537 , 512 , 507 , 467 , 487 , 632 , 552 , 532 , 547 ,
- 527 , 527 , 497 , 487 , 467 , 587 , 587 , 422 , 492 , 577 ,
- 472 , 407 , 502 , 512 , 467 , 577 , 512 , 457 , 567 , 512 ,
- 392 , 447 , 567 , 502 , 477 , 547 , 552 , 527 , 457 , 462 ,
- 467 , 457 , 522 , 517 , 462 , 562 , 572 , 477 , 477 , 542 ,
- 522 , 532 , 542 , 497 , 502 , 672 , 462 , 372 , 592 , 562 ,
- 412 , 512 , 622 , 472 , 517 , 567 , 392 , 547 , 557 , 407 ,
- 532 , 612 , 517 , 412 , 582 , 527 , 422 , 587 , 512 , 437 ,
- 582 , 577 , 362 , 502 , 562 , 367 , 432 , 602 , 482 , 507 ,
- 617 , 492 , 482 , 627 , 462 , 362 , 587 , 622 , 437 , 447 ,
- 722 , 577 , 317 , 587 , 562 , 397 , 517 , 522 , 442 , 557 ,
- 592 , 407 , 487 , 602 , 482 , 462 , 532 , 527 , 552 , 552 ,
- 417 , 432 , 602 , 497 , 362 , 507 , 637 , 477 , 412 , 502 ,
- 487 , 477 , 497 , 472 , 562 , 652 , 542 , 482 , 577 , 562 ,
- 472 , 487 , 507 , 527 , 552 , 512 , 457 , 497 , 537 , 422 ,
- 427 , 532 , 507 , 482 , 567 , 542 , 462 , 592 , 542 , 427 ,
- 602 , 557 , 527 , 507 , 552 , 497 , 452 , 602 , 407 , 447 ,
- 722 , 537 , 377 , 507 , 662 , 402 , 297 , 562 , 507 , 472 ,
- 472 , 547 , 527 , 527 , 487 , 362 , 507 , 542 , 422 , 477 ,
- 532 , 572 , 547 , 477 , 487 , 587 , 592 , 412 , 467 , 662 ,
- 537 , 407 , 517 , 572 , 517 , 467 , 467 , 537 , 617 , 507 ,
- 447 , 582 , 577 , 492 , 537 , 562 , 562 , 582 , 587 , 487 ,
- 492 , 562 , 462 , 417 , 467 , 517 , 432 , 427 , 467 , 452 ,
- 452 , 432 , 482 , 507 , 492 , 527 , 522 , 537 , 537 , 527 ,
- 512 , 522 , 587 , 537 , 522 , 582 , 602 , 482 , 422 , 597 ,
- 522 , 402 , 537 , 547 , 532 , 442 , 417 , 552 , 452 , 407 ,
- 482 , 492 , 522 , 507 , 477 , 552 , 547 , 487 , 457 , 592 ,
- 552 , 512 , 547 , 642 , 527 , 537 , 577 , 462 , 562 , 542 ,
- 432 , 517 , 597 , 437 , 432 , 612 , 477 , 467 , 602 , 437 ,
- 507 , 632 , 422 , 382 , 637 , 482 , 257 , 557 , 562 , 297 ,
- 462 , 557 , 392 , 482 , 522 , 457 , 567 , 622 , 512 , 577 ,
- 732 , 592 , 512 , 612 , 632 , 502 , 552 , 527 , 397 , 557 ,
- 487 , 297 , 462 , 512 , 382 , 347 , 522 , 492 , 417 , 497 ,
- 502 , 552 , 532 , 517 , 547 , 572 , 582 , 502 , 527 , 537 ,
- 527 , 517 , 472 , 532 , 547 , 487 , 487 , 492 , 532 , 512 ,
- 407 , 597 , 562 , 422 , 632 , 567 , 482 , 547 , 632 , 462 ,
- 432 , 702 , 522 , 407 , 552 , 577 , 442 , 507 , 542 , 482 ,
- 577 , 527 , 467 , 562 , 512 , 482 , 442 , 477 , 472 , 457 ,
- 462 , 432 , 512 , 517 , 457 , 447 , 507 , 522 , 397 , 492 ,
- 507 , 472 , 477 , 442 , 512 , 477 , 392 , 517 , 532 , 422 ,
- 492 , 637 , 507 , 487 , 682 , 582 , 562 , 712 , 647 , 582 ,
- 752 , 632 , 432 , 712 , 587 , 337 , 537 , 617 , 412 , 357 ,
- 542 , 452 , 387 , 432 , 377 , 482 , 447 , 392 , 467 , 542 ,
- 482 , 442 , 572 , 527 , 512 , 582 , 532 , 547 , 567 , 502 ,
- 472 , 512 , 512 , 437 , 457 , 532 , 477 , 437 , 432 , 512 ,
- 452 , 427 , 567 , 487 , 527 , 607 , 522 , 567 , 567 , 532 ,
- 557 , 552 , 682 , 567 , 462 , 627 , 587 , 392 , 487 , 562 ,
- 532 , 462 , 502 , 582 , 532 , 427 , 422 , 497 , 437 , 347 ,
- 467 , 487 , 502 , 497 , 517 , 552 , 532 , 517 , 447 , 532 ,
- 587 , 447 , 487 , 577 , 487 , 402 , 497 , 517 , 432 , 517 ,
- 522 , 462 , 577 , 542 , 462 , 592 , 692 , 532 , 607 , 792 ,
- 602 , 557 , 627 , 562 , 467 , 437 , 522 , 407 , 347 , 542 ,
- 347 , 377 , 447 , 277 , 442 , 497 , 362 , 472 , 617 , 492 ,
- 432 , 597 , 542 , 487 , 592 , 577 , 562 , 617 , 562 , 482 ,
- 527 , 532 , 442 , 482 , 537 , 487 , 522 , 537 , 477 , 477 ,
- 487 , 467 , 457 , 537 , 537 , 552 , 592 , 547 , 552 , 587 ,
- 502 , 577 , 617 , 502 , 592 , 702 , 502 , 337 , 612 , 522 ,
- 327 , 567 , 492 , 532 , 587 , 407 , 462 , 477 , 457 , 257 ,
- 422 , 547 , 327 , 447 , 472 , 432 , 487 , 452 , 437 , 552 ,
- 637 , 482 , 562 , 657 , 487 , 497 , 557 , 462 , 527 , 552 ,
- 462 , 522 , 567 , 457 , 447 , 547 , 562 , 517 , 602 , 692 ,
- 692 , 622 , 602 , 692 , 612 , 462 , 637 , 637 , 407 , 527 ,
- 522 , 357 , 327 , 327 , 432 , 307 , 317 , 517 , 462 , 367 ,
- 437 , 512 , 442 , 442 , 532 , 542 , 597 , 607 , 582 , 582 ,
- 542 , 507 , 482 , 457 , 492 , 552 , 517 , 492 , 512 , 482 ,
- 452 , 427 , 487 , 497 , 502 , 592 , 572 , 482 , 617 , 607 ,
- 437 , 632 , 627 , 537 , 597 , 602 , 597 , 482 , 527 , 477 ,
- 442 , 552 , 592 , 472 , 387 , 702 , 422 , 277 , 582 , 427 ,
- 482 , 472 , 492 , 552 , 467 , 417 , 327 , 512 , 427 , 327 ,
- 507 , 537 , 552 , 487 , 522 , 552 , 507 , 547 , 457 , 577 ,
- 672 , 537 , 547 , 577 , 547 , 447 , 437 , 527 , 512 , 497 ,
- 527 , 592 , 557 , 462 , 572 , 557 , 532 , 582 , 647 , 672 ,
- 562 , 557 , 557 , 482 , 492 , 412 , 422 , 532 , 357 , 447 ,
- 452 , 247 , 427 , 407 , 277 , 442 , 557 , 432 , 462 , 632 ,
- 507 , 472 , 587 , 542 , 572 , 662 , 612 , 597 , 617 , 537 ,
- 492 , 512 , 487 , 462 , 537 , 527 , 512 , 552 , 477 , 487 ,
- 482 , 457 , 507 , 542 , 572 , 577 , 622 , 577 , 507 , 562 ,
- 507 , 462 , 582 , 537 , 462 , 587 , 492 , 382 , 497 , 452 ,
- 417 , 452 , 557 , 572 , 337 , 482 , 612 , 347 , 377 , 552 ,
- 487 , 522 , 522 , 452 , 617 , 437 , 327 , 517 , 452 , 392 ,
- 537 , 572 , 492 , 567 , 622 , 417 , 482 , 662 , 502 , 507 ,
- 692 , 662 , 582 , 537 , 587 , 577 , 467 , 492 , 557 , 607 ,
- 537 , 502 , 622 , 537 , 412 , 447 , 562 , 552 , 477 , 572 ,
- 637 , 512 , 387 , 472 , 492 , 307 , 422 , 522 , 387 , 407 ,
- 422 , 347 , 357 , 377 , 377 , 417 , 512 , 517 , 552 , 567 ,
- 552 , 582 , 577 , 547 , 582 , 682 , 632 , 592 , 657 , 612 ,
- 487 , 487 , 547 , 497 , 497 , 557 , 562 , 537 , 467 , 472 ,
- 517 , 432 , 462 , 572 , 552 , 567 , 567 , 512 , 487 , 467 ,
- 512 , 407 , 472 , 602 , 477 , 472 , 552 , 507 , 412 , 507 ,
- 442 , 442 , 587 , 457 , 532 , 542 , 447 , 467 , 542 , 492 ,
- 362 , 582 , 572 , 327 , 537 , 532 , 327 , 492 , 607 , 337 ,
- 562 , 732 , 392 , 507 , 612 , 477 , 457 , 497 , 552 , 602 ,
- 657 , 552 , 587 , 672 , 497 , 472 , 552 , 562 , 527 , 557 ,
- 627 , 532 , 507 , 527 , 392 , 437 , 532 , 437 , 432 , 587 ,
- 497 , 422 , 522 , 447 , 437 , 447 , 492 , 527 , 452 , 472 ,
- 452 , 462 , 407 , 402 , 477 , 452 , 542 , 507 , 482 , 562 ,
- 492 , 502 , 527 , 557 , 612 , 617 , 632 , 622 , 617 , 587 ,
- 542 , 542 , 562 , 567 , 547 , 557 , 542 , 497 , 502 , 437 ,
- 462 , 472 , 452 , 497 , 512 , 522 , 422 , 452 , 487 , 347 ,
- 452 , 502 , 452 , 532 , 492 , 477 , 487 , 477 , 457 , 462 ,
- 542 , 547 , 527 , 582 , 552 , 517 , 542 , 482 , 467 , 562 ,
- 522 , 497 , 627 , 472 , 462 , 672 , 427 , 397 , 672 , 602 ,
- 427 , 592 , 642 , 432 , 512 , 542 , 432 , 542 , 562 , 447 ,
- 492 , 632 , 467 , 347 , 542 , 542 , 392 , 507 , 607 , 527 ,
- 547 , 537 , 502 , 547 , 472 , 482 , 512 , 552 , 527 , 442 ,
- 527 , 432 , 367 , 482 , 422 , 407 , 497 , 497 , 432 , 502 ,
- 557 , 417 , 502 , 612 , 522 , 567 , 617 , 577 , 572 , 547 ,
- 517 , 527 , 532 , 512 , 517 , 582 , 527 , 477 , 507 , 492 ,
- 467 , 492 , 522 , 527 , 547 , 562 , 522 , 532 , 572 , 467 ,
- 462 , 587 , 562 , 522 , 532 , 567 , 512 , 422 , 432 , 447 ,
- 422 , 457 , 472 , 567 , 462 , 452 , 567 , 402 , 432 , 517 ,
- 467 , 502 , 572 , 527 , 472 , 592 , 497 , 437 , 587 , 522 ,
- 527 , 617 , 497 , 512 , 632 , 442 , 452 , 632 , 487 , 507 ,
- 492 , 572 , 532 , 412 , 507 , 467 , 562 , 467 , 457 , 602 ,
- 462 , 482 , 482 , 457 , 522 , 447 , 477 , 597 , 502 , 467 ,
- 572 , 547 , 477 , 507 , 587 , 537 , 492 , 607 , 512 , 497 ,
- 562 , 512 , 472 , 527 , 557 , 512 , 477 , 502 , 512 , 472 ,
- 492 , 442 , 512 , 597 , 442 , 507 , 562 , 482 , 472 , 457 ,
- 507 , 512 , 527 , 507 , 487 , 567 , 487 , 442 , 517 , 507 ,
- 497 , 482 , 502 , 527 , 497 , 477 , 467 , 542 , 517 , 462 ,
- 517 , 557 , 507 , 472 , 517 , 532 , 507 , 517 , 547 , 577 ,
- 537 , 527 , 507 , 487 , 517 , 507 , 507 , 577 , 582 , 537 ,
- 572 , 567 , 477 , 462 , 537 , 507 , 432 , 577 , 592 , 472 ,
- 512 , 547 , 437 , 432 , 502 , 437 , 427 , 552 , 512 , 452 ,
- 492 , 542 , 502 , 397 , 537 , 572 , 482 , 457 , 552 , 542 ,
- 397 , 502 , 547 , 422 , 527 , 572 , 457 , 467 , 537 , 462 ,
- 437 , 497 , 547 , 532 , 582 , 572 , 572 , 572 , 502 , 507 ,
- 527 , 587 , 502 , 547 , 612 , 547 , 527 , 462 , 522 , 497 ,
- 417 , 527 , 527 , 487 , 552 , 512 , 457 , 507 , 517 , 462 ,
- 472 , 552 , 562 , 457 , 467 , 512 , 477 , 452 , 432 , 537 ,
- 507 , 462 , 497 , 497 , 472 , 442 , 522 , 522 , 502 , 632 ,
- 582 , 492 , 622 , 572 , 432 , 517 , 602 , 512 , 492 , 602 ,
- 517 , 492 , 517 , 422 , 482 , 512 , 477 , 497 , 542 , 527 ,
- 487 , 502 , 472 , 477 , 512 , 477 , 507 , 557 , 537 , 477 ,
- 502 , 502 , 442 , 457 , 487 , 502 , 537 , 517 , 487 , 527 ,
- 497 , 462 , 502 , 552 , 547 , 562 , 582 , 577 , 552 , 492 ,
- 507 , 547 , 472 , 522 , 537 , 462 , 582 , 527 , 412 , 542 ,
- 557 , 447 , 517 , 587 , 517 , 527 , 567 , 477 , 492 , 597 ,
- 447 , 392 , 627 , 537 , 392 , 467 , 552 , 442 , 357 , 537 ,
- 497 , 482 , 557 , 487 , 502 , 517 , 502 , 442 , 422 , 602 ,
- 562 , 442 , 582 , 552 , 487 , 467 , 427 , 497 , 492 , 497 ,
- 492 , 512 , 597 , 507 , 457 , 522 , 532 , 567 , 517 , 542 ,
- 617 , 557 , 577 , 512 , 497 , 597 , 522 , 502 , 527 , 547 ,
- 552 , 457 , 502 , 517 , 492 , 522 , 477 , 522 , 537 , 517 ,
- 492 , 457 , 502 , 497 , 477 , 477 , 482 , 517 , 487 , 417 ,
- 447 , 462 , 452 , 467 , 502 , 507 , 517 , 547 , 492 , 462 ,
- 522 , 532 , 487 , 507 , 572 , 572 , 517 , 507 , 527 , 507 ,
- 462 , 497 , 512 , 502 , 577 , 542 , 502 , 547 , 552 , 527 ,
- 517 , 542 , 582 , 572 , 552 , 552 , 532 , 557 , 537 , 482 ,
- 502 , 547 , 502 , 477 , 492 , 487 , 472 , 472 , 457 , 447 ,
- 492 , 492 , 462 , 462 , 487 , 497 , 482 , 497 , 507 , 497 ,
- 522 , 512 , 482 , 477 , 497 , 507 , 467 , 497 , 552 , 537 ,
- 507 , 547 , 557 , 492 , 522 , 552 , 487 , 527 , 567 , 567 ,
- 532 , 507 , 537 , 492 , 492 , 512 , 487 , 507 , 502 , 497 ,
- 507 , 482 , 517 , 512 , 507 , 537 , 532 , 542 , 542 , 532 ,
- 547 , 522 , 522 , 522 , 522 , 497 , 492 , 517 , 487 , 477 ,
- 497 , 492 , 477 , 507 , 502 , 492 , 492 , 487 , 507 , 497 ,
- 512 , 527 , 497 , 537 , 537 , 507 , 517 , 507 , 492 , 497 ,
- 477 , 502 , 502 , 472 , 517 , 522 , 522 , 502 , 487 , 512 ,
- 497 , 512 , 512 , 517 , 542 , 522 , 512 , 517 , 507 , 517 ,
- 512 , 492 , 507 , 497 , 482 , 507 , 517 , 522 , 507 , 527 ,
- 537 , 492 , 522 , 522 , 512 , 532 , 547 , 552 , 547 , 542 ,
- 537 , 517 , 497 , 492 , 507 , 497 , 517 , 517 , 527 , 522 ,
- 512 , 517 , 492 , 482 , 492 , 487 , 507 , 497 , 477 , 512 ,
- 502 , 492 , 482 , 487 , 482 , 467 , 482 , 492 , 482 , 502 ,
- 487 , 502 , 507 , 507 , 527 , 517 , 532 , 537 , 532 , 507 ,
- 547 , 537 , 512 , 542 , 542 , 512 , 497 , 517 , 507 , 482 ,
- 517 , 532 , 507 , 542 , 542 , 527 , 522 , 517 , 527 , 532 ,
- 527 , 542 , 542 , 532 , 517 , 502 , 482 , 477 , 467 , 462 ,
- 482 , 487 , 497 , 492 , 497 , 482 , 492 , 497 , 502 , 517 ,
- 522 , 537 , 532 , 522 , 522 , 502 , 487 , 502 , 487 , 502 ,
- 512 , 502 , 492 , 492 , 487 , 492 , 502 , 497 , 522 , 532 ,
- 517 , 512 , 512 , 512 , 512 , 507 , 517 , 532 , 532 , 522 ,
- 502 , 502 , 487 , 482 , 512 , 522 , 532 , 557 , 552 , 532 ,
- 537 , 527 , 522 , 522 , 522 , 542 , 547 , 542 , 522 , 502 ,
- 482 , 477 , 467 , 472 , 492 , 502 , 497 , 497 , 487 , 482 ,
- 477 , 457 , 487 , 517 , 522 , 547 , 537 , 532 , 517 , 492 ,
- 502 , 497 , 497 , 522 , 522 , 492 , 487 , 472 , 467 , 472 ,
- 482 , 497 , 527 , 532 , 532 , 542 , 527 , 512 , 522 , 522 ,
- 542 , 562 , 557 , 532 , 532 , 507 , 487 , 477 , 482 , 502 ,
- 517 , 522 , 522 , 512 , 507 , 487 , 472 , 497 , 507 , 527 ,
- 552 , 532 , 532 , 537 , 497 , 477 , 487 , 507 , 507 , 512 ,
- 527 , 522 , 507 , 487 , 487 , 497 , 482 , 507 , 537 , 542 ,
- 522 , 517 , 512 , 487 , 492 , 487 , 507 , 542 , 507 , 492 ,
- 497 , 487 , 462 , 452 , 512 , 532 , 537 , 547 , 532 , 552 ,
- 517 , 492 , 507 , 522 , 522 , 527 , 537 , 527 , 517 , 492 ,
- 467 , 452 , 477 , 482 , 487 , 522 , 527 , 512 , 502 , 502 ,
- 482 , 492 , 527 , 537 , 552 , 562 , 557 , 547 , 512 , 502 ,
- 512 , 507 , 502 , 527 , 522 , 502 , 492 , 492 , 492 , 502 ,
- 522 , 512 , 547 , 542 , 522 , 522 , 522 , 487 , 502 , 527 ,
- 517 , 522 , 522 , 507 , 472 , 442 , 457 , 467 , 452 , 492 ,
- 507 , 507 , 507 , 487 , 497 , 487 , 482 , 497 , 522 , 542 ,
- 547 , 542 , 532 , 512 , 507 , 492 , 502 , 502 , 532 , 547 ,
- 537 , 532 , 522 , 512 , 507 , 502 , 517 , 532 , 542 , 537 ,
- 517 , 522 , 507 , 497 , 492 , 487 , 512 , 522 , 497 , 497 ,
- 497 , 487 , 487 , 507 , 517 , 532 , 547 , 537 , 532 , 527 ,
- 497 , 517 , 502 , 502 , 537 , 517 , 512 , 492 , 487 , 477 ,
- 467 , 462 , 467 , 522 , 537 , 502 , 507 , 512 , 482 , 467 ,
- 502 , 512 , 517 , 582 , 572 , 512 , 537 , 527 , 457 , 462 ,
- 502 , 492 , 507 , 542 , 502 , 492 , 532 , 492 , 452 , 507 ,
- 532 , 517 , 532 , 547 , 532 , 532 , 512 , 477 , 492 , 547 ,
- 532 , 507 , 542 , 517 , 477 , 492 , 487 , 482 , 522 , 552 ,
- 532 , 517 , 522 , 522 , 487 , 502 , 502 , 507 , 552 , 532 ,
- 517 , 527 , 502 , 467 , 467 , 472 , 492 , 527 , 537 , 527 ,
- 522 , 522 , 467 , 472 , 472 , 487 , 517 , 542 , 542 , 502 ,
- 507 , 487 , 462 , 462 , 472 , 497 , 527 , 517 , 482 , 527 ,
- 502 , 462 , 512 , 522 , 527 , 577 , 567 , 542 , 572 , 532 ,
- 482 , 507 , 537 , 502 , 527 , 562 , 492 , 487 , 512 , 442 ,
- 442 , 522 , 522 , 517 , 567 , 527 , 497 , 532 , 492 , 472 ,
- 532 , 557 , 517 , 562 , 582 , 492 , 482 , 482 , 447 , 442 ,
- 487 , 517 , 497 , 527 , 522 , 477 , 467 , 477 , 477 , 507 ,
- 547 , 532 , 537 , 517 , 497 , 477 , 482 , 507 , 507 , 522 ,
- 527 , 517 , 507 , 482 , 482 , 477 , 487 , 502 , 547 , 557 ,
- 547 , 527 , 522 , 512 , 502 , 512 , 527 , 552 , 562 , 542 ,
- 487 , 492 , 472 , 462 , 492 , 512 , 532 , 552 , 552 , 512 ,
- 502 , 497 , 482 , 497 , 502 , 537 , 562 , 552 , 507 , 497 ,
- 492 , 442 , 457 , 487 , 487 , 522 , 537 , 482 , 462 , 502 ,
- 497 , 477 , 537 , 562 , 537 , 567 , 567 , 497 , 492 , 532 ,
- 497 , 462 , 512 , 532 , 492 , 477 , 477 , 462 , 462 , 502 ,
- 517 , 517 , 557 , 552 , 492 , 482 , 507 , 512 , 502 , 532 ,
- 577 , 572 , 542 , 522 , 492 , 457 , 482 , 487 , 472 , 522 ,
- 557 , 542 , 507 , 497 , 512 , 497 , 492 , 527 , 547 , 572 ,
- 572 , 517 , 507 , 497 , 492 , 482 , 482 , 507 , 537 , 517 ,
- 482 , 477 , 477 , 472 , 462 , 512 , 497 , 527 , 542 , 497 ,
- 497 , 492 , 507 , 492 , 512 , 532 , 537 , 532 , 502 , 487 ,
- 457 , 487 , 497 , 487 , 542 , 557 , 542 , 527 , 537 , 497 ,
- 472 , 507 , 527 , 522 , 537 , 587 , 517 , 477 , 497 , 462 ,
- 447 , 467 , 517 , 517 , 527 , 537 , 502 , 477 , 507 , 512 ,
- 497 , 542 , 582 , 577 , 557 , 537 , 537 , 492 , 477 , 507 ,
- 507 , 507 , 517 , 517 , 472 , 457 , 467 , 477 , 467 , 522 ,
- 547 , 542 , 542 , 512 , 492 , 497 , 517 , 487 , 507 , 552 ,
- 547 , 522 , 497 , 477 , 452 , 447 , 447 , 467 , 512 , 537 ,
- 522 , 507 , 497 , 472 , 482 , 497 , 517 , 547 , 587 , 562 ,
- 537 , 517 , 487 , 502 , 497 , 497 , 517 , 552 , 537 , 507 ,
- 512 , 487 , 477 , 502 , 507 , 542 , 562 , 552 , 537 , 532 ,
- 507 , 482 , 502 , 492 , 527 , 547 , 532 , 507 , 482 , 457 ,
- 462 , 492 , 482 , 527 , 552 , 552 , 517 , 497 , 497 , 477 ,
- 477 , 482 , 522 , 557 , 532 , 507 , 507 , 472 , 437 , 452 ,
- 457 , 477 , 522 , 527 , 517 , 517 , 497 , 492 , 517 , 517 ,
- 542 , 582 , 592 , 557 , 527 , 532 , 497 , 487 , 492 , 502 ,
- 522 , 517 , 487 , 487 , 482 , 472 , 467 , 492 , 512 , 532 ,
- 552 , 542 , 527 , 527 , 517 , 502 , 517 , 532 , 542 , 562 ,
- 547 , 492 , 502 , 457 , 427 , 467 , 482 , 512 , 537 , 542 ,
- 527 , 522 , 507 , 482 , 497 , 522 , 552 , 537 , 542 , 537 ,
- 517 , 507 , 467 , 467 , 482 , 487 , 517 , 517 , 502 , 502 ,
- 492 , 472 , 462 , 487 , 522 , 537 , 532 , 527 , 537 , 517 ,
- 487 , 492 , 502 , 517 , 512 , 507 , 517 , 497 , 507 , 512 ,
- 492 , 502 , 537 , 542 , 542 , 542 , 532 , 512 , 507 , 497 ,
- 497 , 532 , 542 , 542 , 532 , 517 , 502 , 467 , 457 , 467 ,
- 492 , 512 , 517 , 502 , 532 , 522 , 502 , 502 , 507 , 532 ,
- 527 , 567 , 542 , 532 , 547 , 502 , 472 , 457 , 462 , 472 ,
- 482 , 487 , 487 , 507 , 487 , 477 , 477 , 497 , 517 , 507 ,
- 507 , 527 , 557 , 537 , 527 , 537 , 532 , 532 , 517 , 512 ,
- 512 , 507 , 492 , 472 , 482 , 482 , 502 , 517 , 522 , 512 ,
- 532 , 542 , 517 , 522 , 522 , 532 , 547 , 532 , 517 , 542 ,
- 537 , 492 , 487 , 477 , 492 , 492 , 497 , 502 , 507 , 527 ,
- 502 , 507 , 497 , 492 , 507 , 527 , 527 , 517 , 532 , 527 ,
- 502 , 482 , 472 , 467 , 482 , 472 , 472 , 542 , 532 , 512 ,
- 517 , 502 , 502 , 492 , 512 , 502 , 537 , 542 , 522 , 527 ,
- 502 , 487 , 497 , 507 , 472 , 497 , 532 , 502 , 492 , 497 ,
- 487 , 482 , 502 , 507 , 527 , 572 , 562 , 542 , 547 , 557 ,
- 532 , 522 , 517 , 527 , 547 , 522 , 502 , 477 , 462 , 472 ,
- 482 , 492 , 492 , 532 , 542 , 522 , 497 , 492 , 492 , 472 ,
- 497 , 507 , 557 , 572 , 547 , 522 , 507 , 487 , 457 , 467 ,
- 447 , 492 , 532 , 517 , 502 , 477 , 497 , 477 , 477 , 492 ,
- 517 , 572 , 577 , 552 , 522 , 517 , 497 , 487 , 497 , 497 ,
- 537 , 542 , 517 , 487 , 492 , 472 , 472 , 472 , 497 , 537 ,
- 562 , 557 , 522 , 512 , 502 , 502 , 497 , 492 , 522 , 562 ,
- 567 , 512 , 492 , 492 , 437 , 457 , 487 , 522 , 572 , 582 ,
- 552 , 522 , 517 , 487 , 482 , 492 , 537 , 567 , 577 , 542 ,
- 502 , 492 , 452 , 447 , 432 , 462 , 507 , 532 , 522 , 487 ,
- 482 , 457 , 457 , 457 , 512 , 572 , 587 , 582 , 547 , 537 ,
- 492 , 477 , 482 , 492 , 522 , 542 , 522 , 477 , 472 , 462 ,
- 442 , 467 , 497 , 537 , 572 , 567 , 542 , 522 , 502 , 487 ,
- 497 , 522 , 572 , 602 , 597 , 547 , 512 , 492 , 437 , 437 ,
- 462 , 517 , 557 , 557 , 522 , 492 , 487 , 452 , 462 , 467 ,
- 522 , 562 , 577 , 567 , 522 , 497 , 457 , 447 , 437 , 482 ,
- 532 , 542 , 532 , 497 , 502 , 447 , 457 , 457 , 482 , 572 ,
- 587 , 562 , 542 , 532 , 492 , 472 , 472 , 487 , 537 , 567 ,
- 557 , 522 , 482 , 452 , 452 , 457 , 487 , 562 , 582 , 567 ,
- 547 , 507 , 502 , 462 , 462 , 502 , 542 , 577 , 577 , 537 ,
- 487 , 467 , 437 , 432 , 447 , 497 , 537 , 557 , 547 , 517 ,
- 507 , 482 , 467 , 487 , 532 , 592 , 612 , 607 , 572 , 517 ,
- 497 , 472 , 447 , 492 , 522 , 522 , 532 , 512 , 462 , 452 ,
- 447 , 427 , 472 , 517 , 552 , 552 , 547 , 507 , 477 , 472 ,
- 442 , 482 , 522 , 567 , 567 , 552 , 517 , 472 , 452 , 422 ,
- 452 , 522 , 552 , 562 , 562 , 537 , 487 , 487 , 467 , 472 ,
- 532 , 567 , 592 , 587 , 567 , 517 , 482 , 467 , 462 , 497 ,
- 517 , 557 , 557 , 547 , 502 , 482 , 467 , 442 , 497 , 542 ,
- 567 , 572 , 557 , 522 , 477 , 467 , 442 , 482 , 512 , 517 ,
- 532 , 522 , 492 , 462 , 452 , 447 , 487 , 527 , 552 , 562 ,
- 557 , 542 , 502 , 482 , 457 , 487 , 522 , 542 , 562 , 557 ,
- 512 , 457 , 442 , 417 , 432 , 492 , 517 , 542 , 542 , 537 ,
- 507 , 482 , 462 , 482 , 542 , 562 , 587 , 597 , 582 , 552 ,
- 507 , 472 , 457 , 497 , 512 , 522 , 527 , 522 , 502 , 477 ,
- 447 , 452 , 512 , 532 , 552 , 562 , 537 , 522 , 502 , 482 ,
- 467 , 507 , 537 , 557 , 557 , 542 , 512 , 487 , 442 , 432 ,
- 492 , 527 , 532 , 537 , 537 , 502 , 487 , 457 , 427 , 492 ,
- 532 , 547 , 542 , 542 , 527 , 477 , 452 , 432 , 467 , 507 ,
- 522 , 532 , 547 , 537 , 502 , 497 , 452 , 492 , 542 , 547 ,
- 567 , 562 , 562 , 522 , 477 , 452 , 477 , 512 , 527 , 542 ,
- 527 , 522 , 492 , 482 , 462 , 482 , 542 , 557 , 562 , 562 ,
- 567 , 542 , 522 , 487 , 492 , 537 , 552 , 547 , 547 , 527 ,
- 477 , 437 , 412 , 417 , 447 , 482 , 522 , 522 , 502 , 492 ,
- 462 , 457 , 457 , 512 , 542 , 572 , 582 , 557 , 547 , 507 ,
- 492 , 472 , 477 , 522 , 522 , 517 , 522 , 507 , 492 , 462 ,
- 467 , 502 , 527 , 547 , 557 , 557 , 527 , 497 , 472 , 467 ,
- 512 , 537 , 542 , 552 , 542 , 527 , 492 , 452 , 462 , 487 ,
- 532 , 552 , 552 , 552 , 532 , 507 , 487 , 462 , 477 , 532 ,
- 547 , 547 , 567 , 542 , 497 , 457 , 432 , 452 , 492 , 517 ,
- 522 , 547 , 537 , 502 , 487 , 457 , 467 , 517 , 542 , 542 ,
- 567 , 547 , 507 , 472 , 457 , 467 , 492 , 507 , 502 , 527 ,
- 522 , 472 , 442 , 452 , 477 , 517 , 562 , 547 , 562 , 572 ,
- 517 , 487 , 497 , 512 , 537 , 557 , 557 , 567 , 542 , 492 ,
- 452 , 427 , 437 , 482 , 517 , 517 , 537 , 552 , 512 , 462 ,
- 452 , 487 , 532 , 567 , 567 , 587 , 597 , 532 , 482 , 482 ,
- 477 , 512 , 537 , 512 , 517 , 527 , 487 , 442 , 437 , 462 ,
- 487 , 532 , 542 , 532 , 542 , 517 , 482 , 452 , 452 , 482 ,
- 542 , 532 , 527 , 562 , 522 , 452 , 442 , 457 , 507 , 547 ,
- 552 , 542 , 557 , 537 , 487 , 477 , 477 , 497 , 537 , 562 ,
- 547 , 567 , 542 , 482 , 462 , 437 , 452 , 487 , 517 , 537 ,
- 552 , 547 , 507 , 497 , 482 , 482 , 522 , 562 , 577 , 567 ,
- 557 , 517 , 492 , 477 , 467 , 482 , 507 , 527 , 522 , 502 ,
- 477 , 472 , 472 , 457 , 477 , 522 , 562 , 567 , 547 , 517 ,
- 517 , 512 , 487 , 492 , 527 , 567 , 567 , 532 , 492 , 467 ,
- 472 , 432 , 422 , 452 , 502 , 537 , 512 , 507 , 497 , 502 ,
- 487 , 477 , 502 , 537 , 587 , 587 , 547 , 517 , 527 , 502 ,
- 467 , 497 , 527 , 537 , 532 , 527 , 497 , 512 , 507 , 472 ,
- 502 , 522 , 547 , 547 , 532 , 517 , 512 , 512 , 477 , 482 ,
- 497 , 532 , 527 , 507 , 487 , 487 , 492 , 472 , 482 , 522 ,
- 552 , 552 , 532 , 522 , 507 , 507 , 477 , 482 , 522 , 532 ,
- 517 , 532 , 507 , 467 , 477 , 437 , 442 , 462 , 497 , 517 ,
- 517 , 517 , 502 , 532 , 512 , 492 , 532 , 552 , 562 , 552 ,
- 542 , 522 , 532 , 502 , 472 , 492 , 502 , 502 , 512 , 502 ,
- 492 , 502 , 502 , 477 , 512 , 532 , 522 , 552 , 552 , 527 ,
- 517 , 537 , 527 , 522 , 547 , 537 , 532 , 517 , 487 , 482 ,
- 472 , 452 , 462 , 492 , 497 , 512 , 522 , 502 , 497 , 502 ,
- 497 , 502 , 517 , 522 , 542 , 537 , 517 , 497 , 502 , 487 ,
- 467 , 492 , 477 , 502 , 512 , 512 , 507 , 507 , 502 , 487 ,
- 512 , 507 , 512 , 527 , 532 , 537 , 512 , 522 , 507 , 502 ,
- 497 , 502 , 517 , 492 , 497 , 507 , 517 , 512 , 517 , 537 ,
- 542 , 537 , 527 , 537 , 542 , 522 , 522 , 522 , 527 , 522 ,
- 532 , 522 , 502 , 477 , 477 , 472 , 462 , 487 , 492 , 512 ,
- 522 , 522 , 522 , 522 , 522 , 502 , 512 , 512 , 527 , 522 ,
- 512 , 532 , 497 , 482 , 447 , 447 , 472 , 457 , 477 , 512 ,
- 507 , 502 , 517 , 502 , 507 , 507 , 517 , 542 , 537 , 547 ,
- 552 , 547 , 527 , 522 , 522 , 497 , 497 , 497 , 502 , 487 ,
- 492 , 487 , 492 , 507 , 507 , 512 , 517 , 542 , 542 , 522 ,
- 517 , 532 , 542 , 522 , 527 , 527 , 532 , 522 , 507 , 487 ,
- 487 , 497 , 497 , 507 , 507 , 537 , 527 , 497 , 487 , 492 ,
- 497 , 492 , 507 , 522 , 537 , 537 , 517 , 482 , 477 , 482 ,
- 467 , 457 , 467 , 497 , 527 , 522 , 492 , 502 , 517 , 512 ,
- 512 , 512 , 522 , 547 , 547 , 522 , 517 , 527 , 517 , 497 ,
- 492 , 492 , 517 , 507 , 472 , 492 , 512 , 497 , 502 , 517 ,
- 517 , 552 , 567 , 532 , 527 , 542 , 532 , 537 , 512 , 512 ,
- 537 , 537 , 482 , 457 , 482 , 482 , 472 , 467 , 492 , 527 ,
- 532 , 502 , 497 , 537 , 527 , 502 , 512 , 507 , 542 , 557 ,
- 527 , 512 , 512 , 492 , 487 , 482 , 452 , 462 , 497 , 492 ,
- 452 , 487 , 527 , 492 , 497 , 487 , 527 , 547 , 527 , 517 ,
- 542 , 557 , 517 , 517 , 502 , 502 , 527 , 522 , 497 , 487 ,
- 507 , 517 , 517 , 497 , 492 , 522 , 537 , 517 , 497 , 517 ,
- 537 , 532 , 517 , 502 , 537 , 537 , 512 , 502 , 507 , 507 ,
- 492 , 482 , 477 , 507 , 527 , 532 , 522 , 522 , 542 , 532 ,
- 517 , 487 , 487 , 527 , 522 , 497 , 512 , 532 , 502 , 472 ,
- 452 , 457 , 477 , 487 , 487 , 487 , 517 , 522 , 507 , 502 ,
- 502 , 517 , 527 , 522 , 532 , 552 , 552 , 532 , 512 , 482 ,
- 492 , 487 , 477 , 482 , 497 , 512 , 492 , 497 , 512 , 512 ,
- 537 , 547 , 527 , 537 , 552 , 522 , 532 , 537 , 507 , 547 ,
- 547 , 517 , 512 , 532 , 507 , 462 , 457 , 457 , 487 , 492 ,
- 497 , 517 , 537 , 527 , 492 , 487 , 477 , 502 , 532 , 542 ,
- 537 , 537 , 527 , 512 , 487 , 462 , 487 , 497 , 487 , 492 ,
- 537 , 542 , 517 , 497 , 477 , 492 , 502 , 517 , 507 , 542 ,
- 567 , 517 , 492 , 492 , 502 , 502 , 492 , 492 , 502 , 507 ,
- 502 , 502 , 487 , 502 , 517 , 522 , 527 , 522 , 542 , 532 ,
- 507 , 502 , 512 , 537 , 527 , 522 , 542 , 537 , 502 , 477 ,
- 462 , 462 , 502 , 512 , 512 , 552 , 547 , 522 , 517 , 517 ,
- 492 , 507 , 537 , 542 , 547 , 542 , 532 , 507 , 477 , 437 ,
- 447 , 497 , 472 , 467 , 507 , 517 , 487 , 482 , 487 , 502 ,
- 522 , 497 , 532 , 552 , 542 , 547 , 532 , 507 , 512 , 527 ,
- 512 , 497 , 517 , 502 , 482 , 487 , 467 , 467 , 527 , 532 ,
- 512 , 512 , 542 , 532 , 507 , 492 , 497 , 542 , 542 , 542 ,
- 547 , 542 , 517 , 507 , 497 , 467 , 492 , 527 , 522 , 512 ,
- 507 , 512 , 517 , 502 , 462 , 492 , 527 , 512 , 517 , 547 ,
- 527 , 502 , 517 , 492 , 472 , 472 , 487 , 477 , 487 , 522 ,
- 507 , 522 , 512 , 492 , 532 , 532 , 512 , 492 , 502 , 512 ,
- 527 , 517 , 512 , 542 , 537 , 517 , 482 , 492 , 482 , 492 ,
- 502 , 477 , 512 , 507 , 512 , 517 , 517 , 502 , 512 , 537 ,
- 517 , 537 , 562 , 547 , 507 , 497 , 502 , 487 , 482 , 482 ,
- 527 , 527 , 497 , 477 , 487 , 507 , 512 , 522 , 522 , 537 ,
- 552 , 542 , 517 , 527 , 532 , 517 , 527 , 512 , 512 , 537 ,
- 517 , 492 , 457 , 447 , 457 , 472 , 482 , 497 , 537 , 547 ,
- 497 , 477 , 487 , 492 , 492 , 517 , 537 , 547 , 527 , 497 ,
- 492 , 487 , 492 , 492 , 497 , 507 , 542 , 537 , 507 , 497 ,
- 492 , 502 , 507 , 527 , 537 , 542 , 577 , 542 , 502 , 492 ,
- 512 , 522 , 507 , 497 , 532 , 527 , 482 , 477 , 472 , 487 ,
- 507 , 522 , 557 , 557 , 557 , 517 , 487 , 482 , 477 , 492 ,
- 502 , 537 , 567 , 572 , 522 , 467 , 447 , 447 , 457 , 467 ,
- 482 , 537 , 572 , 542 , 482 , 492 , 492 , 487 , 482 , 512 ,
- 562 , 572 , 552 , 517 , 487 , 467 , 447 , 457 , 487 , 507 ,
- 537 , 532 , 507 , 497 , 487 , 512 , 507 , 502 , 547 , 582 ,
- 572 , 517 , 512 , 517 , 502 , 502 , 507 , 547 , 557 , 537 ,
- 472 , 437 , 452 , 467 , 477 , 492 , 542 , 572 , 567 , 527 ,
- 482 , 467 , 472 , 502 , 527 , 557 , 597 , 592 , 537 , 467 ,
- 452 , 437 , 447 , 477 , 522 , 577 , 572 , 522 , 487 , 472 ,
- 442 , 437 , 467 , 502 , 577 , 612 , 557 , 492 , 477 , 477 ,
- 452 , 442 , 462 , 537 , 572 , 557 , 502 , 487 , 482 , 472 ,
- 492 , 517 , 562 , 587 , 557 , 527 , 512 , 507 , 477 , 487 ,
- 507 , 552 , 577 , 542 , 502 , 477 , 477 , 452 , 452 , 477 ,
- 542 , 592 , 582 , 522 , 482 , 487 , 482 , 472 , 497 , 542 ,
- 597 , 577 , 522 , 477 , 452 , 442 , 447 , 467 , 502 , 552 ,
- 552 , 527 , 502 , 487 , 462 , 457 , 487 , 527 , 587 , 592 ,
- 557 , 517 , 492 , 467 , 457 , 462 , 482 , 562 , 577 , 517 ,
- 472 , 457 , 462 , 442 , 442 , 502 , 572 , 587 , 562 , 532 ,
- 507 , 472 , 472 , 492 , 507 , 552 , 587 , 577 , 527 , 497 ,
- 472 , 432 , 447 , 492 , 552 , 592 , 567 , 532 , 507 , 502 ,
- 487 , 457 , 472 , 542 , 597 , 562 , 537 , 512 , 507 , 462 ,
- 437 , 457 , 492 , 537 , 542 , 527 , 507 , 477 , 477 , 472 ,
- 482 , 502 , 547 , 557 , 527 , 512 , 497 , 492 , 472 , 472 ,
- 497 , 552 , 542 , 512 , 492 , 472 , 472 , 457 , 462 , 507 ,
- 567 , 602 , 567 , 532 , 527 , 507 , 477 , 482 , 497 , 537 ,
- 587 , 567 , 537 , 482 , 462 , 462 , 447 , 452 , 502 , 562 ,
- 562 , 537 , 527 , 522 , 492 , 457 , 487 , 522 , 567 , 587 ,
- 557 , 542 , 512 , 487 , 472 , 457 , 467 , 527 , 532 , 502 ,
- 482 , 487 , 492 , 477 , 477 , 477 , 522 , 562 , 532 , 507 ,
- 502 , 527 , 492 , 482 , 507 , 522 , 552 , 532 , 497 , 477 ,
- 472 , 467 , 477 , 497 , 537 , 567 , 552 , 517 , 487 , 482 ,
- 492 , 497 , 502 , 537 , 562 , 562 , 522 , 477 , 482 , 477 ,
- 447 , 472 , 507 , 547 , 567 , 552 , 522 , 512 , 507 , 497 ,
- 502 , 532 , 577 , 577 , 557 , 527 , 487 , 502 , 492 , 492 ,
- 482 , 512 , 532 , 487 , 457 , 457 , 497 , 487 , 467 , 507 ,
- 542 , 547 , 537 , 512 , 492 , 507 , 497 , 497 , 507 , 522 ,
- 532 , 517 , 477 , 432 , 457 , 457 , 482 , 507 , 532 , 547 ,
- 532 , 517 , 492 , 507 , 522 , 522 , 527 , 562 , 577 , 557 ,
- 547 , 512 , 512 , 497 , 482 , 502 , 512 , 537 , 532 , 507 ,
- 477 , 467 , 482 , 492 , 507 , 527 , 532 , 532 , 522 , 502 ,
- 497 , 502 , 507 , 497 , 517 , 542 , 517 , 507 , 497 , 487 ,
- 487 , 487 , 512 , 517 , 572 , 562 , 532 , 512 , 502 , 492 ,
- 497 , 492 , 502 , 522 , 527 , 517 , 482 , 462 , 457 , 462 ,
- 462 , 477 , 502 , 517 , 507 , 517 , 527 , 527 , 497 , 497 ,
- 517 , 547 , 547 , 542 , 537 , 522 , 532 , 497 , 497 , 497 ,
- 512 , 517 , 492 , 482 , 482 , 507 , 512 , 517 , 542 , 527 ,
- 552 , 552 , 537 , 522 , 517 , 527 , 517 , 527 , 542 , 527 ,
- 507 , 492 , 487 , 467 , 452 , 447 , 482 , 527 , 532 , 517 ,
- 512 , 502 , 497 , 497 , 472 , 512 , 532 , 542 , 542 , 522 ,
- 507 , 502 , 497 , 492 , 477 , 477 , 497 , 502 , 517 , 512 ,
- 482 , 502 , 512 , 482 , 512 , 537 , 532 , 512 , 517 , 532 ,
- 527 , 512 , 507 , 527 , 527 , 492 , 492 , 492 , 487 , 507 ,
- 517 , 532 , 542 , 557 , 557 , 532 , 507 , 502 , 507 , 517 ,
- 502 , 512 , 522 , 532 , 502 , 482 , 457 , 457 , 472 , 477 ,
- 497 , 522 , 522 , 517 , 512 , 522 , 512 , 517 , 532 , 547 ,
- 557 , 557 , 552 , 532 , 522 , 512 , 502 , 467 , 462 , 482 ,
- 502 , 487 , 457 , 457 , 477 , 492 , 497 , 497 , 522 , 537 ,
- 522 , 522 , 512 , 502 , 512 , 532 , 537 , 527 , 522 , 522 ,
- 487 , 477 , 487 , 492 , 482 , 497 , 522 , 537 , 542 , 527 ,
- 502 , 507 , 527 , 522 , 512 , 527 , 572 , 562 , 522 , 517 ,
- 502 , 502 , 512 , 512 , 512 , 512 , 512 , 522 , 512 , 487 ,
- 492 , 492 , 512 , 507 , 482 , 502 , 517 , 502 , 492 , 482 ,
- 492 , 477 , 472 , 492 , 497 , 477 , 477 , 487 , 497 , 502 ,
- 517 , 527 , 542 , 572 , 557 , 542 , 532 , 517 , 517 , 517 ,
- 517 , 507 , 497 , 522 , 512 , 492 , 467 , 467 , 477 , 487 ,
- 492 , 497 , 527 , 517 , 512 , 537 , 532 , 527 , 537 , 537 ,
- 562 , 557 , 532 , 527 , 547 , 537 , 512 , 492 , 467 , 457 ,
- 492 , 487 , 467 , 472 , 492 , 517 , 527 , 512 , 497 , 522 ,
- 537 , 512 , 497 , 502 , 512 , 532 , 547 , 532 , 487 , 487 ,
- 467 , 467 , 487 , 472 , 477 , 507 , 527 , 507 , 497 , 507 ,
- 492 , 502 , 522 , 517 , 507 , 517 , 547 , 552 , 532 , 482 ,
- 487 , 507 , 512 , 502 , 512 , 512 , 512 , 527 , 512 , 502 ,
- 512 , 522 , 547 , 547 , 537 , 507 , 497 , 532 , 522 , 502 ,
- 502 , 507 , 512 , 512 , 507 , 487 , 477 , 467 , 487 , 502 ,
- 512 , 517 , 552 , 587 , 572 , 527 , 502 , 497 , 517 , 512 ,
- 507 , 512 , 512 , 502 , 487 , 472 , 447 , 437 , 457 , 467 ,
- 477 , 487 , 492 , 537 , 542 , 507 , 507 , 507 , 522 , 552 ,
- 552 , 552 , 557 , 542 , 547 , 537 , 507 , 477 , 462 , 487 ,
- 492 , 467 , 482 , 492 , 517 , 517 , 502 , 517 , 512 , 522 ,
- 532 , 537 , 537 , 507 , 537 , 552 , 532 , 522 , 517 , 507 ,
- 507 , 497 , 482 , 482 , 492 , 517 , 532 , 522 , 502 , 482 ,
- 512 , 517 , 502 , 502 , 502 , 537 , 542 , 537 , 522 , 502 ,
- 497 , 482 , 467 , 477 , 482 , 497 , 532 , 522 , 507 , 482 ,
- 487 , 517 , 502 , 497 , 517 , 522 , 517 , 507 , 527 , 507 ,
- 477 , 487 , 492 , 482 , 477 , 497 , 517 , 517 , 512 , 507 ,
- 522 , 527 , 527 , 552 , 572 , 567 , 552 , 547 , 532 , 532 ,
- 522 , 512 , 527 , 507 , 487 , 487 , 477 , 492 , 467 , 477 ,
- 487 , 467 , 477 , 502 , 522 , 542 , 507 , 517 , 532 , 532 ,
- 537 , 517 , 557 , 552 , 502 , 517 , 507 , 487 , 482 , 477 ,
- 487 , 467 , 452 , 487 , 502 , 492 , 512 , 517 , 537 , 507 ,
- 507 , 512 , 507 , 532 , 522 , 512 , 527 , 522 , 522 , 507 ,
- 502 , 517 , 482 , 477 , 507 , 487 , 507 , 527 , 532 , 527 ,
- 487 , 507 , 517 , 502 , 522 , 522 , 537 , 537 , 527 , 542 ,
- 512 , 502 , 502 , 472 , 507 , 502 , 512 , 547 , 537 , 537 ,
- 517 , 517 , 527 , 487 , 507 , 527 , 497 , 512 , 512 , 507 ,
- 497 , 482 , 492 , 462 , 462 , 482 , 462 , 492 , 497 , 497 ,
- 517 , 517 , 527 , 527 , 502 , 537 , 527 , 512 , 522 , 517 ,
- 522 , 512 , 522 , 502 , 462 , 492 , 472 , 472 , 482 , 492 ,
- 522 , 517 , 507 , 522 , 517 , 547 , 537 , 507 , 562 , 547 ,
- 557 , 562 , 562 , 552 , 502 , 497 , 502 , 492 , 502 , 502 ,
- 507 , 507 , 487 , 482 , 502 , 482 , 497 , 507 , 522 , 527 ,
- 507 , 532 , 522 , 507 , 507 , 492 , 492 , 507 , 492 , 502 ,
- 502 , 487 , 487 , 482 , 502 , 482 , 472 , 527 , 532 , 522 ,
- 497 , 502 , 537 , 517 , 507 , 542 , 517 , 517 , 527 , 517 ,
- 512 , 487 , 497 , 502 , 492 , 512 , 492 , 502 , 547 , 532 ,
- 517 , 512 , 517 , 522 , 512 , 522 , 522 , 487 , 517 , 522 ,
- 502 , 507 , 487 , 512 , 507 , 487 , 507 , 497 , 492 , 517 ,
- 532 , 542 , 547 , 537 , 542 , 542 , 542 , 522 , 502 , 532 ,
- 517 , 497 , 497 , 502 , 507 , 482 , 462 , 467 , 452 , 462 ,
- 467 , 492 , 512 , 502 , 512 , 517 , 497 , 507 , 512 , 517 ,
- 532 , 537 , 542 , 517 , 517 , 527 , 497 , 507 , 492 , 472 ,
- 512 , 512 , 497 , 497 , 517 , 532 , 517 , 507 , 532 , 522 ,
- 532 , 562 , 527 , 512 , 527 , 537 , 537 , 502 , 522 , 522 ,
- 482 , 492 , 487 , 477 , 492 , 497 , 512 , 497 , 517 , 517 ,
- 502 , 507 , 517 , 507 , 502 , 527 , 527 , 522 , 527 , 512 ,
- 487 , 477 , 472 , 512 , 502 , 492 , 522 , 527 , 507 , 502 ,
- 502 , 507 , 502 , 487 , 502 , 522 , 517 , 527 , 507 , 502 ,
- 517 , 502 , 497 , 497 , 497 , 502 , 487 , 502 , 502 , 502 ,
- 527 , 542 , 542 , 532 , 527 , 527 , 517 , 527 , 522 , 512 ,
- 522 , 527 , 517 , 512 , 497 , 477 , 492 , 512 , 487 , 467 ,
- 507 , 557 , 532 , 502 , 507 , 512 , 507 , 507 , 542 , 532 ,
- 542 , 557 , 537 , 512 , 497 , 492 , 497 , 487 , 487 , 487 ,
- 477 , 502 , 497 , 492 , 482 , 477 , 487 , 482 , 517 , 542 ,
- 502 , 517 , 537 , 527 , 507 , 497 , 507 , 517 , 502 , 527 ,
- 502 , 492 , 527 , 512 , 492 , 492 , 492 , 502 , 517 , 537 ,
- 512 , 517 , 557 , 547 , 517 , 507 , 537 , 532 , 497 , 517 ,
- 512 , 492 , 512 , 522 , 522 , 497 , 502 , 517 , 497 , 497 ,
- 522 , 492 , 497 , 527 , 527 , 502 , 502 , 507 , 507 , 502 ,
- 507 , 497 , 507 , 537 , 512 , 467 , 477 , 492 , 507 , 512 ,
- 502 , 542 , 522 , 522 , 547 , 522 , 492 , 482 , 502 , 502 ,
- 482 , 517 , 527 , 497 , 507 , 497 , 487 , 477 , 472 , 482 ,
- 507 , 527 , 537 , 512 , 532 , 532 , 507 , 522 , 527 , 507 ,
- 522 , 522 , 542 , 547 , 517 , 527 , 517 , 502 , 482 , 477 ,
- 502 , 502 , 517 , 527 , 512 , 537 , 522 , 512 , 537 , 497 ,
- 477 , 512 , 522 , 552 , 522 , 522 , 532 , 487 , 482 , 462 ,
- 462 , 482 , 467 , 497 , 537 , 507 , 497 , 497 , 492 , 487 ,
- 477 , 507 , 502 , 527 , 567 , 532 , 532 , 507 , 487 , 502 ,
- 487 , 492 , 492 , 512 , 562 , 537 , 497 , 517 , 527 , 517 ,
- 477 , 482 , 512 , 497 , 542 , 552 , 522 , 532 , 527 , 522 ,
- 512 , 482 , 492 , 482 , 512 , 537 , 487 , 522 , 547 , 532 ,
- 527 , 497 , 497 , 487 , 507 , 547 , 532 , 512 , 532 , 517 ,
- 512 , 482 , 462 , 477 , 492 , 517 , 522 , 497 , 517 , 517 ,
- 492 , 492 , 482 , 477 , 487 , 527 , 562 , 527 , 512 , 532 ,
- 512 , 497 , 482 , 482 , 487 , 507 , 537 , 527 , 502 , 492 ,
- 492 , 502 , 492 , 477 , 492 , 517 , 552 , 562 , 512 , 507 ,
- 512 , 527 , 527 , 497 , 517 , 522 , 542 , 562 , 502 , 472 ,
- 502 , 502 , 512 , 492 , 492 , 527 , 527 , 542 , 537 , 497 ,
- 527 , 507 , 537 , 542 , 492 , 512 , 507 , 532 , 522 , 472 ,
- 492 , 517 , 492 , 497 , 472 , 477 , 477 , 497 , 532 , 492 ,
- 477 , 512 , 502 , 497 , 487 , 482 , 497 , 512 , 532 , 537 ,
- 532 , 532 , 512 , 492 , 497 , 477 , 492 , 517 , 537 , 552 ,
- 542 , 547 , 537 , 497 , 487 , 482 , 487 , 507 , 527 , 532 ,
- 532 , 532 , 527 , 502 , 487 , 482 , 467 , 492 , 532 , 517 ,
- 522 , 537 , 542 , 512 , 487 , 507 , 502 , 517 , 537 , 532 ,
- 517 , 522 , 542 , 522 , 497 , 502 , 497 , 492 , 517 , 502 ,
- 497 , 507 , 512 , 522 , 492 , 482 , 482 , 487 , 502 , 512 ,
- 487 , 502 , 522 , 537 , 527 , 497 , 507 , 507 , 487 , 497 ,
- 487 , 477 , 507 , 542 , 542 , 507 , 482 , 492 , 507 , 502 ,
- 502 , 507 , 542 , 557 , 547 , 522 , 502 , 487 , 512 , 522 ,
- 517 , 517 , 532 , 557 , 557 , 507 , 472 , 462 , 482 , 492 ,
- 527 , 532 , 517 , 537 , 542 , 537 , 492 , 467 , 492 , 512 ,
- 532 , 527 , 502 , 522 , 527 , 512 , 482 , 452 , 482 , 497 ,
- 487 , 517 , 507 , 492 , 502 , 517 , 507 , 462 , 462 , 512 ,
- 512 , 512 , 517 , 512 , 522 , 537 , 527 , 517 , 487 , 487 ,
- 502 , 517 , 522 , 517 , 537 , 547 , 567 , 547 , 502 , 497 ,
- 502 , 502 , 502 , 492 , 527 , 547 , 537 , 542 , 497 , 447 ,
- 477 , 492 , 477 , 512 , 502 , 527 , 552 , 542 , 517 , 472 ,
- 492 , 517 , 477 , 512 , 527 , 532 , 557 , 532 , 522 , 492 ,
- 457 , 482 , 492 , 492 , 522 , 527 , 537 , 532 , 542 , 502 ,
- 462 , 477 , 507 , 492 , 507 , 512 , 507 , 527 , 542 , 522 ,
- 472 , 477 , 502 , 472 , 477 , 497 , 502 , 512 , 512 , 532 ,
- 512 , 477 , 502 , 512 , 497 , 512 , 517 , 537 , 552 , 552 ,
- 552 , 522 , 497 , 507 , 487 , 512 , 527 , 517 , 542 , 587 ,
- 562 , 527 , 487 , 497 , 482 , 477 , 517 , 502 , 527 , 537 ,
- 542 , 522 , 472 , 467 , 467 , 467 , 502 , 487 , 502 , 532 ,
- 527 , 522 , 482 , 482 , 497 , 462 , 517 , 542 , 522 , 527 ,
- 517 , 527 , 497 , 457 , 492 , 482 , 487 , 517 , 497 , 512 ,
- 517 , 527 , 537 , 502 , 507 , 502 , 497 , 537 , 522 , 532 ,
- 532 , 547 , 567 , 512 , 492 , 507 , 497 , 517 , 502 , 482 ,
- 512 , 507 , 537 , 532 , 492 , 497 , 482 , 507 , 522 , 507 ,
- 522 , 532 , 552 , 552 , 497 , 477 , 477 , 487 , 537 , 507 ,
- 502 , 517 , 522 , 547 , 492 , 462 , 467 , 477 , 537 , 527 ,
- 497 , 517 , 522 , 547 , 512 , 457 , 467 , 472 , 507 , 527 ,
- 507 , 502 , 502 , 517 , 517 , 467 , 457 , 487 , 517 , 547 ,
- 537 , 537 , 527 , 542 , 552 , 497 , 462 , 482 , 492 , 527 ,
- 522 , 517 , 522 , 507 , 537 , 522 , 462 , 487 , 497 , 517 ,
- 552 , 542 , 537 , 547 , 557 , 547 , 497 , 492 , 502 , 512 ,
- 532 , 532 , 507 , 517 , 532 , 522 , 467 , 432 , 432 , 452 ,
- 502 , 512 , 507 , 527 , 537 , 552 , 487 , 442 , 477 , 482 ,
- 497 , 517 , 522 , 527 , 527 , 562 , 527 , 452 , 467 , 462 ,
- 477 , 532 , 542 , 552 , 562 , 572 , 557 , 492 , 462 , 472 ,
- 487 , 537 , 542 , 537 , 537 , 542 , 557 , 487 , 432 , 447 ,
- 452 , 502 , 512 , 512 , 562 , 557 , 562 , 517 , 462 , 487 ,
- 477 , 492 , 532 , 522 , 552 , 542 , 547 , 537 , 462 , 472 ,
- 462 , 462 , 512 , 492 , 527 , 547 , 557 , 567 , 512 , 487 ,
- 492 , 482 , 517 , 512 , 522 , 547 , 537 , 547 , 507 , 447 ,
- 442 , 437 , 462 , 462 , 477 , 527 , 542 , 557 , 527 , 492 ,
- 477 , 457 , 497 , 522 , 507 , 552 , 572 , 582 , 562 , 517 ,
- 492 , 467 , 472 , 502 , 482 , 507 , 547 , 537 , 542 , 507 ,
- 477 , 472 , 467 , 512 , 527 , 542 , 567 , 567 , 572 , 522 ,
- 492 , 477 , 467 , 497 , 492 , 507 , 537 , 537 , 542 , 517 ,
- 482 , 472 , 472 , 507 , 507 , 502 , 552 , 542 , 527 , 532 ,
- 497 , 462 , 457 , 477 , 477 , 462 , 502 , 532 , 502 , 512 ,
- 492 , 467 , 482 , 477 , 517 , 537 , 552 , 572 , 557 , 552 ,
- 537 , 502 , 492 , 467 , 497 , 502 , 507 , 532 , 517 , 522 ,
- 527 , 487 , 462 , 452 , 487 , 522 , 527 , 557 , 547 , 562 ,
- 582 , 517 , 497 , 502 , 482 , 512 , 512 , 532 , 527 , 507 ,
- 517 , 492 , 452 , 447 , 437 , 482 , 532 , 527 , 577 , 557 ,
- 547 , 547 , 477 , 477 , 477 , 492 , 522 , 542 , 567 , 542 ,
- 522 , 532 , 482 , 447 , 432 , 432 , 492 , 507 , 527 , 547 ,
- 517 , 522 , 487 , 482 , 482 , 442 , 507 , 547 , 542 , 542 ,
- 507 , 542 , 512 , 462 , 467 , 442 , 492 , 537 , 537 , 587 ,
- 547 , 552 , 567 , 527 , 522 , 482 , 487 , 547 , 537 , 552 ,
- 537 , 537 , 552 , 492 , 467 , 447 , 442 , 477 , 487 , 517 ,
- 527 , 512 , 547 , 532 , 507 , 477 , 457 , 532 , 527 , 532 ,
- 557 , 527 , 552 , 512 , 477 , 442 , 402 , 472 , 482 , 482 ,
- 517 , 507 , 542 , 542 , 487 , 492 , 462 , 492 , 542 , 532 ,
- 562 , 567 , 567 , 562 , 512 , 492 , 457 , 457 , 502 , 497 ,
- 497 , 517 , 502 , 507 , 502 , 507 , 477 , 472 , 532 , 537 ,
- 552 , 557 , 532 , 547 , 542 , 502 , 482 , 482 , 532 , 532 ,
- 522 , 537 , 507 , 507 , 522 , 497 , 487 , 452 , 517 , 557 ,
- 492 , 532 , 532 , 517 , 522 , 492 , 497 , 472 , 492 , 527 ,
- 477 , 497 , 517 , 477 , 497 , 492 , 482 , 467 , 482 , 552 ,
- 532 , 517 , 552 , 542 , 537 , 512 , 502 , 492 , 467 , 517 ,
- 517 , 492 , 522 , 497 , 502 , 497 , 472 , 462 , 457 , 532 ,
- 532 , 502 , 567 , 567 , 552 , 557 , 517 , 527 , 507 , 512 ,
- 572 , 522 , 527 , 552 , 502 , 507 , 462 , 462 , 462 , 457 ,
- 512 , 507 , 522 , 562 , 522 , 512 , 502 , 502 , 492 , 477 ,
- 547 , 557 , 517 , 552 , 532 , 507 , 472 , 447 , 472 , 432 ,
- 462 , 507 , 502 , 527 , 517 , 527 , 527 , 477 , 502 , 482 ,
- 507 , 552 , 527 , 552 , 557 , 527 , 522 , 482 , 502 , 497 ,
- 467 , 502 , 497 , 517 , 557 , 517 , 522 , 497 , 492 , 497 ,
- 477 , 512 , 512 , 522 , 562 , 522 , 512 , 517 , 492 , 487 ,
- 472 , 482 , 507 , 507 , 532 , 542 , 542 , 507 , 512 , 572 ,
- 527 , 507 , 532 , 557 , 557 , 532 , 547 , 492 , 472 , 502 ,
- 487 , 452 , 457 , 482 , 507 , 492 , 487 , 482 , 472 , 507 ,
- 502 , 467 , 477 , 532 , 557 , 542 , 542 , 527 , 492 , 522 ,
- 522 , 477 , 472 , 487 , 512 , 507 , 492 , 492 , 487 , 522 ,
- 512 , 502 , 512 , 527 , 542 , 562 , 577 , 537 , 502 , 547 ,
- 552 , 512 , 497 , 507 , 532 , 532 , 502 , 502 , 447 , 467 ,
- 512 , 482 , 492 , 492 , 517 , 557 , 537 , 517 , 482 , 492 ,
- 537 , 512 , 497 , 507 , 507 , 537 , 517 , 497 , 477 , 452 ,
- 492 , 517 , 507 , 487 , 512 , 557 , 562 , 512 , 487 , 497 ,
- 512 , 507 , 507 , 522 , 487 , 517 , 542 , 512 , 492 , 462 ,
- 477 , 502 , 472 , 482 , 497 , 527 , 572 , 547 , 537 , 532 ,
- 517 , 532 , 517 , 517 , 517 , 497 , 532 , 527 , 507 , 502 ,
- 477 , 502 , 467 , 462 , 502 , 497 , 527 , 547 , 547 , 557 ,
- 507 , 507 , 517 , 527 , 537 , 512 , 562 , 567 , 527 , 527 ,
- 487 , 497 , 472 , 452 , 477 , 457 , 467 , 512 , 507 , 517 ,
- 502 , 477 , 492 , 472 , 512 , 527 , 507 , 542 , 537 , 517 ,
- 517 , 517 , 512 , 477 , 482 , 487 , 467 , 512 , 527 , 497 ,
- 512 , 512 , 537 , 522 , 497 , 537 , 507 , 517 , 537 , 537 ,
- 542 , 532 , 542 , 522 , 502 , 522 , 487 , 472 , 502 , 497 ,
- 532 , 527 , 507 , 517 , 512 , 532 , 507 , 467 , 512 , 517 ,
- 517 , 522 , 517 , 497 , 497 , 512 , 487 , 462 , 457 , 492 ,
- 537 , 517 , 482 , 487 , 502 , 527 , 532 , 512 , 522 , 537 ,
- 547 , 552 , 537 , 512 , 482 , 497 , 517 , 497 , 477 , 482 ,
- 492 , 507 , 482 , 472 , 472 , 497 , 522 , 532 , 522 , 507 ,
- 512 , 532 , 532 , 527 , 512 , 517 , 552 , 542 , 527 , 507 ,
- 497 , 497 , 487 , 492 , 497 , 477 , 497 , 537 , 532 , 512 ,
- 507 , 507 , 527 , 527 , 527 , 532 , 532 , 547 , 532 , 517 ,
- 512 , 522 , 507 , 497 , 487 , 467 , 482 , 482 , 487 , 487 ,
- 487 , 512 , 517 , 497 , 492 , 507 , 487 , 497 , 512 , 522 ,
- 527 , 542 , 527 , 517 , 497 , 482 , 492 , 492 , 502 , 502 ,
- 507 , 542 , 537 , 512 , 492 , 507 , 507 , 507 , 527 , 522 ,
- 532 , 537 , 542 , 522 , 482 , 487 , 492 , 477 , 517 , 507 ,
- 497 , 517 , 517 , 537 , 507 , 502 , 527 , 517 , 552 , 552 ,
- 522 , 532 , 517 , 512 , 512 , 482 , 487 , 477 , 487 , 512 ,
- 487 , 482 , 487 , 502 , 507 , 512 , 492 , 477 , 512 , 522 ,
- 507 , 537 , 527 , 532 , 527 , 522 , 517 , 482 , 472 , 492 ,
- 492 , 512 , 497 , 502 , 502 , 487 , 517 , 502 , 482 , 482 ,
- 517 , 562 , 547 , 522 , 537 , 527 , 517 , 527 , 517 , 507 ,
- 502 , 537 , 542 , 527 , 492 , 472 , 492 , 497 , 502 , 487 ,
- 512 , 557 , 542 , 527 , 517 , 487 , 502 , 527 , 537 , 532 ,
- 507 , 537 , 527 , 517 , 492 , 467 , 492 , 492 , 492 , 497 ,
- 512 , 517 , 492 , 507 , 507 , 487 , 482 , 507 , 507 , 497 ,
- 512 , 512 , 497 , 487 , 482 , 502 , 517 , 477 , 482 , 497 ,
- 492 , 537 , 527 , 537 , 537 , 522 , 547 , 552 , 517 , 507 ,
- 492 , 522 , 547 , 532 , 507 , 507 , 517 , 497 , 482 , 467 ,
- 467 , 497 , 527 , 557 , 512 , 482 , 522 , 532 , 512 , 497 ,
- 512 , 537 , 557 , 577 , 532 , 487 , 482 , 487 , 502 , 507 ,
- 482 , 497 , 527 , 537 , 527 , 477 , 457 , 482 , 507 , 512 ,
- 517 , 512 , 527 , 532 , 517 , 497 , 502 , 492 , 487 , 522 ,
- 497 , 492 , 497 , 497 , 472 , 472 , 492 , 497 , 502 , 517 ,
- 532 , 527 , 512 , 507 , 517 , 527 , 542 , 542 , 517 , 522 ,
- 512 , 517 , 532 , 512 , 492 , 502 , 527 , 532 , 522 , 507 ,
- 487 , 497 , 527 , 522 , 517 , 517 , 522 , 522 , 532 , 517 ,
- 482 , 482 , 512 , 522 , 502 , 497 , 502 , 497 , 482 , 502 ,
- 497 , 482 , 507 , 557 , 542 , 517 , 512 , 497 , 487 , 482 ,
- 502 , 497 , 512 , 527 , 532 , 522 , 507 , 462 , 452 , 497 ,
- 502 , 497 , 512 , 517 , 532 , 527 , 522 , 517 , 492 , 507 ,
- 522 , 532 , 562 , 532 , 497 , 497 , 507 , 502 , 482 , 492 ,
- 512 , 502 , 522 , 547 , 517 , 482 , 512 , 547 , 532 , 497 ,
- 507 , 527 , 527 , 532 , 532 , 502 , 487 , 522 , 527 , 517 ,
- 497 , 457 , 482 , 512 , 512 , 492 , 487 , 517 , 547 , 527 ,
- 497 , 477 , 482 , 512 , 527 , 542 , 517 , 512 , 527 , 522 ,
- 492 , 467 , 457 , 482 , 512 , 507 , 512 , 507 , 502 , 492 ,
- 487 , 497 , 487 , 487 , 517 , 532 , 527 , 537 , 527 , 502 ,
- 507 , 517 , 502 , 517 , 522 , 527 , 537 , 527 , 532 , 517 ,
- 502 , 517 , 547 , 547 , 537 , 532 , 512 , 502 , 512 , 522 ,
- 512 , 487 , 507 , 517 , 507 , 492 , 477 , 487 , 492 , 497 ,
- 497 , 492 , 482 , 502 , 537 , 517 , 492 , 482 , 517 , 522 ,
- 527 , 537 , 482 , 472 , 507 , 497 , 507 , 507 , 492 , 517 ,
- 527 , 537 , 507 , 482 , 487 , 512 , 547 , 532 , 507 , 517 ,
- 532 , 527 , 517 , 502 , 482 , 482 , 522 , 527 , 502 , 492 ,
- 497 , 507 , 482 , 482 , 497 , 497 , 512 , 547 , 567 , 527 ,
- 497 , 507 , 522 , 507 , 497 , 532 , 522 , 527 , 562 , 542 ,
- 507 , 497 , 487 , 482 , 512 , 517 , 517 , 512 , 522 , 537 ,
- 512 , 502 , 497 , 497 , 492 , 492 , 502 , 507 , 497 , 492 ,
- 527 , 492 , 467 , 477 , 482 , 497 , 497 , 502 , 512 , 522 ,
- 502 , 522 , 532 , 517 , 492 , 492 , 517 , 492 , 502 , 532 ,
- 512 , 522 , 552 , 517 , 497 , 487 , 492 , 507 , 517 , 537 ,
- 542 , 517 , 527 , 567 , 532 , 497 , 497 , 512 , 517 , 517 ,
- 552 , 532 , 487 , 512 , 517 , 462 , 452 , 477 , 492 , 527 ,
- 542 , 527 , 517 , 497 , 522 , 527 , 487 , 472 , 487 , 522 ,
- 532 , 522 , 537 , 492 , 492 , 517 , 487 , 467 , 482 , 497 ,
- 502 , 527 , 527 , 492 , 502 , 517 , 507 , 512 , 532 , 507 ,
- 512 , 542 , 522 , 512 , 517 , 517 , 507 , 522 , 517 , 482 ,
- 492 , 517 , 497 , 497 , 507 , 482 , 472 , 527 , 517 , 512 ,
- 527 , 502 , 502 , 552 , 537 , 482 , 502 , 542 , 502 , 497 ,
- 552 , 502 , 477 , 537 , 532 , 497 , 532 , 517 , 482 , 537 ,
- 537 , 502 , 527 , 552 , 517 , 507 , 532 , 487 , 457 , 527 ,
- 512 , 467 , 527 , 532 , 452 , 492 , 522 , 442 , 452 , 497 ,
- 482 , 467 , 527 , 547 , 487 , 522 , 557 , 487 , 497 , 547 ,
- 492 , 507 , 562 , 522 , 502 , 532 , 512 , 462 , 502 , 522 ,
- 477 , 487 , 557 , 507 , 492 , 587 , 542 , 482 , 542 , 547 ,
- 472 , 522 , 567 , 517 , 502 , 557 , 542 , 467 , 502 , 522 ,
- 457 , 487 , 537 , 452 , 472 , 532 , 522 , 497 , 512 , 532 ,
- 492 , 497 , 557 , 502 , 472 , 557 , 507 , 477 , 532 , 497 ,
- 442 , 477 , 537 , 472 , 432 , 537 , 522 , 447 , 562 , 562 ,
- 447 , 492 , 577 , 507 , 482 , 577 , 547 , 467 , 542 , 582 ,
- 447 , 467 , 562 , 472 , 452 , 567 , 517 , 457 , 552 , 582 ,
- 477 , 472 , 567 , 497 , 472 , 587 , 547 , 437 , 542 , 577 ,
- 447 , 462 , 577 , 492 , 422 , 552 , 562 , 412 , 467 , 607 ,
- 477 , 442 , 587 , 557 , 437 , 547 , 632 , 477 , 457 , 612 ,
- 537 , 407 , 542 , 587 , 427 , 412 , 577 , 502 , 367 , 502 ,
- 572 , 427 , 442 , 602 , 527 , 402 , 517 , 632 , 462 , 432 ,
- 587 , 527 , 407 , 537 , 612 , 447 , 427 , 602 , 552 , 397 ,
- 542 , 607 , 432 , 452 , 622 , 542 , 417 , 542 , 637 , 502 ,
- 467 , 612 , 552 , 422 , 522 , 612 , 502 , 442 , 522 , 572 ,
- 457 , 447 , 537 , 497 , 422 , 492 , 577 , 507 , 442 , 512 ,
- 587 , 502 , 447 , 537 , 562 , 447 , 472 , 597 , 547 , 397 ,
- 477 , 602 , 482 , 407 , 492 , 577 , 457 , 462 , 602 , 572 ,
- 462 , 497 , 602 , 547 , 442 , 502 , 577 , 507 , 467 , 537 ,
- 547 , 457 , 452 , 527 , 522 , 452 , 442 , 502 , 512 , 502 ,
- 512 , 527 , 532 , 502 , 512 , 542 , 542 , 512 , 502 , 547 ,
- 577 , 522 , 477 , 512 , 552 , 507 , 452 , 487 , 532 , 477 ,
- 467 , 557 , 557 , 492 , 507 , 557 , 547 , 502 , 517 , 527 ,
- 497 , 507 , 542 , 497 , 477 , 507 , 502 , 497 , 472 , 482 ,
- 487 , 467 , 502 , 532 , 487 , 477 , 497 , 507 , 517 , 512 ,
- 512 , 517 , 517 , 537 , 542 , 487 , 492 , 512 , 517 , 492 ,
- 477 , 502 , 492 , 492 , 547 , 537 , 497 , 512 , 527 , 547 ,
- 537 , 517 , 532 , 527 , 502 , 547 , 537 , 477 , 502 , 542 ,
- 517 , 477 , 502 , 497 , 467 , 517 , 562 , 492 , 497 , 557 ,
- 527 , 507 , 547 , 532 , 467 , 502 , 562 , 502 , 462 , 512 ,
- 507 , 467 , 477 , 497 , 442 , 422 , 522 , 552 , 467 , 467 ,
- 567 , 542 , 487 , 537 , 557 , 472 , 482 , 572 , 552 , 477 ,
- 527 , 572 , 487 , 477 , 542 , 507 , 412 , 482 , 562 , 482 ,
- 452 , 552 , 562 , 462 , 507 , 587 , 502 , 422 , 532 , 592 ,
- 487 , 457 , 562 , 562 , 467 , 482 , 557 , 512 , 427 , 517 ,
- 597 , 512 , 447 , 552 , 602 , 492 , 462 , 567 , 552 , 432 ,
- 492 , 612 , 552 , 437 , 512 , 577 , 457 , 422 , 517 , 502 ,
- 412 , 472 , 572 , 527 , 462 , 527 , 572 , 492 , 452 , 527 ,
- 522 , 467 , 497 , 567 , 537 , 462 , 482 , 537 , 492 , 437 ,
- 482 , 522 , 482 , 487 , 562 , 562 , 507 , 517 , 567 , 547 ,
- 492 , 492 , 542 , 557 , 537 , 542 , 557 , 532 , 482 , 472 ,
- 517 , 497 , 437 , 462 , 522 , 517 , 487 , 522 , 552 , 502 ,
- 477 , 512 , 527 , 482 , 497 , 547 , 557 , 527 , 507 , 512 ,
- 507 , 492 , 472 , 492 , 492 , 482 , 512 , 537 , 517 , 497 ,
- 502 , 522 , 497 , 492 , 507 , 507 , 522 , 532 , 542 , 522 ,
- 497 , 492 , 477 , 487 , 492 , 477 , 502 , 522 , 532 , 537 ,
- 527 , 527 , 502 , 492 , 507 , 512 , 502 , 512 , 542 , 547 ,
- 532 , 517 , 502 , 487 , 497 , 487 , 487 , 487 , 487 , 527 ,
- 547 , 532 , 522 , 512 , 517 , 522 , 507 , 522 , 537 , 542 ,
- 527 , 532 , 532 , 497 , 467 , 487 , 507 , 487 , 477 , 492 ,
- 507 , 512 , 517 , 522 , 512 , 492 , 492 , 507 , 517 , 512 ,
- 502 , 537 , 537 , 517 , 527 , 462 , 497 , 482 , 432 , 527 ,
- 442 , 462 , 552 , 462 , 557 , 537 , 427 , 572 , 517 , 477 ,
- 587 , 492 , 527 , 592 , 487 , 547 , 587 , 442 , 497 , 567 ,
- 442 , 517 , 562 , 457 , 547 , 562 , 447 , 542 , 537 , 422 ,
- 557 , 562 , 432 , 572 , 532 , 427 , 612 , 492 , 417 , 597 ,
- 437 , 427 , 597 , 422 , 447 , 592 , 457 , 517 , 597 , 442 ,
- 502 , 592 , 462 , 497 , 572 , 452 , 492 , 582 , 487 , 512 ,
- 557 , 437 , 472 , 547 , 452 , 462 , 552 , 477 , 492 , 567 ,
- 507 , 497 , 532 , 517 , 517 , 522 , 507 , 517 , 542 , 532 ,
- 517 , 522 , 477 , 452 , 517 , 497 , 462 , 507 , 497 , 497 ,
- 542 , 522 , 517 , 527 , 522 , 557 , 517 , 502 , 557 , 517 ,
- 517 , 582 , 537 , 497 , 502 , 502 , 507 , 472 , 472 , 517 ,
- 467 , 477 , 547 , 512 , 497 , 497 , 497 , 517 , 477 , 507 ,
- 502 , 522 , 537 , 497 , 577 , 432 , 482 , 542 , 427 , 547 ,
- 467 , 487 , 567 , 467 , 592 , 502 , 452 , 587 , 427 , 527 ,
- 532 , 477 , 597 , 467 , 542 , 602 , 432 , 502 , 537 , 452 ,
- 517 , 502 , 472 , 542 , 482 , 527 , 607 , 467 , 492 , 552 ,
- 492 , 537 , 517 , 532 , 517 , 517 , 562 , 497 , 492 , 487 ,
- 467 , 522 , 462 , 472 , 547 , 472 , 532 , 577 , 477 , 512 ,
- 502 , 502 , 522 , 492 , 537 , 512 , 507 , 542 , 517 , 507 ,
- 457 , 462 , 507 , 472 , 492 , 497 , 492 , 497 , 547 , 522 ,
- 467 , 517 , 507 , 532 , 552 , 512 , 532 , 517 , 512 , 557 ,
- 517 , 487 , 512 , 492 , 492 , 507 , 487 , 497 , 517 , 512 ,
- 527 , 512 , 477 , 527 , 512 , 502 , 557 , 497 , 527 , 532 ,
- 522 , 587 , 482 , 497 , 522 , 462 , 537 , 482 , 502 , 547 ,
- 447 , 577 , 527 , 442 , 537 , 462 , 502 , 552 , 452 , 532 ,
- 552 , 447 , 547 , 542 , 442 , 492 , 482 , 467 , 517 , 477 ,
- 497 , 502 , 492 , 537 , 512 , 527 , 512 , 517 , 547 , 497 ,
- 532 , 552 , 497 , 532 , 547 , 512 , 512 , 467 , 487 , 517 ,
- 472 , 487 , 507 , 477 , 522 , 532 , 527 , 532 , 487 , 522 ,
- 542 , 512 , 517 , 537 , 522 , 537 , 547 , 517 , 487 , 487 ,
- 487 , 502 , 497 , 482 , 487 , 502 , 527 , 512 , 517 , 492 ,
- 517 , 522 , 512 , 547 , 527 , 507 , 517 , 537 , 522 , 497 ,
- 477 , 507 , 487 , 487 , 502 , 472 , 462 , 517 , 517 , 482 ,
- 517 , 462 , 482 , 537 , 487 , 492 , 542 , 507 , 512 , 547 ,
- 527 , 492 , 492 , 537 , 497 , 492 , 537 , 492 , 492 , 587 ,
- 542 , 487 , 542 , 522 , 497 , 537 , 547 , 517 , 522 , 542 ,
- 557 , 522 , 492 , 487 , 487 , 477 , 502 , 482 , 467 , 487 ,
- 507 , 512 , 502 , 507 , 492 , 512 , 547 , 522 , 502 , 537 ,
- 517 , 517 , 537 , 522 , 487 , 477 , 502 , 492 , 487 , 467 ,
- 487 , 517 , 512 , 522 , 512 , 487 , 537 , 527 , 512 , 542 ,
- 517 , 517 , 532 , 522 , 527 , 507 , 482 , 497 , 472 , 502 ,
- 492 , 472 , 497 , 497 , 502 , 517 , 482 , 507 , 532 , 527 ,
- 552 , 532 , 542 , 537 , 542 , 542 , 517 , 497 , 522 , 512 ,
- 502 , 522 , 492 , 477 , 507 , 507 , 512 , 512 , 487 , 527 ,
- 512 , 512 , 512 , 497 , 507 , 517 , 517 , 517 , 502 , 487 ,
- 497 , 512 , 507 , 472 , 497 , 472 , 492 , 527 , 507 , 507 ,
- 507 , 497 , 522 , 517 , 487 , 527 , 512 , 512 , 537 , 522 ,
- 482 , 487 , 522 , 502 , 492 , 487 , 482 , 497 , 537 , 512 ,
- 527 , 532 , 522 , 552 , 537 , 522 , 547 , 517 , 527 , 547 ,
- 517 , 522 , 507 , 512 , 512 , 502 , 487 , 467 , 472 , 492 ,
- 497 , 527 , 507 , 492 , 532 , 507 , 527 , 517 , 497 , 522 ,
- 522 , 522 , 522 , 507 , 502 , 492 , 487 , 497 , 457 , 467 ,
- 502 , 497 , 532 , 512 , 492 , 507 , 512 , 522 , 522 , 507 ,
- 527 , 557 , 537 , 522 , 537 , 502 , 497 , 497 , 487 , 507 ,
- 472 , 472 , 502 , 502 , 497 , 502 , 517 , 517 , 497 , 527 ,
- 507 , 497 , 522 , 512 , 542 , 532 , 502 , 532 , 512 , 497 ,
- 527 , 497 , 507 , 527 , 512 , 527 , 542 , 517 , 517 , 552 ,
- 517 , 512 , 507 , 502 , 527 , 542 , 512 , 517 , 517 , 472 ,
- 477 , 477 , 477 , 467 , 462 , 487 , 492 , 472 , 492 , 497 ,
- 507 , 512 , 502 , 532 , 517 , 517 , 532 , 532 , 527 , 512 ,
- 512 , 507 , 507 , 507 , 502 , 507 , 487 , 502 , 522 , 502 ,
- 507 , 522 , 522 , 527 , 542 , 522 , 517 , 532 , 537 , 527 ,
- 507 , 517 , 502 , 497 , 492 , 512 , 497 , 462 , 497 , 522 ,
- 492 , 492 , 522 , 527 , 517 , 487 , 527 , 537 , 517 , 537 ,
- 557 , 547 , 517 , 497 , 507 , 497 , 477 , 487 , 477 , 492 ,
- 472 , 487 , 522 , 497 , 487 , 522 , 527 , 512 , 507 , 527 ,
- 527 , 517 , 517 , 517 , 517 , 467 , 512 , 517 , 477 , 502 ,
- 492 , 517 , 497 , 487 , 532 , 517 , 487 , 537 , 537 , 507 ,
- 497 , 527 , 537 , 512 , 532 , 527 , 502 , 512 , 502 , 497 ,
- 497 , 467 , 492 , 502 , 507 , 507 , 517 , 527 , 517 , 527 ,
- 542 , 542 , 537 , 532 , 557 , 542 , 507 , 537 , 522 , 502 ,
- 497 , 497 , 507 , 472 , 502 , 532 , 482 , 452 , 502 , 502 ,
- 492 , 477 , 512 , 537 , 487 , 512 , 552 , 502 , 462 , 497 ,
- 527 , 467 , 447 , 522 , 512 , 472 , 487 , 532 , 497 , 482 ,
- 512 , 507 , 537 , 517 , 532 , 552 , 542 , 542 , 552 , 542 ,
- 542 , 542 , 522 , 512 , 497 , 497 , 492 , 512 , 512 , 472 ,
- 482 , 507 , 502 , 502 , 522 , 537 , 502 , 507 , 542 , 537 ,
- 507 , 492 , 492 , 507 , 492 , 447 , 517 , 522 , 462 , 517 ,
- 557 , 497 , 457 , 517 , 542 , 512 , 492 , 547 , 577 , 487 ,
- 502 , 582 , 492 , 482 , 522 , 517 , 507 , 462 , 492 , 502 ,
- 487 , 477 , 467 , 467 , 477 , 477 , 532 , 542 , 507 , 527 ,
- 532 , 547 , 537 , 517 , 507 , 522 , 497 , 497 , 527 , 487 ,
- 497 , 522 , 517 , 547 , 502 , 477 , 557 , 507 , 487 , 552 ,
- 552 , 532 , 502 , 557 , 577 , 492 , 462 , 552 , 527 , 447 ,
- 482 , 537 , 497 , 472 , 512 , 547 , 452 , 432 , 522 , 512 ,
- 487 , 492 , 527 , 527 , 507 , 512 , 552 , 492 , 477 , 527 ,
- 507 , 517 , 482 , 482 , 502 , 502 , 492 , 497 , 482 , 482 ,
- 517 , 517 , 532 , 512 , 542 , 562 , 527 , 537 , 542 , 502 ,
- 492 , 502 , 522 , 512 , 467 , 492 , 547 , 517 , 482 , 532 ,
- 497 , 497 , 502 , 527 , 567 , 497 , 502 , 582 , 557 , 502 ,
- 487 , 527 , 502 , 452 , 532 , 532 , 482 , 467 , 512 , 542 ,
- 467 , 442 , 467 , 502 , 477 , 492 , 527 , 552 , 537 , 532 ,
- 572 , 537 , 482 , 487 , 512 , 507 , 507 , 482 , 502 , 517 ,
- 497 , 522 , 512 , 477 , 482 , 497 , 537 , 522 , 502 , 527 ,
- 547 , 537 , 522 , 502 , 477 , 487 , 507 , 517 , 497 , 507 ,
- 517 , 502 , 497 , 542 , 522 , 432 , 497 , 557 , 507 , 482 ,
- 562 , 587 , 497 , 537 , 582 , 517 , 452 , 502 , 582 , 512 ,
- 467 , 532 , 542 , 477 , 477 , 522 , 482 , 442 , 477 , 532 ,
- 537 , 502 , 517 , 537 , 532 , 502 , 482 , 482 , 467 , 462 ,
- 507 , 502 , 467 , 482 , 517 , 507 , 487 , 512 , 497 , 482 ,
- 537 , 567 , 527 , 542 , 567 , 562 , 537 , 507 , 527 , 522 ,
- 472 , 502 , 567 , 512 , 472 , 502 , 542 , 512 , 447 , 482 ,
- 517 , 442 , 472 , 572 , 542 , 472 , 512 , 592 , 527 , 462 ,
- 537 , 532 , 462 , 497 , 542 , 522 , 472 , 502 , 532 , 497 ,
- 492 , 502 , 507 , 527 , 542 , 537 , 537 , 522 , 527 , 522 ,
- 512 , 482 , 482 , 492 , 477 , 497 , 512 , 487 , 487 , 517 ,
- 502 , 472 , 477 , 502 , 492 , 477 , 532 , 557 , 512 , 482 ,
- 537 , 552 , 482 , 487 , 522 , 507 , 492 , 527 , 542 , 517 ,
- 512 , 522 , 527 , 477 , 462 , 537 , 542 , 507 , 537 , 562 ,
- 537 , 512 , 517 , 537 , 507 , 487 , 482 , 502 , 517 , 502 ,
- 512 , 517 , 522 , 502 , 487 , 487 , 497 , 502 , 507 , 567 ,
- 532 , 482 , 517 , 532 , 487 , 462 , 487 , 522 , 467 , 447 ,
- 532 , 537 , 482 , 477 , 527 , 532 , 457 , 492 , 547 , 497 ,
- 492 , 557 , 557 , 517 , 522 , 547 , 542 , 477 , 482 , 552 ,
- 502 , 487 , 517 , 512 , 472 , 487 , 512 , 477 , 502 , 527 ,
- 512 , 517 , 537 , 532 , 517 , 492 , 517 , 527 , 517 , 522 ,
- 492 , 492 , 512 , 492 , 512 , 517 , 512 , 537 , 542 , 502 ,
- 502 , 552 , 497 , 497 , 567 , 522 , 517 , 537 , 517 , 532 ,
- 492 , 457 , 517 , 467 , 402 , 532 , 557 , 427 , 487 , 567 ,
- 502 , 447 , 467 , 517 , 527 , 487 , 507 , 582 , 497 , 452 ,
- 572 , 552 , 432 , 472 , 547 , 492 , 467 , 527 , 537 , 517 ,
- 497 , 537 , 572 , 487 , 502 , 557 , 517 , 537 , 557 , 532 ,
- 532 , 562 , 512 , 507 , 492 , 467 , 507 , 497 , 457 , 497 ,
- 492 , 477 , 572 , 507 , 522 , 547 , 442 , 472 , 512 , 507 ,
- 557 , 552 , 482 , 562 , 532 , 452 , 527 , 462 , 472 , 552 ,
- 497 , 492 , 507 , 492 , 522 , 462 , 457 , 522 , 507 , 497 ,
- 557 , 562 , 472 , 492 , 557 , 522 , 487 , 497 , 517 , 477 ,
- 432 , 517 , 567 , 487 , 482 , 562 , 532 , 472 , 512 , 557 ,
- 522 , 492 , 537 , 547 , 512 , 487 , 562 , 587 , 517 , 502 ,
- 472 , 457 , 462 , 502 , 542 , 497 , 537 , 512 , 487 , 502 ,
- 482 , 512 , 507 , 507 , 537 , 552 , 497 , 542 , 582 , 472 ,
- 472 , 467 , 462 , 532 , 472 , 482 , 572 , 502 , 482 , 492 ,
- 497 , 527 , 512 , 477 , 552 , 542 , 467 , 597 , 577 , 437 ,
- 517 , 522 , 512 , 462 , 447 , 547 , 492 , 452 , 507 , 507 ,
- 427 , 507 , 567 , 537 , 477 , 487 , 607 , 522 , 482 , 552 ,
- 522 , 547 , 557 , 522 , 502 , 487 , 512 , 492 , 537 , 497 ,
- 527 , 577 , 492 , 492 , 457 , 487 , 527 , 492 , 552 , 562 ,
- 492 , 487 , 497 , 517 , 517 , 502 , 517 , 437 , 437 , 547 ,
- 452 , 497 , 597 , 492 , 447 , 492 , 482 , 532 , 582 , 487 ,
- 507 , 527 , 532 , 542 , 492 , 527 , 512 , 487 , 557 , 507 ,
- 457 , 452 , 502 , 557 , 442 , 497 , 602 , 472 , 487 , 532 ,
- 517 , 507 , 462 , 542 , 662 , 472 , 452 , 592 , 402 , 517 ,
- 552 , 432 , 517 , 472 , 502 , 562 , 437 , 502 , 652 , 442 ,
- 507 , 627 , 462 , 537 , 572 , 527 , 527 , 577 , 442 , 477 ,
- 647 , 427 , 497 , 592 , 307 , 517 , 567 , 457 , 492 , 417 ,
- 492 , 522 , 487 , 542 , 472 , 447 , 582 , 482 , 522 , 622 ,
- 422 , 467 , 612 , 432 , 432 , 557 , 487 , 567 , 527 , 482 ,
- 557 , 507 , 552 , 492 , 477 , 477 , 452 , 672 , 602 , 472 ,
- 547 , 482 , 432 , 497 , 502 , 582 , 582 , 427 , 567 , 447 ,
- 402 , 567 , 492 , 637 , 527 , 437 , 482 , 517 , 517 , 512 ,
- 647 , 502 , 542 , 482 , 367 , 517 , 532 , 567 , 567 , 527 ,
- 362 , 417 , 487 , 487 , 657 , 517 , 437 , 512 , 467 , 487 ,
- 487 , 587 , 512 , 527 , 602 , 417 , 462 , 587 , 482 , 487 ,
- 537 , 392 , 527 , 607 , 382 , 547 , 587 , 362 , 562 , 597 ,
- 482 , 572 , 492 , 547 , 572 , 432 , 562 , 527 , 502 , 547 ,
- 482 , 487 , 407 , 547 , 622 , 497 , 452 , 432 , 522 , 527 ,
- 517 , 582 , 407 , 457 , 602 , 507 , 567 , 587 , 537 , 557 ,
- 432 , 427 , 482 , 452 , 582 , 637 , 462 , 422 , 527 , 467 ,
- 452 , 672 , 502 , 437 , 602 , 467 , 442 , 452 , 502 , 552 ,
- 612 , 502 , 387 , 367 , 432 , 557 , 522 , 587 , 497 , 547 ,
- 587 , 327 , 362 , 577 , 587 , 587 , 592 , 467 , 522 , 592 ,
- 517 , 517 , 587 , 532 , 482 , 537 , 457 , 407 , 537 , 627 ,
- 622 , 442 , 417 , 487 , 477 , 642 , 567 , 517 , 447 , 417 ,
- 617 , 507 , 347 , 557 , 582 , 377 , 547 , 467 , 432 , 652 ,
- 447 , 417 , 467 , 447 , 522 , 597 , 487 , 432 , 597 , 497 ,
- 597 , 582 , 347 , 567 , 712 , 522 , 417 , 507 , 437 , 557 ,
- 652 , 357 , 457 , 587 , 442 , 567 , 572 , 407 , 407 , 532 ,
- 457 , 527 , 762 , 372 , 377 , 657 , 427 , 492 , 662 , 432 ,
- 507 , 692 , 397 , 367 , 557 , 552 , 562 , 577 , 477 , 512 ,
- 547 , 402 , 452 , 672 , 597 , 477 , 552 , 347 , 412 , 627 ,
- 517 , 537 , 492 , 417 , 517 , 472 , 337 , 567 , 662 , 527 ,
- 572 , 347 , 417 , 722 , 442 , 527 , 712 , 402 , 612 , 542 ,
- 267 , 467 , 542 , 572 , 587 , 527 , 407 , 432 , 527 , 497 ,
- 467 , 512 , 647 , 582 , 337 , 417 , 527 , 587 , 692 , 502 ,
- 402 , 507 , 447 , 557 , 552 , 457 , 617 , 517 , 382 , 462 ,
- 447 , 562 , 627 , 457 , 457 , 607 , 547 , 492 , 547 , 447 ,
- 422 , 587 , 722 , 547 , 422 , 532 , 497 , 357 , 532 , 582 ,
- 402 , 567 , 592 , 492 , 457 , 417 , 532 , 622 , 472 , 447 ,
- 587 , 317 , 412 , 752 , 562 , 512 , 457 , 267 , 517 , 702 ,
- 407 , 462 , 702 , 467 , 492 , 477 , 297 , 587 , 682 , 457 ,
- 532 , 557 , 492 , 497 , 422 , 547 , 612 , 432 , 467 , 482 ,
- 547 , 622 , 377 , 567 , 587 , 407 , 597 , 457 , 377 , 752 ,
- 562 , 347 , 622 , 482 , 412 , 607 , 442 , 422 , 712 , 577 ,
- 432 , 602 , 357 , 387 , 702 , 557 , 502 , 562 , 422 , 442 ,
- 547 , 552 , 592 , 547 , 427 , 552 , 607 , 347 , 502 , 597 ,
- 367 , 492 , 487 , 427 , 497 , 597 , 407 , 317 , 642 , 542 ,
- 432 , 477 , 457 , 597 , 572 , 477 , 492 , 567 , 547 , 527 ,
- 537 , 427 , 607 , 627 , 392 , 587 , 672 , 442 , 437 , 497 ,
- 527 , 582 , 477 , 462 , 682 , 547 , 337 , 452 , 462 , 617 ,
- 637 , 367 , 382 , 577 , 497 , 462 , 632 , 347 , 487 , 772 ,
- 362 , 462 , 632 , 482 , 587 , 472 , 427 , 612 , 527 , 377 ,
- 657 , 572 , 267 , 542 , 627 , 297 , 492 , 622 , 492 , 442 ,
- 517 , 557 , 317 , 552 , 662 , 407 , 507 , 622 , 507 , 507 ,
- 552 , 407 , 552 , 622 , 347 , 467 , 632 , 547 , 577 , 427 ,
- 267 , 602 , 632 , 407 , 547 , 642 , 517 , 497 , 487 , 432 ,
- 432 , 607 , 637 , 437 , 477 , 487 , 582 , 532 , 527 , 502 ,
- 417 , 577 , 497 , 472 , 462 , 567 , 592 , 537 , 597 , 487 ,
- 372 , 552 , 532 , 392 , 772 , 472 , 217 , 682 , 492 , 377 ,
- 592 , 467 , 547 , 562 , 307 , 427 , 672 , 492 , 397 , 607 ,
- 507 , 522 , 592 , 397 , 517 , 622 , 457 , 492 , 472 , 457 ,
- 592 , 437 , 512 , 762 , 402 , 182 , 572 , 712 , 467 , 547 ,
- 577 , 487 , 587 , 382 , 407 , 732 , 517 , 407 , 597 , 572 ,
- 497 , 497 , 447 , 287 , 582 , 762 , 417 , 522 , 752 , 437 ,
- 392 , 527 , 462 , 437 , 597 , 587 , 517 , 637 , 457 , 317 ,
- 552 , 552 , 482 , 502 , 347 , 422 , 702 , 417 , 382 , 732 ,
- 522 , 382 , 407 , 477 , 612 , 542 , 552 , 552 , 527 , 542 ,
- 452 , 482 , 387 , 622 , 597 , 472 , 582 , 432 , 432 , 437 ,
- 602 , 522 , 397 , 592 , 572 , 522 , 432 , 442 , 507 , 577 ,
- 567 , 452 , 542 , 562 , 577 , 412 , 482 , 672 , 407 , 372 ,
- 682 , 602 , 287 , 662 , 672 , 337 , 672 , 502 , 337 , 692 ,
- 527 , 387 , 672 , 657 , 277 , 487 , 547 , 217 , 622 , 602 ,
- 287 , 607 , 682 , 367 , 362 , 497 , 502 , 642 , 447 , 437 ,
- 692 , 557 , 347 , 482 , 637 , 487 , 557 , 482 , 357 , 642 ,
- 507 , 412 , 532 , 457 , 567 , 587 , 442 , 362 , 642 , 577 ,
- 427 , 577 , 482 , 512 , 577 , 512 , 482 , 507 , 557 , 577 ,
- 492 , 397 , 537 , 627 , 462 , 407 , 542 , 622 , 547 , 432 ,
- 492 , 537 , 477 , 517 , 562 , 532 , 502 , 522 , 432 , 417 ,
- 497 , 547 , 567 , 447 , 527 , 602 , 452 , 432 , 467 , 527 ,
- 582 , 567 , 427 , 537 , 647 , 462 , 467 , 557 , 442 , 527 ,
- 582 , 337 , 577 , 627 , 307 , 477 , 672 , 392 , 357 , 642 ,
- 482 , 397 , 642 , 417 , 477 , 752 , 412 , 447 , 647 , 542 ,
- 472 , 532 , 472 , 452 , 702 , 417 , 432 , 712 , 542 , 437 ,
- 477 , 537 , 467 , 602 , 507 , 337 , 702 , 532 , 347 , 577 ,
- 502 , 457 , 537 , 457 , 462 , 602 , 432 , 417 , 662 , 552 ,
- 412 , 472 , 532 , 507 , 487 , 527 , 587 , 517 , 527 , 612 ,
- 407 , 392 , 537 , 572 , 542 , 427 , 632 , 522 , 377 , 567 ,
- 467 , 392 , 552 , 612 , 407 , 567 , 632 , 427 , 427 , 417 ,
- 527 , 502 , 517 , 607 , 602 , 562 , 402 , 507 , 492 , 447 ,
- 482 , 507 , 652 , 502 , 562 , 492 , 432 , 617 , 347 , 452 ,
- 762 , 457 , 437 , 722 , 497 , 317 , 542 , 542 , 407 , 592 ,
- 597 , 422 , 557 , 722 , 397 , 337 , 712 , 532 , 327 , 607 ,
- 517 , 467 , 587 , 397 , 452 , 647 , 497 , 362 , 567 , 532 ,
- 367 , 537 , 522 , 472 , 432 , 562 , 632 , 307 , 502 , 682 ,
- 337 , 472 , 672 , 487 , 477 , 627 , 522 , 462 , 522 , 512 ,
- 457 , 522 , 672 , 512 , 467 , 572 , 477 , 502 , 482 , 447 ,
- 577 , 527 , 537 , 537 , 407 , 542 , 582 , 382 , 482 , 557 ,
- 502 , 457 , 482 , 557 , 502 , 567 , 452 , 447 , 582 , 502 ,
- 502 , 467 , 622 , 642 , 417 , 517 , 527 , 497 , 522 , 432 ,
- 537 , 587 , 542 , 542 , 417 , 437 , 537 , 497 , 482 , 502 ,
- 482 , 552 , 557 , 422 , 477 , 512 , 467 , 522 , 542 , 502 ,
- 522 , 572 , 477 , 432 , 507 , 517 , 517 , 472 , 542 , 587 ,
- 517 , 492 , 482 , 537 , 432 , 452 , 612 , 537 , 527 , 592 ,
- 497 , 377 , 562 , 567 , 327 , 542 , 712 , 477 , 467 , 597 ,
- 512 , 522 , 467 , 447 , 577 , 577 , 512 , 457 , 562 , 597 ,
- 472 , 417 , 462 , 587 , 477 , 347 , 532 , 552 , 482 , 487 ,
- 482 , 472 , 552 , 557 , 432 , 467 , 537 , 532 , 597 , 482 ,
- 442 , 587 , 622 , 397 , 407 , 567 , 567 , 517 , 512 , 547 ,
- 482 , 532 , 527 , 387 , 412 , 602 , 622 , 432 , 442 , 672 ,
- 542 , 357 , 537 , 547 , 432 , 522 , 612 , 462 , 507 , 567 ,
- 477 , 472 , 477 , 527 , 512 , 522 , 547 , 507 , 557 , 617 ,
- 457 , 417 , 547 , 552 , 512 , 462 , 497 , 592 , 592 , 532 ,
- 452 , 487 , 557 , 452 , 437 , 502 , 502 , 502 , 487 , 522 ,
- 542 , 492 , 477 , 492 , 497 , 467 , 507 , 537 , 527 , 492 ,
- 497 , 522 , 512 , 487 , 452 , 492 , 502 , 502 , 527 , 517 ,
- 562 , 547 , 477 , 482 , 522 , 492 , 497 , 547 , 542 , 547 ,
- 562 , 542 , 542 , 522 , 487 , 492 , 492 , 497 , 517 , 522 ,
- 532 , 542 , 532 , 472 , 467 , 502 , 457 , 497 , 552 , 502 ,
- 502 , 532 , 532 , 512 , 492 , 487 , 492 , 497 , 522 , 552 ,
- 522 , 497 , 517 , 502 , 472 , 492 , 492 , 497 , 527 , 507 ,
- 512 , 517 , 522 , 527 , 492 , 497 , 522 , 497 , 477 , 497 ,
- 512 , 492 , 502 , 547 , 532 , 452 , 487 , 532 , 462 , 512 ,
- 567 , 507 , 497 , 527 , 542 , 527 , 492 , 522 , 532 , 542 ,
- 532 , 537 , 537 , 522 , 507 , 507 , 477 , 487 , 502 , 502 ,
- 542 , 517 , 492 , 522 , 502 , 497 , 497 , 517 , 517 , 502 ,
- 502 , 502 , 512 , 522 , 527 , 507 , 512 , 502 , 497 , 502 ,
- 522 , 517 , 512 , 517 , 522 , 487 , 497 , 477 , 507 , 507 ,
- 477 , 527 , 517 , 482 , 512 , 512 , 507 , 452 , 497 , 517 ,
- 477 , 537 , 512 , 507 , 537 , 537 , 512 , 502 , 502 , 507 ,
- 532 , 517 , 547 , 532 , 512 , 547 , 507 , 482 , 492 , 547 ,
- 517 , 477 , 547 , 542 , 502 , 502 , 507 , 492 , 462 , 537 ,
- 527 , 497 , 527 , 527 , 492 , 497 , 512 , 497 , 472 , 502 ,
- 547 , 502 , 507 , 547 , 512 , 487 , 532 , 507 , 467 , 517 ,
- 527 , 462 , 502 , 532 , 502 , 507 , 512 , 472 , 467 , 502 ,
- 512 , 492 , 517 , 527 , 522 , 517 , 507 , 487 , 492 , 497 ,
- 517 , 537 , 552 , 567 , 542 , 532 , 532 , 447 , 447 , 527 ,
- 512 , 492 , 522 , 567 , 512 , 487 , 537 , 492 , 452 , 512 ,
- 537 , 522 , 517 , 532 , 507 , 487 , 502 , 512 , 477 , 502 ,
- 527 , 532 , 527 , 517 , 522 , 492 , 517 , 527 , 492 , 522 ,
- 517 , 507 , 532 , 497 , 512 , 517 , 497 , 497 , 482 , 477 ,
- 492 , 472 , 487 , 497 , 512 , 522 , 502 , 507 , 507 , 487 ,
- 502 , 502 , 522 , 527 , 512 , 537 , 542 , 522 , 492 , 477 ,
- 502 , 487 , 502 , 517 , 487 , 527 , 532 , 512 , 507 , 517 ,
- 517 , 507 , 532 , 547 , 507 , 562 , 572 , 532 , 532 , 512 ,
- 497 , 517 , 502 , 527 , 542 , 537 , 517 , 502 , 507 , 482 ,
- 472 , 502 , 497 , 487 , 497 , 512 , 497 , 482 , 487 , 482 ,
- 457 , 492 , 527 , 502 , 482 , 502 , 522 , 497 , 487 , 502 ,
- 517 , 522 , 517 , 527 , 512 , 497 , 547 , 532 , 527 , 527 ,
- 497 , 512 , 517 , 492 , 532 , 522 , 507 , 522 , 522 , 502 ,
- 467 , 502 , 507 , 492 , 542 , 497 , 492 , 552 , 527 , 512 ,
- 487 , 487 , 527 , 502 , 507 , 542 , 517 , 502 , 542 , 527 ,
- 487 , 522 , 562 , 537 , 522 , 542 , 497 , 487 , 502 , 512 ,
- 497 , 467 , 522 , 502 , 457 , 487 , 487 , 477 , 487 , 487 ,
- 502 , 477 , 472 , 542 , 537 , 502 , 517 , 532 , 527 , 512 ,
- 562 , 527 , 482 , 542 , 517 , 482 , 502 , 492 , 512 , 527 ,
- 502 , 482 , 482 , 507 , 532 , 512 , 522 , 517 , 477 , 532 ,
- 557 , 482 , 497 , 572 , 522 , 497 , 527 , 517 , 487 , 517 ,
- 532 , 512 , 477 , 492 , 542 , 507 , 522 , 547 , 497 , 507 ,
- 532 , 532 , 492 , 487 , 547 , 512 , 482 , 517 , 472 , 482 ,
- 512 , 492 , 482 , 482 , 507 , 522 , 527 , 517 , 507 , 512 ,
- 477 , 502 , 527 , 487 , 497 , 567 , 542 , 482 , 487 , 502 ,
- 492 , 477 , 497 , 502 , 497 , 497 , 507 , 522 , 472 , 472 ,
- 552 , 507 , 502 , 542 , 542 , 567 , 522 , 562 , 557 , 482 ,
- 542 , 547 , 512 , 517 , 517 , 527 , 527 , 512 , 542 , 492 ,
- 462 , 507 , 467 , 452 , 497 , 522 , 527 , 522 , 547 , 477 ,
- 462 , 512 , 467 , 477 , 492 , 507 , 537 , 517 , 532 , 532 ,
- 457 , 512 , 537 , 497 , 527 , 527 , 557 , 547 , 497 , 507 ,
- 487 , 487 , 507 , 472 , 492 , 497 , 507 , 522 , 487 , 527 ,
- 497 , 467 , 482 , 492 , 497 , 487 , 537 , 602 , 517 , 507 ,
- 542 , 502 , 477 , 482 , 542 , 537 , 452 , 557 , 592 , 472 ,
- 497 , 587 , 522 , 417 , 517 , 557 , 442 , 497 , 622 , 562 ,
- 522 , 542 , 522 , 467 , 447 , 472 , 482 , 497 , 567 , 577 ,
- 517 , 477 , 517 , 472 , 412 , 467 , 522 , 502 , 532 , 552 ,
- 547 , 532 , 492 , 487 , 457 , 497 , 502 , 512 , 552 , 477 ,
- 522 , 547 , 472 , 472 , 472 , 482 , 512 , 442 , 547 , 562 ,
- 492 , 587 , 527 , 492 , 492 , 552 , 532 , 497 , 522 , 567 ,
- 572 , 467 , 542 , 562 , 412 , 477 , 547 , 477 , 392 , 652 ,
- 467 , 457 , 652 , 427 , 487 , 562 , 452 , 427 , 662 , 422 ,
- 482 , 742 , 432 , 562 , 552 , 397 , 562 , 437 , 452 , 537 ,
- 472 , 602 , 542 , 452 , 627 , 357 , 572 , 412 , 497 , 537 ,
- 392 , 712 , 412 , 612 , 517 , 367 , 592 , 287 , 582 , 392 ,
- 537 , 592 , 452 , 642 , 507 , 457 , 567 , 402 , 527 , 537 ,
- 457 , 617 , 487 , 587 , 552 , 422 , 642 , 297 , 647 , 497 ,
- 442 , 632 , 472 , 587 , 552 , 472 , 522 , 462 , 447 , 537 ,
- 447 , 572 , 457 , 612 , 567 , 432 , 627 , 337 , 587 , 437 ,
- 452 , 622 , 362 , 657 , 542 , 452 , 602 , 337 , 607 , 367 ,
- 517 , 472 , 422 , 702 , 367 , 722 , 347 , 527 , 502 , 347 ,
- 632 , 297 , 702 , 437 , 597 , 617 , 417 , 712 , 267 , 702 ,
- 367 , 572 , 537 , 477 , 712 , 357 , 772 , 277 , 642 , 397 ,
- 452 , 552 , 347 , 672 , 317 , 772 , 327 , 607 , 447 , 407 ,
- 612 , 297 , 627 , 392 , 712 , 417 , 672 , 522 , 492 , 582 ,
- 412 , 637 , 372 , 617 , 467 , 617 , 442 , 547 , 557 , 417 ,
- 507 , 457 , 527 , 402 , 597 , 447 , 617 , 427 , 587 , 477 ,
- 432 , 502 , 432 , 542 , 422 , 597 , 462 , 602 , 487 , 522 ,
- 492 , 482 , 487 , 522 , 487 , 462 , 652 , 462 , 612 , 492 ,
- 522 , 472 , 527 , 532 , 387 , 692 , 362 , 672 , 422 , 582 ,
- 427 , 542 , 447 , 457 , 542 , 417 , 627 , 452 , 617 , 507 ,
- 552 , 482 , 502 , 502 , 472 , 537 , 522 , 532 , 582 , 447 ,
- 622 , 427 , 482 , 537 , 487 , 452 , 507 , 562 , 487 , 572 ,
- 462 , 547 , 482 , 487 , 462 , 532 , 482 , 447 , 632 , 442 ,
- 567 , 497 , 512 , 502 , 517 , 407 , 557 , 492 , 467 , 622 ,
- 437 , 597 , 412 , 597 , 327 , 602 , 402 , 567 , 472 , 537 ,
- 522 , 537 , 482 , 467 , 557 , 382 , 627 , 327 , 637 , 457 ,
- 637 , 482 , 612 , 497 , 532 , 557 , 467 , 567 , 507 , 542 ,
- 562 , 522 , 547 , 462 , 557 , 452 , 547 , 467 , 507 , 472 ,
- 512 , 502 , 557 , 432 , 562 , 437 , 497 , 452 , 517 , 492 ,
- 482 , 567 , 517 , 517 , 472 , 507 , 522 , 437 , 492 , 537 ,
- 502 , 497 , 522 , 617 , 397 , 652 , 397 , 592 , 432 , 572 ,
- 462 , 552 , 552 , 447 , 617 , 417 , 557 , 412 , 642 , 317 ,
- 637 , 407 , 572 , 537 , 492 , 517 , 462 , 542 , 427 , 622 ,
- 367 , 647 , 477 , 612 , 472 , 577 , 472 , 567 , 462 , 542 ,
- 467 , 552 , 487 , 557 , 547 , 437 , 612 , 387 , 542 , 482 ,
- 462 , 512 , 517 , 502 , 527 , 572 , 417 , 622 , 477 , 482 ,
- 507 , 577 , 367 , 597 , 467 , 537 , 467 , 512 , 457 , 512 ,
- 482 , 432 , 547 , 452 , 532 , 562 , 437 , 532 , 467 , 532 ,
- 487 , 502 , 467 , 582 , 542 , 547 , 562 , 507 , 552 , 557 ,
- 512 , 527 , 457 , 552 , 512 , 532 , 517 , 512 , 502 , 527 ,
- 492 , 512 , 437 , 507 , 487 , 582 , 472 , 517 , 467 , 597 ,
- 407 , 572 , 457 , 472 , 537 , 552 , 502 , 532 , 547 , 477 ,
- 562 , 497 , 452 , 537 , 472 , 527 , 502 , 582 , 412 , 572 ,
- 537 , 437 , 552 , 462 , 447 , 582 , 432 , 582 , 452 , 547 ,
- 457 , 547 , 482 , 462 , 517 , 412 , 592 , 472 , 497 , 542 ,
- 492 , 572 , 447 , 587 , 427 , 592 , 447 , 577 , 512 , 502 ,
- 547 , 547 , 422 , 597 , 437 , 572 , 422 , 622 , 487 , 552 ,
- 512 , 537 , 532 , 492 , 497 , 477 , 482 , 547 , 487 , 572 ,
- 487 , 537 , 512 , 547 , 467 , 502 , 472 , 562 , 477 , 542 ,
- 452 , 552 , 457 , 542 , 487 , 432 , 532 , 512 , 457 , 547 ,
- 507 , 467 , 532 , 507 , 472 , 492 , 432 , 552 , 527 , 522 ,
- 557 , 477 , 567 , 482 , 547 , 522 , 437 , 532 , 527 , 577 ,
- 387 , 627 , 472 , 527 , 557 , 452 , 537 , 437 , 637 , 382 ,
- 657 , 432 , 512 , 607 , 427 , 557 , 432 , 547 , 467 , 587 ,
- 447 , 567 , 512 , 467 , 597 , 462 , 472 , 507 , 512 , 602 ,
- 382 , 627 , 477 , 567 , 437 , 597 , 432 , 502 , 562 , 442 ,
- 497 , 512 , 492 , 502 , 497 , 487 , 487 , 422 , 522 , 447 ,
- 532 , 432 , 622 , 432 , 612 , 417 , 587 , 482 , 562 , 472 ,
- 617 , 467 , 592 , 487 , 532 , 507 , 542 , 467 , 502 , 512 ,
- 507 , 507 , 532 , 477 , 577 , 447 , 587 , 432 , 562 , 462 ,
- 557 , 487 , 577 , 517 , 537 , 477 , 632 , 412 , 517 , 527 ,
- 442 , 547 , 497 , 527 , 462 , 502 , 492 , 467 , 522 , 402 ,
- 602 , 497 , 442 , 607 , 462 , 452 , 602 , 497 , 477 , 522 ,
- 492 , 517 , 572 , 427 , 617 , 442 , 497 , 572 , 432 , 547 ,
- 437 , 572 , 502 , 532 , 492 , 487 , 517 , 487 , 527 , 482 ,
- 492 , 547 , 497 , 512 , 527 , 517 , 502 , 522 , 497 , 442 ,
- 562 , 442 , 587 , 502 , 532 , 527 , 497 , 557 , 492 , 557 ,
- 522 , 517 , 542 , 532 , 542 , 487 , 567 , 462 , 532 , 432 ,
- 537 , 477 , 527 , 432 , 562 , 542 , 477 , 502 , 497 , 487 ,
- 482 , 462 , 522 , 462 , 502 , 482 , 607 , 402 , 557 , 482 ,
- 497 , 467 , 552 , 472 , 537 , 507 , 517 , 467 , 577 , 422 ,
- 612 , 462 , 552 , 532 , 522 , 482 , 572 , 507 , 492 , 522 ,
- 557 , 432 , 607 , 452 , 597 , 487 , 542 , 502 , 517 , 512 ,
- 467 , 567 , 507 , 477 , 552 , 472 , 557 , 447 , 567 , 452 ,
- 497 , 512 , 517 , 457 , 547 , 502 , 472 , 552 , 492 , 477 ,
- 547 , 507 , 532 , 552 , 487 , 527 , 487 , 532 , 537 , 452 ,
- 497 , 522 , 502 , 472 , 532 , 487 , 522 , 502 , 467 , 527 ,
- 452 , 482 , 572 , 522 , 392 , 672 , 422 , 487 , 557 , 457 ,
- 492 , 567 , 467 , 457 , 622 , 377 , 602 , 527 , 422 , 552 ,
- 502 , 512 , 522 , 602 , 457 , 637 , 482 , 577 , 507 , 502 ,
- 557 , 477 , 552 , 522 , 487 , 532 , 522 , 457 , 547 , 422 ,
- 517 , 452 , 467 , 552 , 462 , 527 , 467 , 557 , 482 , 517 ,
- 492 , 507 , 522 , 537 , 527 , 497 , 562 , 502 , 537 , 467 ,
- 497 , 507 , 507 , 482 , 562 , 502 , 532 , 457 , 532 , 472 ,
- 382 , 577 , 472 , 477 , 622 , 417 , 622 , 472 , 542 , 517 ,
- 527 , 432 , 502 , 567 , 452 , 547 , 517 , 507 , 507 , 537 ,
- 432 , 547 , 457 , 532 , 562 , 482 , 552 , 517 , 537 , 517 ,
- 487 , 527 , 502 , 512 , 557 , 557 , 527 , 592 , 472 , 522 ,
- 492 , 462 , 542 , 437 , 597 , 442 , 612 , 437 , 577 , 492 ,
- 437 , 522 , 462 , 512 , 477 , 527 , 512 , 472 , 592 , 387 ,
- 542 , 397 , 467 , 497 , 462 , 607 , 377 , 692 , 357 , 627 ,
- 382 , 542 , 497 , 437 , 647 , 387 , 702 , 422 , 682 , 517 ,
- 487 , 537 , 457 , 557 , 377 , 637 , 457 , 592 , 552 , 522 ,
- 522 , 507 , 422 , 452 , 617 , 372 , 582 , 502 , 607 , 462 ,
- 602 , 477 , 487 , 452 , 472 , 587 , 497 , 572 , 482 , 597 ,
- 467 , 552 , 477 , 407 , 517 , 417 , 577 , 502 , 567 , 507 ,
- 492 , 547 , 397 , 542 , 307 , 532 , 507 , 532 , 622 , 532 ,
- 572 , 502 , 537 , 472 , 467 , 492 , 432 , 622 , 447 , 557 ,
- 537 , 437 , 532 , 482 , 422 , 487 , 537 , 427 , 612 , 627 ,
- 472 , 577 , 492 , 422 , 592 , 492 , 457 , 552 , 507 , 587 ,
- 657 , 407 , 542 , 552 , 347 , 557 , 422 , 547 , 622 , 412 ,
- 637 , 562 , 432 , 537 , 517 , 402 , 512 , 582 , 442 , 642 ,
- 472 , 497 , 627 , 392 , 512 , 432 , 337 , 542 , 557 , 492 ,
- 617 , 502 , 467 , 597 , 362 , 517 , 482 , 362 , 607 , 522 ,
- 537 , 627 , 492 , 457 , 577 , 422 , 407 , 547 , 422 , 512 ,
- 722 , 447 , 672 , 572 , 307 , 572 , 462 , 432 , 592 , 542 ,
- 497 , 712 , 532 , 457 , 562 , 382 , 512 , 507 , 497 , 592 ,
- 537 , 562 , 452 , 552 , 452 , 392 , 532 , 362 , 577 , 527 ,
- 462 , 552 , 567 , 437 , 547 , 487 , 337 , 692 , 327 , 527 ,
- 772 , 287 , 732 , 477 , 432 , 607 , 362 , 632 , 387 , 547 ,
- 632 , 372 , 587 , 587 , 477 , 542 , 417 , 447 , 497 , 537 ,
- 617 , 437 , 517 , 577 , 422 , 597 , 477 , 407 , 457 , 492 ,
- 492 , 517 , 672 , 397 , 512 , 682 , 307 , 602 , 592 , 287 ,
- 632 , 537 , 472 , 702 , 552 , 457 , 512 , 537 , 337 , 467 ,
- 647 , 597 , 477 , 557 , 442 , 457 , 567 , 462 , 617 , 237 ,
- 547 , 567 , 467 , 877 , 277 , 487 , 477 , 337 , 762 , 412 ,
- 417 , 547 , 482 , 602 , 577 , 507 , 382 , 447 , 482 , 627 ,
- 572 , 217 , 532 , 547 , 392 , 732 , 627 , 287 , 627 , 487 ,
- 377 , 772 , 307 , 557 , 692 , 347 , 692 , 587 , 417 , 337 ,
- 612 , 482 , 442 , 742 , 337 , 527 , 642 , 347 , 467 , 622 ,
- 277 , 497 , 792 , 337 , 672 , 622 , 327 , 597 , 447 , 417 ,
- 532 , 537 , 442 , 632 , 562 , 432 , 692 , 427 , 427 , 662 ,
- 357 , 507 , 662 , 442 , 552 , 452 , 482 , 517 , 432 , 502 ,
- 387 , 467 , 597 , 422 , 622 , 517 , 432 , 567 , 437 , 562 ,
- 552 , 392 , 497 , 612 , 477 , 477 , 507 , 452 , 547 , 637 ,
- 577 , 442 , 442 , 457 , 502 , 577 , 502 , 557 , 627 , 517 ,
- 557 , 672 , 327 , 377 , 627 , 392 , 607 , 682 , 442 , 472 ,
- 407 , 462 , 497 , 512 , 517 , 592 , 482 , 402 , 647 , 527 ,
- 457 , 492 , 582 , 412 , 407 , 742 , 482 , 502 , 597 , 442 ,
- 452 , 347 , 507 , 432 , 472 , 837 , 572 , 452 , 382 , 257 ,
- 472 , 442 , 772 , 702 , 467 , 652 , 397 , 377 , 567 , 327 ,
- 517 , 557 , 592 , 742 , 457 , 522 , 347 , 267 , 682 , 572 ,
- 542 , 477 , 407 , 522 , 497 , 752 , 532 , 377 , 612 , 337 ,
- 452 , 622 , 492 , 587 , 542 , 582 , 517 , 457 , 622 , 337 ,
- 452 , 562 , 427 , 802 , 557 , 597 , 532 , 287 , 587 , 287 ,
- 502 , 572 , 337 , 742 , 472 , 457 , 537 , 387 , 552 , 287 ,
- 572 , 542 , 337 , 762 , 507 , 377 , 617 , 467 , 462 , 507 ,
- 642 , 432 , 432 , 762 , 347 , 372 , 772 , 437 , 502 , 722 ,
- 372 , 422 , 562 , 602 , 587 , 587 , 527 , 297 , 442 , 542 ,
- 492 , 497 , 662 , 567 , 447 , 647 , 407 , 357 , 452 , 512 ,
- 442 , 587 , 632 , 372 , 617 , 692 , 467 , 532 , 447 , 317 ,
- 407 , 607 , 617 , 537 , 507 , 457 , 347 , 572 , 612 , 402 ,
- 532 , 607 , 417 , 492 , 672 , 382 , 472 , 712 , 467 , 447 ,
- 557 , 412 , 307 , 682 , 712 , 442 , 602 , 507 , 317 , 467 ,
- 482 , 472 , 477 , 652 , 542 , 407 , 662 , 347 , 452 , 572 ,
- 382 , 537 , 557 , 477 , 582 , 607 , 437 , 487 , 477 , 597 ,
- 642 , 522 , 657 , 417 , 287 , 572 , 587 , 497 , 752 , 637 ,
- 207 , 457 , 557 , 432 , 612 , 607 , 447 , 377 , 577 , 462 ,
- 397 , 692 , 512 , 402 , 547 , 422 , 307 , 532 , 647 , 602 ,
- 567 , 572 , 307 , 317 , 507 , 427 , 597 , 647 , 602 , 587 ,
- 417 , 412 , 472 , 357 , 692 , 652 , 522 , 742 , 387 , 387 ,
- 457 , 387 , 587 , 532 , 517 , 567 , 562 , 502 , 547 , 582 ,
- 357 , 472 , 497 , 412 , 557 , 602 , 442 , 572 , 552 , 487 ,
- 617 , 567 , 527 , 427 , 422 , 442 , 502 , 592 , 527 , 507 ,
- 512 , 512 , 377 , 477 , 637 , 397 , 572 , 622 , 407 , 527 ,
- 592 , 522 , 497 , 587 , 412 , 247 , 632 , 602 , 457 , 752 ,
- 547 , 317 , 547 , 497 , 472 , 472 , 547 , 397 , 412 , 627 ,
- 507 , 457 , 657 , 432 , 457 , 607 , 417 , 407 , 462 , 447 ,
- 562 , 692 , 617 , 527 , 552 , 357 , 487 , 542 , 382 , 607 ,
- 702 , 607 , 592 , 582 , 402 , 257 , 447 , 377 , 437 , 742 ,
- 617 , 662 , 672 , 397 , 347 , 307 , 482 , 472 , 562 , 722 ,
- 382 , 507 , 587 , 472 , 632 , 542 , 437 , 297 , 347 , 572 ,
- 542 , 712 , 837 , 392 , 377 , 402 , 267 , 562 , 682 , 637 ,
- 542 , 472 , 422 , 327 , 557 , 517 , 487 , 597 , 512 , 497 ,
- 502 , 502 , 517 , 497 , 602 , 577 , 477 , 562 , 487 , 387 ,
- 512 , 452 , 467 , 522 , 597 , 702 , 607 , 602 , 402 , 317 ,
- 367 , 337 , 537 , 582 , 742 , 647 , 472 , 682 , 337 , 347 ,
- 647 , 372 , 492 , 652 , 417 , 537 , 577 , 547 , 537 , 567 ,
- 552 , 397 , 372 , 477 , 462 , 472 , 692 , 662 , 457 , 537 ,
- 377 , 227 , 452 , 517 , 492 , 547 , 762 , 552 , 462 , 532 ,
- 287 , 327 , 512 , 522 , 742 , 692 , 597 , 547 , 307 , 397 ,
- 432 , 452 , 722 , 597 , 567 , 577 , 412 , 462 , 497 , 527 ,
- 417 , 552 , 527 , 507 , 632 , 407 , 567 , 502 , 472 , 562 ,
- 457 , 637 , 397 , 457 , 467 , 267 , 592 , 647 , 672 , 692 ,
- 522 , 377 , 277 , 397 , 492 , 622 , 772 , 607 , 512 , 562 ,
- 317 , 437 , 572 , 457 , 582 , 487 , 472 , 532 , 447 , 497 ,
- 497 , 437 , 457 , 572 , 432 , 572 , 612 , 452 , 497 , 432 ,
- 397 , 502 , 592 , 527 , 602 , 527 , 497 , 527 , 447 , 507 ,
- 452 , 522 , 542 , 482 , 562 , 552 , 487 , 482 , 527 , 432 ,
- 482 , 577 , 497 , 657 , 652 , 437 , 512 , 402 , 337 , 572 ,
- 607 , 642 , 772 , 492 , 277 , 317 , 337 , 482 , 742 , 762 ,
- 622 , 592 , 327 , 277 , 422 , 447 , 607 , 577 , 557 , 402 ,
- 497 , 492 , 432 , 577 , 387 , 532 , 542 , 592 , 732 , 602 ,
- 497 , 347 , 327 , 307 , 452 , 622 , 542 , 722 , 592 , 397 ,
- 552 , 442 , 502 , 602 , 372 , 477 , 462 , 427 , 632 , 592 ,
- 557 , 527 , 402 , 547 , 407 , 532 , 647 , 512 , 682 , 547 ,
- 347 , 432 , 457 , 357 , 572 , 692 , 522 , 657 , 562 , 457 ,
- 577 , 527 , 517 , 507 , 457 , 467 , 432 , 567 , 607 , 587 ,
- 632 , 377 , 337 , 517 , 337 , 477 , 702 , 437 , 432 , 522 ,
- 437 , 372 , 587 , 692 , 387 , 542 , 642 , 227 , 542 , 702 ,
- 347 , 522 , 607 , 317 , 432 , 682 , 552 , 462 , 702 , 462 ,
- 247 , 627 , 522 , 472 , 772 , 602 , 432 , 487 , 427 , 357 ,
- 542 , 712 , 512 , 642 , 732 , 287 , 432 , 637 , 287 , 472 ,
- 692 , 307 , 447 , 632 , 392 , 607 , 672 , 407 , 517 , 482 ,
- 432 , 562 , 502 , 557 , 532 , 507 , 517 , 442 , 557 , 522 ,
- 502 , 467 , 427 , 392 , 447 , 627 , 662 , 632 , 702 , 392 ,
- 307 , 327 , 277 , 532 , 682 , 657 , 702 , 507 , 377 , 422 ,
- 382 , 537 , 607 , 562 , 592 , 462 , 442 , 337 , 482 , 557 ,
- 502 , 702 , 512 , 377 , 522 , 482 , 527 , 672 , 612 , 472 ,
- 482 , 387 , 397 , 607 , 642 , 647 , 712 , 437 , 347 , 362 ,
- 372 , 602 , 657 , 672 , 637 , 402 , 382 , 347 , 337 , 552 ,
- 572 , 647 , 622 , 482 , 452 , 382 , 502 , 517 , 447 , 512 ,
- 437 , 482 , 592 , 647 , 632 , 492 , 522 , 307 , 347 , 467 ,
- 457 , 722 , 682 , 637 , 522 , 317 , 347 , 327 , 547 , 577 ,
- 657 , 732 , 437 , 457 , 327 , 427 , 542 , 467 , 762 , 582 ,
- 487 , 657 , 397 , 417 , 532 , 462 , 457 , 497 , 517 , 412 ,
- 502 , 662 , 462 , 602 , 537 , 362 , 502 , 522 , 497 , 537 ,
- 612 , 542 , 517 , 657 , 532 , 477 , 577 , 412 , 237 , 502 ,
- 477 , 432 , 812 , 742 , 517 , 502 , 267 , 207 , 357 , 577 ,
- 742 , 692 , 782 , 482 , 207 , 367 , 277 , 487 , 772 , 622 ,
- 577 , 437 , 347 , 327 , 507 , 692 , 432 , 672 , 587 , 182 ,
- 572 , 472 , 457 , 762 , 652 , 527 , 457 , 502 , 337 , 527 ,
- 802 , 512 , 657 , 597 , 267 , 412 , 362 , 387 , 602 , 597 ,
- 672 , 547 , 457 , 482 , 347 , 447 , 497 , 497 , 587 , 607 ,
- 627 , 542 , 452 , 422 , 372 , 397 , 482 , 587 , 692 , 627 ,
- 627 , 502 , 337 , 417 , 362 , 412 , 572 , 577 , 587 , 627 ,
- 507 , 437 , 542 , 412 , 457 , 607 , 432 , 477 , 662 , 497 ,
- 532 , 682 , 472 , 387 , 482 , 347 , 367 , 557 , 572 , 542 ,
- 712 , 577 , 347 , 442 , 417 , 347 , 602 , 617 , 472 , 602 ,
- 607 , 447 , 552 , 537 , 452 , 522 , 487 , 532 , 567 , 617 ,
- 627 , 522 , 452 , 347 , 337 , 552 , 592 , 712 , 752 , 507 ,
- 432 , 362 , 277 , 442 , 517 , 657 , 622 , 507 , 447 , 317 ,
- 412 , 487 , 562 , 652 , 537 , 482 , 442 , 357 , 467 , 567 ,
- 547 , 527 , 512 , 402 , 427 , 582 , 617 , 672 , 732 , 582 ,
- 387 , 372 , 287 , 317 , 602 , 652 , 702 , 792 , 507 , 422 ,
- 447 , 347 , 402 , 532 , 492 , 482 , 602 , 572 , 507 , 557 ,
- 527 , 307 , 422 , 447 , 357 , 672 , 692 , 607 , 632 , 532 ,
- 397 , 382 , 567 , 447 , 552 , 627 , 412 , 442 , 487 , 487 ,
- 582 , 752 , 632 , 512 , 542 , 277 , 277 , 547 , 447 , 542 ,
- 782 , 532 , 442 , 557 , 362 , 422 , 567 , 517 , 502 , 532 ,
- 442 , 397 , 507 , 452 , 472 , 627 , 542 , 542 , 577 , 452 ,
- 397 , 477 , 447 , 427 , 572 , 657 , 607 , 657 , 597 , 367 ,
- 442 , 447 , 382 , 542 , 607 , 602 , 602 , 637 , 512 , 402 ,
- 507 , 422 , 517 , 577 , 507 , 562 , 472 , 532 , 547 , 472 ,
- 587 , 472 , 427 , 442 , 357 , 522 , 477 , 542 , 702 , 432 ,
- 467 , 462 , 327 , 492 , 542 , 542 , 557 , 602 , 512 , 432 ,
- 552 , 552 , 587 , 607 , 527 , 467 , 402 , 447 , 492 , 502 ,
- 627 , 632 , 547 , 532 , 422 , 307 , 397 , 482 , 512 , 672 ,
- 652 , 542 , 557 , 407 , 347 , 427 , 487 , 552 , 592 , 587 ,
- 512 , 477 , 462 , 487 , 492 , 532 , 562 , 537 , 537 , 482 ,
- 537 , 562 , 562 , 617 , 502 , 447 , 462 , 452 , 497 , 537 ,
- 562 , 572 , 507 , 512 , 452 , 437 , 562 , 512 , 562 , 547 ,
- 402 , 417 , 412 , 457 , 537 , 572 , 642 , 577 , 522 , 427 ,
- 317 , 427 , 497 , 532 , 652 , 587 , 527 , 502 , 447 , 482 ,
- 462 , 547 , 537 , 552 , 582 , 407 , 477 , 472 , 432 , 607 ,
- 507 , 462 , 582 , 467 , 532 , 622 , 547 , 647 , 547 , 447 ,
- 392 , 317 , 392 , 497 , 702 , 732 , 692 , 652 , 407 , 362 ,
- 347 , 337 , 562 , 682 , 652 , 617 , 477 , 307 , 337 , 472 ,
- 477 , 607 , 702 , 527 , 537 , 522 , 397 , 447 , 487 , 457 ,
- 512 , 472 , 442 , 497 , 562 , 582 , 547 , 557 , 442 , 397 ,
- 472 , 422 , 472 , 567 , 537 , 582 , 577 , 507 , 467 , 542 ,
- 557 , 472 , 577 , 502 , 397 , 582 , 537 , 442 , 642 , 557 ,
- 462 , 552 , 452 , 442 , 537 , 587 , 592 , 587 , 552 , 402 ,
- 417 , 417 , 422 , 502 , 552 , 627 , 517 , 522 , 507 , 447 ,
- 582 , 522 , 512 , 447 , 412 , 427 , 507 , 622 , 572 , 672 ,
- 582 , 432 , 522 , 382 , 427 , 517 , 542 , 542 , 457 , 522 ,
- 487 , 527 , 577 , 507 , 532 , 447 , 457 , 447 , 467 , 517 ,
- 487 , 632 , 507 , 487 , 552 , 362 , 477 , 507 , 402 , 557 ,
- 532 , 587 , 577 , 542 , 547 , 412 , 512 , 487 , 492 , 637 ,
- 542 , 617 , 597 , 462 , 527 , 462 , 442 , 512 , 552 , 497 ,
- 527 , 592 , 472 , 432 , 522 , 407 , 467 , 592 , 547 , 622 ,
- 572 , 472 , 522 , 402 , 447 , 492 , 427 , 562 , 577 , 497 ,
- 537 , 517 , 472 , 442 , 472 , 422 , 387 , 532 , 537 , 557 ,
- 622 , 502 , 492 , 472 , 422 , 517 , 517 , 622 , 632 , 597 ,
- 547 , 357 , 432 , 442 , 462 , 627 , 562 , 582 , 547 , 422 ,
- 422 , 467 , 482 , 572 , 672 , 522 , 462 , 467 , 392 , 477 ,
- 572 , 567 , 537 , 557 , 502 , 442 , 592 , 592 , 577 , 672 ,
- 392 , 317 , 377 , 297 , 532 , 702 , 752 , 732 , 577 , 457 ,
- 307 , 362 , 442 , 502 , 672 , 647 , 527 , 452 , 357 , 327 ,
- 477 , 557 , 567 , 577 , 512 , 407 , 407 , 452 , 462 , 562 ,
- 617 , 552 , 472 , 407 , 412 , 412 , 612 , 692 , 647 , 722 ,
- 572 , 402 , 397 , 347 , 422 , 557 , 612 , 652 , 617 , 487 ,
- 437 , 447 , 427 , 522 , 562 , 527 , 577 , 492 , 397 , 452 ,
- 447 , 547 , 647 , 622 , 622 , 527 , 422 , 412 , 412 , 417 ,
- 527 , 592 , 567 , 582 , 527 , 427 , 457 , 462 , 462 , 542 ,
- 517 , 532 , 582 , 507 , 517 , 562 , 437 , 487 , 527 , 432 ,
- 512 , 527 , 537 , 612 , 602 , 552 , 487 , 457 , 307 , 387 ,
- 447 , 442 , 647 , 622 , 597 , 587 , 392 , 372 , 407 , 442 ,
- 542 , 582 , 582 , 547 , 497 , 492 , 497 , 537 , 592 , 577 ,
- 512 , 452 , 437 , 407 , 517 , 642 , 617 , 672 , 622 , 452 ,
- 462 , 417 , 407 , 517 , 572 , 557 , 562 , 567 , 457 , 517 ,
- 482 , 412 , 477 , 412 , 437 , 547 , 497 , 607 , 622 , 512 ,
- 497 , 407 , 317 , 357 , 462 , 527 , 622 , 732 , 637 , 562 ,
- 547 , 437 , 447 , 487 , 477 , 512 , 497 , 497 , 522 , 457 ,
- 552 , 597 , 522 , 567 , 507 , 452 , 527 , 467 , 472 , 507 ,
- 457 , 512 , 542 , 517 , 552 , 572 , 467 , 487 , 522 , 407 ,
- 487 , 652 , 557 , 552 , 587 , 432 , 337 , 427 , 432 , 462 ,
- 627 , 642 , 647 , 602 , 457 , 467 , 427 , 412 , 582 , 592 ,
- 527 , 587 , 577 , 437 , 482 , 507 , 487 , 522 , 582 , 532 ,
- 402 , 432 , 452 , 432 , 532 , 587 , 592 , 522 , 462 , 457 ,
- 347 , 372 , 492 , 557 , 587 , 597 , 657 , 552 , 432 , 502 ,
- 377 , 347 , 462 , 532 , 582 , 552 , 702 , 622 , 427 , 592 ,
- 512 , 367 , 517 , 532 , 552 , 547 , 612 , 632 , 502 , 547 ,
- 562 , 452 , 452 , 507 , 532 , 417 , 452 , 552 , 427 , 472 ,
- 567 , 487 , 467 , 477 , 487 , 477 , 447 , 442 , 592 , 577 ,
- 442 , 662 , 597 , 392 , 577 , 522 , 372 , 497 , 557 , 502 ,
- 532 , 612 , 492 , 502 , 497 , 347 , 517 , 527 , 422 , 657 ,
- 637 , 452 , 477 , 477 , 392 , 377 , 522 , 542 , 572 , 652 ,
- 552 , 587 , 497 , 317 , 507 , 447 , 407 , 577 , 607 , 597 ,
- 562 , 582 , 547 , 377 , 432 , 452 , 472 , 502 , 542 , 692 ,
- 602 , 592 , 557 , 447 , 442 , 377 , 477 , 562 , 542 , 587 ,
- 577 , 642 , 462 , 402 , 562 , 417 , 452 , 557 , 447 , 537 ,
- 527 , 467 , 472 , 532 , 432 , 442 , 622 , 487 , 432 , 547 ,
- 432 , 497 , 527 , 362 , 512 , 527 , 417 , 542 , 607 , 557 ,
- 527 , 617 , 562 , 432 , 567 , 422 , 522 , 612 , 397 , 592 ,
- 582 , 522 , 652 , 532 , 532 , 462 , 442 , 402 , 367 , 542 ,
- 482 , 582 , 712 , 532 , 532 , 402 , 337 , 472 , 452 , 517 ,
- 627 , 632 , 517 , 517 , 467 , 337 , 527 , 582 , 512 , 657 ,
- 562 , 457 , 502 , 432 , 452 , 572 , 547 , 597 , 612 , 432 ,
- 387 , 467 , 377 , 517 , 682 , 487 , 537 , 582 , 347 , 417 ,
- 502 , 467 , 572 , 627 , 567 , 492 , 427 , 377 , 412 , 452 ,
- 467 , 632 , 602 , 537 , 662 , 472 , 392 , 532 , 492 , 492 ,
- 557 , 532 , 532 , 467 , 477 , 587 , 502 , 532 , 637 , 532 ,
- 452 , 502 , 522 , 462 , 547 , 612 , 537 , 527 , 517 , 502 ,
- 467 , 427 , 502 , 547 , 477 , 532 , 587 , 442 , 412 , 497 ,
- 437 , 417 , 532 , 572 , 572 , 567 , 512 , 492 , 392 , 377 ,
- 482 , 502 , 507 , 632 , 637 , 547 , 527 , 477 , 452 , 472 ,
- 412 , 547 , 617 , 477 , 607 , 632 , 432 , 467 , 472 , 487 ,
- 477 , 492 , 592 , 542 , 512 , 472 , 517 , 437 , 357 , 587 ,
- 507 , 452 , 592 , 537 , 577 , 472 , 492 , 592 , 402 , 487 ,
- 562 , 552 , 582 , 587 , 647 , 462 , 407 , 457 , 442 , 507 ,
- 542 , 682 , 622 , 442 , 522 , 402 , 347 , 457 , 487 , 592 ,
- 512 , 477 , 552 , 447 , 492 , 532 , 552 , 567 , 477 , 502 ,
- 512 , 397 , 457 , 532 , 507 , 532 , 532 , 472 , 497 , 512 ,
- 497 , 532 , 542 , 467 , 467 , 517 , 432 , 527 , 582 , 552 ,
- 622 , 462 , 477 , 527 , 432 , 557 , 617 , 632 , 587 , 517 ,
- 487 , 372 , 387 , 437 , 527 , 672 , 617 , 597 , 567 , 422 ,
- 367 , 417 , 432 , 527 , 592 , 632 , 607 , 517 , 442 , 432 ,
- 457 , 422 , 557 , 592 , 527 , 607 , 492 , 392 , 497 , 442 ,
- 472 , 627 , 522 , 527 , 587 , 407 , 502 , 582 , 427 , 567 ,
- 572 , 417 , 442 , 432 , 397 , 497 , 612 , 527 , 612 , 587 ,
- 357 , 532 , 412 , 347 , 612 , 462 , 547 , 617 , 432 , 497 ,
- 532 , 502 , 587 , 642 , 587 , 572 , 552 , 372 , 412 , 472 ,
- 432 , 622 , 602 , 562 , 632 , 432 , 497 , 487 , 407 , 572 ,
- 522 , 552 , 562 , 462 , 502 , 512 , 472 , 522 , 502 , 412 ,
- 447 , 477 , 447 , 587 , 642 , 562 , 602 , 482 , 317 , 367 ,
- 372 , 457 , 627 , 647 , 597 , 627 , 452 , 372 , 492 , 432 ,
- 512 , 692 , 532 , 507 , 562 , 337 , 427 , 587 , 487 , 627 ,
- 642 , 442 , 467 , 412 , 357 , 507 , 582 , 592 , 642 , 587 ,
- 447 , 432 , 447 , 417 , 552 , 592 , 537 , 567 , 482 , 382 ,
- 447 , 502 , 532 , 647 , 682 , 552 , 527 , 477 , 327 , 417 ,
- 527 , 487 , 652 , 672 , 512 , 552 , 477 , 382 , 502 , 512 ,
- 492 , 587 , 542 , 457 , 512 , 477 , 412 , 537 , 517 , 452 ,
- 567 , 467 , 407 , 507 , 447 , 487 , 592 , 562 , 512 , 512 ,
- 402 , 362 , 457 , 512 , 547 , 692 , 642 , 502 , 527 , 407 ,
- 377 , 592 , 547 , 597 , 647 , 482 , 437 , 467 , 467 , 537 ,
- 672 , 587 , 547 , 507 , 317 , 402 , 462 , 517 , 622 , 627 ,
- 547 , 517 , 507 , 392 , 482 , 567 , 447 , 567 , 547 , 417 ,
- 562 , 482 , 457 , 612 , 462 , 452 , 537 , 422 , 467 , 587 ,
- 497 , 582 , 652 , 462 , 502 , 487 , 402 , 497 , 537 , 487 ,
- 502 , 552 , 462 , 507 , 562 , 482 , 567 , 502 , 377 , 427 ,
- 432 , 482 , 637 , 682 , 592 , 557 , 387 , 317 , 392 , 452 ,
- 622 , 712 , 702 , 592 , 437 , 357 , 307 , 412 , 587 , 657 ,
- 657 , 612 , 517 , 367 , 442 , 487 , 502 , 642 , 602 , 552 ,
- 522 , 457 , 497 , 527 , 502 , 517 , 477 , 427 , 502 , 532 ,
- 542 , 562 , 497 , 437 , 417 , 427 , 487 , 537 , 542 , 537 ,
- 482 , 422 , 497 , 497 , 527 , 592 , 497 , 427 , 497 , 512 ,
- 512 , 647 , 577 , 492 , 507 , 462 , 472 , 557 , 597 , 572 ,
- 552 , 462 , 367 , 452 , 527 , 562 , 592 , 537 , 427 , 457 ,
- 487 , 437 , 602 , 602 , 547 , 587 , 432 , 382 , 497 , 522 ,
- 542 , 622 , 492 , 447 , 537 , 467 , 507 , 562 , 502 , 557 ,
- 542 , 482 , 497 , 537 , 502 , 517 , 512 , 447 , 467 , 467 ,
- 517 , 567 , 547 , 552 , 507 , 497 , 502 , 427 , 442 , 452 ,
- 477 , 527 , 592 , 602 , 582 , 522 , 362 , 432 , 497 , 457 ,
- 652 , 632 , 487 , 527 , 427 , 397 , 482 , 462 , 417 , 542 ,
- 682 , 547 , 597 , 577 , 387 , 492 , 407 , 432 , 607 , 497 ,
- 592 , 672 , 527 , 482 , 522 , 412 , 387 , 642 , 462 , 422 ,
- 637 , 457 , 462 , 602 , 537 , 512 , 612 , 477 , 417 , 617 ,
- 457 , 507 , 627 , 432 , 447 , 567 , 522 , 512 , 607 , 432 ,
- 307 , 587 , 447 , 432 , 617 , 467 , 507 , 587 , 457 , 402 ,
- 552 , 452 , 362 , 517 , 477 , 472 , 642 , 632 , 642 , 542 ,
- 337 , 382 , 392 , 502 , 657 , 672 , 742 , 582 , 507 , 467 ,
- 372 , 472 , 527 , 472 , 582 , 552 , 522 , 522 , 437 , 487 ,
- 492 , 477 , 522 , 537 , 472 , 482 , 522 , 472 , 447 , 472 ,
- 517 , 497 , 427 , 577 , 587 , 567 , 637 , 502 , 442 , 452 ,
- 467 , 412 , 522 , 597 , 467 , 597 , 632 , 537 , 552 , 522 ,
- 537 , 502 , 412 , 447 , 447 , 472 , 542 , 572 , 572 , 507 ,
- 572 , 522 , 347 , 482 , 427 , 412 , 587 , 572 , 567 , 537 ,
- 462 , 462 , 492 , 452 , 452 , 517 , 477 , 532 , 632 , 472 ,
- 467 , 607 , 567 , 387 , 517 , 507 , 447 , 642 , 567 , 607 ,
- 607 , 547 , 442 , 367 , 447 , 452 , 612 , 642 , 662 , 487 ,
- 452 , 437 , 427 , 582 , 472 , 477 , 532 , 572 , 527 , 437 ,
- 502 , 412 , 347 , 407 , 597 , 532 , 587 , 672 , 447 , 547 ,
- 487 , 337 , 362 , 487 , 607 , 617 , 682 , 622 , 567 , 382 ,
- 417 , 407 , 437 , 632 , 602 , 612 , 572 , 502 , 472 , 502 ,
- 327 , 267 , 572 , 517 , 622 , 762 , 407 , 347 , 542 , 512 ,
- 512 , 572 , 377 , 467 , 522 , 467 , 582 , 462 , 457 , 597 ,
- 602 , 612 , 572 , 487 , 477 , 437 , 412 , 447 , 457 , 702 ,
- 752 , 612 , 562 , 467 , 442 , 347 , 442 , 392 , 382 , 762 ,
- 567 , 592 , 647 , 327 , 367 , 412 , 337 , 422 , 672 , 627 ,
- 592 , 732 , 457 , 357 , 417 , 297 , 452 , 642 , 557 , 617 ,
- 672 , 357 , 427 , 507 , 387 , 487 , 577 , 472 , 597 , 802 ,
- 497 , 442 , 417 , 427 , 522 , 447 , 617 , 577 , 632 , 607 ,
- 567 , 467 , 422 , 457 , 417 , 557 , 557 , 582 , 507 , 527 ,
- 517 , 422 , 552 , 422 , 422 , 517 , 487 , 597 , 542 , 482 ,
- 527 , 442 , 452 , 502 , 492 , 457 , 492 , 637 , 512 , 467 ,
- 637 , 447 , 537 , 642 , 432 , 427 , 477 , 622 , 512 , 467 ,
- 612 , 457 , 537 , 477 , 427 , 427 , 367 , 542 , 527 , 492 ,
- 672 , 547 , 397 , 532 , 427 , 417 , 552 , 432 , 527 , 672 ,
- 637 , 602 , 432 , 432 , 552 , 582 , 522 , 447 , 442 , 567 ,
- 762 , 432 , 412 , 532 , 502 , 592 , 532 , 557 , 417 , 547 ,
- 462 , 462 , 597 , 277 , 577 , 547 , 417 , 597 , 482 , 487 ,
- 627 , 532 , 257 , 477 , 482 , 457 , 657 , 467 , 522 , 722 ,
- 487 , 207 , 532 , 552 , 462 , 752 , 487 , 337 , 587 , 527 ,
- 357 , 587 , 522 , 427 , 782 , 507 , 477 , 582 , 317 , 497 ,
- 637 , 517 , 432 , 602 , 517 , 557 , 582 , 307 , 527 , 557 ,
- 492 , 572 , 477 , 492 , 557 , 452 , 472 , 662 , 407 , 357 ,
- 662 , 432 , 432 , 632 , 452 , 432 , 587 , 632 , 507 , 432 ,
- 432 , 522 , 537 , 512 , 592 , 497 , 692 , 652 , 392 , 482 ,
- 357 , 442 , 572 , 492 , 552 , 642 , 507 , 297 , 472 , 392 ,
- 407 , 597 , 502 , 572 , 587 , 502 , 512 , 472 , 347 , 442 ,
- 577 , 462 , 692 , 672 , 477 , 582 , 547 , 462 , 347 , 432 ,
- 612 , 617 , 592 , 537 , 532 , 572 , 557 , 372 , 412 , 582 ,
- 557 , 572 , 457 , 472 , 467 , 547 , 567 , 482 , 537 , 532 ,
- 497 , 467 , 397 , 392 , 562 , 517 , 542 , 607 , 397 , 507 ,
- 607 , 397 , 357 , 492 , 487 , 557 , 672 , 417 , 537 , 647 ,
- 517 , 442 , 407 , 457 , 502 , 577 , 562 , 572 , 712 , 477 ,
- 432 , 562 , 307 , 392 , 592 , 622 , 587 , 557 , 492 , 512 ,
- 597 , 287 , 402 , 627 , 497 , 507 , 612 , 497 , 437 , 582 ,
- 297 , 327 , 612 , 622 , 587 , 567 , 432 , 337 , 657 , 472 ,
- 407 , 622 , 537 , 512 , 622 , 772 , 327 , 297 , 657 , 637 ,
- 547 , 517 , 592 , 457 , 497 , 522 , 247 , 452 , 722 , 512 ,
- 347 , 642 , 572 , 297 , 362 , 432 , 472 , 572 , 592 , 542 ,
- 437 , 592 , 512 , 347 , 437 , 562 , 547 , 477 , 792 , 652 ,
- 472 , 427 , 397 , 447 , 437 , 587 , 542 , 572 , 617 , 642 ,
- 572 , 362 , 372 , 422 , 632 , 702 , 532 , 402 , 537 , 457 ,
- 417 , 567 , 337 , 602 , 617 , 457 , 642 , 372 , 392 , 457 ,
- 547 , 547 , 467 , 607 , 522 , 632 , 517 , 412 , 477 , 537 ,
- 562 , 492 , 542 , 437 , 637 , 587 , 267 , 397 , 532 , 607 ,
- 552 , 412 , 487 , 692 , 562 , 382 , 377 , 537 , 587 , 567 ,
- 527 , 347 , 557 , 802 , 477 , 307 , 527 , 477 , 522 , 477 ,
- 317 , 587 , 732 , 432 , 487 , 547 , 287 , 547 , 477 , 317 ,
- 682 , 627 , 472 , 637 , 517 , 247 , 657 , 577 , 337 , 742 ,
- 617 , 467 , 582 , 467 , 412 , 597 , 522 , 507 , 622 , 487 ,
- 497 , 517 , 417 , 412 , 622 , 527 , 487 , 597 , 377 , 517 ,
- 532 , 257 , 552 , 692 , 487 , 557 , 537 , 377 , 462 , 542 ,
- 417 , 457 , 627 , 617 , 527 , 392 , 417 , 392 , 512 , 762 ,
- 467 , 367 , 692 , 612 , 372 , 517 , 387 , 452 , 857 , 647 ,
- 362 , 487 , 487 , 522 , 507 , 287 , 597 , 837 , 442 , 422 ,
- 527 , 327 , 522 , 517 , 442 , 532 , 607 , 587 , 537 , 532 ,
- 337 , 527 , 537 , 457 , 617 , 537 , 457 , 517 , 662 , 427 ,
- 297 , 447 , 647 , 672 , 267 , 587 , 732 , 387 , 377 , 487 ,
- 512 , 452 , 742 , 582 , 372 , 642 , 512 , 367 , 487 , 457 ,
- 487 , 637 , 432 , 572 , 547 , 412 , 582 , 317 , 452 , 557 ,
- 467 , 447 , 612 , 682 , 267 , 552 , 637 , 337 , 512 , 577 ,
- 597 , 642 , 482 , 432 , 652 , 457 , 432 , 542 , 477 , 642 ,
- 627 , 417 , 447 , 702 , 457 , 327 , 502 , 492 , 732 , 522 ,
- 247 , 642 , 542 , 327 , 712 , 477 , 367 , 752 , 567 , 247 ,
- 457 , 597 , 327 , 542 , 602 , 387 , 587 , 622 , 432 , 362 ,
- 652 , 557 , 392 , 567 , 552 , 502 , 457 , 487 , 382 , 642 ,
- 702 , 437 , 467 , 557 , 617 , 397 , 317 , 592 , 527 , 452 ,
- 702 , 372 , 397 , 692 , 377 , 387 , 602 , 567 , 572 , 602 ,
- 527 , 492 , 432 , 457 , 397 , 437 , 812 , 532 , 412 , 627 ,
- 507 , 427 , 567 , 437 , 377 , 722 , 572 , 472 , 512 , 407 ,
- 427 , 552 , 562 , 577 , 627 , 422 , 652 , 547 , 372 , 372 ,
- 482 , 682 , 457 , 407 , 627 , 427 , 512 , 622 , 182 , 482 ,
- 752 , 387 , 532 , 647 , 307 , 597 , 517 , 247 , 577 , 592 ,
- 462 , 672 , 597 , 277 , 682 , 742 , 317 , 552 , 527 , 337 ,
- 612 , 572 , 277 , 467 , 662 , 572 , 477 , 542 , 557 , 607 ,
- 607 , 427 , 497 , 327 , 267 , 597 , 682 , 467 , 412 , 722 ,
- 672 , 432 , 287 , 307 , 637 , 657 , 317 , 482 , 837 , 537 ,
- 297 , 427 , 582 , 557 , 772 , 497 , 337 , 702 , 497 , 307 ,
- 412 , 627 , 457 , 657 , 772 , 277 , 467 , 602 , 327 , 347 ,
- 567 , 562 , 437 , 637 , 517 , 357 , 542 , 327 , 402 , 837 ,
- 592 , 307 , 542 , 582 , 452 , 617 , 372 , 307 , 822 , 632 ,
- 397 , 587 , 532 , 582 , 417 , 217 , 607 , 577 , 542 , 657 ,
- 422 , 632 , 517 , 317 , 337 , 497 , 722 , 542 , 657 , 642 ,
- 387 , 307 , 467 , 477 , 497 , 712 , 552 , 632 , 692 , 417 ,
- 142 , 317 , 497 , 537 , 772 , 597 , 572 , 592 , 347 , 227 ,
- 277 , 647 , 647 , 437 , 627 , 812 , 492 , 247 , 362 , 472 ,
- 672 , 597 , 297 , 657 , 857 , 277 , 317 , 562 , 382 , 502 ,
- 877 , 467 , 347 , 837 , 207 , 227 , 742 , 287 , 567 , 837 ,
- 317 , 472 , 752 , 467 , 287 , 402 , 602 , 607 , 597 , 432 ,
- 417 , 772 , 592 , 182 , 337 , 857 , 647 , 247 , 627 , 782 ,
- 552 , 407 , 237 , 512 , 837 , 307 , 432 , 837 , 482 , 442 ,
- 482 , 382 , 612 , 672 , 277 , 362 , 802 , 287 , 182 , 762 ,
- 547 , 517 , 742 , 412 , 287 , 427 , 277 , 367 , 607 , 647 ,
- 837 , 822 , 327 , 102 , 527 , 422 , 197 , 812 , 802 , 592 ,
- 722 , 382 , 182 , 522 , 617 , 317 , 632 , 897 , 477 , 317 ,
- 447 , 617 , 467 , 472 , 602 , 612 , 642 , 482 , 317 , 532 ,
- 557 , 307 , 547 , 637 , 437 , 782 , 572 , 182 , 592 , 547 ,
- 142 , 682 , 647 , 227 , 877 , 597 , 102 , 537 , 642 , 297 ,
- 427 , 752 , 482 , 607 , 762 , 237 , 307 , 702 , 427 , 372 ,
- 642 , 537 , 642 , 607 , 237 , 597 , 577 , 357 , 417 , 452 ,
- 822 , 512 , 287 , 457 , 642 , 637 , 287 , 317 , 647 , 732 ,
- 502 , 362 , 507 , 662 , 307 , 287 , 647 , 532 , 712 , 702 ,
- 327 , 567 , 692 , 142 , 397 , 782 , 477 , 552 , 627 , 597 ,
- 517 , 387 , 467 , 582 , 547 , 197 , 592 , 837 , 402 , 327 ,
- 702 , 652 , 227 , 427 , 592 , 382 , 497 , 657 , 287 , 477 ,
- 762 , 347 , 457 , 657 , 497 , 422 , 702 , 647 , 182 , 542 ,
- 612 , 357 , 592 , 642 , 567 , 367 , 442 , 567 , 517 , 297 ,
- 357 , 802 , 547 , 472 , 607 , 487 , 622 , 402 , 197 , 457 ,
- 802 , 692 , 567 , 417 , 357 , 752 , 377 , 102 , 632 , 877 ,
- 552 , 527 , 597 , 337 , 277 , 307 , 377 , 732 , 897 , 657 ,
- 427 , 437 , 587 , 337 , 317 , 357 , 802 , 997 , 277 , 362 ,
- 592 , 337 , 537 , 857 , 267 , 432 , 1057 , 317 , 142 , 597 ,
- 447 , 347 , 712 , 647 , 382 , 532 , 527 , 287 , 182 , 662 ,
- 587 , 337 , 877 , 557 , 327 , 502 , 457 , 182 , 527 , 812 ,
- 512 , 647 , 502 , 577 , 472 , 287 , 562 , 702 , 517 , 547 ,
- 557 , 257 , 692 , 702 , 182 , 582 , 857 , 462 , 392 , 492 ,
- 297 , 617 , 647 , 427 , 522 , 642 , 632 , 277 , 442 , 622 ,
- 402 , 402 , 672 , 537 , 407 , 652 , 402 , 317 , 712 , 587 ,
- 257 , 632 , 612 , 457 , 447 , 122 , 507 , 722 , 507 , 622 ,
- 637 , 532 , 442 , 437 , 257 , 502 , 762 , 517 , 612 , 602 ,
- 417 , 472 , 432 , 257 , 652 , 822 , 432 , 557 , 692 , 267 ,
- 362 , 577 , 502 , 532 , 547 , 712 , 397 , 182 , 502 , 522 ,
- 387 , 712 , 772 , 527 , 577 , 227 , 142 , 632 , 752 , 337 ,
- 702 , 917 , 457 , 432 , 162 , 347 , 857 , 467 , 467 , 997 ,
- 557 , 237 , 522 , 217 , 277 , 812 , 547 , 572 , 617 , 492 ,
- 487 , 247 , 277 , 542 , 682 , 637 , 602 , 432 , 217 , 537 ,
- 427 , 297 , 602 , 772 , 732 , 492 , 477 , 372 , 422 , 377 ,
- 377 , 857 , 772 , 387 , 537 , 732 , 412 , 297 , 327 , 487 ,
- 957 , 612 , 217 , 662 , 562 , 247 , 587 , 457 , 557 , 837 ,
- 412 , 142 , 587 , 642 , 162 , 517 , 837 , 582 , 592 , 547 ,
- 237 , 412 , 572 , 257 , 642 , 937 , 372 , 362 , 692 , 327 ,
- 422 , 652 , 182 , 752 , 837 , 227 , 512 , 637 , 257 , 367 ,
- 682 , 402 , 692 , 782 , 347 , 602 , 412 , 267 , 592 , 412 ,
- 592 , 782 , 417 , 367 , 592 , 347 , 447 , 582 , 412 , 762 ,
- 457 , 337 , 627 , 227 , 487 , 937 , 347 , 432 , 782 , 422 ,
- 277 , 382 , 692 , 702 , 372 , 627 , 792 , 427 , 407 , 387 ,
- 417 , 647 , 712 , 567 , 622 , 532 , 377 , 372 , 257 , 477 ,
- 792 , 632 , 612 , 622 , 362 , 257 , 317 , 267 , 712 , 792 ,
- 467 , 557 , 607 , 402 , 102 , 297 , 692 , 672 , 402 , 722 ,
- 702 , 327 , 237 , 277 , 597 , 752 , 652 , 657 , 552 , 377 ,
- 387 , 457 , 402 , 647 , 812 , 492 , 567 , 567 , 197 , 257 ,
- 617 , 802 , 442 , 572 , 762 , 227 , 482 , 357 , 267 , 742 ,
- 487 , 647 , 822 , 427 , 267 , 587 , 582 , 122 , 587 , 917 ,
- 487 , 597 , 482 , 217 , 622 , 392 , 402 , 917 , 482 , 607 ,
- 702 , 42 , 372 , 802 , 462 , 387 , 582 , 682 , 462 , 482 ,
- 382 , 257 , 762 , 587 , 397 , 547 , 547 , 492 , 357 , 227 ,
- 527 , 897 , 472 , 347 , 627 , 587 , 447 , 277 , 277 , 752 ,
- 752 , 337 , 742 , 517 , 347 , 672 , 227 , 367 , 837 , 662 ,
- 372 , 762 , 662 , 162 , 377 , 442 , 382 , 772 , 897 , 567 ,
- 472 , 437 , 347 , 277 , 562 , 772 , 317 , 462 , 957 , 402 ,
- 162 , 732 , 397 , 402 , 692 , 182 , 662 , 782 , 82 , 432 ,
- 937 , 512 , 327 , 487 , 517 , 692 , 287 , 287 , 702 , 567 ,
- 752 , 612 , 277 , 607 , 587 , 142 , 527 , 792 , 397 , 617 ,
- 577 , 297 , 582 , 387 , 317 , 762 , 562 , 427 , 542 , 527 ,
- 522 , 162 , 567 , 712 , 372 , 572 , 442 , 572 , 692 , 492 ,
- 277 , 592 , 742 , 362 , 397 , 567 , 682 , 607 , 382 , 397 ,
- 612 , 672 , 407 , 347 , 782 , 762 , 277 , 297 , 567 , 617 ,
- 287 , 572 , 792 , 377 , 597 , 522 , 257 , 547 , 437 , 537 ,
- 682 , 387 , 662 , 392 , 182 , 492 , 597 , 602 , 462 , 627 ,
- 427 , 347 , 562 , 267 , 467 , 877 , 602 , 407 , 587 , 452 ,
- 277 , 532 , 722 , 522 , 477 , 762 , 512 , 182 , 607 , 722 ,
- 197 , 577 , 877 , 327 , 517 , 637 , 247 , 542 , 542 , 407 ,
- 647 , 812 , 582 , 62 , 397 , 607 , 422 , 527 , 577 , 752 ,
- 497 , 487 , 297 , 142 , 837 , 692 , 287 , 742 , 857 , 277 ,
- 102 , 527 , 562 , 587 , 672 , 557 , 562 , 432 , 372 , 337 ,
- 487 , 752 , 722 , 417 , 532 , 497 , 227 , 412 , 417 , 442 ,
- 772 , 742 , 372 , 277 , 632 , 467 , 382 , 732 , 487 , 607 ,
- 732 , 122 , 227 , 712 , 597 , 537 , 702 , 597 , 552 , 442 ,
- 102 , 327 , 812 , 712 , 552 , 617 , 572 , 457 , 142 , 277 ,
- 642 , 732 , 812 , 672 , 307 , 572 , 407 , 42 , 472 , 812 ,
- 837 , 587 , 307 , 437 , 517 , 197 , 532 , 647 , 552 , 732 ,
- 512 , 247 , 267 , 507 , 517 , 627 , 762 , 542 , 487 , 427 ,
- 277 , 267 , 542 , 822 , 802 , 452 , 462 , 552 , 197 , 357 ,
- 532 , 637 , 857 , 562 , 297 , 552 , 507 , 182 , 512 , 742 ,
- 582 , 592 , 452 , 512 , 582 , 227 , 287 , 682 , 692 , 497 ,
- 652 , 577 , 287 , 307 , 522 , 682 , 462 , 467 , 812 , 632 ,
- 327 , 367 , 347 , 472 , 752 , 662 , 472 , 742 , 607 , 217 ,
- 337 , 437 , 497 , 587 , 542 , 682 , 672 , 317 , 277 , 522 ,
- 467 , 337 , 682 , 752 , 387 , 582 , 427 , 162 , 552 , 692 ,
- 627 , 422 , 572 , 702 , 237 , 347 , 557 , 462 , 702 , 647 ,
- 367 , 517 , 702 , 257 , 182 , 752 , 672 , 602 , 662 , 412 ,
- 407 , 487 , 347 , 447 , 622 , 782 , 702 , 227 , 487 , 587 ,
- 237 , 557 , 572 , 437 , 732 , 762 , 297 , 207 , 622 , 577 ,
- 362 , 587 , 692 , 587 , 492 , 297 , 427 , 587 , 402 , 602 ,
- 712 , 297 , 527 , 742 , 142 , 372 , 792 , 457 , 447 , 632 ,
- 437 , 497 , 502 , 367 , 582 , 702 , 567 , 502 , 457 , 482 ,
- 442 , 357 , 532 , 722 , 622 , 447 , 517 , 397 , 422 , 592 ,
- 407 , 532 , 612 , 552 , 512 , 422 , 462 , 442 , 547 , 587 ,
- 502 , 542 , 512 , 492 , 422 , 482 , 682 , 457 , 552 , 772 ,
- 347 , 412 , 642 , 432 , 447 , 562 , 552 , 462 , 662 , 492 ,
- 267 , 712 , 602 , 287 , 577 , 567 , 417 , 442 , 507 , 427 ,
- 607 , 772 , 297 , 357 , 702 , 437 , 397 , 557 , 592 , 742 ,
- 372 , 257 , 572 , 472 , 547 , 557 , 607 , 602 , 247 , 432 ,
- 587 , 362 , 537 , 897 , 502 , 142 , 657 , 592 , 317 , 582 ,
- 692 , 427 , 487 , 722 , 362 , 327 , 742 , 552 , 317 , 602 ,
- 507 , 317 , 597 , 577 , 492 , 597 , 652 , 482 , 217 , 427 ,
- 627 , 682 , 502 , 412 , 652 , 642 , 337 , 327 , 627 , 482 ,
- 457 , 722 , 497 , 387 , 572 , 402 , 367 , 562 , 497 , 652 ,
- 732 , 507 , 482 , 397 , 327 , 417 , 672 , 617 , 487 , 702 ,
- 372 , 277 , 632 , 297 , 307 , 822 , 742 , 492 , 372 , 357 ,
- 472 , 447 , 642 , 732 , 437 , 362 , 592 , 507 , 382 , 682 ,
- 587 , 387 , 642 , 617 , 362 , 287 , 617 , 617 , 502 , 722 ,
- 307 , 267 , 732 , 437 , 432 , 837 , 642 , 382 , 492 , 317 ,
- 307 , 762 , 597 , 347 , 722 , 702 , 327 , 432 , 357 , 317 ,
- 642 , 782 , 597 , 422 , 557 , 372 , 207 , 437 , 557 , 762 ,
- 647 , 552 , 547 , 257 , 392 , 452 , 412 , 877 , 702 , 297 ,
- 497 , 512 , 377 , 442 , 442 , 682 , 802 , 402 , 367 , 607 ,
- 377 , 422 , 647 , 497 , 512 , 682 , 582 , 337 , 562 , 652 ,
- 297 , 472 , 672 , 347 , 557 , 742 , 217 , 412 , 802 , 502 ,
- 367 , 607 , 557 , 257 , 482 , 607 , 367 , 617 , 712 , 507 ,
- 382 , 557 , 632 , 297 , 487 , 692 , 297 , 557 , 877 , 327 ,
- 307 , 702 , 472 , 287 , 692 , 587 , 377 , 682 , 382 , 197 ,
- 692 , 712 , 442 , 477 , 632 , 297 , 422 , 632 , 337 , 647 ,
- 567 , 522 , 672 , 327 , 502 , 497 , 447 , 567 , 432 , 532 ,
- 722 , 582 , 327 , 452 , 517 , 527 , 537 , 422 , 587 , 632 ,
- 602 , 427 , 407 , 492 , 407 , 642 , 622 , 592 , 532 , 472 ,
- 437 , 247 , 522 , 742 , 632 , 572 , 452 , 417 , 377 , 422 ,
- 417 , 587 , 732 , 692 , 647 , 297 , 102 , 527 , 712 , 327 ,
- 672 , 762 , 432 , 557 , 257 , 277 , 592 , 557 , 712 , 657 ,
- 372 , 432 , 432 , 382 , 582 , 562 , 452 , 682 , 492 , 432 ,
- 442 , 327 , 602 , 682 , 587 , 432 , 577 , 632 , 217 , 537 ,
- 682 , 417 , 467 , 562 , 457 , 477 , 642 , 427 , 422 , 672 ,
- 622 , 372 , 417 , 597 , 287 , 577 , 837 , 367 , 507 , 782 ,
- 347 , 287 , 812 , 482 , 307 , 877 , 442 , 162 , 682 , 642 ,
- 227 , 537 , 732 , 377 , 632 , 547 , 162 , 512 , 637 , 397 ,
- 572 , 772 , 442 , 347 , 527 , 357 , 422 , 527 , 622 , 647 ,
- 597 , 537 , 257 , 392 , 467 , 417 , 582 , 702 , 582 , 472 ,
- 632 , 377 , 327 , 602 , 502 , 577 , 572 , 552 , 392 , 372 ,
- 672 , 627 , 612 , 537 , 467 , 492 , 297 , 372 , 642 , 547 ,
- 562 , 772 , 537 , 397 , 457 , 382 , 397 , 577 , 612 , 502 ,
- 637 , 617 , 327 , 472 , 487 , 267 , 562 , 672 , 502 , 532 ,
- 617 , 472 , 437 , 452 , 382 , 692 , 512 , 462 , 607 , 377 ,
- 577 , 422 , 537 , 692 , 337 , 537 , 657 , 427 , 337 , 532 ,
- 442 , 532 , 692 , 412 , 362 , 577 , 652 , 457 , 542 , 512 ,
- 277 , 537 , 607 , 432 , 482 , 657 , 662 , 517 , 417 , 467 ,
- 497 , 442 , 552 , 517 , 547 , 657 , 522 , 642 , 507 , 307 ,
- 397 , 452 , 672 , 547 , 512 , 702 , 527 , 442 , 537 , 472 ,
- 307 , 587 , 622 , 287 , 527 , 662 , 392 , 467 , 577 , 457 ,
- 502 , 552 , 457 , 392 , 532 , 592 , 367 , 497 , 622 , 417 ,
- 497 , 592 , 487 , 452 , 542 , 522 , 537 , 537 , 507 , 502 ,
- 492 , 512 , 532 , 507 , 467 , 577 , 557 , 522 , 542 , 507 ,
- 517 , 512 , 462 , 462 , 477 , 482 , 532 , 557 , 552 , 567 ,
- 537 , 522 , 552 , 542 , 492 , 487 , 487 , 477 , 472 , 467 ,
- 492 , 492 , 482 , 482 , 502 , 517 , 532 , 562 , 557 , 547 ,
- 567 , 597 , 542 , 527 , 547 , 492 , 477 , 457 , 467 , 452 ,
- 442 , 457 , 447 , 447 , 442 , 452 , 472 , 482 , 487 , 502 ,
- 547 , 557 , 572 , 587 , 592 , 607 , 582 , 582 , 547 , 537 ,
- 552 , 537 , 527 , 467 , 427 , 432 , 417 , 392 , 417 , 462 ,
- 437 , 462 , 487 , 462 , 497 , 522 , 552 , 542 , 587 , 622 ,
- 572 , 597 , 602 , 577 , 607 , 602 , 547 , 552 , 527 , 482 ,
- 487 , 467 , 457 , 452 , 452 , 467 , 442 , 432 , 447 , 457 ,
- 462 , 452 , 467 , 502 , 512 , 507 , 512 , 532 , 527 , 522 ,
- 542 , 577 , 527 , 477 , 552 , 542 , 502 , 542 , 542 , 502 ,
- 482 , 507 , 482 , 492 , 537 , 527 , 522 , 507 , 517 , 487 ,
- 492 , 532 , 517 , 522 , 542 , 532 , 482 , 492 , 542 , 497 ,
- 507 , 537 , 502 , 492 , 492 , 482 , 487 , 512 , 507 , 527 ,
- 542 , 497 , 497 , 502 , 497 , 492 , 522 , 557 , 517 , 517 ,
- 517 , 497 , 487 , 477 , 497 , 532 , 527 , 507 , 507 , 477 ,
- 482 , 517 , 507 , 522 , 512 , 492 , 492 , 492 , 492 , 512 ,
- 552 , 532 , 532 , 532 , 502 , 512 , 522 , 532 , 532 , 542 ,
- 532 , 487 , 517 , 522 , 472 , 497 , 502 , 482 , 517 , 527 ,
- 482 , 492 , 497 , 472 , 472 , 467 , 487 , 502 , 512 , 522 ,
- 532 , 517 , 507 , 542 , 532 , 527 , 512 , 507 , 532 , 532 ,
- 532 , 517 , 512 , 497 , 467 , 512 , 502 , 502 , 552 , 547 ,
- 522 , 497 , 492 , 492 , 502 , 527 , 517 , 537 , 542 , 527 ,
- 502 , 502 , 532 , 507 , 522 , 532 , 517 , 492 , 472 , 507 ,
- 477 , 507 , 522 , 487 , 497 , 487 , 497 , 447 , 472 , 512 ,
- 492 , 517 , 507 , 497 , 497 , 502 , 487 , 502 , 532 , 497 ,
- 512 , 517 , 507 , 507 , 522 , 542 , 527 , 552 , 532 , 527 ,
- 542 , 532 , 532 , 532 , 532 , 537 , 527 , 502 , 502 , 502 ,
- 487 , 517 , 497 , 487 , 527 , 532 , 517 , 497 , 517 , 492 ,
- 492 , 527 , 482 , 512 , 532 , 497 , 487 , 497 , 492 , 472 ,
- 497 , 507 , 487 , 507 , 502 , 492 , 472 , 497 , 497 , 502 ,
- 537 , 522 , 522 , 537 , 517 , 507 , 522 , 527 , 517 , 532 ,
- 517 , 507 , 497 , 492 , 497 , 487 , 522 , 527 , 517 , 517 ,
- 502 , 497 , 497 , 497 , 512 , 522 , 512 , 507 , 502 , 517 ,
- 522 , 527 , 522 , 522 , 512 , 512 , 512 , 497 , 517 , 527 ,
- 517 , 522 , 522 , 497 , 502 , 517 , 517 , 512 , 517 , 532 ,
- 507 , 512 , 517 , 497 , 512 , 522 , 512 , 502 , 487 , 482 ,
- 497 , 512 , 512 , 512 , 502 , 497 , 487 , 477 , 482 , 482 ,
- 497 , 517 , 507 , 522 , 522 , 482 , 497 , 502 , 492 , 527 ,
- 537 , 507 , 497 , 507 , 532 , 532 , 552 , 537 , 522 , 542 ,
- 512 , 502 , 512 , 517 , 527 , 527 , 532 , 512 , 507 , 522 ,
- 492 , 502 , 502 , 497 , 517 , 512 , 507 , 517 , 512 , 482 ,
- 487 , 497 , 497 , 492 , 492 , 517 , 532 , 527 , 527 , 512 ,
- 492 , 487 , 512 , 497 , 497 , 502 , 502 , 517 , 507 , 502 ,
- 487 , 492 , 492 , 487 , 497 , 507 , 517 , 517 , 512 , 527 ,
- 517 , 507 , 507 , 522 , 522 , 512 , 517 , 527 , 542 , 532 ,
- 522 , 512 , 482 , 482 , 502 , 512 , 502 , 522 , 522 , 517 ,
- 537 , 522 , 502 , 512 , 517 , 522 , 542 , 527 , 507 , 527 ,
- 522 , 527 , 527 , 502 , 492 , 482 , 497 , 492 , 482 , 522 ,
- 512 , 517 , 507 , 482 , 487 , 492 , 507 , 482 , 507 , 517 ,
- 477 , 522 , 522 , 497 , 487 , 477 , 522 , 487 , 427 , 542 ,
- 562 , 482 , 462 , 482 , 592 , 557 , 462 , 487 , 497 , 562 ,
- 577 , 517 , 517 , 512 , 522 , 532 , 527 , 512 , 482 , 482 ,
- 532 , 547 , 477 , 542 , 542 , 467 , 487 , 527 , 537 , 532 ,
- 522 , 487 , 482 , 542 , 537 , 527 , 512 , 437 , 502 , 547 ,
- 497 , 542 , 532 , 442 , 477 , 587 , 522 , 497 , 487 , 437 ,
- 517 , 557 , 497 , 487 , 522 , 517 , 487 , 502 , 512 , 497 ,
- 462 , 487 , 517 , 507 , 477 , 512 , 537 , 497 , 482 , 527 ,
- 522 , 502 , 507 , 507 , 537 , 542 , 487 , 497 , 522 , 537 ,
- 517 , 497 , 527 , 512 , 517 , 517 , 492 , 522 , 532 , 522 ,
- 517 , 527 , 517 , 492 , 522 , 512 , 507 , 527 , 502 , 497 ,
- 522 , 502 , 477 , 512 , 537 , 497 , 487 , 517 , 522 , 507 ,
- 507 , 512 , 502 , 512 , 497 , 502 , 507 , 487 , 492 , 512 ,
- 517 , 517 , 497 , 502 , 522 , 507 , 497 , 492 , 517 , 532 ,
- 507 , 512 , 522 , 512 , 512 , 497 , 492 , 517 , 517 , 497 ,
- 512 , 512 , 482 , 482 , 492 , 502 , 507 , 487 , 487 , 512 ,
- 522 , 507 , 512 , 532 , 517 , 517 , 537 , 527 , 512 , 512 ,
- 522 , 527 , 542 , 537 , 532 , 537 , 532 , 512 , 497 , 532 ,
- 522 , 497 , 527 , 517 , 522 , 527 , 487 , 497 , 522 , 512 ,
- 482 , 482 , 502 , 522 , 477 , 457 , 487 , 522 , 532 , 432 ,
- 427 , 557 , 487 , 487 , 502 , 487 , 512 , 557 , 412 , 432 ,
- 547 , 572 , 532 , 467 , 602 , 537 , 527 , 537 , 472 , 452 ,
- 627 , 472 , 407 , 637 , 547 , 492 , 502 , 532 , 567 , 547 ,
- 497 , 492 , 547 , 512 , 497 , 502 , 497 , 562 , 487 , 487 ,
- 567 , 477 , 442 , 492 , 572 , 467 , 447 , 592 , 492 , 422 ,
- 632 , 492 , 337 , 647 , 537 , 307 , 592 , 622 , 362 , 562 ,
- 682 , 437 , 377 , 597 , 682 , 407 , 347 , 592 , 552 , 652 ,
- 382 , 267 , 712 , 627 , 377 , 297 , 657 , 592 , 347 , 482 ,
- 522 , 627 , 437 , 442 , 497 , 632 , 542 , 347 , 587 , 582 ,
- 537 , 462 , 457 , 532 , 537 , 472 , 422 , 627 , 462 , 492 ,
- 597 , 502 , 467 , 552 , 592 , 487 , 542 , 557 , 557 , 577 ,
- 452 , 522 , 572 , 467 , 477 , 552 , 517 , 387 , 517 , 487 ,
- 447 , 492 , 477 , 532 , 477 , 517 , 482 , 522 , 532 , 467 ,
- 552 , 517 , 517 , 472 , 587 , 517 , 417 , 632 , 467 , 447 ,
- 577 , 452 , 522 , 542 , 427 , 517 , 647 , 357 , 482 , 782 ,
- 287 , 477 , 732 , 307 , 517 , 622 , 402 , 542 , 577 , 362 ,
- 602 , 577 , 277 , 682 , 567 , 317 , 627 , 572 , 347 , 602 ,
- 542 , 422 , 637 , 442 , 497 , 602 , 427 , 452 , 672 , 462 ,
- 392 , 802 , 442 , 347 , 782 , 452 , 357 , 657 , 537 , 362 ,
- 617 , 532 , 447 , 542 , 457 , 597 , 392 , 442 , 672 , 447 ,
- 372 , 682 , 512 , 257 , 702 , 512 , 307 , 572 , 592 , 397 ,
- 432 , 652 , 467 , 412 , 642 , 527 , 417 , 562 , 517 , 492 ,
- 502 , 477 , 642 , 432 , 432 , 652 , 462 , 382 , 612 , 602 ,
- 377 , 612 , 542 , 557 , 462 , 457 , 672 , 377 , 507 , 572 ,
- 522 , 447 , 597 , 537 , 437 , 577 , 492 , 507 , 462 , 607 ,
- 432 , 517 , 557 , 377 , 617 , 527 , 427 , 512 , 602 , 377 ,
- 517 , 562 , 437 , 532 , 482 , 572 , 442 , 477 , 552 , 527 ,
- 422 , 512 , 592 , 382 , 522 , 562 , 432 , 507 , 547 , 507 ,
- 507 , 512 , 522 , 557 , 487 , 497 , 602 , 472 , 467 , 627 ,
- 417 , 567 , 522 , 407 , 672 , 442 , 422 , 702 , 457 , 402 ,
- 637 , 432 , 487 , 562 , 432 , 622 , 502 , 417 , 672 , 492 ,
- 407 , 642 , 507 , 452 , 562 , 497 , 477 , 557 , 432 , 552 ,
- 587 , 367 , 542 , 567 , 432 , 447 , 607 , 502 , 387 , 617 ,
- 532 , 447 , 482 , 557 , 552 , 327 , 547 , 657 , 357 , 422 ,
- 732 , 467 , 347 , 662 , 532 , 417 , 427 , 637 , 592 , 227 ,
- 637 , 742 , 197 , 552 , 782 , 267 , 482 , 692 , 397 , 522 ,
- 472 , 587 , 562 , 267 , 662 , 647 , 237 , 657 , 722 , 287 ,
- 572 , 682 , 387 , 467 , 607 , 512 , 427 , 542 , 612 , 462 ,
- 477 , 582 , 547 , 417 , 532 , 582 , 437 , 442 , 562 , 552 ,
- 372 , 532 , 602 , 427 , 417 , 632 , 512 , 317 , 622 , 562 ,
- 347 , 547 , 612 , 417 , 477 , 587 , 532 , 497 , 472 , 597 ,
- 492 , 432 , 522 , 567 , 487 , 437 , 662 , 462 , 397 , 647 ,
- 467 , 442 , 602 , 432 , 562 , 532 , 377 , 657 , 532 , 277 ,
- 792 , 487 , 287 , 782 , 472 , 377 , 642 , 517 , 462 , 562 ,
- 422 , 597 , 517 , 377 , 672 , 432 , 422 , 612 , 437 , 457 ,
- 567 , 482 , 482 , 557 , 517 , 462 , 497 , 592 , 407 , 552 ,
- 557 , 412 , 617 , 472 , 457 , 577 , 457 , 487 , 562 , 442 ,
- 572 , 482 , 477 , 587 , 347 , 612 , 542 , 427 , 587 , 577 ,
- 447 , 442 , 642 , 472 , 442 , 512 , 577 , 462 , 432 , 602 ,
- 512 , 502 , 477 , 602 , 507 , 437 , 502 , 587 , 487 , 362 ,
- 762 , 452 , 367 , 692 , 477 , 417 , 602 , 557 , 417 , 567 ,
- 477 , 487 , 542 , 492 , 507 , 532 , 502 , 442 , 597 , 422 ,
- 457 , 652 , 427 , 462 , 672 , 467 , 387 , 642 , 457 , 447 ,
- 557 , 562 , 507 , 452 , 547 , 477 , 487 , 442 , 577 , 482 ,
- 462 , 522 , 472 , 562 , 427 , 502 , 567 , 507 , 452 , 577 ,
- 577 , 412 , 577 , 542 , 532 , 477 , 492 , 672 , 327 , 527 ,
- 642 , 372 , 517 , 567 , 497 , 457 , 562 , 532 , 467 , 552 ,
- 477 , 517 , 632 , 417 , 497 , 712 , 327 , 537 , 622 , 402 ,
- 547 , 522 , 477 , 527 , 502 , 472 , 647 , 362 , 517 , 647 ,
- 357 , 547 , 547 , 482 , 477 , 502 , 522 , 527 , 382 , 657 ,
- 482 , 317 , 762 , 402 , 417 , 652 , 427 , 457 , 532 , 467 ,
- 562 , 382 , 582 , 622 , 297 , 672 , 557 , 432 , 607 , 437 ,
- 597 , 507 , 427 , 672 , 507 , 372 , 642 , 527 , 392 , 577 ,
- 552 , 477 , 437 , 607 , 457 , 427 , 567 , 487 , 457 , 507 ,
- 562 , 497 , 502 , 532 , 552 , 467 , 502 , 597 , 422 , 547 ,
- 557 , 452 , 572 , 502 , 527 , 597 , 442 , 522 , 512 , 427 ,
- 587 , 477 , 457 , 637 , 437 , 422 , 672 , 367 , 407 , 622 ,
- 472 , 402 , 582 , 557 , 367 , 517 , 602 , 422 , 437 , 732 ,
- 407 , 442 , 712 , 407 , 557 , 537 , 497 , 587 , 412 , 502 ,
- 652 , 412 , 432 , 722 , 417 , 382 , 742 , 467 , 337 , 682 ,
- 512 , 347 , 617 , 557 , 407 , 537 , 502 , 622 , 397 , 542 ,
- 647 , 377 , 452 , 692 , 477 , 337 , 732 , 462 , 382 , 557 ,
- 527 , 472 , 372 , 587 , 577 , 307 , 692 , 567 , 297 , 702 ,
- 462 , 412 , 627 , 387 , 542 , 557 , 347 , 657 , 527 , 347 ,
- 712 , 487 , 317 , 712 , 432 , 437 , 692 , 422 , 537 , 572 ,
- 507 , 552 , 502 , 482 , 552 , 472 , 497 , 572 , 482 , 477 ,
- 512 , 537 , 412 , 522 , 587 , 397 , 492 , 662 , 412 , 452 ,
- 692 , 432 , 382 , 712 , 472 , 372 , 722 , 482 , 427 , 642 ,
- 482 , 457 , 507 , 492 , 472 , 522 , 422 , 642 , 487 , 372 ,
- 692 , 462 , 347 , 637 , 537 , 347 , 592 , 502 , 537 , 487 ,
- 467 , 682 , 382 , 397 , 732 , 397 , 392 , 637 , 587 , 317 ,
- 497 , 802 , 277 , 452 , 762 , 392 , 317 , 732 , 557 , 267 ,
- 682 , 602 , 337 , 522 , 682 , 427 , 392 , 632 , 552 , 397 ,
- 507 , 672 , 452 , 367 , 712 , 532 , 297 , 732 , 517 , 317 ,
- 692 , 527 , 347 , 632 , 497 , 407 , 617 , 422 , 532 , 587 ,
- 372 , 632 , 487 , 392 , 682 , 387 , 427 , 692 , 357 , 497 ,
- 647 , 437 , 507 , 502 , 592 , 452 , 467 , 652 , 397 , 502 ,
- 632 , 347 , 617 , 547 , 307 , 742 , 372 , 387 , 722 , 347 ,
- 452 , 567 , 467 , 537 , 392 , 587 , 657 , 247 , 647 , 637 ,
- 277 , 612 , 597 , 367 , 557 , 582 , 462 , 532 , 542 , 592 ,
- 452 , 442 , 762 , 372 , 432 , 792 , 307 , 527 , 682 , 357 ,
- 607 , 482 , 452 , 662 , 337 , 587 , 652 , 257 , 597 , 652 ,
- 267 , 567 , 632 , 357 , 487 , 552 , 477 , 477 , 477 , 577 ,
- 492 , 432 , 607 , 522 , 407 , 582 , 497 , 417 , 557 , 427 ,
- 582 , 457 , 437 , 702 , 367 , 502 , 662 , 357 , 587 , 532 ,
- 407 , 682 , 402 , 522 , 662 , 327 , 592 , 587 , 377 , 592 ,
- 512 , 457 , 587 , 432 , 602 , 507 , 407 , 647 , 447 , 462 ,
- 622 , 467 , 512 , 547 , 497 , 542 , 502 , 452 , 617 , 447 ,
- 412 , 637 , 402 , 477 , 577 , 452 , 527 , 512 , 482 , 557 ,
- 512 , 442 , 642 , 452 , 452 , 692 , 432 , 472 , 587 , 487 ,
- 462 , 492 , 517 , 537 , 382 , 547 , 542 , 377 , 567 , 472 ,
- 462 , 507 , 492 , 537 , 472 , 517 , 567 , 457 , 592 , 522 ,
- 482 , 652 , 392 , 517 , 682 , 347 , 552 , 652 , 392 , 527 ,
- 537 , 502 , 512 , 407 , 672 , 447 , 412 , 702 , 417 , 507 ,
- 587 , 497 , 512 , 447 , 582 , 527 , 367 , 587 , 587 , 327 ,
- 587 , 567 , 377 , 592 , 477 , 502 , 592 , 382 , 602 , 582 ,
- 317 , 642 , 572 , 327 , 577 , 522 , 437 , 442 , 587 , 562 ,
- 347 , 622 , 552 , 337 , 622 , 497 , 397 , 602 , 517 , 432 ,
- 622 , 482 , 497 , 582 , 422 , 537 , 532 , 477 , 537 , 552 ,
- 492 , 537 , 457 , 532 , 557 , 372 , 607 , 532 , 392 , 607 ,
- 547 , 387 , 607 , 567 , 377 , 607 , 512 , 442 , 552 , 522 ,
- 507 , 552 , 507 , 467 , 587 , 462 , 487 , 617 , 452 , 547 ,
- 567 , 437 , 577 , 487 , 472 , 567 , 472 , 497 , 527 , 402 ,
- 612 , 407 , 472 , 602 , 347 , 547 , 527 , 402 , 552 , 522 ,
- 472 , 502 , 577 , 527 , 432 , 597 , 517 , 422 , 587 , 517 ,
- 457 , 602 , 477 , 507 , 582 , 467 , 547 , 457 , 502 , 572 ,
- 437 , 537 , 502 , 557 , 482 , 452 , 622 , 427 , 492 , 542 ,
- 432 , 537 , 542 , 472 , 597 , 502 , 497 , 592 , 422 , 567 ,
- 507 , 477 , 577 , 422 , 587 , 572 , 337 , 702 , 457 , 367 ,
- 672 , 382 , 497 , 617 , 392 , 582 , 567 , 347 , 692 , 407 ,
- 397 , 692 , 337 , 472 , 637 , 462 , 402 , 592 , 622 , 287 ,
- 617 , 647 , 287 , 637 , 587 , 337 , 607 , 542 , 382 , 597 ,
- 482 , 497 , 552 , 447 , 602 , 437 , 457 , 632 , 377 , 527 ,
- 562 , 417 , 542 , 542 , 502 , 552 , 547 , 477 , 662 , 417 ,
- 497 , 722 , 392 , 472 , 712 , 387 , 432 , 712 , 327 , 537 ,
- 567 , 382 , 562 , 442 , 472 , 497 , 497 , 492 , 467 , 562 ,
- 552 , 447 , 582 , 507 , 462 , 557 , 502 , 537 , 437 , 552 ,
- 537 , 427 , 572 , 567 , 382 , 592 , 522 , 362 , 647 , 422 ,
- 502 , 542 , 442 , 572 , 502 , 467 , 537 , 517 , 417 , 577 ,
- 527 , 452 , 532 , 562 , 512 , 422 , 622 , 587 , 327 , 647 ,
- 597 , 337 , 672 , 512 , 492 , 587 , 412 , 617 , 522 , 402 ,
- 627 , 512 , 412 , 537 , 537 , 462 , 457 , 562 , 527 , 337 ,
- 662 , 457 , 417 , 632 , 412 , 507 , 567 , 462 , 557 , 522 ,
- 432 , 612 , 397 , 557 , 547 , 412 , 622 , 407 , 532 , 547 ,
- 402 , 567 , 477 , 417 , 622 , 457 , 457 , 612 , 437 , 517 ,
- 522 , 512 , 497 , 482 , 572 , 407 , 607 , 557 , 442 , 692 ,
- 447 , 547 , 572 , 432 , 602 , 472 , 512 , 567 , 457 , 562 ,
- 592 , 417 , 547 , 532 , 402 , 502 , 572 , 437 , 442 , 652 ,
- 402 , 377 , 732 , 427 , 337 , 702 , 472 , 367 , 617 , 562 ,
- 462 , 462 , 612 , 527 , 442 , 602 , 497 , 507 , 462 , 532 ,
- 522 , 452 , 487 , 547 , 462 , 422 , 607 , 512 , 452 , 562 ,
- 552 , 452 , 472 , 597 , 492 , 367 , 657 , 432 , 427 , 647 ,
- 477 , 432 , 592 , 517 , 437 , 572 , 567 , 477 , 487 , 662 ,
- 422 , 477 , 702 , 377 , 497 , 587 , 452 , 482 , 552 , 537 ,
- 467 , 522 , 537 , 477 , 492 , 537 , 477 , 492 , 492 , 577 ,
- 507 , 467 , 627 , 467 , 442 , 597 , 472 , 512 , 432 , 552 ,
- 542 , 307 , 657 , 532 , 297 , 692 , 427 , 442 , 642 , 382 ,
- 592 , 502 , 407 , 672 , 452 , 467 , 702 , 367 , 537 , 627 ,
- 377 , 577 , 522 , 462 , 492 , 482 , 527 , 527 , 422 , 637 ,
- 477 , 382 , 682 , 407 , 472 , 592 , 467 , 457 , 547 , 582 ,
- 487 , 502 , 612 , 507 , 432 , 617 , 522 , 432 , 572 , 537 ,
- 462 , 517 , 592 , 497 , 467 , 527 , 577 , 417 , 472 , 662 ,
- 327 , 517 , 592 , 372 , 597 , 472 , 477 , 567 , 402 , 562 ,
- 512 , 402 , 607 , 462 , 402 , 612 , 477 , 477 , 542 , 467 ,
- 552 , 462 , 537 , 562 , 497 , 552 , 487 , 587 , 512 , 522 ,
- 552 , 557 , 462 , 572 , 557 , 377 , 632 , 427 , 417 , 557 ,
- 432 , 487 , 502 , 532 , 422 , 572 , 487 , 477 , 572 , 462 ,
- 507 , 562 , 507 , 522 , 642 , 437 , 597 , 587 , 412 , 612 ,
- 462 , 497 , 512 , 467 , 532 , 467 , 542 , 492 , 472 , 537 ,
- 462 , 472 , 572 , 442 , 532 , 532 , 457 , 607 , 482 , 507 ,
- 567 , 497 , 517 , 412 , 572 , 557 , 372 , 552 , 542 , 432 ,
- 477 , 527 , 467 , 487 , 527 , 517 , 492 , 527 , 552 , 467 ,
- 537 , 532 , 462 , 587 , 507 , 502 , 542 , 527 , 472 , 527 ,
- 502 , 487 , 497 , 452 , 632 , 437 , 492 , 657 , 472 , 432 ,
- 642 , 527 , 382 , 652 , 497 , 412 , 607 , 562 , 407 , 572 ,
- 557 , 447 , 447 , 522 , 582 , 307 , 592 , 577 , 287 , 612 ,
- 557 , 372 , 572 , 577 , 432 , 527 , 552 , 552 , 427 , 552 ,
- 592 , 412 , 547 , 557 , 492 , 462 , 587 , 477 , 467 , 517 ,
- 507 , 462 , 472 , 512 , 512 , 517 , 432 , 602 , 482 , 462 ,
- 597 , 442 , 492 , 582 , 417 , 552 , 592 , 407 , 647 , 532 ,
- 437 , 577 , 537 , 432 , 537 , 572 , 427 , 527 , 522 , 557 ,
- 472 , 537 , 592 , 432 , 512 , 587 , 497 , 437 , 632 , 522 ,
- 397 , 592 , 502 , 447 , 472 , 567 , 482 , 412 , 577 , 487 ,
- 417 , 542 , 522 , 417 , 577 , 472 , 457 , 617 , 397 , 552 ,
- 612 , 362 , 582 , 572 , 392 , 577 , 547 , 487 , 537 , 497 ,
- 542 , 462 , 567 , 477 , 482 , 542 , 397 , 577 , 492 , 532 ,
- 497 , 552 , 562 , 462 , 532 , 547 , 522 , 472 , 602 , 487 ,
- 492 , 592 , 497 , 522 , 532 , 492 , 522 , 472 , 482 , 527 ,
- 447 , 477 , 522 , 507 , 502 , 462 , 552 , 487 , 502 , 577 ,
- 422 , 532 , 642 , 337 , 592 , 622 , 387 , 577 , 577 , 427 ,
- 532 , 542 , 437 , 502 , 497 , 467 , 462 , 522 , 502 , 467 ,
- 512 , 502 , 472 , 537 , 467 , 522 , 562 , 447 , 597 , 472 ,
- 577 , 517 , 472 , 622 , 452 , 497 , 572 , 487 , 472 , 552 ,
- 502 , 492 , 512 , 547 , 532 , 422 , 632 , 512 , 402 , 662 ,
- 512 , 412 , 612 , 552 , 387 , 607 , 522 , 442 , 527 , 542 ,
- 457 , 467 , 527 , 492 , 457 , 497 , 562 , 477 , 472 , 567 ,
- 517 , 442 , 547 , 512 , 482 , 542 , 492 , 507 , 507 , 497 ,
- 532 , 482 , 522 , 512 , 447 , 547 , 477 , 507 , 487 , 492 ,
- 552 , 477 , 512 , 592 , 462 , 507 , 597 , 492 , 507 , 532 ,
- 602 , 452 , 462 , 637 , 477 , 427 , 542 , 607 , 307 , 512 ,
- 647 , 297 , 522 , 612 , 382 , 492 , 627 , 497 , 437 , 582 ,
- 617 , 382 , 562 , 637 , 372 , 547 , 577 , 427 , 592 , 502 ,
- 562 , 522 , 432 , 652 , 422 , 442 , 657 , 357 , 502 , 602 ,
- 412 , 577 , 512 , 457 , 607 , 407 , 517 , 547 , 417 , 557 ,
- 427 , 557 , 467 , 502 , 527 , 452 , 522 , 502 , 457 , 497 ,
- 567 , 397 , 592 , 502 , 487 , 547 , 502 , 567 , 457 , 582 ,
- 542 , 492 , 547 , 532 , 527 , 462 , 597 , 492 , 492 , 572 ,
- 482 , 532 , 467 , 532 , 537 , 432 , 507 , 582 , 422 , 517 ,
- 612 , 427 , 547 , 557 , 437 , 487 , 532 , 502 , 432 , 527 ,
- 572 , 397 , 572 , 542 , 482 , 492 , 482 , 572 , 432 , 432 ,
- 647 , 417 , 422 , 732 , 412 , 462 , 642 , 517 , 397 , 527 ,
- 637 , 367 , 472 , 657 , 442 , 407 , 672 , 497 , 412 , 582 ,
- 542 , 452 , 437 , 637 , 427 , 402 , 617 , 512 , 417 , 577 ,
- 607 , 417 , 522 , 617 , 472 , 442 , 612 , 547 , 367 , 612 ,
- 592 , 397 , 552 , 602 , 462 , 462 , 597 , 497 , 437 , 552 ,
- 552 , 452 , 492 , 592 , 472 , 432 , 567 , 517 , 382 , 542 ,
- 547 , 427 , 502 , 557 , 502 , 437 , 577 , 492 , 457 , 522 ,
- 502 , 517 , 447 , 587 , 472 , 452 , 617 , 492 , 447 , 587 ,
- 527 , 467 , 547 , 547 , 517 , 422 , 597 , 522 , 417 , 572 ,
- 517 , 532 , 447 , 532 , 597 , 367 , 487 , 602 , 422 , 462 ,
- 607 , 487 , 462 , 602 , 512 , 517 , 522 , 542 , 507 , 457 ,
- 587 , 462 , 497 , 567 , 507 , 497 , 522 , 502 , 517 , 527 ,
- 472 , 497 , 572 , 447 , 472 , 587 , 462 , 487 , 552 , 472 ,
- 517 , 497 , 472 , 562 , 467 , 432 , 622 , 427 , 452 , 637 ,
- 417 , 497 , 587 , 477 , 512 , 492 , 532 , 512 , 447 , 552 ,
- 507 , 482 , 547 , 477 , 557 , 522 , 492 , 547 , 477 , 562 ,
- 487 , 452 , 587 , 477 , 467 , 577 , 492 , 532 , 502 , 522 ,
- 577 , 432 , 537 , 582 , 432 , 537 , 582 , 472 , 507 , 547 ,
- 542 , 417 , 517 , 617 , 367 , 542 , 557 , 417 , 562 , 432 ,
- 537 , 572 , 367 , 587 , 582 , 362 , 577 , 587 , 372 , 577 ,
- 557 , 432 , 537 , 557 , 482 , 477 , 592 , 422 , 472 , 592 ,
- 452 , 457 , 577 , 562 , 432 , 557 , 562 , 457 , 487 , 522 ,
- 497 , 477 , 507 , 517 , 572 , 457 , 532 , 582 , 422 , 502 ,
- 547 , 462 , 457 , 582 , 482 , 497 , 547 , 502 , 557 , 457 ,
- 562 , 547 , 437 , 582 , 557 , 427 , 612 , 547 , 432 , 602 ,
- 482 , 542 , 517 , 452 , 602 , 437 , 482 , 542 , 462 , 467 ,
- 552 , 462 , 442 , 612 , 392 , 517 , 582 , 442 , 527 , 482 ,
- 547 , 477 , 452 , 647 , 412 , 467 , 672 , 402 , 477 , 647 ,
- 377 , 492 , 602 , 412 , 502 , 542 , 522 , 497 , 477 , 592 ,
- 467 , 427 , 617 , 477 , 457 , 577 , 537 , 492 , 567 , 552 ,
- 502 , 552 , 487 , 527 , 527 , 477 , 567 , 487 , 492 , 567 ,
- 477 , 442 , 542 , 537 , 387 , 547 , 557 , 417 , 517 , 602 ,
- 432 , 482 , 652 , 432 , 492 , 612 , 492 , 457 , 587 , 522 ,
- 432 , 592 , 412 , 547 , 517 , 402 , 592 , 472 , 462 , 512 ,
- 522 , 462 , 507 , 507 , 492 , 477 , 542 , 462 , 487 , 612 ,
- 417 , 512 , 602 , 387 , 557 , 537 , 442 , 587 , 457 , 587 ,
- 517 , 462 , 632 , 482 , 452 , 582 , 552 , 392 , 577 , 582 ,
- 412 , 562 , 567 , 492 , 477 , 582 , 467 , 522 , 512 , 527 ,
- 527 , 467 , 582 , 502 , 482 , 597 , 477 , 402 , 612 , 462 ,
- 422 , 617 , 492 , 437 , 517 , 532 , 472 , 467 , 527 , 547 ,
- 447 , 482 , 597 , 432 , 472 , 582 , 467 , 482 , 472 , 532 ,
- 517 , 412 , 562 , 567 , 422 , 502 , 662 , 447 , 467 , 642 ,
- 492 , 502 , 502 , 567 , 462 , 432 , 612 , 477 , 432 , 542 ,
- 542 , 432 , 502 , 602 , 467 , 437 , 572 , 597 , 362 , 602 ,
- 642 , 347 , 622 , 552 , 447 , 527 , 542 , 547 , 477 , 527 ,
- 497 , 567 , 422 , 522 , 607 , 337 , 542 , 562 , 372 , 517 ,
- 607 , 422 , 522 , 592 , 467 , 527 , 497 , 547 , 497 , 467 ,
- 562 , 487 , 462 , 557 , 517 , 432 , 522 , 517 , 427 , 452 ,
- 587 , 442 , 427 , 627 , 472 , 432 , 587 , 497 , 482 , 572 ,
- 507 , 547 , 517 , 537 , 602 , 477 , 547 , 557 , 472 , 532 ,
- 537 , 522 , 497 , 557 , 527 , 482 , 457 , 492 , 522 , 417 ,
- 532 , 542 , 462 , 477 , 592 , 502 , 447 , 577 , 482 , 472 ,
- 567 , 507 , 467 , 582 , 517 , 497 , 517 , 512 , 472 , 477 ,
- 557 , 482 , 517 , 507 , 532 , 462 , 517 , 527 , 447 , 512 ,
- 487 , 522 , 487 , 492 , 552 , 537 , 442 , 572 , 497 , 447 ,
- 577 , 467 , 532 , 537 , 457 , 537 , 527 , 472 , 522 , 512 ,
- 472 , 522 , 492 , 542 , 477 , 537 , 522 , 497 , 537 , 462 ,
- 567 , 522 , 467 , 587 , 562 , 422 , 582 , 587 , 427 , 522 ,
- 607 , 452 , 467 , 612 , 487 , 482 , 562 , 577 , 402 , 517 ,
- 582 , 377 , 462 , 607 , 432 , 442 , 582 , 452 , 457 , 502 ,
- 562 , 432 , 497 , 557 , 442 , 557 , 532 , 487 , 542 , 547 ,
- 457 , 517 , 552 , 482 , 542 , 497 , 547 , 487 , 467 , 527 ,
- 497 , 487 , 487 , 527 , 507 , 492 , 512 , 542 , 492 , 477 ,
- 567 , 452 , 477 , 557 , 552 , 477 , 587 , 572 , 437 , 587 ,
- 507 , 512 , 522 , 492 , 542 , 467 , 522 , 537 , 437 , 507 ,
- 542 , 462 , 457 , 542 , 522 , 492 , 547 , 567 , 472 , 507 ,
- 572 , 477 , 492 , 532 , 552 , 472 , 527 , 557 , 442 , 482 ,
- 542 , 432 , 492 , 497 , 432 , 507 , 497 , 517 , 457 , 507 ,
- 527 , 427 , 562 , 577 , 447 , 567 , 572 , 502 , 572 , 457 ,
- 537 , 552 , 432 , 537 , 552 , 442 , 537 , 577 , 462 , 552 ,
- 507 , 447 , 547 , 507 , 497 , 537 , 522 , 512 , 537 , 527 ,
- 512 , 557 , 492 , 487 , 592 , 432 , 527 , 562 , 442 , 537 ,
- 512 , 467 , 512 , 497 , 457 , 547 , 462 , 497 , 542 , 442 ,
- 487 , 547 , 492 , 457 , 592 , 482 , 452 , 597 , 462 , 517 ,
- 542 , 462 , 572 , 477 , 517 , 527 , 502 , 547 , 532 , 517 ,
- 487 , 542 , 437 , 547 , 537 , 477 , 512 , 487 , 562 , 452 ,
- 517 , 552 , 372 , 572 , 557 , 412 , 602 , 522 , 442 , 617 ,
- 492 , 447 , 607 , 447 , 527 , 597 , 422 , 602 , 522 , 422 ,
- 627 , 497 , 432 , 547 , 527 , 442 , 472 , 562 , 492 , 407 ,
- 602 , 522 , 407 , 577 , 492 , 517 , 472 , 557 , 597 , 377 ,
- 547 , 607 , 432 , 472 , 607 , 507 , 422 , 567 , 592 , 407 ,
- 527 , 572 , 402 , 502 , 537 , 447 , 502 , 477 , 532 , 552 ,
- 437 , 562 , 522 , 467 , 487 , 552 , 492 , 462 , 642 , 492 ,
- 512 , 597 , 522 , 447 , 557 , 572 , 407 , 542 , 547 , 492 ,
- 487 , 527 , 542 , 467 , 482 , 542 , 487 , 442 , 567 , 492 ,
- 467 , 592 , 512 , 487 , 547 , 482 , 547 , 492 , 537 , 567 ,
- 407 , 597 , 512 , 437 , 577 , 452 , 472 , 522 , 472 , 497 ,
- 492 , 472 , 522 , 512 , 452 , 572 , 472 , 472 , 517 , 557 ,
- 517 , 437 , 592 , 517 , 437 , 582 , 552 , 422 , 557 , 572 ,
- 467 , 522 , 547 , 482 , 502 , 532 , 497 , 482 , 497 , 512 ,
- 542 , 497 , 497 , 532 , 517 , 477 , 522 , 567 , 447 , 517 ,
- 577 , 502 , 487 , 617 , 487 , 487 , 557 , 537 , 502 , 477 ,
- 572 , 492 , 462 , 527 , 517 , 392 , 492 , 532 , 412 , 502 ,
- 537 , 482 , 477 , 572 , 482 , 452 , 562 , 482 , 492 , 532 ,
- 572 , 507 , 497 , 592 , 487 , 492 , 537 , 472 , 492 , 517 ,
- 522 , 522 , 472 , 527 , 547 , 442 , 497 , 547 , 427 , 552 ,
- 547 , 512 , 542 , 537 , 537 , 492 , 522 , 522 , 507 , 472 ,
- 562 , 517 , 472 , 592 , 457 , 472 , 542 , 462 , 482 , 497 ,
- 507 , 492 , 527 , 557 , 477 , 527 , 552 , 432 , 542 , 527 ,
- 447 , 547 , 512 , 512 , 537 , 497 , 512 , 492 , 502 , 517 ,
- 472 , 517 , 502 , 522 , 537 , 532 , 517 , 497 , 467 , 502 ,
- 512 , 432 , 522 , 512 , 517 , 532 , 497 , 512 , 517 , 477 ,
- 507 , 547 , 462 , 557 , 567 , 472 , 617 , 507 , 522 , 547 ,
- 447 , 552 , 497 , 442 , 567 , 522 , 457 , 572 , 467 , 482 ,
- 507 , 462 , 527 , 507 , 507 , 527 , 527 , 547 , 527 , 502 ,
- 537 , 472 , 522 , 537 , 472 , 552 , 522 , 497 , 522 , 502 ,
- 492 , 452 , 477 , 497 , 467 , 527 , 467 , 487 , 552 , 502 ,
- 492 , 517 , 502 , 482 , 537 , 517 , 532 , 532 , 527 , 557 ,
- 527 , 497 , 522 , 517 , 492 , 497 , 522 , 507 , 467 , 497 ,
- 542 , 477 , 467 , 537 , 492 , 482 , 557 , 522 , 467 , 547 ,
- 542 , 462 , 547 , 527 , 472 , 572 , 522 , 502 , 572 , 487 ,
- 522 , 552 , 447 , 567 , 522 , 432 , 572 , 517 , 442 , 537 ,
- 477 , 487 , 462 , 522 , 512 , 447 , 542 , 497 , 512 , 487 ,
- 542 , 542 , 432 , 572 , 547 , 452 , 572 , 537 , 487 , 512 ,
- 512 , 492 , 472 , 467 , 517 , 462 , 487 , 542 , 447 , 522 ,
- 547 , 467 , 567 , 497 , 507 , 547 , 527 , 532 , 527 , 582 ,
- 482 , 562 , 522 , 467 , 512 , 492 , 522 , 477 , 542 , 527 ,
- 492 , 467 , 557 , 462 , 467 , 552 , 452 , 527 , 532 , 532 ,
- 492 , 532 , 542 , 437 , 537 , 537 , 457 , 527 , 577 , 487 ,
- 532 , 542 , 517 , 477 , 512 , 532 , 442 , 512 , 537 , 472 ,
- 497 , 557 , 457 , 512 , 467 , 492 , 542 , 417 , 572 , 507 ,
- 422 , 607 , 487 , 442 , 577 , 477 , 502 , 572 , 467 , 562 ,
- 502 , 497 , 557 , 507 , 487 , 532 , 497 , 497 , 537 , 477 ,
- 542 , 497 , 487 , 542 , 512 , 482 , 527 , 502 , 502 , 582 ,
- 472 , 547 , 567 , 492 , 532 , 547 , 517 , 497 , 532 , 517 ,
- 482 , 532 , 477 , 447 , 542 , 477 , 457 , 497 , 487 , 507 ,
- 487 , 522 , 522 , 452 , 542 , 492 , 477 , 567 , 532 , 477 ,
- 572 , 587 , 482 , 487 , 562 , 487 , 442 , 562 , 512 , 467 ,
- 532 , 512 , 482 , 497 , 462 , 507 , 457 , 502 , 567 , 482 ,
- 522 , 562 , 507 , 482 , 557 , 487 , 452 , 547 , 547 , 482 ,
- 567 , 572 , 457 , 567 , 547 , 432 , 547 , 487 , 457 , 562 ,
- 512 , 482 , 572 , 502 , 517 , 512 , 482 , 532 , 462 , 497 ,
- 507 , 522 , 517 , 532 , 537 , 507 , 527 , 487 , 497 , 507 ,
- 477 , 492 , 562 , 472 , 497 , 542 , 442 , 487 , 477 , 472 ,
- 462 , 477 , 507 , 532 , 487 , 537 , 547 , 467 , 497 , 537 ,
- 522 , 457 , 612 , 567 , 512 , 627 , 532 , 512 , 532 , 497 ,
- 487 , 522 , 462 , 507 , 527 , 492 , 527 , 477 , 512 , 477 ,
- 452 , 532 , 497 , 492 , 512 , 562 , 512 , 512 , 577 , 497 ,
- 477 , 502 , 547 , 492 , 467 , 542 , 567 , 452 , 537 , 612 ,
- 362 , 487 , 587 , 397 , 462 , 602 , 437 , 497 , 587 , 512 ,
- 517 , 452 , 552 , 492 , 422 , 577 , 517 , 462 , 572 , 582 ,
- 502 , 512 , 562 , 487 , 432 , 562 , 542 , 407 , 542 , 562 ,
- 432 , 507 , 542 , 452 , 442 , 542 , 537 , 457 , 502 , 597 ,
- 447 , 527 , 597 , 457 , 512 , 532 , 532 , 517 , 517 , 542 ,
- 547 , 487 , 517 , 587 , 457 , 452 , 577 , 482 , 437 , 582 ,
- 492 , 407 , 587 , 472 , 517 , 512 , 452 , 567 , 447 , 487 ,
- 592 , 457 , 522 , 582 , 497 , 582 , 497 , 457 , 607 , 447 ,
- 432 , 642 , 427 , 417 , 617 , 447 , 472 , 497 , 487 , 492 ,
- 462 , 527 , 517 , 502 , 497 , 582 , 502 , 497 , 597 , 487 ,
- 522 , 562 , 532 , 512 , 517 , 517 , 517 , 507 , 492 , 552 ,
- 442 , 487 , 542 , 442 , 497 , 532 , 487 , 487 , 557 , 527 ,
- 492 , 502 , 527 , 507 , 462 , 552 , 527 , 462 , 532 , 557 ,
- 527 , 472 , 557 , 527 , 462 , 532 , 527 , 532 , 467 , 507 ,
- 562 , 472 , 442 , 547 , 492 , 452 , 547 , 507 , 482 , 492 ,
- 492 , 527 , 487 , 487 , 552 , 512 , 482 , 582 , 522 , 497 ,
- 537 , 502 , 502 , 487 , 532 , 522 , 467 , 522 , 547 , 462 ,
- 502 , 542 , 447 , 487 , 552 , 487 , 497 , 522 , 522 , 532 ,
- 532 , 532 , 512 , 482 , 512 , 532 , 502 , 532 , 527 , 502 ,
- 572 , 512 , 477 , 522 , 512 , 472 , 477 , 582 , 462 , 452 ,
- 607 , 472 , 462 , 582 , 432 , 472 , 547 , 457 , 567 , 487 ,
- 472 , 582 , 477 , 497 , 557 , 457 , 502 , 582 , 462 , 542 ,
- 552 , 472 , 537 , 532 , 467 , 502 , 507 , 437 , 532 , 512 ,
- 467 , 532 , 482 , 532 , 522 , 477 , 537 , 467 , 467 , 562 ,
- 507 , 477 , 577 , 542 , 477 , 587 , 557 , 432 , 532 , 552 ,
- 457 , 532 , 552 , 512 , 502 , 537 , 542 , 472 , 482 , 512 ,
- 447 , 507 , 552 , 502 , 527 , 507 , 552 , 507 , 457 , 557 ,
- 457 , 467 , 577 , 487 , 512 , 527 , 512 , 512 , 482 , 542 ,
- 452 , 422 , 582 , 477 , 422 , 617 , 497 , 432 , 587 , 532 ,
- 447 , 512 , 537 , 487 , 497 , 557 , 547 , 467 , 547 , 582 ,
- 472 , 512 , 542 , 467 , 517 , 542 , 507 , 512 , 497 , 532 ,
- 492 , 462 , 527 , 462 , 472 , 532 , 512 , 517 , 527 , 522 ,
- 512 , 512 , 522 , 502 , 472 , 522 , 552 , 492 , 572 , 542 ,
- 507 , 532 , 522 , 492 , 457 , 517 , 452 , 502 , 537 , 497 ,
- 487 , 512 , 512 , 472 , 517 , 497 , 482 , 477 , 542 , 557 ,
- 472 , 517 , 552 , 502 , 497 , 522 , 522 , 447 , 497 , 562 ,
- 472 , 452 , 587 , 522 , 442 , 587 , 517 , 427 , 507 , 537 ,
- 482 , 502 , 572 , 537 , 467 , 552 , 542 , 432 , 502 , 552 ,
- 477 , 537 , 587 , 517 , 527 , 552 , 522 , 507 , 482 , 492 ,
- 537 , 482 , 522 , 567 , 487 , 467 , 552 , 482 , 407 , 542 ,
- 477 , 452 , 552 , 502 , 512 , 512 , 502 , 537 , 497 , 492 ,
- 532 , 502 , 502 , 527 , 522 , 522 , 512 , 512 , 512 , 502 ,
- 457 , 492 , 507 , 467 , 532 , 522 , 497 , 507 , 532 , 512 ,
- 462 , 542 , 512 , 467 , 567 , 517 , 492 , 587 , 517 , 522 ,
- 547 , 502 , 497 , 517 , 497 , 467 , 557 , 492 , 462 , 552 ,
- 517 , 457 , 522 , 537 , 442 , 562 , 512 , 472 , 562 , 482 ,
- 517 , 567 , 477 , 497 , 562 , 472 , 502 , 562 , 487 , 512 ,
- 527 , 502 , 507 , 477 , 522 , 487 , 477 , 527 , 497 , 497 ,
- 512 , 487 , 497 , 527 , 462 , 517 , 507 , 462 , 542 , 482 ,
- 517 , 542 , 492 , 527 , 537 , 502 , 487 , 562 , 477 , 517 ,
- 542 , 477 , 517 , 512 , 502 , 512 , 502 , 497 , 522 , 497 ,
- 527 , 547 , 497 , 547 , 542 , 502 , 557 , 512 , 492 , 527 ,
- 537 , 502 , 522 , 522 , 497 , 527 , 492 , 512 , 487 , 477 ,
- 487 , 492 , 487 , 487 , 507 , 492 , 517 , 492 , 517 , 497 ,
- 477 , 522 , 517 , 512 , 492 , 542 , 492 , 517 , 537 , 532 ,
- 527 , 487 , 547 , 512 , 487 , 507 , 532 , 462 , 542 , 507 ,
- 462 , 577 , 447 , 512 , 547 , 472 , 522 , 512 , 502 , 517 ,
- 497 , 507 , 537 , 447 , 552 , 552 , 457 , 562 , 542 , 497 ,
- 522 , 547 , 507 , 497 , 517 , 512 , 527 , 477 , 507 , 512 ,
- 472 , 512 , 527 , 487 , 512 , 532 , 502 , 512 , 517 , 517 ,
- 462 , 527 , 537 , 492 , 547 , 512 , 517 , 537 , 492 , 522 ,
- 482 , 462 , 502 , 487 , 477 , 502 , 467 , 512 , 517 , 452 ,
- 537 , 512 , 467 , 547 , 537 , 497 , 547 , 522 , 527 , 537 ,
- 497 , 537 , 507 , 482 , 567 , 497 , 467 , 572 , 487 , 482 ,
- 557 , 502 , 472 , 497 , 517 , 492 , 502 , 522 , 542 , 477 ,
- 527 , 552 , 472 , 512 , 512 , 497 , 517 , 507 , 522 , 532 ,
- 522 , 537 , 542 , 502 , 517 , 512 , 477 , 502 , 517 , 462 ,
- 512 , 537 , 467 , 507 , 522 , 467 , 487 , 512 , 492 , 497 ,
- 512 , 517 , 527 , 507 , 512 , 532 , 487 , 477 , 557 , 522 ,
- 487 , 562 , 527 , 497 , 522 , 507 , 492 , 487 , 482 , 497 ,
- 492 , 477 , 527 , 517 , 477 , 527 , 517 , 507 , 502 , 522 ,
- 512 , 517 , 537 , 527 , 557 , 512 , 557 , 577 , 507 , 517 ,
- 547 , 487 , 477 , 517 , 472 , 512 , 502 , 487 , 517 , 487 ,
- 467 , 507 , 492 , 492 , 532 , 527 , 532 , 537 , 532 , 507 ,
- 512 , 497 , 487 , 507 , 512 , 492 , 507 , 512 , 482 , 512 ,
- 492 , 472 , 487 , 497 , 487 , 472 , 542 , 512 , 522 , 527 ,
- 497 , 557 , 512 , 472 , 557 , 537 , 427 , 577 , 537 , 447 ,
- 562 , 557 , 532 , 527 , 527 , 552 , 507 , 432 , 537 , 522 ,
- 432 , 572 , 512 , 487 , 547 , 482 , 502 , 482 , 462 , 492 ,
- 522 , 497 , 537 , 572 , 522 , 532 , 502 , 477 , 497 , 512 ,
- 517 , 552 , 572 , 517 , 577 , 467 , 462 , 502 , 422 , 457 ,
- 497 , 482 , 517 , 547 , 497 , 502 , 512 , 462 , 497 , 487 ,
- 462 , 542 , 547 , 532 , 547 , 567 , 497 , 522 , 547 , 482 ,
- 532 , 522 , 497 , 522 , 487 , 497 , 492 , 467 , 477 , 502 ,
- 472 , 502 , 512 , 497 , 582 , 542 , 552 , 557 , 532 , 527 ,
- 537 , 517 , 507 , 517 , 502 , 537 , 522 , 507 , 507 , 512 ,
- 492 , 462 , 482 , 467 , 472 , 472 , 507 , 512 , 512 , 522 ,
- 487 , 517 , 502 , 507 , 472 , 522 , 497 , 512 , 552 , 502 ,
- 522 , 522 , 537 , 542 , 512 , 507 , 527 , 497 , 507 , 507 ,
- 507 , 487 , 502 , 502 , 482 , 497 , 497 , 482 , 502 , 517 ,
- 527 , 527 , 502 , 547 , 522 , 527 , 542 , 497 , 507 , 552 ,
- 542 , 532 , 542 , 532 , 532 , 512 , 482 , 492 , 477 , 447 ,
- 492 , 507 , 477 , 497 , 507 , 497 , 517 , 517 , 502 , 512 ,
- 497 , 522 , 537 , 532 , 532 , 532 , 542 , 522 , 512 , 517 ,
- 492 , 487 , 517 , 497 , 457 , 487 , 482 , 492 , 462 , 462 ,
- 502 , 477 , 477 , 532 , 537 , 537 , 542 , 537 , 552 , 522 ,
- 487 , 532 , 492 , 487 , 557 , 512 , 522 , 542 , 512 , 532 ,
- 512 , 477 , 497 , 477 , 492 , 532 , 497 , 527 , 542 , 502 ,
- 527 , 497 , 492 , 522 , 467 , 502 , 552 , 507 , 522 , 527 ,
- 522 , 532 , 517 , 527 , 532 , 507 , 532 , 532 , 517 , 502 ,
- 492 , 497 , 477 , 467 , 472 , 472 , 457 , 497 , 512 , 472 ,
- 522 , 522 , 507 , 517 , 517 , 517 , 527 , 497 , 517 , 547 ,
- 522 , 527 , 537 , 527 , 512 , 517 , 487 , 472 , 477 , 477 ,
- 492 , 487 , 497 , 507 , 497 , 517 , 507 , 507 , 522 , 522 ,
- 532 , 532 , 547 , 552 , 542 , 542 , 542 , 537 , 512 , 517 ,
- 517 , 507 , 517 , 507 , 497 , 492 , 472 , 482 , 482 , 457 ,
- 487 , 507 , 497 , 512 , 517 , 537 , 547 , 512 , 532 , 527 ,
- 482 , 502 , 497 , 502 , 507 , 502 , 532 , 522 , 482 , 512 ,
- 512 , 482 , 497 , 487 , 487 , 502 , 492 , 537 , 502 , 482 ,
- 537 , 482 , 452 , 522 , 487 , 482 , 537 , 517 , 537 , 542 ,
- 482 , 527 , 567 , 502 , 557 , 572 , 507 , 547 , 567 , 507 ,
- 507 , 517 , 477 , 472 , 517 , 457 , 462 , 532 , 477 , 502 ,
- 562 , 477 , 487 , 572 , 492 , 507 , 587 , 502 , 492 , 562 ,
- 532 , 502 , 552 , 507 , 482 , 547 , 497 , 432 , 507 , 497 ,
- 432 , 527 , 517 , 407 , 482 , 542 , 442 , 482 , 562 , 487 ,
- 477 , 582 , 542 , 457 , 552 , 552 , 457 , 542 , 587 , 467 ,
- 502 , 597 , 517 , 487 , 557 , 467 , 427 , 542 , 517 , 417 ,
- 522 , 567 , 447 , 512 , 582 , 467 , 477 , 597 , 542 , 482 ,
- 567 , 542 , 437 , 537 , 587 , 462 , 482 , 577 , 502 , 477 ,
- 577 , 527 , 447 , 507 , 552 , 462 , 447 , 527 , 482 , 457 ,
- 532 , 512 , 437 , 482 , 547 , 507 , 467 , 542 , 527 , 442 ,
- 522 , 592 , 487 , 507 , 602 , 532 , 492 , 557 , 537 , 432 ,
- 492 , 562 , 447 , 432 , 542 , 452 , 432 , 552 , 502 , 427 ,
- 497 , 557 , 507 , 502 , 582 , 552 , 482 , 567 , 572 , 482 ,
- 522 , 552 , 532 , 542 , 547 , 542 , 497 , 487 , 522 , 517 ,
- 467 , 477 , 487 , 492 , 507 , 502 , 497 , 502 , 517 , 517 ,
- 532 , 497 , 482 , 537 , 522 , 507 , 557 , 502 , 492 , 567 ,
- 502 , 502 , 547 , 452 , 472 , 542 , 447 , 477 , 527 , 432 ,
- 487 , 547 , 442 , 467 , 527 , 467 , 537 , 587 , 477 , 512 ,
- 592 , 467 , 487 , 602 , 477 , 442 , 617 , 562 , 447 , 577 ,
- 587 , 437 , 517 , 592 , 412 , 452 , 567 , 457 , 462 , 582 ,
- 492 , 407 , 547 , 542 , 422 , 527 , 562 , 432 , 517 , 627 ,
- 482 , 482 , 647 , 532 , 462 , 632 , 557 , 397 , 557 , 597 ,
- 407 , 492 , 587 , 412 , 422 , 572 , 457 , 392 , 537 , 502 ,
- 422 , 577 , 572 , 432 , 547 , 587 , 447 , 497 , 582 , 452 ,
- 457 , 617 , 542 , 442 , 592 , 572 , 412 , 527 , 567 , 412 ,
- 462 , 577 , 482 , 457 , 562 , 517 , 417 , 527 , 577 , 432 ,
- 487 , 582 , 487 , 477 , 592 , 547 , 472 , 532 , 577 , 497 ,
- 487 , 572 , 537 , 477 , 547 , 567 , 467 , 462 , 537 , 497 ,
- 422 , 502 , 547 , 432 , 457 , 597 , 532 , 457 , 552 , 572 ,
- 457 , 472 , 572 , 497 , 437 , 567 , 587 , 482 , 532 , 582 ,
- 492 , 467 , 532 , 497 , 432 , 472 , 517 , 477 , 482 , 517 ,
- 477 , 452 , 482 , 492 , 497 , 492 , 487 , 547 , 552 , 522 ,
- 557 , 542 , 502 , 572 , 557 , 502 , 552 , 522 , 497 , 547 ,
- 537 , 467 , 477 , 507 , 442 , 472 , 532 , 442 , 457 , 572 ,
- 527 , 512 , 587 , 527 , 487 , 557 , 552 , 482 , 487 , 552 ,
- 512 , 507 , 587 , 522 , 457 , 562 , 537 , 432 , 507 , 522 ,
- 452 , 487 , 567 , 502 , 432 , 497 , 507 , 437 , 467 , 537 ,
- 472 , 462 , 542 , 567 , 487 , 482 , 567 , 527 , 472 , 547 ,
- 582 , 467 , 492 , 632 , 562 , 417 , 517 , 562 , 407 , 407 ,
- 577 , 487 , 372 , 537 , 592 , 442 , 482 , 617 , 517 , 442 ,
- 572 , 587 , 452 , 477 , 612 , 587 , 502 , 547 , 592 , 507 ,
- 467 , 542 , 542 , 442 , 452 , 547 , 527 , 437 , 472 , 537 ,
- 467 , 422 , 507 , 527 , 447 , 477 , 562 , 562 , 507 , 502 ,
- 537 , 532 , 487 , 522 , 577 , 522 , 472 , 547 , 587 , 472 ,
- 437 , 522 , 512 , 422 , 442 , 522 , 482 , 427 , 517 , 582 ,
- 497 , 472 , 537 , 547 , 502 , 487 , 527 , 537 , 517 , 507 ,
- 537 , 577 , 512 , 477 , 552 , 587 , 487 , 462 , 562 , 547 ,
- 507 , 517 , 537 , 517 , 457 , 467 , 517 , 507 , 472 , 472 ,
- 532 , 567 , 487 , 467 , 542 , 542 , 472 , 507 , 567 , 522 ,
- 482 , 547 , 572 , 527 , 497 , 472 , 477 , 487 , 452 , 427 ,
- 462 , 502 , 477 , 462 , 512 , 537 , 492 , 487 , 542 , 542 ,
- 497 , 482 , 532 , 577 , 552 , 527 , 557 , 562 , 517 , 507 ,
- 512 , 502 , 497 , 497 , 502 , 502 , 512 , 467 , 462 , 502 ,
- 497 , 482 , 482 , 482 , 527 , 567 , 517 , 502 , 552 , 557 ,
- 492 , 497 , 557 , 552 , 517 , 537 , 562 , 547 , 527 , 482 ,
- 467 , 497 , 502 , 457 , 437 , 482 , 522 , 497 , 487 , 517 ,
- 517 , 522 , 507 , 472 , 497 , 532 , 497 , 487 , 527 , 552 ,
- 522 , 487 , 512 , 512 , 512 , 522 , 497 , 477 , 547 , 557 ,
- 502 , 487 , 517 , 522 , 462 , 442 , 477 , 517 , 487 , 487 ,
- 522 , 547 , 532 , 497 , 512 , 512 , 542 , 542 , 517 , 537 ,
- 572 , 582 , 547 , 542 , 527 , 512 , 502 , 462 , 447 , 472 ,
- 482 , 482 , 487 , 497 , 507 , 512 , 497 , 487 , 507 , 542 ,
- 527 , 497 , 522 , 547 , 552 , 547 , 517 , 507 , 517 , 537 ,
- 507 , 477 , 482 , 487 , 512 , 492 , 462 , 462 , 467 , 472 ,
- 462 , 477 , 492 , 502 , 522 , 527 , 527 , 507 , 522 , 532 ,
- 507 , 512 , 532 , 537 , 547 , 567 , 552 , 542 , 542 , 522 ,
- 497 , 472 , 477 , 502 , 502 , 482 , 492 , 527 , 517 , 477 ,
- 502 , 517 , 502 , 512 , 527 , 512 , 502 , 532 , 552 , 522 ,
- 502 , 502 , 512 , 527 , 517 , 522 , 537 , 547 , 552 , 522 ,
- 507 , 502 , 487 , 487 , 477 , 467 , 477 , 467 , 472 , 482 ,
- 487 , 477 , 482 , 497 , 482 , 482 , 512 , 542 , 537 , 562 ,
- 582 , 552 , 542 , 542 , 527 , 507 , 497 , 482 , 472 , 462 ,
- 477 , 477 , 477 , 482 , 482 , 477 , 497 , 512 , 537 , 542 ,
- 537 , 572 , 562 , 542 , 547 , 532 , 532 , 532 , 537 , 537 ,
- 527 , 532 , 542 , 517 , 492 , 482 , 492 , 472 , 447 , 472 ,
- 497 , 487 , 512 , 527 , 492 , 487 , 497 , 502 , 487 , 477 ,
- 492 , 517 , 522 , 517 , 542 , 552 , 532 , 532 , 522 , 497 ,
- 487 , 497 , 502 , 482 , 497 , 512 , 517 , 492 , 472 , 487 ,
- 492 , 492 , 492 , 517 , 522 , 512 , 532 , 537 , 522 , 517 ,
- 517 , 497 , 502 , 527 , 547 , 547 , 557 , 577 , 552 , 512 ,
- 507 , 502 , 472 , 467 , 497 , 497 , 477 , 482 , 512 , 492 ,
- 477 , 507 , 497 , 482 , 507 , 522 , 532 , 547 , 572 , 577 ,
- 562 , 542 , 527 , 527 , 512 , 502 , 507 , 482 , 452 , 462 ,
- 472 , 457 , 437 , 457 , 472 , 467 , 477 , 502 , 537 , 547 ,
- 547 , 557 , 542 , 507 , 517 , 517 , 482 , 512 , 552 , 547 ,
- 532 , 542 , 542 , 512 , 492 , 507 , 477 , 452 , 482 , 512 ,
- 522 , 502 , 527 , 552 , 497 , 457 , 497 , 507 , 482 , 482 ,
- 527 , 572 , 532 , 507 , 547 , 552 , 527 , 517 , 527 , 537 ,
- 517 , 512 , 547 , 522 , 502 , 492 , 497 , 492 , 452 , 442 ,
- 487 , 502 , 462 , 497 , 537 , 517 , 472 , 487 , 542 , 522 ,
- 462 , 482 , 542 , 527 , 532 , 562 , 587 , 537 , 507 , 537 ,
- 527 , 452 , 452 , 512 , 502 , 472 , 472 , 507 , 492 , 427 ,
- 462 , 527 , 472 , 467 , 527 , 567 , 547 , 532 , 587 , 572 ,
- 507 , 527 , 582 , 532 , 507 , 542 , 572 , 532 , 462 , 497 ,
- 507 , 442 , 447 , 497 , 482 , 477 , 502 , 532 , 542 , 522 ,
- 537 , 542 , 502 , 512 , 522 , 482 , 497 , 507 , 522 , 542 ,
- 517 , 522 , 522 , 512 , 502 , 497 , 467 , 477 , 477 , 482 ,
- 507 , 492 , 502 , 497 , 472 , 472 , 477 , 472 , 482 , 507 ,
- 522 , 542 , 542 , 522 , 517 , 527 , 542 , 527 , 532 , 552 ,
- 547 , 552 , 557 , 532 , 507 , 497 , 487 , 482 , 467 , 467 ,
- 477 , 477 , 517 , 532 , 502 , 492 , 537 , 492 , 497 , 577 ,
- 507 , 482 , 547 , 572 , 522 , 542 , 592 , 512 , 502 , 587 ,
- 522 , 432 , 512 , 547 , 442 , 477 , 542 , 447 , 397 , 487 ,
- 512 , 412 , 457 , 552 , 507 , 477 , 577 , 572 , 472 , 512 ,
- 582 , 512 , 452 , 537 , 572 , 492 , 522 , 602 , 502 , 422 ,
- 507 , 517 , 422 , 437 , 532 , 512 , 467 , 537 , 577 , 492 ,
- 477 , 567 , 537 , 472 , 512 , 547 , 512 , 502 , 572 , 567 ,
- 487 , 512 , 567 , 527 , 497 , 527 , 547 , 512 , 482 , 527 ,
- 522 , 447 , 477 , 512 , 477 , 447 , 467 , 507 , 487 , 472 ,
- 532 , 542 , 482 , 507 , 532 , 517 , 497 , 507 , 567 , 557 ,
- 527 , 567 , 557 , 487 , 492 , 522 , 487 , 437 , 462 , 507 ,
- 477 , 452 , 527 , 512 , 447 , 497 , 522 , 487 , 497 , 522 ,
- 542 , 537 , 532 , 547 , 532 , 512 , 542 , 542 , 542 , 547 ,
- 522 , 532 , 527 , 517 , 522 , 477 , 487 , 502 , 457 , 457 ,
- 477 , 492 , 502 , 512 , 527 , 552 , 507 , 502 , 562 , 522 ,
- 507 , 522 , 512 , 517 , 532 , 557 , 542 , 502 , 542 , 522 ,
- 447 , 492 , 472 , 437 , 507 , 487 , 487 , 547 , 462 , 467 ,
- 552 , 492 , 457 , 542 , 512 , 447 , 547 , 562 , 472 , 507 ,
- 577 , 492 , 482 , 592 , 542 , 462 , 567 , 602 , 462 , 487 ,
- 562 , 467 , 427 , 527 , 527 , 417 , 467 , 552 , 467 , 447 ,
- 567 , 537 , 452 , 542 , 597 , 502 , 467 , 567 , 587 , 512 ,
- 542 , 612 , 532 , 467 , 547 , 572 , 457 , 442 , 517 , 487 ,
- 432 , 492 , 547 , 457 , 437 , 527 , 502 , 442 , 487 , 542 ,
- 507 , 502 , 552 , 562 , 477 , 467 , 547 , 537 , 492 , 502 ,
- 552 , 552 , 497 , 512 , 552 , 492 , 447 , 512 , 512 , 437 ,
- 452 , 507 , 522 , 472 , 497 , 562 , 512 , 472 , 537 , 567 ,
- 497 , 487 , 537 , 547 , 487 , 522 , 602 , 522 , 482 , 582 ,
- 562 , 447 , 487 , 542 , 507 , 457 , 522 , 557 , 452 , 477 ,
- 542 , 497 , 467 , 507 , 532 , 492 , 487 , 547 , 532 , 472 ,
- 507 , 552 , 507 , 507 , 557 , 527 , 532 , 552 , 542 , 507 ,
- 467 , 477 , 487 , 452 , 462 , 472 , 452 , 482 , 467 , 472 ,
- 502 , 477 , 502 , 532 , 517 , 542 , 532 , 512 , 552 , 562 ,
- 567 , 557 , 522 , 542 , 557 , 507 , 522 , 522 , 462 , 482 ,
- 517 , 487 , 452 , 492 , 492 , 467 , 507 , 512 , 477 , 532 ,
- 537 , 497 , 577 , 557 , 462 , 527 , 562 , 467 , 522 , 582 ,
- 497 , 507 , 602 , 552 , 442 , 517 , 567 , 447 , 447 , 562 ,
- 457 , 397 , 537 , 532 , 412 , 467 , 552 , 467 , 452 , 557 ,
- 537 , 432 , 507 , 572 , 482 , 487 , 572 , 527 , 477 , 562 ,
- 592 , 512 , 467 , 537 , 532 , 452 , 487 , 537 , 452 , 457 ,
- 547 , 497 , 442 , 507 , 557 , 482 , 487 , 567 , 522 , 462 ,
- 537 , 587 , 507 , 507 , 592 , 572 , 517 , 577 , 582 , 512 ,
- 472 , 527 , 522 , 437 , 457 , 497 , 467 , 462 , 482 , 482 ,
- 452 , 452 , 522 , 532 , 482 , 522 , 552 , 512 , 502 , 542 ,
- 552 , 512 , 497 , 552 , 552 , 487 , 517 , 532 , 482 , 477 ,
- 502 , 507 , 452 , 452 , 527 , 512 , 457 , 502 , 532 , 497 ,
- 512 , 527 , 537 , 492 , 487 , 557 , 517 , 457 , 527 , 552 ,
- 517 , 537 , 567 , 567 , 507 , 507 , 572 , 517 , 487 , 537 ,
- 492 , 482 , 507 , 492 , 467 , 457 , 492 , 522 , 497 , 497 ,
- 522 , 512 , 517 , 522 , 517 , 522 , 492 , 527 , 572 , 532 ,
- 527 , 572 , 537 , 497 , 502 , 502 , 467 , 432 , 472 , 507 ,
- 462 , 467 , 482 , 472 , 497 , 512 , 512 , 492 , 472 , 527 ,
- 552 , 482 , 532 , 582 , 517 , 552 , 602 , 522 , 502 , 562 ,
- 537 , 477 , 517 , 512 , 447 , 467 , 512 , 462 , 467 , 502 ,
- 437 , 462 , 557 , 527 , 482 , 567 , 572 , 497 , 542 , 567 ,
- 487 , 492 , 597 , 572 , 472 , 552 , 577 , 482 , 492 , 552 ,
- 492 , 417 , 497 , 537 , 452 , 477 , 542 , 487 , 432 , 527 ,
- 547 , 447 , 452 , 547 , 522 , 457 , 517 , 527 , 462 , 487 ,
- 592 , 527 , 467 , 552 , 587 , 507 , 512 , 577 , 517 , 467 ,
- 507 , 527 , 437 , 442 , 497 , 467 , 452 , 522 , 517 , 477 ,
- 517 , 532 , 527 , 497 , 507 , 527 , 537 , 557 , 587 , 557 ,
- 537 , 582 , 572 , 517 , 477 , 502 , 487 , 457 , 492 , 502 ,
- 447 , 482 , 502 , 452 , 482 , 527 , 502 , 477 , 527 , 547 ,
- 507 , 502 , 557 , 537 , 512 , 547 , 542 , 507 , 512 , 552 ,
- 532 , 497 , 487 , 517 , 472 , 447 , 467 , 457 , 442 , 467 ,
- 492 , 487 , 492 , 517 , 542 , 507 , 522 , 547 , 512 , 497 ,
- 532 , 562 , 547 , 552 , 557 , 532 , 517 , 532 , 507 , 482 ,
- 502 , 507 , 497 , 512 , 497 , 487 , 497 , 492 , 497 , 497 ,
- 502 , 502 , 512 , 517 , 527 , 522 , 507 , 512 , 517 , 517 ,
- 527 , 522 , 527 , 552 , 557 , 542 , 517 , 537 , 527 , 492 ,
- 492 , 477 , 462 , 467 , 477 , 482 , 492 , 472 , 487 , 502 ,
- 482 , 477 , 502 , 487 , 492 , 527 , 562 , 547 , 522 , 567 ,
- 547 , 507 , 532 , 522 , 467 , 492 , 537 , 522 , 462 , 482 ,
- 517 , 452 , 457 , 507 , 492 , 482 , 537 , 557 , 522 , 517 ,
- 542 , 527 , 497 , 532 , 552 , 517 , 522 , 572 , 562 , 542 ,
- 532 , 522 , 512 , 477 , 482 , 487 , 447 , 452 , 512 , 497 ,
- 487 , 512 , 502 , 492 , 512 , 517 , 492 , 497 , 537 , 527 ,
- 507 , 562 , 547 , 512 , 532 , 517 , 502 , 497 , 472 , 492 ,
- 517 , 502 , 517 , 502 , 477 , 482 , 472 , 482 , 487 , 482 ,
- 512 , 512 , 517 , 527 , 492 , 517 , 522 , 487 , 517 , 517 ,
- 512 , 552 , 547 , 567 , 587 , 547 , 532 , 532 , 512 , 517 ,
- 492 , 467 , 502 , 482 , 477 , 487 , 482 , 487 , 477 , 492 ,
- 512 , 477 , 487 , 537 , 527 , 557 , 577 , 547 , 557 , 537 ,
- 532 , 537 , 507 , 517 , 497 , 482 , 512 , 482 , 447 , 467 ,
- 457 , 442 , 477 , 467 , 482 , 512 , 532 , 547 , 517 , 512 ,
- 517 , 482 , 512 , 537 , 507 , 537 , 552 , 542 , 567 , 547 ,
- 502 , 502 , 492 , 477 , 482 , 467 , 477 , 472 , 512 , 527 ,
- 497 , 497 , 512 , 492 , 507 , 522 , 492 , 522 , 547 , 557 ,
- 547 , 542 , 547 , 537 , 507 , 532 , 527 , 502 , 507 , 517 ,
- 542 , 527 , 502 , 497 , 487 , 467 , 487 , 467 , 477 , 502 ,
- 502 , 532 , 522 , 477 , 482 , 482 , 472 , 507 , 492 , 512 ,
- 532 , 537 , 562 , 552 , 547 , 537 , 517 , 492 , 507 , 507 ,
- 502 , 482 , 507 , 517 , 467 , 447 , 477 , 462 , 462 , 502 ,
- 507 , 502 , 502 , 542 , 567 , 557 , 542 , 562 , 537 , 532 ,
- 542 , 542 , 547 , 527 , 537 , 527 , 482 , 452 , 467 , 437 ,
- 462 , 492 , 502 , 502 , 497 , 557 , 562 , 512 , 507 , 512 ,
- 482 , 492 , 517 , 552 , 532 , 542 , 582 , 547 , 522 , 507 ,
- 497 , 457 , 482 , 497 , 487 , 472 , 477 , 512 , 512 , 482 ,
- 477 , 482 , 447 , 487 , 517 , 502 , 492 , 512 , 562 , 552 ,
- 502 , 512 , 537 , 507 , 527 , 532 , 547 , 532 , 512 , 542 ,
- 542 , 502 , 492 , 482 , 477 , 502 , 502 , 517 , 497 , 507 ,
- 542 , 522 , 492 , 487 , 462 , 477 , 527 , 537 , 527 , 527 ,
- 562 , 572 , 552 , 537 , 542 , 517 , 507 , 527 , 522 , 512 ,
- 502 , 507 , 502 , 482 , 462 , 447 , 437 , 452 , 492 , 497 ,
- 492 , 492 , 517 , 527 , 522 , 512 , 517 , 512 , 527 , 552 ,
- 542 , 522 , 522 , 552 , 532 , 487 , 467 , 477 , 442 , 457 ,
- 507 , 507 , 507 , 512 , 527 , 537 , 532 , 517 , 507 , 477 ,
- 507 , 537 , 527 , 532 , 547 , 572 , 567 , 537 , 527 , 507 ,
- 472 , 517 , 527 , 497 , 507 , 502 , 507 , 492 , 492 , 492 ,
- 467 , 477 , 492 , 492 , 512 , 507 , 507 , 522 , 527 , 527 ,
- 507 , 467 , 487 , 567 , 542 , 522 , 537 , 547 , 532 , 502 ,
- 507 , 492 , 457 , 477 , 512 , 502 , 502 , 497 , 507 , 517 ,
- 487 , 497 , 462 , 432 , 472 , 527 , 522 , 532 , 532 , 537 ,
- 562 , 547 , 537 , 512 , 502 , 547 , 562 , 512 , 517 , 522 ,
- 537 , 517 , 482 , 497 , 457 , 432 , 492 , 507 , 502 , 522 ,
- 517 , 542 , 547 , 522 , 512 , 497 , 502 , 552 , 552 , 542 ,
- 532 , 532 , 562 , 552 , 497 , 472 , 437 , 437 , 487 , 477 ,
- 477 , 497 , 507 , 527 , 502 , 472 , 497 , 472 , 472 , 532 ,
- 527 , 502 , 512 , 537 , 547 , 547 , 527 , 512 , 482 , 512 ,
- 547 , 527 , 512 , 497 , 507 , 522 , 477 , 467 , 487 , 467 ,
- 502 , 527 , 507 , 502 , 517 , 522 , 522 , 512 , 502 , 502 ,
- 477 , 522 , 557 , 557 , 542 , 552 , 572 , 557 , 527 , 507 ,
- 477 , 482 , 527 , 517 , 497 , 512 , 517 , 497 , 507 , 482 ,
- 447 , 442 , 467 , 497 , 507 , 512 , 522 , 532 , 537 , 527 ,
- 507 , 512 , 497 , 522 , 552 , 557 , 547 , 507 , 487 , 517 ,
- 507 , 462 , 467 , 467 , 477 , 492 , 492 , 497 , 497 , 512 ,
- 532 , 507 , 512 , 502 , 487 , 532 , 547 , 542 , 552 , 542 ,
- 532 , 557 , 537 , 517 , 492 , 472 , 482 , 502 , 497 , 507 ,
- 492 , 507 , 552 , 497 , 477 , 472 , 497 , 522 , 522 , 537 ,
- 547 , 497 , 502 , 547 , 502 , 507 , 502 , 522 , 542 , 532 ,
- 537 , 542 , 482 , 507 , 507 , 457 , 477 , 452 , 487 , 507 ,
- 507 , 512 , 502 , 447 , 497 , 527 , 477 , 487 , 477 , 512 ,
- 522 , 497 , 542 , 552 , 512 , 577 , 567 , 527 , 527 , 492 ,
- 517 , 507 , 497 , 532 , 517 , 462 , 512 , 507 , 472 , 487 ,
- 452 , 477 , 507 , 517 , 542 , 527 , 517 , 562 , 537 , 512 ,
- 522 , 512 , 547 , 557 , 532 , 577 , 552 , 477 , 517 , 482 ,
- 472 , 487 , 457 , 502 , 497 , 487 , 527 , 477 , 462 , 522 ,
- 517 , 497 , 497 , 497 , 502 , 507 , 522 , 547 , 492 , 492 ,
- 547 , 517 , 517 , 527 , 502 , 507 , 497 , 497 , 512 , 482 ,
- 477 , 512 , 512 , 507 , 497 , 462 , 487 , 527 , 537 , 557 ,
- 507 , 507 , 532 , 497 , 507 , 517 , 502 , 537 , 577 , 557 ,
- 552 , 522 , 522 , 527 , 492 , 497 , 482 , 462 , 497 , 517 ,
- 522 , 522 , 477 , 462 , 492 , 517 , 502 , 477 , 482 , 532 ,
- 542 , 522 , 517 , 507 , 532 , 557 , 557 , 542 , 512 , 497 ,
- 512 , 522 , 507 , 482 , 467 , 472 , 487 , 487 , 472 , 452 ,
- 447 , 482 , 512 , 507 , 502 , 502 , 527 , 547 , 547 , 517 ,
- 487 , 502 , 567 , 562 , 542 , 532 , 522 , 532 , 517 , 512 ,
- 482 , 477 , 502 , 532 , 537 , 512 , 487 , 487 , 507 , 517 ,
- 537 , 492 , 482 , 507 , 532 , 542 , 512 , 477 , 492 , 522 ,
- 537 , 547 , 492 , 517 , 547 , 552 , 547 , 497 , 462 , 487 ,
- 482 , 512 , 502 , 462 , 477 , 472 , 487 , 517 , 512 , 482 ,
- 502 , 517 , 527 , 512 , 447 , 487 , 527 , 562 , 557 , 542 ,
- 522 , 527 , 542 , 557 , 517 , 467 , 482 , 477 , 507 , 517 ,
- 477 , 472 , 507 , 497 , 497 , 477 , 462 , 502 , 512 , 537 ,
- 562 , 512 , 482 , 527 , 557 , 577 , 542 , 527 , 547 , 537 ,
- 557 , 547 , 482 , 477 , 502 , 502 , 507 , 452 , 457 , 492 ,
- 487 , 517 , 502 , 467 , 507 , 532 , 542 , 552 , 487 , 497 ,
- 497 , 497 , 552 , 517 , 487 , 527 , 527 , 542 , 522 , 452 ,
- 472 , 492 , 502 , 542 , 492 , 477 , 507 , 507 , 527 , 492 ,
- 467 , 502 , 482 , 537 , 547 , 487 , 492 , 502 , 517 , 542 ,
- 497 , 497 , 527 , 527 , 587 , 577 , 517 , 522 , 517 , 517 ,
- 522 , 477 , 472 , 487 , 492 , 537 , 492 , 462 , 507 , 537 ,
- 532 , 522 , 482 , 492 , 497 , 492 , 557 , 532 , 522 , 552 ,
- 572 , 557 , 527 , 497 , 497 , 467 , 502 , 497 , 457 , 452 ,
- 477 , 512 , 497 , 482 , 437 , 442 , 467 , 517 , 527 , 497 ,
- 512 , 542 , 537 , 522 , 517 , 522 , 537 , 527 , 582 , 557 ,
- 522 , 517 , 522 , 527 , 502 , 462 , 472 , 467 , 462 , 532 ,
- 507 , 492 , 507 , 527 , 547 , 532 , 502 , 512 , 502 , 522 ,
- 552 , 512 , 502 , 522 , 547 , 557 , 522 , 502 , 532 , 497 ,
- 502 , 522 , 517 , 512 , 507 , 517 , 522 , 487 , 462 , 467 ,
- 442 , 487 , 512 , 497 , 497 , 482 , 502 , 497 , 467 , 477 ,
- 482 , 477 , 537 , 552 , 552 , 562 , 562 , 562 , 542 , 492 ,
- 482 , 472 , 462 , 497 , 507 , 512 , 497 , 472 , 492 , 527 ,
- 502 , 492 , 497 , 497 , 522 , 537 , 537 , 542 , 557 , 567 ,
- 582 , 552 , 522 , 522 , 497 , 537 , 532 , 492 , 482 , 477 ,
- 472 , 482 , 472 , 477 , 462 , 447 , 492 , 517 , 532 , 532 ,
- 512 , 527 , 542 , 507 , 482 , 472 , 532 , 577 , 557 , 557 ,
- 527 , 512 , 517 , 497 , 472 , 462 , 462 , 477 , 502 , 502 ,
- 502 , 497 , 497 , 497 , 497 , 507 , 487 , 467 , 522 , 547 ,
- 527 , 522 , 502 , 497 , 527 , 542 , 532 , 507 , 507 , 567 ,
- 562 , 527 , 517 , 532 , 527 , 522 , 512 , 497 , 462 , 467 ,
- 497 , 502 , 517 , 507 , 492 , 497 , 512 , 507 , 492 , 462 ,
- 492 , 522 , 547 , 572 , 557 , 547 , 562 , 567 , 547 , 487 ,
- 452 , 487 , 487 , 482 , 487 , 462 , 472 , 482 , 467 , 477 ,
- 477 , 492 , 507 , 522 , 532 , 527 , 512 , 517 , 537 , 542 ,
- 547 , 532 , 547 , 537 , 527 , 532 , 512 , 482 , 472 , 477 ,
- 477 , 462 , 462 , 472 , 487 , 507 , 512 , 497 , 502 , 537 ,
- 547 , 552 , 507 , 512 , 542 , 532 , 512 , 507 , 527 , 547 ,
- 562 , 542 , 547 , 527 , 517 , 482 , 487 , 512 , 502 , 497 ,
- 507 , 487 , 507 , 507 , 467 , 482 , 482 , 487 , 502 , 477 ,
- 467 , 507 , 502 , 522 , 517 , 497 , 542 , 527 , 557 , 532 ,
- 537 , 582 , 537 , 497 , 522 , 507 , 482 , 487 , 482 , 482 ,
- 452 , 447 , 482 , 492 , 497 , 532 , 507 , 497 , 482 , 497 ,
- 532 , 507 , 517 , 567 , 562 , 562 , 582 , 562 , 557 , 542 ,
- 517 , 502 , 462 , 472 , 497 , 467 , 482 , 502 , 487 , 477 ,
- 467 , 487 , 522 , 507 , 527 , 552 , 517 , 537 , 537 , 517 ,
- 542 , 537 , 547 , 552 , 512 , 512 , 537 , 512 , 502 , 492 ,
- 467 , 462 , 422 , 452 , 472 , 457 , 502 , 507 , 502 , 522 ,
- 517 , 517 , 497 , 467 , 512 , 517 , 487 , 522 , 532 , 547 ,
- 567 , 542 , 557 , 537 , 487 , 517 , 502 , 502 , 537 , 512 ,
- 522 , 527 , 487 , 492 , 472 , 482 , 507 , 472 , 492 , 502 ,
- 487 , 522 , 532 , 527 , 532 , 497 , 522 , 562 , 542 , 557 ,
- 562 , 572 , 577 , 527 , 502 , 487 , 472 , 467 , 477 , 482 ,
- 472 , 452 , 487 , 527 , 502 , 502 , 502 , 457 , 467 , 492 ,
- 497 , 517 , 517 , 552 , 572 , 532 , 522 , 517 , 527 , 532 ,
- 502 , 512 , 477 , 472 , 512 , 492 , 472 , 467 , 472 , 472 ,
- 487 , 502 , 522 , 517 , 522 , 557 , 552 , 517 , 487 , 512 ,
- 552 , 547 , 552 , 562 , 537 , 547 , 567 , 532 , 502 , 482 ,
- 472 , 457 , 447 , 482 , 492 , 472 , 522 , 562 , 527 , 497 ,
- 487 , 492 , 487 , 477 , 512 , 532 , 487 , 537 , 587 , 542 ,
- 517 , 512 , 527 , 517 , 492 , 502 , 507 , 497 , 537 , 532 ,
- 497 , 477 , 437 , 462 , 472 , 482 , 497 , 487 , 472 , 507 ,
- 512 , 507 , 497 , 492 , 517 , 512 , 537 , 562 , 547 , 552 ,
- 582 , 587 , 572 , 512 , 467 , 512 , 487 , 472 , 492 , 492 ,
- 487 , 497 , 522 , 527 , 502 , 497 , 502 , 477 , 497 , 507 ,
- 502 , 537 , 572 , 572 , 572 , 522 , 487 , 522 , 517 , 522 ,
- 522 , 497 , 502 , 517 , 517 , 492 , 442 , 432 , 467 , 462 ,
- 487 , 492 , 502 , 522 , 542 , 537 , 532 , 487 , 467 , 487 ,
- 497 , 552 , 547 , 527 , 562 , 572 , 552 , 532 , 482 , 477 ,
- 477 , 462 , 477 , 457 , 467 , 517 , 527 , 537 , 552 , 482 ,
- 482 , 497 , 487 , 487 , 477 , 507 , 562 , 562 , 552 , 562 ,
- 522 , 512 , 512 , 542 , 557 , 492 , 502 , 567 , 557 , 537 ,
- 527 , 467 , 472 , 457 , 462 , 497 , 487 , 497 , 522 , 522 ,
- 507 , 477 , 457 , 487 , 482 , 507 , 532 , 522 , 547 , 582 ,
- 562 , 557 , 552 , 492 , 472 , 452 , 492 , 487 , 447 , 492 ,
- 517 , 512 , 497 , 487 , 477 , 487 , 472 , 502 , 502 , 482 ,
- 512 , 547 , 562 , 572 , 547 , 517 , 492 , 487 , 537 , 527 ,
- 527 , 547 , 542 , 532 , 527 , 487 , 442 , 442 , 452 , 502 ,
- 507 , 507 , 542 , 562 , 552 , 547 , 512 , 477 , 462 , 472 ,
- 522 , 532 , 552 , 572 , 562 , 562 , 557 , 502 , 477 , 457 ,
- 462 , 487 , 472 , 482 , 502 , 507 , 507 , 507 , 487 , 457 ,
- 452 , 472 , 492 , 477 , 487 , 517 , 542 , 552 , 517 , 507 ,
- 517 , 492 , 512 , 547 , 557 , 532 , 532 , 542 , 547 , 537 ,
- 487 , 457 , 462 , 482 , 477 , 497 , 527 , 527 , 532 , 537 ,
- 512 , 482 , 462 , 482 , 507 , 537 , 542 , 552 , 587 , 572 ,
- 562 , 547 , 532 , 507 , 477 , 467 , 482 , 507 , 502 , 502 ,
- 522 , 532 , 477 , 452 , 472 , 487 , 492 , 502 , 512 , 502 ,
- 507 , 502 , 527 , 532 , 497 , 472 , 492 , 512 , 527 , 537 ,
- 547 , 537 , 527 , 517 , 482 , 467 , 462 , 447 , 457 , 522 ,
- 542 , 527 , 517 , 527 , 557 , 522 , 497 , 477 , 472 , 482 ,
- 517 , 547 , 562 , 562 , 562 , 562 , 542 , 497 , 487 , 482 ,
- 487 , 502 , 497 , 527 , 517 , 522 , 532 , 497 , 492 , 482 ,
- 442 , 502 , 537 , 512 , 517 , 507 , 532 , 547 , 492 , 462 ,
- 497 , 512 , 532 , 557 , 562 , 552 , 522 , 532 , 522 , 482 ,
- 462 , 442 , 452 , 492 , 477 , 507 , 502 , 487 , 512 , 517 ,
- 482 , 452 , 472 , 477 , 517 , 552 , 537 , 532 , 557 , 572 ,
- 547 , 517 , 507 , 507 , 527 , 512 , 482 , 527 , 517 , 502 ,
- 537 , 522 , 477 , 482 , 482 , 502 , 532 , 537 , 537 , 517 ,
- 532 , 517 , 497 , 492 , 477 , 472 , 532 , 547 , 532 , 552 ,
- 532 , 547 , 557 , 492 , 442 , 457 , 462 , 492 , 492 , 512 ,
- 547 , 502 , 487 , 497 , 507 , 502 , 467 , 487 , 527 , 507 ,
- 507 , 532 , 517 , 532 , 542 , 522 , 512 , 492 , 497 , 532 ,
- 512 , 497 , 512 , 502 , 517 , 502 , 492 , 482 , 477 , 497 ,
- 487 , 477 , 522 , 532 , 502 , 512 , 522 , 527 , 482 , 452 ,
- 507 , 552 , 542 , 562 , 577 , 572 , 567 , 542 , 532 , 487 ,
- 472 , 477 , 497 , 517 , 497 , 482 , 492 , 492 , 477 , 492 ,
- 482 , 487 , 492 , 497 , 532 , 542 , 532 , 512 , 517 , 547 ,
- 547 , 507 , 517 , 517 , 527 , 527 , 477 , 477 , 497 , 482 ,
- 492 , 532 , 472 , 472 , 487 , 502 , 502 , 497 , 512 , 522 ,
- 537 , 522 , 517 , 482 , 467 , 487 , 527 , 557 , 532 , 522 ,
- 542 , 552 , 562 , 542 , 477 , 472 , 487 , 497 , 507 , 522 ,
- 512 , 517 , 512 , 502 , 502 , 487 , 507 , 517 , 537 , 542 ,
- 512 , 517 , 512 , 507 , 537 , 507 , 497 , 532 , 527 , 527 ,
- 507 , 507 , 517 , 507 , 512 , 512 , 477 , 467 , 487 , 487 ,
- 492 , 487 , 462 , 482 , 487 , 517 , 532 , 472 , 492 , 492 ,
- 477 , 512 , 517 , 552 , 562 , 562 , 602 , 577 , 517 , 522 ,
- 512 , 477 , 482 , 482 , 487 , 492 , 457 , 477 , 502 , 462 ,
- 502 , 522 , 507 , 512 , 512 , 547 , 557 , 527 , 552 , 517 ,
- 512 , 542 , 532 , 537 , 547 , 527 , 522 , 502 , 482 , 522 ,
- 497 , 477 , 517 , 507 , 487 , 497 , 512 , 517 , 472 , 502 ,
- 547 , 507 , 482 , 487 , 482 , 477 , 492 , 522 , 542 , 497 ,
- 492 , 547 , 542 , 517 , 532 , 507 , 477 , 462 , 497 , 522 ,
- 487 , 492 , 502 , 507 , 497 , 487 , 487 , 512 , 527 , 542 ,
- 537 , 502 , 527 , 542 , 497 , 502 , 547 , 522 , 517 , 542 ,
- 542 , 552 , 512 , 532 , 557 , 507 , 482 , 472 , 472 , 487 ,
- 487 , 522 , 517 , 437 , 472 , 522 , 517 , 522 , 497 , 487 ,
- 512 , 502 , 517 , 547 , 542 , 567 , 577 , 562 , 562 , 537 ,
- 497 , 467 , 467 , 477 , 467 , 432 , 457 , 467 , 462 , 482 ,
- 507 , 502 , 487 , 502 , 512 , 527 , 522 , 547 , 572 , 532 ,
- 497 , 512 , 522 , 537 , 542 , 542 , 532 , 517 , 512 , 507 ,
- 507 , 517 , 497 , 487 , 497 , 512 , 522 , 502 , 472 , 492 ,
- 532 , 527 , 517 , 502 , 467 , 492 , 517 , 522 , 522 , 512 ,
- 502 , 517 , 547 , 562 , 552 , 527 , 497 , 492 , 497 , 492 ,
- 487 , 487 , 492 , 502 , 497 , 472 , 462 , 492 , 517 , 522 ,
- 527 , 522 , 517 , 537 , 517 , 492 , 512 , 497 , 517 , 542 ,
- 527 , 537 , 527 , 527 , 552 , 542 , 482 , 432 , 447 , 472 ,
- 492 , 502 , 487 , 467 , 447 , 482 , 532 , 532 , 502 , 477 ,
- 517 , 557 , 522 , 517 , 562 , 567 , 582 , 602 , 572 , 552 ,
- 522 , 492 , 492 , 492 , 472 , 457 , 457 , 477 , 482 , 487 ,
- 492 , 487 , 512 , 502 , 497 , 517 , 522 , 537 , 567 , 557 ,
- 507 , 477 , 477 , 522 , 542 , 522 , 507 , 517 , 522 , 512 ,
- 507 , 507 , 482 , 462 , 492 , 512 , 507 , 502 , 487 , 487 ,
- 507 , 512 , 502 , 497 , 492 , 477 , 507 , 537 ,
-};
diff --git a/sw/airborne/arch/lpc21/uart_tunnel.c b/sw/airborne/arch/lpc21/uart_tunnel.c
deleted file mode 100644
index ceb2e94a3b..0000000000
--- a/sw/airborne/arch/lpc21/uart_tunnel.c
+++ /dev/null
@@ -1,60 +0,0 @@
-
-#include "LPC21xx.h"
-
-#include "std.h"
-
-#include "mcu.h"
-#include "led.h"
-
-#define TXD0_PIN 0
-#define RXD0_PIN 1
-#define TXD1_PIN 8
-#define RXD1_PIN 9
-
-int main(int argc __attribute__((unused)), char **argv __attribute__((unused)))
-{
- int tx = 0, rx = 0;
- int tx_shadow = 1, rx_shadow = 1;
- mcu_init();
- led_init();
-#if USE_LED_1
- LED_ON(1);
-#endif
-
- /* TXD0 and TXD1 output */
- SetBit(IO0DIR, TXD0_PIN);
- SetBit(IO0DIR, TXD1_PIN);
-
- /* RXD0 and RXD1 input */
- ClearBit(IO0DIR, RXD0_PIN);
- ClearBit(IO0DIR, RXD1_PIN);
-
- /* use shadow bits to reduce jitter */
- while (1) {
- tx = bit_is_set(IO0PIN, RXD0_PIN);
- if (tx != tx_shadow) {
- if (tx) {
- SetBit(IO0SET, TXD1_PIN);
- } else {
- SetBit(IO0CLR, TXD1_PIN);
- }
- tx_shadow = tx;
-#if USE_LED_2
- LED_TOGGLE(2);
-#endif
- }
- rx = bit_is_set(IO0PIN, RXD1_PIN);
- if (rx != rx_shadow) {
- if (rx) {
- SetBit(IO0SET, TXD0_PIN);
- } else {
- SetBit(IO0CLR, TXD0_PIN);
- }
- rx_shadow = rx;
-#if USE_LED_3
- LED_TOGGLE(3);
-#endif
- }
- }
- return 0;
-}
diff --git a/sw/airborne/arch/lpc21/usb_msc_hw.c b/sw/airborne/arch/lpc21/usb_msc_hw.c
deleted file mode 100644
index 60c879997f..0000000000
--- a/sw/airborne/arch/lpc21/usb_msc_hw.c
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
- adapted to pprz Martin Mueller (martinmm@pfump.org)
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
- Connects a microSD card to the SPI port of the Paparazzi Tiny. Keep cables
- short, microSD card can be directly soldered to Molex cable. For now only
- non SDHC SD cards (<= 2GB) are supported. martinmm@pfump.org
-
- microSD TinyV2 SPI J3
- 8 nc
- 7 DO 5 MISO
- 6 GND 1 GND
- 5 CLK 7 SCK
- 4 Vcc 2 +3V3
- 3 DI 4 MOSI
- 2 CS 3 SSEL
- 1 nc
-
- Looking onto the gold plated connector side of the microSD card:
-
- ---------------
- I 8
- I 7
- I 6
- I 5
- I 4
- I 3
- I 2
- I 1
- ------ --
- \ I \
- -- --
-
-*/
-
-#include
-#include "std.h"
-#include "LPC21xx.h"
-#include "armVIC.h"
-#include BOARD_CONFIG
-
-#include "lpcusb/usbapi.h"
-#include "msc_bot.h"
-#include "blockdev.h"
-#include "usb_msc_hw.h"
-
-#if USE_USB_SERIAL
-#if PCLK < 18000000
-#error PCLK needs to be higher than 18MHz for USB to work properly
-#endif
-#endif
-
-#define MAX_PACKET_SIZE 64
-
-#define LE_WORD(x) ((x)&0xFF),((x)>>8)
-
-static U8 abClassReqData[4];
-
-static const U8 abDescriptors[] = {
-
-// device descriptor
- 0x12,
- DESC_DEVICE,
- LE_WORD(0x0200), // bcdUSB
- 0x00, // bDeviceClass
- 0x00, // bDeviceSubClass
- 0x00, // bDeviceProtocol
- MAX_PACKET_SIZE0, // bMaxPacketSize
- LE_WORD(0x7070), // idVendor
- LE_WORD(0x1236), // idProduct
- LE_WORD(0x0100), // bcdDevice
- 0x01, // iManufacturer
- 0x02, // iProduct
- 0x03, // iSerialNumber
- 0x01, // bNumConfigurations
-
-// configuration descriptor
- 0x09,
- DESC_CONFIGURATION,
- LE_WORD(32), // wTotalLength
- 0x01, // bNumInterfaces
- 0x01, // bConfigurationValue
- 0x00, // iConfiguration
- 0xC0, // bmAttributes
- 0x32, // bMaxPower
-
-// interface
- 0x09,
- DESC_INTERFACE,
- 0x00, // bInterfaceNumber
- 0x00, // bAlternateSetting
- 0x02, // bNumEndPoints
- 0x08, // bInterfaceClass = mass storage
- 0x06, // bInterfaceSubClass = transparent SCSI
- 0x50, // bInterfaceProtocol = BOT
- 0x00, // iInterface
-// EP
- 0x07,
- DESC_ENDPOINT,
- MSC_BULK_IN_EP, // bEndpointAddress
- 0x02, // bmAttributes = bulk
- LE_WORD(MAX_PACKET_SIZE),// wMaxPacketSize
- 0x00, // bInterval
-// EP
- 0x07,
- DESC_ENDPOINT,
- MSC_BULK_OUT_EP, // bEndpointAddress
- 0x02, // bmAttributes = bulk
- LE_WORD(MAX_PACKET_SIZE),// wMaxPacketSize
- 0x00, // bInterval
-
-// string descriptors
- 0x04,
- DESC_STRING,
- LE_WORD(0x0409),
-
- 0x0E,
- DESC_STRING,
- 'L', 0, 'P', 0, 'C', 0, 'U', 0, 'S', 0, 'B', 0,
-
- 0x14,
- DESC_STRING,
- 'S', 0, 'D', 0, '-', 0, 'R', 0, 'e', 0, 'a', 0, 'd', 0, 'e', 0, 'r', 0,
-
- 0x12,
- DESC_STRING,
- '1', 0, '2', 0, '3', 0, '4', 0, '5', 0, '6', 0, '7', 0, '8', 0,
-
-// terminating zero
- 0
-};
-
-#ifdef USE_USB_MSC
-
-/*************************************************************************
- HandleClassRequest
- ==================
- Handle mass storage class request
-
-**************************************************************************/
-static BOOL HandleClassRequest(TSetupPacket *pSetup, int *piLen, U8 **ppbData)
-{
- if (pSetup->wIndex != 0) {
- return FALSE;
- }
- if (pSetup->wValue != 0) {
- return FALSE;
- }
-
- switch (pSetup->bRequest) {
-
- // get max LUN
- case 0xFE:
- *ppbData[0] = 0; // No LUNs
- *piLen = 1;
- break;
-
- // MSC reset
- case 0xFF:
- if (pSetup->wLength > 0) {
- return FALSE;
- }
- MSCBotReset();
- break;
-
- default:
- return FALSE;
- }
- return TRUE;
-}
-
-
-/*************************************************************************
- main
- ====
-**************************************************************************/
-int main_mass_storage(void)
-{
- unsigned cpsr;
-
- // disable global interrupts, do it polling
- cpsr = disableIRQ();
-
- // initialise the SD card
- BlockDevInit();
-
- // initialise stack
- USBInit();
-
- // enable bulk-in interrupts on NAKs
- // these are required to get the BOT protocol going again after a STALL
- USBHwNakIntEnable(INACK_BI);
-
- // register descriptors
- USBRegisterDescriptors(abDescriptors);
-
- // register class request handler
- USBRegisterRequestHandler(REQTYPE_TYPE_CLASS, HandleClassRequest, abClassReqData);
-
- // register endpoint handlers
- USBHwRegisterEPIntHandler(MSC_BULK_IN_EP, MSCBotBulkIn);
- USBHwRegisterEPIntHandler(MSC_BULK_OUT_EP, MSCBotBulkOut);
-
- // connect to bus
- USBHwConnect(TRUE);
-
- // call USB interrupt handler continuously
- while (1) {
- USBHwISR();
- }
-
- // possibly restore global interrupts (never happens)
- restoreIRQ(cpsr);
-
- return 0;
-}
-
-#endif /* USE_USB_MSC */
-
diff --git a/sw/airborne/arch/lpc21/usb_msc_hw.h b/sw/airborne/arch/lpc21/usb_msc_hw.h
deleted file mode 100644
index 21c4b28044..0000000000
--- a/sw/airborne/arch/lpc21/usb_msc_hw.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
- adapted to pprz Martin Mueller (martinmm@pfump.org)
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef USB_MSC_HW_H
-#define USB_MSC_HW_H
-
-int main_mass_storage(void);
-
-#endif /* USB_MSC_HW_H */
-
diff --git a/sw/airborne/arch/lpc21/usb_ser_hw.c b/sw/airborne/arch/lpc21/usb_ser_hw.c
deleted file mode 100644
index 5726d59590..0000000000
--- a/sw/airborne/arch/lpc21/usb_ser_hw.c
+++ /dev/null
@@ -1,634 +0,0 @@
-/*
- LPCUSB, an USB device driver for LPC microcontrollers
- Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
- adapted to pprz Martin Mueller (martinmm@pfump.org)
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
- Minimal implementation of a USB serial port, using the CDC class.
- This example application simply echoes everything it receives right back
- to the host.
-
- Windows:
- Extract the usbser.sys file from .cab file in C:\WINDOWS\Driver Cache\i386
- and store it somewhere (C:\temp is a good place) along with the usbser.inf
- file. Then plug in the LPC214x and direct windows to the usbser driver.
- Windows then creates an extra COMx port that you can open in a terminal
- program, like hyperterminal.
-
- Linux:
- The device should be recognised automatically by the cdc_acm driver,
- which creates a /dev/ttyACMx device file that acts just like a regular
- serial port.
-
-*/
-
-
-#include
-#include "std.h"
-#include
-#include "LPC21xx.h"
-#include "armVIC.h"
-#include "mcu_periph/usb_serial.h"
-#include BOARD_CONFIG
-
-#include "lpcusb/usbapi.h"
-
-#if USE_USB_SERIAL
-#if PCLK < 18000000
-#error PCLK needs to be higher than 18MHz for USB to work properly
-#endif
-#endif
-
-#ifndef USB_VIC_SLOT
-#define USB_VIC_SLOT 10
-#endif
-
-#define INT_IN_EP 0x81
-#define BULK_OUT_EP 0x05
-#define BULK_IN_EP 0x82
-
-#define MAX_PACKET_SIZE 64
-
-#define LE_WORD(x) ((x)&0xFF),((x)>>8)
-
-// CDC definitions
-#define CS_INTERFACE 0x24
-#define CS_ENDPOINT 0x25
-
-#define SET_LINE_CODING 0x20
-#define GET_LINE_CODING 0x21
-#define SET_CONTROL_LINE_STATE 0x22
-
-#define VCOM_FIFO_SIZE 128
-
-#define EOF (-1)
-#define ASSERT(x)
-
-typedef struct {
- int head;
- int tail;
- uint8_t *buf;
-} fifo_t;
-
-// data structure for GET_LINE_CODING / SET_LINE_CODING class requests
-typedef struct {
- uint32_t dwDTERate;
- uint8_t bCharFormat;
- uint8_t bParityType;
- uint8_t bDataBits;
-} TLineCoding;
-
-int allow_line_coding = 0;
-/* this settings are virtual unless you enable line coding */
-static TLineCoding LineCoding = {115200, 0, 0, 8};
-static uint8_t abBulkBuf[64];
-static uint8_t abClassReqData[8];
-
-static uint8_t txdata[VCOM_FIFO_SIZE];
-static uint8_t rxdata[VCOM_FIFO_SIZE];
-
-static fifo_t txfifo;
-static fifo_t rxfifo;
-
-static bool BulkOut_is_blocked = false;
-
-// forward declaration of interrupt handler
-static void USBIntHandler(void) __attribute__((interrupt("IRQ")));
-
-static void BulkOut(U8 bEP, U8 bEPStatus);
-
-#ifdef USE_USB_LINE_CODING
-void set_linecoding(TLineCoding linecoding);
-#endif
-
-void fifo_init(fifo_t *fifo, U8 *buf);
-BOOL fifo_put(fifo_t *fifo, U8 c);
-BOOL fifo_get(fifo_t *fifo, U8 *pc);
-int fifo_avail(fifo_t *fifo);
-int fifo_free(fifo_t *fifo);
-
-static const uint8_t abDescriptors[] = {
-
-// device descriptor
- 0x12,
- DESC_DEVICE,
- LE_WORD(0x0101), // bcdUSB
- 0x02, // bDeviceClass
- 0x00, // bDeviceSubClass
- 0x00, // bDeviceProtocol
- MAX_PACKET_SIZE0, // bMaxPacketSize
- LE_WORD(0x7070), // idVendor
- LE_WORD(0x1235), // idProduct
- LE_WORD(0x0100), // bcdDevice
- 0x01, // iManufacturer
- 0x02, // iProduct
- 0x03, // iSerialNumber
- 0x01, // bNumConfigurations
-
-// configuration descriptor
- 0x09,
- DESC_CONFIGURATION,
- LE_WORD(67), // wTotalLength
- 0x02, // bNumInterfaces
- 0x01, // bConfigurationValue
- 0x00, // iConfiguration
- 0xC0, // bmAttributes
- 0x32, // bMaxPower
-// control class interface
- 0x09,
- DESC_INTERFACE,
- 0x00, // bInterfaceNumber
- 0x00, // bAlternateSetting
- 0x01, // bNumEndPoints
- 0x02, // bInterfaceClass
- 0x02, // bInterfaceSubClass
- 0x01, // bInterfaceProtocol, linux requires value of 1 for the cdc_acm module
- 0x00, // iInterface
-// header functional descriptor
- 0x05,
- CS_INTERFACE,
- 0x00,
- LE_WORD(0x0110),
-// call management functional descriptor
- 0x05,
- CS_INTERFACE,
- 0x01,
- 0x01, // bmCapabilities = device handles call management
- 0x01, // bDataInterface
-// ACM functional descriptor
- 0x04,
- CS_INTERFACE,
- 0x02,
- 0x02, // bmCapabilities
-// union functional descriptor
- 0x05,
- CS_INTERFACE,
- 0x06,
- 0x00, // bMasterInterface
- 0x01, // bSlaveInterface0
-// notification EP
- 0x07,
- DESC_ENDPOINT,
- INT_IN_EP, // bEndpointAddress
- 0x03, // bmAttributes = intr
- LE_WORD(8), // wMaxPacketSize
- 0xFE, // bInterval
-// data class interface descriptor
- 0x09,
- DESC_INTERFACE,
- 0x01, // bInterfaceNumber
- 0x00, // bAlternateSetting
- 0x02, // bNumEndPoints
- 0x0A, // bInterfaceClass = data
- 0x00, // bInterfaceSubClass
- 0x00, // bInterfaceProtocol
- 0x00, // iInterface
-// data EP OUT
- 0x07,
- DESC_ENDPOINT,
- BULK_OUT_EP, // bEndpointAddress
- 0x02, // bmAttributes = bulk
- LE_WORD(MAX_PACKET_SIZE), // wMaxPacketSize
- 0x00, // bInterval
-// data EP in
- 0x07,
- DESC_ENDPOINT,
- BULK_IN_EP, // bEndpointAddress
- 0x02, // bmAttributes = bulk
- LE_WORD(MAX_PACKET_SIZE), // wMaxPacketSize
- 0x00, // bInterval
-
- // string descriptors
- 0x04,
- DESC_STRING,
- LE_WORD(0x0409),
-
- 0x0E,
- DESC_STRING,
- 'L', 0, 'P', 0, 'C', 0, 'U', 0, 'S', 0, 'B', 0,
-
- 0x14,
- DESC_STRING,
- 'U', 0, 'S', 0, 'B', 0, 'S', 0, 'e', 0, 'r', 0, 'i', 0, 'a', 0, 'l', 0,
-
- 0x12,
- DESC_STRING,
- '1', 0, '2', 0, '3', 0, '4', 0, '5', 0, '6', 0, '7', 0, '8', 0,
-
-// terminating zero
- 0
-};
-
-
-void fifo_init(fifo_t *fifo, U8 *buf)
-{
- fifo->head = 0;
- fifo->tail = 0;
- fifo->buf = buf;
-}
-
-BOOL fifo_put(fifo_t *fifo, U8 c)
-{
- int next;
-
- // check if FIFO has room
- next = (fifo->head + 1) % VCOM_FIFO_SIZE;
- if (next == fifo->tail) {
- // full
- return FALSE;
- }
-
- fifo->buf[fifo->head] = c;
- fifo->head = next;
-
- return TRUE;
-}
-
-BOOL fifo_get(fifo_t *fifo, U8 *pc)
-{
- int next;
-
- // check if FIFO has data
- if (fifo->head == fifo->tail) {
- return FALSE;
- }
-
- next = (fifo->tail + 1) % VCOM_FIFO_SIZE;
-
- *pc = fifo->buf[fifo->tail];
- fifo->tail = next;
-
- return TRUE;
-}
-
-int fifo_avail(fifo_t *fifo)
-{
- return (VCOM_FIFO_SIZE + fifo->head - fifo->tail) % VCOM_FIFO_SIZE;
-}
-
-int fifo_free(fifo_t *fifo)
-{
- return (VCOM_FIFO_SIZE - 1 - fifo_avail(fifo));
-}
-
-#ifdef USE_USB_LINE_CODING
-void set_linecoding(TLineCoding linecoding)
-{
- uint16_t baud;
- uint8_t mode;
-
- // set the baudrate
- baud = (uint16_t)((PCLK / ((linecoding.dwDTERate) * 16.0)) + 0.5);
-
- // set the number of characters and other
- // user specified operating parameters
- switch (linecoding.bCharFormat) {
- case 0: /* 1 stop bit */
- mode = ULCR_STOP_1;
- break;
- case 1: /* 1.5 stop bit (only with 5 bit character) */
- case 2: /* 2 stop bit */
- mode = ULCR_STOP_2;
- break;
- default:
- mode = ULCR_STOP_1;
- break;
- }
- switch (linecoding.bParityType) {
- case 0: mode += ULCR_PAR_NO;
- break;
- case 1: mode += ULCR_PAR_ODD;
- break;
- case 2: mode += ULCR_PAR_EVEN;
- break;
- case 3: mode += ULCR_PAR_MARK;
- break;
- case 4: mode += ULCR_PAR_SPACE;
- break;
- default: mode += ULCR_PAR_NO;
- break;
- }
- switch (linecoding.bDataBits) {
- case 5: mode += ULCR_CHAR_5;
- break;
- case 6: mode += ULCR_CHAR_6;
- break;
- case 7: mode += ULCR_CHAR_7;
- break;
- case 8: mode += ULCR_CHAR_8;
- break;
- case 16:
- default: mode += ULCR_CHAR_8;
- break;
- }
-
-#if USE_UART0
- U0LCR = ULCR_DLAB_ENABLE; // select divisor latches
- U0DLL = (uint8_t)baud; // set for baud low byte
- U0DLM = (uint8_t)(baud >> 8); // set for baud high byte
- U0LCR = (mode & ~ULCR_DLAB_ENABLE);
-#endif
-#if USE_UART1
- U1LCR = ULCR_DLAB_ENABLE; // select divisor latches
- U1DLL = (uint8_t)baud; // set for baud low byte
- U1DLM = (uint8_t)(baud >> 8); // set for baud high byte
- U1LCR = (mode & ~ULCR_DLAB_ENABLE);
-#endif
-}
-#endif
-
-#ifdef USE_USB_LINE_CODING
-void VCOM_allow_linecoding(uint8_t mode)
-{
- allow_line_coding = mode;
-}
-#endif
-
-/**
- Writes one character to VCOM port
-
- @param [in] c character to write
- @returns character written, or EOF if character could not be written
- */
-int VCOM_putchar(int c)
-{
- return fifo_put(&txfifo, c) ? c : EOF;
-}
-
-/**
- Reads one character from VCOM port
-
- @returns character read, or EOF if character could not be read
- */
-int VCOM_getchar(void)
-{
- int result;
- U8 c;
-
- result = fifo_get(&rxfifo, &c) ? c : EOF;
-
- if (BulkOut_is_blocked && fifo_free(&rxfifo) >= MAX_PACKET_SIZE) {
- disableIRQ();
- // get more data from usb bus
- BulkOut(BULK_OUT_EP, 0);
- BulkOut_is_blocked = false;
- enableIRQ();
- }
-
- return result;
-}
-
-/**
- Checks if buffer free in VCOM buffer
-
- @returns TRUE if len bytes are free
- */
-bool VCOM_check_free_space(uint16_t len)
-{
- return (fifo_free(&txfifo) >= len ? TRUE : FALSE);
-}
-
-
-/**
- Checks if data available in VCOM buffer
-
- @returns character read, or EOF if character could not be read
- */
-int VCOM_check_available(void)
-{
- return (fifo_avail(&rxfifo));
-}
-
-
-/**
- Local function to handle incoming bulk data
-
- @param [in] bEP
- @param [in] bEPStatus
- */
-static void BulkOut(U8 bEP, U8 bEPStatus __attribute__((unused)))
-{
- int i, iLen;
-
- if (fifo_free(&rxfifo) < MAX_PACKET_SIZE) {
- // may not fit into fifo
- BulkOut_is_blocked = true;
- return;
- }
-
- // get data from USB into intermediate buffer
- iLen = USBHwEPRead(bEP, abBulkBuf, sizeof(abBulkBuf));
- for (i = 0; i < iLen; i++) {
- // put into FIFO
- if (!fifo_put(&rxfifo, abBulkBuf[i])) {
- // overflow... :(
- ASSERT(FALSE);
- break;
- }
- }
-}
-
-
-/**
- Local function to handle outgoing bulk data
-
- @param [in] bEP
- @param [in] bEPStatus
- */
-static void BulkIn(U8 bEP, U8 bEPStatus __attribute__((unused)))
-{
- int i, iLen;
-
- if (fifo_avail(&txfifo) == 0) {
- // no more data, disable further NAK interrupts until next USB frame
- USBHwNakIntEnable(0);
- return;
- }
-
- // get bytes from transmit FIFO into intermediate buffer
- for (i = 0; i < MAX_PACKET_SIZE; i++) {
- if (!fifo_get(&txfifo, &abBulkBuf[i])) {
- break;
- }
- }
- iLen = i;
-
- // send over USB
- if (iLen > 0) {
- USBHwEPWrite(bEP, abBulkBuf, iLen);
- }
-}
-
-
-/**
- Local function to handle the USB-CDC class requests
-
- @param [in] pSetup
- @param [out] piLen
- @param [out] ppbData
- */
-static BOOL HandleClassRequest(TSetupPacket *pSetup, int *piLen, U8 **ppbData)
-{
- switch (pSetup->bRequest) {
-
- // set line coding
- case SET_LINE_CODING:
- memcpy((U8 *)&LineCoding, *ppbData, 7);
- *piLen = 7;
-#ifdef USE_USB_LINE_CODING
- if (allow_line_coding) {
- set_linecoding(LineCoding);
- }
-#endif
- break;
-
- // get line coding
- case GET_LINE_CODING:
- *ppbData = (U8 *)&LineCoding;
- *piLen = 7;
- break;
-
- // set control line state
- case SET_CONTROL_LINE_STATE:
- // bit0 = DTR, bit1 = RTS
- break;
-
- default:
- return FALSE;
- }
- return TRUE;
-}
-
-
-/**
- Interrupt handler
-
- Simply calls the USB ISR, then signals end of interrupt to VIC
- */
-static void USBIntHandler(void)
-{
- USBHwISR();
- VICVectAddr = 0x00; // dummy write to VIC to signal end of ISR
-}
-
-
-static void USBFrameHandler(U16 wFrame __attribute__((unused)))
-{
- if (fifo_avail(&txfifo) > 0) {
- // data available, enable NAK interrupt on bulk in
- USBHwNakIntEnable(INACK_BI);
- }
-}
-
-// Periph with generic device API
-struct usb_serial_periph usb_serial;
-
-// Functions for the generic device API
-static int usb_serial_check_free_space(struct usb_serial_periph *p __attribute__((unused)), long *fd __attribute__((unused)), uint16_t len)
-{
- return (int)VCOM_check_free_space(len);
-}
-
-static void usb_serial_transmit(struct usb_serial_periph *p __attribute__((unused)), long fd __attribute__((unused)), uint8_t byte)
-{
- VCOM_putchar(byte);
-}
-
-static void usb_serial_transmit_buffer(struct usb_serial_periph *p __attribute__((unused)), long fd __attribute__((unused)), uint8_t *data, uint16_t len)
-{
- int i;
- for (i = 0; i < len; i++) {
- VCOM_putchar(data[i]);
- }
-}
-
-static void usb_serial_send(struct usb_serial_periph *p __attribute__((unused)), long fd __attribute__((unused))) { }
-
-// Empty for lpc21
-void VCOM_event(void) {}
-
-// Empty for lpc21
-void VCOM_send_message(void) {}
-
-static int usb_serial_char_available(struct usb_serial_periph *p __attribute__((unused)))
-{
- return VCOM_check_available();
-}
-
-static uint8_t usb_serial_getch(struct usb_serial_periph *p __attribute__((unused)))
-{
- return (uint8_t)(VCOM_getchar());
-}
-
-void VCOM_init(void)
-{
- // initialise stack
- USBInit();
-#ifdef USE_USB_LINE_CODING
- // set default line coding
- set_linecoding(LineCoding);
-#endif
-
- // register descriptors
- USBRegisterDescriptors(abDescriptors);
-
- // register class request handler
- USBRegisterRequestHandler(REQTYPE_TYPE_CLASS, HandleClassRequest, abClassReqData);
-
- // register endpoint handlers
- USBHwRegisterEPIntHandler(INT_IN_EP, NULL);
- USBHwRegisterEPIntHandler(BULK_IN_EP, BulkIn);
- USBHwRegisterEPIntHandler(BULK_OUT_EP, BulkOut);
-
- // register frame handler
- USBHwRegisterFrameHandler(USBFrameHandler);
-
- // enable bulk-in interrupts on NAKs
- USBHwNakIntEnable(INACK_BI);
-
- // initialise fifos
- fifo_init(&txfifo, txdata);
- fifo_init(&rxfifo, rxdata);
-
- // set up USB interrupt
- VICIntSelect &= ~VIC_BIT(VIC_USB); // select IRQ for USB
- VICIntEnable = VIC_BIT(VIC_USB);
-
- _VIC_CNTL(USB_VIC_SLOT) = VIC_ENABLE | VIC_USB;
- _VIC_ADDR(USB_VIC_SLOT) = (uint32_t)USBIntHandler;
-
- // connect to bus
- USBHwConnect(TRUE);
-
- // Configure generic device
- usb_serial.device.periph = (void *)(&usb_serial);
- usb_serial.device.check_free_space = (check_free_space_t) usb_serial_check_free_space;
- usb_serial.device.put_byte = (put_byte_t) usb_serial_transmit;
- usb_serial.device.put_buffer = (put_buffer_t) usb_serial_transmit_buffer;
- usb_serial.device.send_message = (send_message_t) usb_serial_send;
- usb_serial.device.char_available = (char_available_t) usb_serial_char_available;
- usb_serial.device.get_byte = (get_byte_t) usb_serial_getch;
-}
diff --git a/sw/airborne/arch/lpc21/vic_slots.txt b/sw/airborne/arch/lpc21/vic_slots.txt
deleted file mode 100644
index 2d457cf51d..0000000000
--- a/sw/airborne/arch/lpc21/vic_slots.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-VIC slots used for the LPC2148
-
-define name slot (default) used for
-------------------------------------------------------------------
-TIMER0_VIC_SLOT 1 system timer
-AD0_VIC_SLOT 2 adc_arch if USE_AD0
-PWM_VIC_SLOT 3 PWM_ISR in servos_4015
-AD1_VIC_SLOT 4 adc_arch if USE_AD1
-UART0_VIC_SLOT 5 uart_arch, e.g. gps
-UART1_VIC_SLOT 6 uart_arch, e.g. modem
-SPI1_VIC_SLOT 7 SPI1 in mcu_periph/spi_arch.c or spi_slave_hs_arch.c (and some others not using the SPI peripheral yet..)
-I2C0_VIC_SLOT 8 mcu_periph/i2c_arch.c
-I2C1_VIC_SLOT 9 mcu_periph/i2c_arch.c
-USB_VIC_SLOT 10 usb, e.g. telemetry_transparent_usb
-
-
-no defaults, explicitly set in subsystems:
-MAX1168_EOC_VIC_SLOT 11 imu_b2_v1.0, imu_b2_v1.1, imu_b2_v1.2
-MS2100_DRDY_VIC_SLOT 12 ms2100 mag in imu_b2_v1.1
-
-in modules:
-hardcoded, no define 8 EXTINT in max3100 module
-
-these seem to be outdated, should be updated to use the new spi driver:
-MAX11040_DRDY_VIC_SLOT 12 max11040_hw.c
-MICROMAG_DRDY_VIC_SLOT 12 micromag_hw.c
diff --git a/sw/airborne/arch/sim/subsystems/actuators/servos_4015_MAT_hw.h b/sw/airborne/arch/sim/subsystems/actuators/servos_4015_MAT_hw.h
deleted file mode 100644
index f3e00e1822..0000000000
--- a/sw/airborne/arch/sim/subsystems/actuators/servos_4015_MAT_hw.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2012 Gautier Hattenberger
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-#ifndef SERVOS_4015_HW_H
-#define SERVOS_4015_HW_H
-
-#define SERVOS_TICS_OF_USEC(_v) (_v)
-
-#define Actuator4015Set(_i, _v) {}
-#define Actuators4015Init() {}
-#define Actuators4015Commit() {}
-
-#endif
-
diff --git a/sw/airborne/arch/sim/subsystems/actuators/servos_4017_hw.h b/sw/airborne/arch/sim/subsystems/actuators/servos_4017_hw.h
deleted file mode 100644
index fad3ed1c7f..0000000000
--- a/sw/airborne/arch/sim/subsystems/actuators/servos_4017_hw.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2012 Gautier Hattenberger
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-#ifndef SERVOS_4017_HW_H
-#define SERVOS_4017_HW_H
-
-#define SERVOS_TICS_OF_USEC(_v) (_v)
-
-#define Actuator4017Set(_i, _v) {}
-#define Actuators4017Init() {}
-#define Actuators4017Commit() {}
-
-#endif
-
-
diff --git a/sw/airborne/arch/stm32/subsystems/settings_arch.c b/sw/airborne/arch/stm32/subsystems/settings_arch.c
index 4dcb779a2f..d7787789f1 100644
--- a/sw/airborne/arch/stm32/subsystems/settings_arch.c
+++ b/sw/airborne/arch/stm32/subsystems/settings_arch.c
@@ -21,7 +21,7 @@
*/
/**
- * @file arch/lpc21/subsystems/settings_arch.c
+ * @file arch/stm32/subsystems/settings_arch.c
* Persistent settings low level flash routines stm32.
*
* data flash_addr
diff --git a/sw/airborne/boards/booz/baro_board.c b/sw/airborne/boards/booz/baro_board.c
deleted file mode 100644
index dbd54fcd9b..0000000000
--- a/sw/airborne/boards/booz/baro_board.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (C) 2010 The Paparazzi Team
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/**
- * @file boards/booz/baro_board.c
- *
- */
-
-
-#include "subsystems/sensors/baro.h"
-
-#include "generated/airframe.h"
-#include "subsystems/abi.h"
-#include "led.h"
-
-
-/** threshold >0 && <1023 */
-#ifndef BOOZ_ANALOG_BARO_THRESHOLD
-#define BOOZ_ANALOG_BARO_THRESHOLD 850
-#endif
-
-/** scale factor to convert raw ADC measurement to pressure in Pascal.
- *
- * Sensor Sensitivity -> SS = 0.045 mv / Pa
- * Sensor Gain -> G = 94.25
- * Sensitivity -> S = SS*G = 4.24125 mV / Pa
- * 10 bit ADC -> A = 3.3 V / 1024 = 3.223 mV / LSB
- * Total Sensitivity SENS = A / S = 0.759837
- *
- * For the real pressure you also need to take into account the (variable) offset
- *
- * supply voltage Vs = 5V
- * real sensor sensitivity Vout = Vs * (0.009 P - 0.095)
- * voltage variable offset Voff(DAC) = Vs / 69.23 + (DAC * 3.3 / 1024) / 21.77
- * ADC voltage at init Vadc = 3.3*BARO_THRESHOLD/1024 = Vout - Voff
- *
- * => Inverting these formulas can give the 'real' pressure
- *
- * since we don't care that much in this case, we can take a fixed offset of 101325 Pa
- */
-#ifndef BOOZ_BARO_SENS
-#define BOOZ_BARO_SENS 0.759837
-#endif
-
-struct BaroBoard baro_board;
-
-void baro_init(void)
-{
-
- adc_buf_channel(ADC_CHANNEL_BARO, &baro_board.buf, DEFAULT_AV_NB_SAMPLE);
-
- baro_board.status = BB_UNINITIALIZED;
- baro_board.absolute = 0;
- baro_board.offset = 1023;
- DACSet(baro_board.offset);
- baro_board.value_filtered = 0;
-#ifdef BARO_LED
- LED_OFF(BARO_LED);
-#endif
-}
-
-void baro_periodic(void)
-{
-
- baro_board.absolute = baro_board.buf.sum / baro_board.buf.av_nb_sample;
- baro_board.value_filtered = (3 * baro_board.value_filtered + baro_board.absolute) / 4;
- if (baro_board.status == BB_UNINITIALIZED) {
- RunOnceEvery(10, { baro_board_calibrate();});
- } else {
- uint32_t now_ts = get_sys_time_usec();
- float pressure = 101325.0 - BOOZ_BARO_SENS * (BOOZ_ANALOG_BARO_THRESHOLD - baro_board.absolute);
- AbiSendMsgBARO_ABS(BARO_BOARD_SENDER_ID, now_ts, pressure);
- }
-}
-
-/* decrement offset until adc reading is over a threshold */
-void baro_board_calibrate(void)
-{
- if (baro_board.value_filtered < BOOZ_ANALOG_BARO_THRESHOLD && baro_board.offset >= 1) {
- if (baro_board.value_filtered == 0 && baro_board.offset > 15) {
- baro_board.offset -= 15;
- } else {
- baro_board.offset--;
- }
- DACSet(baro_board.offset);
-#ifdef BARO_LED
- LED_TOGGLE(BARO_LED);
-#endif
- } else {
- baro_board.status = BB_RUNNING;
-#ifdef BARO_LED
- LED_ON(BARO_LED);
-#endif
- }
-}
-
diff --git a/sw/airborne/boards/booz/baro_board.h b/sw/airborne/boards/booz/baro_board.h
deleted file mode 100644
index 2434a711ad..0000000000
--- a/sw/airborne/boards/booz/baro_board.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-* Copyright (C) 2010-2013 Antoine Drouin, Gautier Hattenberger
-*
-* This file is part of paparazzi.
-*
-* paparazzi is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2, or (at your option)
-* any later version.
-*
-* paparazzi is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with paparazzi; see the file COPYING. If not, write to
-* the Free Software Foundation, 59 Temple Place - Suite 330,
-* Boston, MA 02111-1307, USA.
-*
-*/
-
-/**
- * @file boards/booz/baro_board.h
- *
- */
-
-#ifndef BOARDS_BOOZ_BARO_H
-#define BOARDS_BOOZ_BARO_H
-
-#include "std.h"
-
-#include "subsystems/sensors/baro.h"
-#include "mcu_periph/adc.h"
-#include "mcu_periph/dac.h"
-
-enum BaroBoardStatus {
- BB_UNINITIALIZED,
- BB_RUNNING
-};
-
-struct BaroBoard {
- enum BaroBoardStatus status;
- int32_t absolute;
- uint16_t offset;
- uint16_t value_filtered;
- struct adc_buf buf;
-};
-
-extern struct BaroBoard baro_board;
-
-extern void baro_board_calibrate(void);
-#define BaroEvent() {}
-
-static inline void baro_board_SetOffset(uint16_t _o)
-{
- baro_board.offset = _o;
- DACSet(_o);
-}
-
-
-#endif /* BOARDS_BOOZ_BARO_H */
diff --git a/sw/airborne/boards/booz_1.0.h b/sw/airborne/boards/booz_1.0.h
deleted file mode 100644
index 11bd4defaa..0000000000
--- a/sw/airborne/boards/booz_1.0.h
+++ /dev/null
@@ -1,177 +0,0 @@
-#ifndef CONFIG_BOOZ2_V1_0_H
-#define CONFIG_BOOZ2_V1_0_H
-
-/* Master oscillator freq. */
-#define FOSC (12000000)
-
-/* PLL multiplier */
-#define PLL_MUL (5)
-
-/* CPU clock freq. */
-#define CCLK (FOSC * PLL_MUL)
-
-/* Peripheral bus speed mask 0x00->4, 0x01-> 1, 0x02 -> 2 */
-#define PBSD_BITS 0x02
-#define PBSD_VAL 2
-
-/* Peripheral bus clock freq. */
-#define PCLK (CCLK / PBSD_VAL)
-
-/* Onboard LEDs */
-#ifndef USE_LED_1
-#define USE_LED_1 1
-#endif
-#define LED_1_BANK 1
-#define LED_1_PIN 25
-
-#ifndef USE_LED_2
-#define USE_LED_2 1
-#endif
-#define LED_2_BANK 1
-#define LED_2_PIN 24
-
-#ifndef USE_LED_3
-#define USE_LED_3 1
-#endif
-#define LED_3_BANK 1
-#define LED_3_PIN 23
-
-#ifndef USE_LED_4
-#define USE_LED_4 1
-#endif
-#define LED_4_BANK 1
-#define LED_4_PIN 31
-
-#define POWER_SWITCH_GPIO GPIOB,GPIO18
-
-#define CAM_SWITCH_GPIO GPIOB,GPIO22
-
-/* PPM : rc rx on P0.28 ( CAP0.2 ) */
-#define PPM_PINSEL PINSEL1
-#define PPM_PINSEL_VAL 0x02
-#define PPM_PINSEL_BIT 24
-#define PPM_CRI TIR_CR2I
-#define PPM_CCR_CRF TCCR_CR2_F
-#define PPM_CCR_CRR TCCR_CR2_R
-#define PPM_CCR_CRI TCCR_CR2_I
-#define PPM_CR T0CR2
-
-
-/* ADC */
-
-/* select P0.13 (ADC_SPARE) as AD1.4 for ADC_0 */
-#define ADC_0 AdcBank1(4)
-#if USE_ADC_0
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_4
-#endif
-
-/* select P0.4 (SCK_0) as AD0.6 for ADC_1 */
-#define ADC_1 AdcBank0(6)
-#if USE_ADC_1
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_6
-#endif
-
-/* select P0.5 (MISO_0) as AD0.7 for ADC_2 */
-#define ADC_2 AdcBank0(7)
-#if USE_ADC_2
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_7
-#endif
-
-/* select P0.6 (MOSI_0) as AD1.0 for ADC_3 */
-#define ADC_3 AdcBank1(0)
-#if USE_ADC_3
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_0
-#endif
-
-/* battery */
-/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
-#ifndef ADC_CHANNEL_VSUPPLY
-#define ADC_CHANNEL_VSUPPLY AdcBank0(2)
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_2
-#endif
-
-#define DefaultVoltageOfAdc(adc) (0.0183*adc)
-
-/* baro */
-#define ADC_CHANNEL_BARO AdcBank1(2)
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_2
-
-
-/* SPI slaves (IMU connector) */
-#define SPI_SELECT_SLAVE0_PORT 0
-#define SPI_SELECT_SLAVE0_PIN 20
-#define SPI_SELECT_SLAVE0_PINSEL PINSEL1
-#define SPI_SELECT_SLAVE0_PINSEL_BIT 8
-#define SPI_SELECT_SLAVE0_PINSEL_VAL 0
-
-#define SPI_SELECT_SLAVE1_PORT 1
-#define SPI_SELECT_SLAVE1_PIN 28
-#define SPI_SELECT_SLAVE1_PINSEL PINSEL2
-#define SPI_SELECT_SLAVE1_PINSEL_BIT 2
-#define SPI_SELECT_SLAVE1_PINSEL_VAL 0
-
-
-/* MAX1168 EOC pin (booz2 imu) */
-#define MAX1168_EOC_PIN 16
-#define MAX1168_EOC_PINSEL PINSEL1
-#define MAX1168_EOC_PINSEL_BIT 0
-#define MAX1168_EOC_PINSEL_VAL 1
-#define MAX1168_EOC_EINT 0
-#define MAX1168_EOC_VIC_IT VIC_EINT0
-
-
-/* MS2100 EOC and reset pins (booz2 imu) */
-#define MS2100_RESET_PIN 19
-#define MS2100_RESET_IODIR IO1DIR
-#define MS2100_RESET_IOSET IO1SET
-#define MS2100_RESET_IOCLR IO1CLR
-
-#define MS2100_DRDY_PIN 30
-#define MS2100_DRDY_PINSEL PINSEL1
-#define MS2100_DRDY_PINSEL_BIT 28
-#define MS2100_DRDY_PINSEL_VAL 2
-#define MS2100_DRDY_EINT 3
-#define MS2100_DRDY_VIC_IT VIC_EINT3
-
-
-/* Servo definition for actruators_pwm driver */
-
-/* BOOZ PWM0 = PWM_SERVO_5 (driver) = PWM5 (lpc)
- * on CAM connector */
-#if USE_PWM0
-#define PWM_SERVO_5 1
-#define SERVO_REG_0 PWMMR5
-#endif
-
-/* BOOZ PWM1 = PWM_SERVO_2 (driver) = PWM2 (lpc)
- * on SPI connector */
-#if USE_PWM1
-#define PWM_SERVO_2 1
-#define SERVO_REG_1 PWMMR2
-#endif
-
-
-/* by default enable onboard baro */
-#ifndef USE_BARO_BOARD
-#define USE_BARO_BOARD 1
-#endif
-
-#endif /* CONFIG_BOOZ2_V1_0_H */
diff --git a/sw/airborne/boards/hb_1.1.h b/sw/airborne/boards/hb_1.1.h
deleted file mode 100644
index ad0c7a6511..0000000000
--- a/sw/airborne/boards/hb_1.1.h
+++ /dev/null
@@ -1,117 +0,0 @@
-#ifndef CONFIG_HB_V1_1_H
-#define CONFIG_HB_V1_1_H
-
-/* Master oscillator freq. */
-#define FOSC (12000000)
-
-/* PLL multiplier */
-#define PLL_MUL (5)
-
-/* CPU clock freq. */
-#define CCLK (FOSC * PLL_MUL)
-
-/* Peripheral bus speed mask 0x00->4, 0x01-> 1, 0x02 -> 2 */
-#define PBSD_BITS 0x02
-#define PBSD_VAL 2
-
-/* Peripheral bus clock freq. */
-#define PCLK (CCLK / PBSD_VAL)
-
-/* power switch status */
-#define POWER_SWITCH_GPIO GPIOB,GPIO18
-#define POWER_SWITCH_2_GPIO GPIOB,GPIO19
-
-/* buzzer and cam switch */
-#define BUZZER_GPIO GPIOB,GPIO20
-#define CAM_SWITCH_GPIO GPIOB,GPIO25
-
-/* P0.22 aka MAT0.0 */
-#define SERVO_CLOCK_PIN 22
-#define SERVO_CLOCK_PINSEL PINSEL1
-#define SERVO_CLOCK_PINSEL_VAL 0x03
-#define SERVO_CLOCK_PINSEL_BIT 12
-/* p1.24 */
-#define SERVO_RESET_PIN 24
-
-/* PPM : rc rx on P0.16 ( CAP0.2 ) */
-#define PPM_PINSEL PINSEL1
-#define PPM_PINSEL_VAL 0x03
-#define PPM_PINSEL_BIT 0
-#define PPM_CRI TIR_CR2I
-#define PPM_CCR_CRF TCCR_CR2_F
-#define PPM_CCR_CRR TCCR_CR2_R
-#define PPM_CCR_CRI TCCR_CR2_I
-#define PPM_CR T0CR2
-
-
-/* ADC */
-
-/* IR3 */
-#define ADC_0 AdcBank0(3)
-#if USE_ADC_0
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_3
-#endif
-
-/* IR2 */
-#define ADC_1 AdcBank0(2)
-#if USE_ADC_1
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_2
-#endif
-
-/* IR1 */
-#define ADC_2 AdcBank0(1)
-#if USE_ADC_2
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_1
-#endif
-
-
-/* ADC2 on ANALOG connector */
-#define ADC_3 AdcBank1(2)
-#if USE_ADC_3
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_2
-#endif
-
-/* ADC3 on ANALOG connector */
-#define ADC_4 AdcBank1(3)
-#if USE_ADC_4
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_3
-#endif
-
-/* ADC4 on ANALOG connector */
-#define ADC_5 AdcBank1(4)
-#if USE_ADC_5
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_4
-#endif
-
-/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
-#ifndef ADC_CHANNEL_VSUPPLY
-#define ADC_CHANNEL_VSUPPLY AdcBank1(6)
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_6
-#endif
-
-
-#define DefaultVoltageOfAdc(adc) (0.032362123*adc)
-
-
-#endif /* CONFIG_HB_V1_1_H */
diff --git a/sw/airborne/boards/hbmini/baro_board.c b/sw/airborne/boards/hbmini/baro_board.c
deleted file mode 100644
index 77014ba38f..0000000000
--- a/sw/airborne/boards/hbmini/baro_board.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
-* Copyright (C) 2010 Christoph Niemann
-*
-* This file is part of paparazzi.
-*
-* paparazzi is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2, or (at your option)
-* any later version.
-*
-* paparazzi is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with paparazzi; see the file COPYING. If not, write to
-* the Free Software Foundation, 59 Temple Place - Suite 330,
-* Boston, MA 02111-1307, USA.
-*
-*/
-
-/** @file boards/hbmini/baro_board.c
- * Baro board interface for Bosch BMP085 on HBmini I2C1 with EOC check.
- */
-
-#include "std.h"
-#include "baro_board.h"
-#include "subsystems/sensors/baro.h"
-#include "peripherals/bmp085.h"
-#include "peripherals/bmp085_regs.h"
-#include "subsystems/abi.h"
-#include "led.h"
-
-struct Bmp085 baro_bmp085;
-
-void baro_init(void)
-{
- bmp085_init(&baro_bmp085, &i2c1, BMP085_SLAVE_ADDR);
-#ifdef BARO_LED
- LED_OFF(BARO_LED);
-#endif
-}
-
-void baro_periodic(void)
-{
- if (baro_bmp085.initialized) {
- bmp085_periodic(&baro_bmp085);
- } else {
- bmp085_read_eeprom_calib(&baro_bmp085);
- }
-}
-
-void bmp_baro_event(void)
-{
- bmp085_event(&baro_bmp085);
-
- if (baro_bmp085.data_available) {
- uint32_t now_ts = get_sys_time_usec();
- float pressure = (float)baro_bmp085.pressure;
- AbiSendMsgBARO_ABS(BARO_BOARD_SENDER_ID, now_ts, pressure);
- baro_bmp085.data_available = false;
-#ifdef BARO_LED
- RunOnceEvery(10, LED_TOGGLE(BARO_LED));
-#endif
- }
-}
diff --git a/sw/airborne/boards/hbmini/baro_board.h b/sw/airborne/boards/hbmini/baro_board.h
deleted file mode 100644
index 9f43960f48..0000000000
--- a/sw/airborne/boards/hbmini/baro_board.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2011-2013 Gautier Hattenberger
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/** @file boards/hbmini/baro_board.h
- * Baro board interface for Bosch BMP085 on HBmini I2C1 with EOC check.
- */
-
-
-
-#ifndef BOARDS_HBMINI_BARO_H
-#define BOARDS_HBMINI_BARO_H
-
-// only for printing the baro type during compilation
-#define BARO_BOARD BARO_BOARD_BMP085
-
-extern void bmp_baro_event(void);
-
-// define BaroEvent macro
-#define BaroEvent bmp_baro_event
-
-#endif // BOARDS_HBMINI_BARO_H
diff --git a/sw/airborne/boards/hbmini/imu_hbmini.c b/sw/airborne/boards/hbmini/imu_hbmini.c
deleted file mode 100644
index 29cc9ac74e..0000000000
--- a/sw/airborne/boards/hbmini/imu_hbmini.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (C) 2011 Paparazzi Team
- * Derived from Aspirin, NavGo and ppzuavimu drivers
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/**
- * @file boards/hbmini/imu_hbmini.c
- *
- * Driver for the IMU on the Hbmini board.
- *
- * - Gyroscope: IDG 500 and ISZ 500, MAX1168
- * - Accelerometer: Analog Devices ADXL320
- * - Magnetometer: Honeywell HMC5883L
- */
-
-#include
-#include "imu_hbmini.h"
-#include "mcu_periph/i2c.h"
-#include "led.h"
-#include "subsystems/abi.h"
-
-// Downlink
-#include "mcu_periph/uart.h"
-#include "pprzlink/messages.h"
-#include "subsystems/datalink/downlink.h"
-
-
-#if !defined IMU_GYRO_P_CHAN & !defined IMU_GYRO_Q_CHAN & !defined IMU_GYRO_R_CHAN
-#define IMU_GYRO_P_CHAN 3
-#define IMU_GYRO_Q_CHAN 4
-#define IMU_GYRO_R_CHAN 5
-#endif
-#if !defined IMU_ACCEL_X_CHAN & !defined IMU_ACCEL_Y_CHAN & !defined IMU_ACCEL_Z_CHAN
-#define IMU_ACCEL_X_CHAN 0
-#define IMU_ACCEL_Y_CHAN 1
-#define IMU_ACCEL_Z_CHAN 2
-#endif
-#if !defined IMU_MAG_X_CHAN & !defined IMU_MAG_Y_CHAN & !defined IMU_MAG_Z_CHAN
-#define IMU_MAG_X_CHAN 2
-#define IMU_MAG_Y_CHAN 0
-#define IMU_MAG_Z_CHAN 1
-#endif
-
-struct ImuHbmini imu_hbmini;
-
-void imu_hbmini_init(void)
-{
- max1168_init();
-
- /////////////////////////////////////////////////////////////////////
- // HMC58XX
- hmc58xx_init(&imu_hbmini.hmc, &(IMU_HBMINI_I2C_DEV), HMC58XX_ADDR);
-}
-
-void imu_hbmini_periodic(void)
-{
-
- Max1168Periodic();
-
- // Read HMC58XX at 100Hz (main loop for rotorcraft: 512Hz)
- RunOnceEvery(5, hmc58xx_periodic(&imu_hbmini.hmc));
-
- //RunOnceEvery(20,imu_hbmini_downlink_raw());
-}
-
-
-void imu_hbmini_downlink_raw(void)
-{
- DOWNLINK_SEND_IMU_GYRO_RAW(DefaultChannel, DefaultDevice, &imu.gyro_unscaled.p, &imu.gyro_unscaled.q,
- &imu.gyro_unscaled.r);
- DOWNLINK_SEND_IMU_ACCEL_RAW(DefaultChannel, DefaultDevice, &imu.accel_unscaled.x, &imu.accel_unscaled.y,
- &imu.accel_unscaled.z);
- DOWNLINK_SEND_IMU_MAG_RAW(DefaultChannel, DefaultDevice, &imu.mag_unscaled.x, &imu.mag_unscaled.y, &imu.mag_unscaled.z);
-}
-
-void imu_hbmini_event(void)
-{
- uint32_t now_ts = get_sys_time_usec();
-
- max1168_event();
-
- if (max1168_status == MAX1168_DATA_AVAILABLE) {
- imu.gyro_unscaled.p = max1168_values[IMU_GYRO_P_CHAN];
- imu.gyro_unscaled.q = max1168_values[IMU_GYRO_Q_CHAN];
- imu.gyro_unscaled.r = max1168_values[IMU_GYRO_R_CHAN];
- imu.accel_unscaled.x = max1168_values[IMU_ACCEL_X_CHAN];
- imu.accel_unscaled.y = max1168_values[IMU_ACCEL_Y_CHAN];
- imu.accel_unscaled.z = max1168_values[IMU_ACCEL_Z_CHAN];
- max1168_status = MAX1168_IDLE;
- imu_scale_gyro(&imu);
- imu_scale_accel(&imu);
- AbiSendMsgIMU_GYRO_INT32(IMU_BOARD_ID, now_ts, &imu.gyro);
- AbiSendMsgIMU_ACCEL_INT32(IMU_BOARD_ID, now_ts, &imu.accel);
- }
-
- // HMC58XX event task
- hmc58xx_event(&imu_hbmini.hmc);
- if (imu_hbmini.hmc.data_available) {
- imu.mag_unscaled.z = imu_hbmini.hmc.data.value[IMU_MAG_X_CHAN];
- imu.mag_unscaled.y = imu_hbmini.hmc.data.value[IMU_MAG_Y_CHAN];
- imu.mag_unscaled.x = imu_hbmini.hmc.data.value[IMU_MAG_Z_CHAN];
-
- imu_hbmini.hmc.data_available = false;
- imu_scale_mag(&imu);
- AbiSendMsgIMU_MAG_INT32(IMU_BOARD_ID, now_ts, &imu.mag);
- }
-
-}
-
diff --git a/sw/airborne/boards/hbmini/imu_hbmini.h b/sw/airborne/boards/hbmini/imu_hbmini.h
deleted file mode 100644
index cca76b1386..0000000000
--- a/sw/airborne/boards/hbmini/imu_hbmini.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2011 Paparazzi Team
- * Derived from Aspirin, NavGo and ppzuavimu drivers
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/**
- * @file boards/hbmini/imu_hbmini.c
- *
- * Driver for the IMU on the Hbmini board.
- *
- * - Gyroscope: IDG 500 and ISZ 500, MAX1168
- * - Accelerometer: Analog Devices ADXL320
- * - Magnetometer: Honeywell HMC5883L
- */
-
-#ifndef IMU_HBMINI_H
-#define IMU_HBMINI_H
-
-#include "std.h"
-#include "generated/airframe.h"
-#include "subsystems/imu.h"
-
-#include "peripherals/max1168.h"
-#include "peripherals/hmc58xx.h"
-
-// Default configuration
-#if !defined IMU_GYRO_P_SIGN & !defined IMU_GYRO_Q_SIGN & !defined IMU_GYRO_R_SIGN
-#define IMU_GYRO_P_SIGN -1
-#define IMU_GYRO_Q_SIGN 1
-#define IMU_GYRO_R_SIGN -1
-#endif
-#if !defined IMU_ACCEL_X_SIGN & !defined IMU_ACCEL_Y_SIGN & !defined IMU_ACCEL_Z_SIGN
-#define IMU_ACCEL_X_SIGN 1
-#define IMU_ACCEL_Y_SIGN -1
-#define IMU_ACCEL_Z_SIGN -1
-#endif
-#if !defined IMU_MAG_X_SIGN & !defined IMU_MAG_Y_SIGN & !defined IMU_MAG_Z_SIGN
-#define IMU_MAG_X_SIGN -1
-#define IMU_MAG_Y_SIGN -1
-#define IMU_MAG_Z_SIGN -1
-#endif
-
-
-struct ImuHbmini {
- struct Hmc58xx hmc;
-};
-
-extern struct ImuHbmini imu_hbmini;
-
-extern void imu_hbmini_init(void);
-extern void imu_hbmini_periodic(void);
-extern void imu_hbmini_event(void);
-extern void imu_hbmini_downlink_raw(void);
-
-#endif
diff --git a/sw/airborne/boards/hbmini_1.0.h b/sw/airborne/boards/hbmini_1.0.h
deleted file mode 100644
index 0f2e782521..0000000000
--- a/sw/airborne/boards/hbmini_1.0.h
+++ /dev/null
@@ -1,123 +0,0 @@
-#ifndef CONFIG_HBMINI_V1_0_H
-#define CONFIG_HBMINI_V1_0_H
-
-/* Master oscillator freq. */
-#define FOSC (12000000)
-
-/* PLL multiplier */
-#define PLL_MUL (5)
-
-/* CPU clock freq. */
-#define CCLK (FOSC * PLL_MUL)
-
-/* Peripheral bus speed mask 0x00->4, 0x01-> 1, 0x02 -> 2 */
-#define PBSD_BITS 0x02
-#define PBSD_VAL 2
-
-/* Peripheral bus clock freq. */
-#define PCLK (CCLK / PBSD_VAL)
-
-/* Onboard LEDs */
-#ifndef USE_LED_1
-#define USE_LED_1 1
-#endif
-#define LED_1_BANK 0
-#define LED_1_PIN 22
-
-#ifndef USE_LED_2
-#define USE_LED_2 1
-#endif
-#define LED_2_BANK 1
-#define LED_2_PIN 28
-
-#ifndef USE_LED_3
-#define USE_LED_3 1
-#endif
-#define LED_3_BANK 1
-#define LED_3_PIN 29
-
-#ifndef USE_LED_4
-#define USE_LED_4 1
-#endif
-#define LED_4_BANK 1
-#define LED_4_PIN 30
-
-/* PPM : rc rx on P0.28 ( CAP0.2 ) */
-#define PPM_PINSEL PINSEL0
-#define PPM_PINSEL_VAL 0x02
-#define PPM_PINSEL_BIT 12
-#define PPM_CRI TIR_CR2I
-#define PPM_CCR_CRF TCCR_CR2_F
-#define PPM_CCR_CRR TCCR_CR2_R
-#define PPM_CCR_CRI TCCR_CR2_I
-#define PPM_CR T0CR2
-
-/* ADC */
-
-/* not compatible with PWM1 */
-#define ADC_0 AdcBank1(6)
-#if USE_ADC_0
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_6
-#endif
-
-/* battery */
-/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
-#ifndef ADC_CHANNEL_VSUPPLY
-#define ADC_CHANNEL_VSUPPLY AdcBank1(6)
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_6
-#endif
-
-#define DefaultVoltageOfAdc(adc) (0.03385*adc)
-
-/* SPI (SSP) */
-#define SPI_SELECT_SLAVE0_PORT 0
-#define SPI_SELECT_SLAVE0_PIN 20
-#define SPI_SELECT_SLAVE0_PINSEL PINSEL1
-#define SPI_SELECT_SLAVE0_PINSEL_BIT 8
-#define SPI_SELECT_SLAVE0_PINSEL_VAL 0
-
-//#define SPI_SELECT_SLAVE1_PORT 1
-//#define SPI_SELECT_SLAVE1_PIN 19
-
-#define SPI1_DRDY_PINSEL PINSEL1
-#define SPI1_DRDY_PINSEL_BIT 0
-#define SPI1_DRDY_PINSEL_VAL 1
-#define SPI1_DRDY_EINT 0
-#define SPI1_DRDY_VIC_IT VIC_EINT0
-
-
-/* MAX1168 EOC pin (booz2 imu) */
-#define MAX1168_EOC_PIN 16
-#define MAX1168_EOC_PINSEL PINSEL1
-#define MAX1168_EOC_PINSEL_BIT 0
-#define MAX1168_EOC_PINSEL_VAL 1
-#define MAX1168_EOC_EINT 0
-#define MAX1168_EOC_VIC_IT VIC_EINT0
-
-/* Servo definition for actruators_pwm driver */
-
-/* HBMINI PWM0 = PWM_SERVO_2 (driver) = PWM2 (lpc) */
-#if USE_PWM0
-#define PWM_SERVO_2 1
-#define SERVO_REG_0 PWMMR2
-#endif
-
-/* HBMINI PWM1 = PWM_SERVO_5 (driver) = PWM5 (lpc) */
-#if USE_PWM1
-#define PWM_SERVO_5 1
-#define SERVO_REG_1 PWMMR5
-#endif
-
-
-/* by default activate onboard baro */
-#ifndef USE_BARO_BOARD
-#define USE_BARO_BOARD 1
-#endif
-
-#endif /* CONFIG_HBMINI_V1_0_H */
diff --git a/sw/airborne/boards/logom_2.6.h b/sw/airborne/boards/logom_2.6.h
deleted file mode 100644
index f3d11d99b8..0000000000
--- a/sw/airborne/boards/logom_2.6.h
+++ /dev/null
@@ -1,179 +0,0 @@
-/* board definition file for Sparkfun Logomatic V2.6 data logger */
-
-#ifndef CONFIG_LOGOMATIC_H
-#define CONFIG_LOGOMATIC_H
-
-#ifdef SITL
-/* Dummy definitions: adc are unused anyway */
-#define AdcBank0(x) (x)
-#define AdcBank1(x) (x)
-#endif /* SITL */
-
-/* Master oscillator freq. */
-#define FOSC (12000000)
-
-/* PLL multiplier */
-#define PLL_MUL (5)
-
-/* CPU clock freq. */
-#define CCLK (FOSC * PLL_MUL)
-
-/* PCLK needs to run @ 30MHz for USB */
-#define USE_USB_HIGH_PCLK
-
-#ifdef USE_USB_HIGH_PCLK
-/* Peripheral bus speed mask 0x00-> 4, 0x01-> 1, 0x02-> 2 */
-/* change both PBSD_BITS/VAL 15MHz, 60MHz, 30MHz */
-#define PBSD_BITS 0x02
-#define PBSD_VAL 2
-#else
-/* Peripheral bus speed mask 0x00->4, 0x01-> 1, 0x02 -> 2 */
-#define PBSD_BITS 0x00
-#define PBSD_VAL 4
-#endif
-
-/* Peripheral bus clock freq. */
-#define PCLK (CCLK / PBSD_VAL)
-
-#ifndef USE_LED_1
-#define USE_LED_1 1
-#endif
-#define LED_1_BANK 1
-#define LED_1_PIN 16
-
-#ifndef USE_LED_2
-#define USE_LED_2 1
-#endif
-#define LED_2_BANK 0
-#define LED_2_PIN 2
-
-#ifndef USE_LED_3
-#define USE_LED_3 1
-#endif
-#define LED_3_BANK 0
-#define LED_3_PIN 11
-
-#define POWER_SWITCH_GPIO GPIOB,GPIO17
-
-#define CAM_SWITCH_GPIO GPIOB,GPIO18
-
-#define GPS_RESET_GPIO GPIOB,GPIO19
-
-#define Configure_GPS_RESET_Pin() gpio_setup_output(GPS_RESET_GPIO)
-#define Set_GPS_RESET_Pin_LOW() gpio_clear(GPS_RESET_GPIO)
-#define Open_GPS_RESET_Pin() gpio_setup_input(GPS_RESET_GPIO)
-
-/* P0.29 aka MAT0.3 (P2) */
-#define SERVO_CLOCK_PIN 29
-#define SERVO_CLOCK_PINSEL PINSEL0
-#define SERVO_CLOCK_PINSEL_VAL 0x02
-#define SERVO_CLOCK_PINSEL_BIT 10
-/* p1.20 */
-#define SERVO_RESET_PIN 20
-
-/* PPM : rc rx on P0.6 aka CAP0.0 (P1) */
-#define PPM_PINSEL PINSEL0
-#define PPM_PINSEL_VAL 0x02
-#define PPM_PINSEL_BIT 12
-#define PPM_CRI TIR_CR2I
-#define PPM_CCR_CRF TCCR_CR2_F
-#define PPM_CCR_CRR TCCR_CR2_R
-#define PPM_CCR_CRI TCCR_CR2_I
-#define PPM_CR T0CR2
-
-/* ADC */
-
-#define ADC_0 AdcBank0(3)
-#if USE_ADC_0
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_3
-#endif
-
-#define ADC_1 AdcBank0(2)
-#if USE_ADC_1
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_2
-#endif
-
-
-#define ADC_2 AdcBank0(1)
-#if USE_ADC_2
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_1
-#endif
-
-#define ADC_3 AdcBank0(4)
-#if USE_ADC_3
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_4
-#endif
-
-#define ADC_4 AdcBank1(7)
-#if USE_ADC_4
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_7
-#endif
-
-#define ADC_5 AdcBank1(6)
-#if USE_ADC_5
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_6
-#endif
-
-#define ADC_6 AdcBank1(2)
-#if USE_ADC_6
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_2
-#endif
-
-#define ADC_7 AdcBank1(2)
-#if USE_ADC_7
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_2
-#endif
-
-/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
-#ifndef ADC_CHANNEL_VSUPPLY
-#define ADC_CHANNEL_VSUPPLY AdcBank1(4)
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_4
-#endif
-
-
-#define DefaultVoltageOfAdc(adc) (0.068505859375*adc)
-
-#define SPI_SELECT_SLAVE0_PORT 0
-#define SPI_SELECT_SLAVE0_PIN 20
-
-#define SPI1_DRDY_PINSEL PINSEL1
-#define SPI1_DRDY_PINSEL_BIT 0
-#define SPI1_DRDY_PINSEL_VAL 1
-#define SPI1_DRDY_EINT 0
-#define SPI1_DRDY_VIC_IT VIC_EINT0
-
-/* micro SD connected to SPI0 */
-#define SPI_CHANNEL 0
-
-/* STOP button P0.3 */
-#define LOG_STOP_KEY 3
-
-#endif /* CONFIG_LOGOMATIC_H */
-
diff --git a/sw/airborne/boards/navgo/baro_board.c b/sw/airborne/boards/navgo/baro_board.c
deleted file mode 100644
index ad5742dc28..0000000000
--- a/sw/airborne/boards/navgo/baro_board.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-* Copyright (C) 2010 ENAC
-*
-* This file is part of paparazzi.
-*
-* paparazzi is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2, or (at your option)
-* any later version.
-*
-* paparazzi is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with paparazzi; see the file COPYING. If not, write to
-* the Free Software Foundation, 59 Temple Place - Suite 330,
-* Boston, MA 02111-1307, USA.
-*
-*/
-
-
-/* driver for the analog Barometer Mpxa6115 using ADC ads1114 (16 bits I2C 860SpS max) from Texas instruments
- * Navarro & Gorraz & Hattenberger
- */
-
-#include "std.h"
-#include "baro_board.h"
-#include "subsystems/sensors/baro.h"
-#include "peripherals/mcp355x.h"
-#include "subsystems/abi.h"
-#include "led.h"
-
-/** scale factor to convert raw ADC measurement to pressure in Pascal.
- *
- * supply voltage Vs = 5V
- * real sensor sensitivity Vout = Vs * (0.009 P - 0.095) with P in kPa
- * 22 bit signed ADC -> only 21 useful bits ADC = 5/2^21 = 2.384e-6 V / LSB
- *
- * offset = 5*0.095/2.384e-6 = 199229 (LSB)
- * sensitivity = (1000/0.009)*2.384e-6/5 = 0.05298 Pa/LSB
- *
- */
-#ifndef NAVGO_BARO_SENS
-#define NAVGO_BARO_SENS 0.05298
-#endif
-
-#ifndef NAVGO_BARO_OFFSET
-#define NAVGO_BARO_OFFSET 199229
-#endif
-
-/* Counter to init mcp355x at startup */
-#define BARO_STARTUP_COUNTER 200
-uint16_t startup_cnt;
-
-void baro_init(void)
-{
- mcp355x_init();
-#ifdef BARO_LED
- LED_OFF(BARO_LED);
-#endif
- startup_cnt = BARO_STARTUP_COUNTER;
-}
-
-void baro_periodic(void)
-{
- // Run some loops to get correct readings from the adc
- if (startup_cnt > 0) {
- --startup_cnt;
-#ifdef BARO_LED
- LED_TOGGLE(BARO_LED);
- if (startup_cnt == 0) {
- LED_ON(BARO_LED);
- }
-#endif
- }
- // Read the ADC (at 50/4 Hz, conversion time is 68 ms)
- RunOnceEvery(4, mcp355x_read());
-}
-
-void navgo_baro_event(void)
-{
- mcp355x_event();
- if (mcp355x_data_available) {
- if (startup_cnt == 0) {
- // Send data when init phase is done
- uint32_t now_ts = get_sys_time_usec();
- float pressure = NAVGO_BARO_SENS * (mcp355x_data + NAVGO_BARO_OFFSET);
- AbiSendMsgBARO_ABS(BARO_BOARD_SENDER_ID, now_ts, pressure);
- }
- mcp355x_data_available = false;
- }
-}
diff --git a/sw/airborne/boards/navgo/baro_board.h b/sw/airborne/boards/navgo/baro_board.h
deleted file mode 100644
index dde5e64c4d..0000000000
--- a/sw/airborne/boards/navgo/baro_board.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2011-2013 Gautier Hattenberger
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/* driver for the analog Barometer Mpxa6115 using ADC ads1114 (16 bits I2C 860SpS max) from Texas instruments
- * Navarro & Gorraz & Hattenberger
- */
-
-
-
-#ifndef BOARDS_NAVGO_BARO_H
-#define BOARDS_NAVGO_BARO_H
-
-// only for printing the baro type during compilation
-#define BARO_BOARD BARO_BOARD_MPC355X
-
-extern void navgo_baro_event(void);
-
-// define BaroEvent macro
-#define BaroEvent navgo_baro_event
-
-#endif // BOARDS_NAVGO_BARO_H
diff --git a/sw/airborne/boards/navgo/imu_navgo.c b/sw/airborne/boards/navgo/imu_navgo.c
deleted file mode 100644
index 3a1d8e96a3..0000000000
--- a/sw/airborne/boards/navgo/imu_navgo.c
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Copyright (C) 2011 Gautier Hattenberger
- * Derived from Aspirin and ppzuavimu drivers
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/**
- * @file boards/navgo/imu_navgo.c
- *
- * Driver for the IMU on the NavGo board.
- *
- * - Gyroscope: Invensense ITG-3200
- * - Accelerometer: Analog Devices ADXL345
- * - Magnetometer: Honeywell HMC5883L
- */
-
-#include
-#include "imu_navgo.h"
-#include "mcu_periph/i2c.h"
-#include "led.h"
-#include "subsystems/abi.h"
-
-// Downlink
-#include "mcu_periph/uart.h"
-#include "pprzlink/messages.h"
-#include "subsystems/datalink/downlink.h"
-
-
-#ifndef NAVGO_ACCEL_RATE
-#define NAVGO_ACCEL_RATE ADXL345_RATE_25HZ
-#endif
-PRINT_CONFIG_VAR(NAVGO_ACCEL_RATE)
-
-/* default gyro internal lowpass frequency and sample rate divider */
-#if !defined NAVGO_GYRO_LOWPASS && !defined NAVGO_GYRO_SMPLRT_DIV
-#define NAVGO_GYRO_LOWPASS ITG3200_DLPF_10HZ
-#define NAVGO_GYRO_SMPLRT_DIV 1
-PRINT_CONFIG_MSG("Gyro output rate is 500Hz")
-#endif
-PRINT_CONFIG_VAR(NAVGO_GYRO_LOWPASS)
-PRINT_CONFIG_VAR(NAVGO_GYRO_SMPLRT_DIV)
-
-#if NAVGO_USE_MEDIAN_FILTER
-#include "filters/median_filter.h"
-struct MedianFilter3Int median_gyro, median_accel, median_mag;
-#endif
-
-struct ImuNavgo imu_navgo;
-
-void imu_navgo_init(void)
-{
- /////////////////////////////////////////////////////////////////////
- // ITG3200
- itg3200_init(&imu_navgo.itg, &(IMU_NAVGO_I2C_DEV), ITG3200_ADDR_ALT);
- // change the default configuration
- imu_navgo.itg.config.smplrt_div = NAVGO_GYRO_SMPLRT_DIV; // 500Hz sample rate since internal is 1kHz
- imu_navgo.itg.config.dlpf_cfg = NAVGO_GYRO_LOWPASS;
-
- /////////////////////////////////////////////////////////////////////
- // ADXL345
- adxl345_i2c_init(&imu_navgo.adxl, &(IMU_NAVGO_I2C_DEV), ADXL345_ADDR_ALT);
- // change the default data rate
- imu_navgo.adxl.config.rate = NAVGO_ACCEL_RATE;
-
- /////////////////////////////////////////////////////////////////////
- // HMC58XX
- hmc58xx_init(&imu_navgo.hmc, &(IMU_NAVGO_I2C_DEV), HMC58XX_ADDR);
-
-#if NAVGO_USE_MEDIAN_FILTER
- // Init median filters
- InitMedianFilterRatesInt(median_gyro, MEDIAN_DEFAULT_SIZE);
- InitMedianFilterVect3Int(median_accel, MEDIAN_DEFAULT_SIZE);
- InitMedianFilterVect3Int(median_mag, MEDIAN_DEFAULT_SIZE);
-#endif
-}
-
-void imu_navgo_periodic(void)
-{
- // Start reading the latest gyroscope data
- itg3200_periodic(&imu_navgo.itg);
-
- // Start reading the latest accelerometer data
- // Periodicity is automatically adapted
- // 3200 is the maximum output freq corresponding to the parameter 0xF
- // A factor 2 is applied to reduice the delay without overloading the i2c
- RunOnceEvery((PERIODIC_FREQUENCY / (2 * 3200 >> (0xf - NAVGO_ACCEL_RATE))), adxl345_i2c_periodic(&imu_navgo.adxl));
-
- // Read HMC58XX at 100Hz (main loop for rotorcraft: 512Hz)
- RunOnceEvery(5, hmc58xx_periodic(&imu_navgo.hmc));
-
- //RunOnceEvery(20,imu_navgo_downlink_raw());
-}
-
-
-void imu_navgo_downlink_raw(void)
-{
- DOWNLINK_SEND_IMU_GYRO_RAW(DefaultChannel, DefaultDevice, &imu.gyro_unscaled.p, &imu.gyro_unscaled.q,
- &imu.gyro_unscaled.r);
- DOWNLINK_SEND_IMU_ACCEL_RAW(DefaultChannel, DefaultDevice, &imu.accel_unscaled.x, &imu.accel_unscaled.y,
- &imu.accel_unscaled.z);
- DOWNLINK_SEND_IMU_MAG_RAW(DefaultChannel, DefaultDevice, &imu.mag_unscaled.x, &imu.mag_unscaled.y, &imu.mag_unscaled.z);
-}
-
-void imu_navgo_event(void)
-{
- uint32_t now_ts = get_sys_time_usec();
-
- // If the itg3200 I2C transaction has succeeded: convert the data
- itg3200_event(&imu_navgo.itg);
- if (imu_navgo.itg.data_available) {
- RATES_ASSIGN(imu.gyro_unscaled, -imu_navgo.itg.data.rates.q, imu_navgo.itg.data.rates.p, imu_navgo.itg.data.rates.r);
-#if NAVGO_USE_MEDIAN_FILTER
- UpdateMedianFilterRatesInt(median_gyro, imu.gyro_unscaled);
-#endif
- imu_navgo.itg.data_available = false;
- imu_scale_gyro(&imu);
- AbiSendMsgIMU_GYRO_INT32(IMU_BOARD_ID, now_ts, &imu.gyro);
- }
-
- // If the adxl345 I2C transaction has succeeded: convert the data
- adxl345_i2c_event(&imu_navgo.adxl);
- if (imu_navgo.adxl.data_available) {
- VECT3_ASSIGN(imu.accel_unscaled, imu_navgo.adxl.data.vect.y, -imu_navgo.adxl.data.vect.x, imu_navgo.adxl.data.vect.z);
-#if NAVGO_USE_MEDIAN_FILTER
- UpdateMedianFilterVect3Int(median_accel, imu.accel_unscaled);
-#endif
- imu_navgo.adxl.data_available = false;
- imu_scale_accel(&imu);
- AbiSendMsgIMU_ACCEL_INT32(IMU_BOARD_ID, now_ts, &imu.accel);
- }
-
- // HMC58XX event task
- hmc58xx_event(&imu_navgo.hmc);
- if (imu_navgo.hmc.data_available) {
- VECT3_COPY(imu.mag_unscaled, imu_navgo.hmc.data.vect);
-#if NAVGO_USE_MEDIAN_FILTER
- UpdateMedianFilterVect3Int(median_mag, imu.mag_unscaled);
-#endif
- imu_navgo.hmc.data_available = false;
- imu_scale_mag(&imu);
- AbiSendMsgIMU_MAG_INT32(IMU_BOARD_ID, now_ts, &imu.mag);
- }
-
-}
diff --git a/sw/airborne/boards/navgo/imu_navgo.h b/sw/airborne/boards/navgo/imu_navgo.h
deleted file mode 100644
index 34dc92195d..0000000000
--- a/sw/airborne/boards/navgo/imu_navgo.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (C) 2011 Gautier Hattenberger
- * Derived from Aspirin and ppzuavimu drivers
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/**
- * @file boards/navgo/imu_navgo.h
- *
- * Interface for the IMU on the NavGo board.
- *
- * - Gyroscope: Invensense ITG-3200
- * - Accelerometer: Analog Devices ADXL345
- * - Magnetometer: Honeywell HMC5883L
- */
-
-#ifndef IMU_NAVGO_H
-#define IMU_NAVGO_H
-
-#include "std.h"
-#include "generated/airframe.h"
-#include "subsystems/imu.h"
-
-#include "peripherals/itg3200.h"
-#include "peripherals/adxl345_i2c.h"
-#include "peripherals/hmc58xx.h"
-
-// Default configuration
-#if !defined IMU_GYRO_P_SIGN & !defined IMU_GYRO_Q_SIGN & !defined IMU_GYRO_R_SIGN
-#define IMU_GYRO_P_SIGN 1
-#define IMU_GYRO_Q_SIGN 1
-#define IMU_GYRO_R_SIGN 1
-#endif
-#if !defined IMU_ACCEL_X_SIGN & !defined IMU_ACCEL_Y_SIGN & !defined IMU_ACCEL_Z_SIGN
-#define IMU_ACCEL_X_SIGN 1
-#define IMU_ACCEL_Y_SIGN 1
-#define IMU_ACCEL_Z_SIGN 1
-#endif
-#if !defined IMU_MAG_X_SIGN & !defined IMU_MAG_Y_SIGN & !defined IMU_MAG_Z_SIGN
-#define IMU_MAG_X_SIGN 1
-#define IMU_MAG_Y_SIGN 1
-#define IMU_MAG_Z_SIGN 1
-#endif
-
-
-struct ImuNavgo {
- struct Itg3200 itg;
- struct Adxl345_I2c adxl;
- struct Hmc58xx hmc;
-};
-
-extern struct ImuNavgo imu_navgo;
-
-extern void imu_navgo_init(void);
-extern void imu_navgo_periodic(void);
-extern void imu_navgo_event(void);
-extern void imu_navgo_downlink_raw(void);
-
-#endif // IMU_NAVGO_H
diff --git a/sw/airborne/boards/navgo_1.0.h b/sw/airborne/boards/navgo_1.0.h
deleted file mode 100644
index d696717afb..0000000000
--- a/sw/airborne/boards/navgo_1.0.h
+++ /dev/null
@@ -1,114 +0,0 @@
-#ifndef CONFIG_NAVGO_V1_0_H
-#define CONFIG_NAVGO_V1_0_H
-
-/* Master oscillator freq. */
-#define FOSC (12000000)
-
-/* PLL multiplier */
-#define PLL_MUL (5)
-
-/* CPU clock freq. */
-#define CCLK (FOSC * PLL_MUL)
-
-/* Peripheral bus speed mask 0x00->4, 0x01-> 1, 0x02 -> 2 */
-#define PBSD_BITS 0x02
-#define PBSD_VAL 2
-
-/* Peripheral bus clock freq. */
-#define PCLK (CCLK / PBSD_VAL)
-
-/* Onboard LEDs */
-#ifndef USE_LED_1
-#define USE_LED_1 1
-#endif
-#define LED_1_BANK 0
-#define LED_1_PIN 22
-
-#ifndef USE_LED_2
-#define USE_LED_2 1
-#endif
-#define LED_2_BANK 1
-#define LED_2_PIN 28
-
-#ifndef USE_LED_3
-#define USE_LED_3 1
-#endif
-#define LED_3_BANK 1
-#define LED_3_PIN 29
-
-#ifndef USE_LED_4
-#define USE_LED_4 1
-#endif
-#define LED_4_BANK 1
-#define LED_4_PIN 30
-
-/* PPM : rc rx on P0.28 ( CAP0.2 ) */
-#define PPM_PINSEL PINSEL1
-#define PPM_PINSEL_VAL 0x02
-#define PPM_PINSEL_BIT 24
-#define PPM_CRI TIR_CR2I
-#define PPM_CCR_CRF TCCR_CR2_F
-#define PPM_CCR_CRR TCCR_CR2_R
-#define PPM_CCR_CRI TCCR_CR2_I
-#define PPM_CR T0CR2
-
-/* ADC */
-
-/* not compatible with PWM1 */
-#define ADC_0 AdcBank1(6)
-#if USE_ADC_0
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_6
-#endif
-
-/* battery */
-/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
-#ifndef ADC_CHANNEL_VSUPPLY
-#define ADC_CHANNEL_VSUPPLY AdcBank0(2)
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_2
-#endif
-
-#define DefaultVoltageOfAdc(adc) (0.017889*adc)
-
-/* SPI (SSP) */
-#define SPI_SELECT_SLAVE0_PORT 0
-#define SPI_SELECT_SLAVE0_PIN 20
-#define SPI_SELECT_SLAVE0_PINSEL PINSEL1
-#define SPI_SELECT_SLAVE0_PINSEL_BIT 8
-#define SPI_SELECT_SLAVE0_PINSEL_VAL 0
-
-//#define SPI_SELECT_SLAVE1_PORT 1
-//#define SPI_SELECT_SLAVE1_PIN 19
-
-#define SPI1_DRDY_PINSEL PINSEL1
-#define SPI1_DRDY_PINSEL_BIT 0
-#define SPI1_DRDY_PINSEL_VAL 1
-#define SPI1_DRDY_EINT 0
-#define SPI1_DRDY_VIC_IT VIC_EINT0
-
-/* Servo definition for actruators_pwm driver */
-
-/* NAVGO PWM0 = PWM_SERVO_2 (driver) = PWM2 (lpc) */
-#if USE_PWM0
-#define PWM_SERVO_2 1
-#define SERVO_REG_0 PWMMR2
-#endif
-
-/* NAVGO PWM1 = PWM_SERVO_5 (driver) = PWM5 (lpc) */
-#if USE_PWM1
-#define PWM_SERVO_5 1
-#define SERVO_REG_1 PWMMR5
-#endif
-
-
-/* by default activate onboard baro */
-#ifndef USE_BARO_BOARD
-#define USE_BARO_BOARD 1
-#endif
-
-#endif /* CONFIG_NAVGO_V1_0_H */
diff --git a/sw/airborne/boards/olimex_lpc_h2148.h b/sw/airborne/boards/olimex_lpc_h2148.h
deleted file mode 100644
index 8efc68767c..0000000000
--- a/sw/airborne/boards/olimex_lpc_h2148.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef CONFIG_OLIMEX_H2148_H
-#define CONFIG_OLIMEX_H2148_H
-
-/* Master oscillator freq. */
-#define FOSC (12000000)
-/* PLL multiplier */
-#define PLL_MUL (5)
-/* CPU clock freq. */
-#define CCLK (FOSC * PLL_MUL)
-/* Peripheral bus speed mask 0x00->4, 0x01-> 1, 0x02 -> 2 */
-#define PBSD_BITS 0x02
-#define PBSD_VAL 2
-/* Peripheral bus clock freq. */
-#define PCLK (CCLK / PBSD_VAL)
-
-#ifndef USE_LED_1
-#define USE_LED_1 1
-#endif
-#define LED_1_BANK 1
-#define LED_1_PIN 24
-
-#ifndef USE_LED_2
-#define USE_LED_2 1
-#endif
-#define LED_2_BANK 1
-#define LED_2_PIN 23
-
-#endif /* CONFIG_OLIMEX_H2148_H */
diff --git a/sw/airborne/boards/pc_sim.h b/sw/airborne/boards/pc_sim.h
index 75b5479347..b8974ca4bc 100644
--- a/sw/airborne/boards/pc_sim.h
+++ b/sw/airborne/boards/pc_sim.h
@@ -3,10 +3,10 @@
/* Default actuators driver */
-#define DEFAULT_ACTUATORS "subsystems/actuators/actuators_4017.h"
-#define ActuatorDefaultSet(_x,_y) Actuator4017Set(_x,_y)
-#define ActuatorsDefaultInit() Actuators4017Init()
-#define ActuatorsDefaultCommit() Actuators4017Commit()
+#define DEFAULT_ACTUATORS "subsystems/actuators/actuators_pwm.h"
+#define ActuatorDefaultSet(_x,_y) ActuatorPwmSet(_x,_y)
+#define ActuatorsDefaultInit() ActuatorsPwmInit()
+#define ActuatorsDefaultCommit() ActuatorsPwmCommit()
#define DefaultVoltageOfAdc(adc) (1.0*adc)
diff --git a/sw/airborne/boards/sdlog_1.0.h b/sw/airborne/boards/sdlog_1.0.h
deleted file mode 100644
index ddd79e7b43..0000000000
--- a/sw/airborne/boards/sdlog_1.0.h
+++ /dev/null
@@ -1,198 +0,0 @@
-/* board definition file for Paparazzi SD-Logger v1.0 */
-
-#ifndef CONFIG_SD_LOGGER_PPRZ_H
-#define CONFIG_SD_LOGGER_PPRZ_H
-
-#ifdef SITL
-/* Dummy definitions: adc are unused anyway */
-#define AdcBank0(x) (x)
-#define AdcBank1(x) (x)
-#endif /* SITL */
-
-/* Master oscillator freq. */
-#define FOSC (12000000)
-
-/* PLL multiplier */
-#define PLL_MUL (5)
-
-/* CPU clock freq. */
-#define CCLK (FOSC * PLL_MUL)
-
-/* current @7V, Tiny2.11, Funjet4, no LED
- PCLK max min
- 15MHz 99mA 92mA
- 30MHz 105mA 98mA
- 60MHz 116mA 108mA
-*/
-
-#ifdef USE_USB_HIGH_PCLK
-/* Peripheral bus speed mask 0x00-> 4, 0x01-> 1, 0x02-> 2 */
-/* change both PBSD_BITS/VAL 15MHz, 60MHz, 30MHz */
-#define PBSD_BITS 0x02
-#define PBSD_VAL 2
-#else
-/* Peripheral bus speed mask 0x00->4, 0x01-> 1, 0x02 -> 2 */
-#define PBSD_BITS 0x00
-#define PBSD_VAL 4
-#endif
-
-/* Peripheral bus clock freq. */
-#define PCLK (CCLK / PBSD_VAL)
-
-#ifndef USE_LED_1
-#define USE_LED_1 1
-#endif
-#define LED_1_BANK 1
-#define LED_1_PIN 17
-
-#ifndef USE_LED_2
-#define USE_LED_2 1
-#endif
-#define LED_2_BANK 1
-#define LED_2_PIN 16
-
-#ifndef USE_LED_3
-#define USE_LED_3 1
-#endif
-#define LED_3_BANK 1
-#define LED_3_PIN 23
-
-#define POWER_SWITCH_GPIO GPIOB,GPIO18
-
-#define CAM_SWITCH_GPIO GPIOB,GPIO22
-
-#define GPS_RESET_GPIO GPIOB,GPIO21
-
-#define Configure_GPS_RESET_Pin() gpio_setup_output(GPS_RESET_GPIO)
-#define Set_GPS_RESET_Pin_LOW() gpio_clear(GPS_RESET_GPIO)
-#define Open_GPS_RESET_Pin() gpio_setup_input(GPS_RESET_GPIO)
-
-/* P0.5 aka MAT0.1 */
-#define SERVO_CLOCK_PIN 5
-#define SERVO_CLOCK_PINSEL PINSEL0
-#define SERVO_CLOCK_PINSEL_VAL 0x02
-#define SERVO_CLOCK_PINSEL_BIT 10
-/* p1.20 */
-#define SERVO_RESET_PIN 20
-
-/* PPM : rc rx on P0.6*/
-#define PPM_PINSEL PINSEL0
-#define PPM_PINSEL_VAL 0x02
-#define PPM_PINSEL_BIT 12
-#define PPM_CRI TIR_CR2I
-#define PPM_CCR_CRF TCCR_CR2_F
-#define PPM_CCR_CRR TCCR_CR2_R
-#define PPM_CCR_CRI TCCR_CR2_I
-#define PPM_CR T0CR2
-
-/* ADC */
-
-#define ADC_0 AdcBank1(6)
-#if USE_ADC_0
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_6
-#endif
-
-#define ADC_1 AdcBank1(7)
-#if USE_ADC_1
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_7
-#endif
-
-
-#define ADC_2 AdcBank0(4)
-#if USE_ADC_2
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_4
-#endif
-
-#define ADC_3 AdcBank0(6)
-#if USE_ADC_3
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_6
-#endif
-
-#define ADC_4 AdcBank0(3)
-#if USE_ADC_4
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_3
-#endif
-
-#define ADC_5 AdcBank0(2)
-#if USE_ADC_5
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_2
-#endif
-
-#define ADC_6 AdcBank0(1)
-#if USE_ADC_6
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_1
-#endif
-
-#define ADC_7 AdcBank1(3)
-#if USE_ADC_7
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_3
-#endif
-
-/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
-#ifndef ADC_CHANNEL_VSUPPLY
-#define ADC_CHANNEL_VSUPPLY AdcBank1(5)
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_5
-#endif
-
-
-#define DefaultVoltageOfAdc(adc) (0.01787109375*adc)
-
-#define SPI_SELECT_SLAVE0_PORT 0
-#define SPI_SELECT_SLAVE0_PIN 20
-
-#define SPI1_DRDY_PINSEL PINSEL1
-#define SPI1_DRDY_PINSEL_BIT 0
-#define SPI1_DRDY_PINSEL_VAL 1
-#define SPI1_DRDY_EINT 0
-#define SPI1_DRDY_VIC_IT VIC_EINT0
-
-/* micro SD connected to SPI0 */
-#define SPI_CHANNEL 0
-
-/************ BANK 0 *************/
-
-/* STOP button P0.3 */
-#define LOG_STOP_KEY 29
-
-/* POWER DETECT 5V P0.10 */
-#define POWER_DETECT_PIN 10
-
-/************ BANK 1 *************/
-
-/* STOP button P1.20 */
-#define CARD_DETECT_PIN 20
-
-
-#define LED_GREEN 3
-#define LED_YELLOW 2
-#define LED_RED 1
-
-
-#endif /* CONFIG_SD_LOGGER_PPRZ_H */
diff --git a/sw/airborne/boards/tiny_0.99.h b/sw/airborne/boards/tiny_0.99.h
deleted file mode 100644
index fae8c3c87b..0000000000
--- a/sw/airborne/boards/tiny_0.99.h
+++ /dev/null
@@ -1,157 +0,0 @@
-#ifndef CONFIG_TINY_H
-#define CONFIG_TINY_H
-
-#ifdef SITL
-/* Dummy definitions: adc are unused anyway */
-#define AdcBank0(x) (x)
-#define AdcBank1(x) (x)
-#endif /* SITL */
-
-/* Master oscillator freq. */
-#define FOSC (12000000)
-
-/* PLL multiplier */
-#define PLL_MUL (5)
-
-/* CPU clock freq. */
-#define CCLK (FOSC * PLL_MUL)
-
-/* Peripheral bus speed mask 0x00->4, 0x01-> 1, 0x02 -> 2 */
-#define PBSD_BITS 0x00
-#define PBSD_VAL 4
-
-/* Peripheral bus clock freq. */
-#define PCLK (CCLK / PBSD_VAL)
-
-#ifndef USE_LED_1
-#define USE_LED_1 1
-#endif
-#define LED_1_BANK 1
-#define LED_1_PIN 28
-
-#ifndef USE_LED_2
-#define USE_LED_2 1
-#endif
-#define LED_2_BANK 1
-#define LED_2_PIN 19
-
-/* Default actuators driver */
-#define DEFAULT_ACTUATORS "subsystems/actuators/actuators_4015.h"
-#define ActuatorDefaultSet(_x,_y) Actuator4015Set(_x,_y)
-#define ActuatorsDefaultInit() Actuators4015Init()
-#define ActuatorsDefaultCommit() Actuators4015Commit()
-
-/* P0.5 aka MAT0.1 */
-#define SERVO_CLOCK_PIN 5
-#define SERVO_CLOCK_PINSEL PINSEL0
-#define SERVO_CLOCK_PINSEL_VAL 0x02
-#define SERVO_CLOCK_PINSEL_BIT 10
-/* p1.23 */
-#define SERVO_DATA_PIN 20
-/* p1.24 */
-#define SERVO_RESET_PIN 29
-
-/* PPM : rc rx on P0.6*/
-#define PPM_PINSEL PINSEL0
-#define PPM_PINSEL_VAL 0x02
-#define PPM_PINSEL_BIT 12
-#define PPM_CRI TIR_CR2I
-#define PPM_CCR_CRF TCCR_CR2_F
-#define PPM_CCR_CRR TCCR_CR2_R
-#define PPM_CCR_CRI TCCR_CR2_I
-#define PPM_CR T0CR2
-
-/* ADC */
-
-#define ADC_0 AdcBank0(3)
-#if USE_ADC_0
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_3
-#endif
-
-#define ADC_1 AdcBank0(2)
-#if USE_ADC_1
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_2
-#endif
-
-
-#define ADC_2 AdcBank0(1)
-#if USE_ADC_2
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_1
-#endif
-
-#define ADC_3 AdcBank1(7)
-#if USE_ADC_3
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_7
-#endif
-
-#define ADC_4 AdcBank1(3)
-#if USE_ADC_4
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_3
-#endif
-
-#define ADC_5 AdcBank1(4)
-#if USE_ADC_5
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_4
-#endif
-
-#define ADC_6 AdcBank1(5)
-#if USE_ADC_6
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_5
-#endif
-
-#define ADC_7 AdcBank1(2)
-#if USE_ADC_7
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_2
-#endif
-
-/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
-#ifndef ADC_CHANNEL_VSUPPLY
-#define ADC_CHANNEL_VSUPPLY AdcBank1(6)
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_6
-#endif
-
-#define DefaultVoltageOfAdc(adc) (0.01787109375*adc)
-
-#define SPI_SELECT_SLAVE0_PORT 0
-#define SPI_SELECT_SLAVE0_PIN 20
-#define SPI_SELECT_SLAVE0_PINSEL PINSEL1
-#define SPI_SELECT_SLAVE0_PINSEL_BIT 8
-#define SPI_SELECT_SLAVE0_PINSEL_VAL 0
-
-/* MAX1168 EOC pin (e.g. booz2 imu) */
-#define MAX1168_EOC_PIN 16
-#define MAX1168_EOC_PINSEL PINSEL1
-#define MAX1168_EOC_PINSEL_BIT 0
-#define MAX1168_EOC_PINSEL_VAL 1
-#define MAX1168_EOC_EINT 0
-#define MAX1168_EOC_VIC_IT VIC_EINT0
-
-
-#endif /* CONFIG_TINY_H */
diff --git a/sw/airborne/boards/tiny_1.1.h b/sw/airborne/boards/tiny_1.1.h
deleted file mode 100644
index c942521e61..0000000000
--- a/sw/airborne/boards/tiny_1.1.h
+++ /dev/null
@@ -1,168 +0,0 @@
-#ifndef CONFIG_TINY_H
-#define CONFIG_TINY_H
-
-/* Master oscillator freq. */
-#define FOSC (12000000)
-
-/* PLL multiplier */
-#define PLL_MUL (5)
-
-/* CPU clock freq. */
-#define CCLK (FOSC * PLL_MUL)
-
-#ifdef USE_USB_HIGH_PCLK
-/* Peripheral bus speed mask 0x00-> 4, 0x01-> 1, 0x02-> 2 */
-/* change both PBSD_BITS/VAL 15MHz, 60MHz, 30MHz */
-#define PBSD_BITS 0x02
-#define PBSD_VAL 2
-#else
-/* Peripheral bus speed mask 0x00->4, 0x01-> 1, 0x02 -> 2 */
-#define PBSD_BITS 0x00
-#define PBSD_VAL 4
-#endif
-
-/* Peripheral bus clock freq. */
-#define PCLK (CCLK / PBSD_VAL)
-
-/* Onboard leds */
-#ifndef USE_LED_1
-#define USE_LED_1 1
-#endif
-#define LED_1_BANK 1
-#define LED_1_PIN 28
-
-#ifndef USE_LED_2
-#define USE_LED_2 1
-#endif
-#define LED_2_BANK 1
-#define LED_2_PIN 19
-
-/* Switch pin */
-#define POWER_SWITCH_GPIO GPIOA,GPIO11
-
-/* Default actuators driver */
-#define DEFAULT_ACTUATORS "subsystems/actuators/actuators_4015.h"
-#define ActuatorDefaultSet(_x,_y) Actuator4015Set(_x,_y)
-#define ActuatorsDefaultInit() Actuators4015Init()
-#define ActuatorsDefaultCommit() Actuators4015Commit()
-
-/* P0.5 aka MAT0.1 */
-#define SERVO_CLOCK_PIN 5
-#define SERVO_CLOCK_PINSEL PINSEL0
-#define SERVO_CLOCK_PINSEL_VAL 0x02
-#define SERVO_CLOCK_PINSEL_BIT 10
-/* p1.23 */
-#define SERVO_DATA_PIN 23
-/* p1.24 */
-#define SERVO_RESET_PIN 24
-
-/* PPM : rc rx on P0.6*/
-#define PPM_PINSEL PINSEL0
-#define PPM_PINSEL_VAL 0x02
-#define PPM_PINSEL_BIT 12
-#define PPM_CRI TIR_CR2I
-#define PPM_CCR_CRF TCCR_CR2_F
-#define PPM_CCR_CRR TCCR_CR2_R
-#define PPM_CCR_CRI TCCR_CR2_I
-#define PPM_CR T0CR2
-
-/* ADC */
-
-#define ADC_0 AdcBank0(3)
-#if USE_ADC_0
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_3
-#endif
-
-#define ADC_1 AdcBank0(2)
-#if USE_ADC_1
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_2
-#endif
-
-
-#define ADC_2 AdcBank0(1)
-#if USE_ADC_2
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_1
-#endif
-
-#define ADC_3 AdcBank0(4)
-#if USE_ADC_3
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_4
-#endif
-
-#define ADC_4 AdcBank1(7)
-#if USE_ADC_4
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_7
-#endif
-
-#define ADC_5 AdcBank1(3)
-#if USE_ADC_5
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_3
-#endif
-
-#define ADC_6 AdcBank1(4)
-#if USE_ADC_6
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_4
-#endif
-
-#define ADC_7 AdcBank1(5)
-#if USE_ADC_7
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_5
-#endif
-
-/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
-#ifndef ADC_CHANNEL_VSUPPLY
-#define ADC_CHANNEL_VSUPPLY AdcBank1(6)
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_6
-#endif
-
-#define DefaultVoltageOfAdc(adc) (0.01787109375*adc)
-
-#define SPI_SELECT_SLAVE0_PORT 0
-#define SPI_SELECT_SLAVE0_PIN 20
-#define SPI_SELECT_SLAVE0_PINSEL PINSEL1
-#define SPI_SELECT_SLAVE0_PINSEL_BIT 8
-#define SPI_SELECT_SLAVE0_PINSEL_VAL 0
-
-#define SPI1_DRDY_PINSEL PINSEL0
-#define SPI1_DRDY_PINSEL_BIT 14
-#define SPI1_DRDY_PINSEL_VAL 3
-#define SPI1_DRDY_EINT 2
-#define SPI1_DRDY_VIC_IT VIC_EINT2
-
-/* MAX1168 EOC pin (e.g. booz2 imu) */
-#define MAX1168_EOC_PIN 16
-#define MAX1168_EOC_PINSEL PINSEL1
-#define MAX1168_EOC_PINSEL_BIT 0
-#define MAX1168_EOC_PINSEL_VAL 1
-#define MAX1168_EOC_EINT 0
-#define MAX1168_EOC_VIC_IT VIC_EINT0
-
-
-#endif /* CONFIG_TINY_H */
diff --git a/sw/airborne/boards/tiny_2.0.h b/sw/airborne/boards/tiny_2.0.h
deleted file mode 100644
index d205470a6d..0000000000
--- a/sw/airborne/boards/tiny_2.0.h
+++ /dev/null
@@ -1,164 +0,0 @@
-#ifndef CONFIG_TINY_H
-#define CONFIG_TINY_H
-
-#ifdef SITL
-/* Dummy definitions: adc are unused anyway */
-#define AdcBank0(x) (x)
-#define AdcBank1(x) (x)
-#endif /* SITL */
-
-/* Master oscillator freq. */
-#define FOSC (12000000)
-
-/* PLL multiplier */
-#define PLL_MUL (5)
-
-/* CPU clock freq. */
-#define CCLK (FOSC * PLL_MUL)
-
-/* Peripheral bus speed mask 0x00->4, 0x01-> 1, 0x02 -> 2 */
-#define PBSD_BITS 0x00
-#define PBSD_VAL 4
-
-/* Peripheral bus clock freq. */
-#define PCLK (CCLK / PBSD_VAL)
-
-#ifndef USE_LED_1
-#define USE_LED_1 1
-#endif
-#define LED_1_BANK 1
-#define LED_1_PIN 17
-
-#ifndef USE_LED_2
-#define USE_LED_2 1
-#endif
-#define LED_2_BANK 1
-#define LED_2_PIN 16
-
-#ifndef USE_LED_3
-#define USE_LED_3 1
-#endif
-#define LED_3_BANK 1
-#define LED_3_PIN 23
-
-#define POWER_SWITCH_GPIO GPIOB,GPIO18
-
-/* Default actuators driver */
-#define DEFAULT_ACTUATORS "subsystems/actuators/actuators_4017.h"
-#define ActuatorDefaultSet(_x,_y) Actuator4017Set(_x,_y)
-#define ActuatorsDefaultInit() Actuators4017Init()
-#define ActuatorsDefaultCommit() Actuators4017Commit()
-
-/* P0.5 aka MAT0.1 */
-#define SERVO_CLOCK_PIN 5
-#define SERVO_CLOCK_PINSEL PINSEL0
-#define SERVO_CLOCK_PINSEL_VAL 0x02
-#define SERVO_CLOCK_PINSEL_BIT 10
-/* p1.20 */
-#define SERVO_RESET_PIN 20
-
-/* PPM : rc rx on P0.6*/
-#define PPM_PINSEL PINSEL0
-#define PPM_PINSEL_VAL 0x02
-#define PPM_PINSEL_BIT 12
-#define PPM_CRI TIR_CR2I
-#define PPM_CCR_CRF TCCR_CR2_F
-#define PPM_CCR_CRR TCCR_CR2_R
-#define PPM_CCR_CRI TCCR_CR2_I
-#define PPM_CR T0CR2
-
-/* ADC */
-
-#define ADC_0 AdcBank1(6)
-#if USE_ADC_0
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_6
-#endif
-
-#define ADC_1 AdcBank1(7)
-#if USE_ADC_1
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_7
-#endif
-
-
-#define ADC_2 AdcBank0(4)
-#if USE_ADC_2
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_4
-#endif
-
-#define ADC_3 AdcBank0(6)
-#if USE_ADC_3
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_6
-#endif
-
-#define ADC_4 AdcBank0(3)
-#if USE_ADC_4
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_3
-#endif
-
-#define ADC_5 AdcBank0(2)
-#if USE_ADC_5
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_2
-#endif
-
-#define ADC_6 AdcBank0(1)
-#if USE_ADC_6
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_1
-#endif
-
-#define ADC_7 AdcBank1(3)
-#if USE_ADC_7
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_3
-#endif
-
-/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
-#ifndef ADC_CHANNEL_VSUPPLY
-#define ADC_CHANNEL_VSUPPLY AdcBank1(5)
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_5
-#endif
-
-
-#define DefaultVoltageOfAdc(adc) (0.01787109375*adc)
-
-#define SPI_SELECT_SLAVE0_PORT 0
-#define SPI_SELECT_SLAVE0_PIN 20
-#define SPI_SELECT_SLAVE0_PINSEL PINSEL1
-#define SPI_SELECT_SLAVE0_PINSEL_BIT 8
-#define SPI_SELECT_SLAVE0_PINSEL_VAL 0
-
-/* MAX1168 EOC pin (e.g. booz2 imu) */
-#define MAX1168_EOC_PIN 16
-#define MAX1168_EOC_PINSEL PINSEL1
-#define MAX1168_EOC_PINSEL_BIT 0
-#define MAX1168_EOC_PINSEL_VAL 1
-#define MAX1168_EOC_EINT 0
-#define MAX1168_EOC_VIC_IT VIC_EINT0
-
-
-#endif /* CONFIG_TINY_H */
diff --git a/sw/airborne/boards/tiny_2.1.h b/sw/airborne/boards/tiny_2.1.h
deleted file mode 100644
index b16b12c983..0000000000
--- a/sw/airborne/boards/tiny_2.1.h
+++ /dev/null
@@ -1,195 +0,0 @@
-#ifndef CONFIG_TINY_H
-#define CONFIG_TINY_H
-
-#ifdef SITL
-/* Dummy definitions: adc are unused anyway */
-#define AdcBank0(x) (x)
-#define AdcBank1(x) (x)
-#endif /* SITL */
-
-/* Master oscillator freq. */
-#define FOSC (12000000)
-
-/* PLL multiplier */
-#define PLL_MUL (5)
-
-/* CPU clock freq. */
-#define CCLK (FOSC * PLL_MUL)
-
-/* current @7V, Tiny2.11, Funjet4, no LED
- PCLK max min
- 15MHz 99mA 92mA
- 30MHz 105mA 98mA
- 60MHz 116mA 108mA
-*/
-
-#ifdef USE_USB_HIGH_PCLK
-/* Peripheral bus speed mask 0x00-> 4, 0x01-> 1, 0x02-> 2 */
-/* change both PBSD_BITS/VAL 15MHz, 60MHz, 30MHz */
-#define PBSD_BITS 0x02
-#define PBSD_VAL 2
-#else
-/* Peripheral bus speed mask 0x00->4, 0x01-> 1, 0x02 -> 2 */
-#define PBSD_BITS 0x00
-#define PBSD_VAL 4
-#endif
-
-/* Peripheral bus clock freq. */
-#define PCLK (CCLK / PBSD_VAL)
-
-/* red */
-#ifndef USE_LED_1
-#define USE_LED_1 1
-#endif
-#define LED_1_BANK 1
-#define LED_1_PIN 17
-
-/* green */
-#ifndef USE_LED_2
-#define USE_LED_2 1
-#endif
-#define LED_2_BANK 1
-#define LED_2_PIN 16
-
-/* yellow */
-#ifndef USE_LED_3
-#define USE_LED_3 1
-#endif
-#define LED_3_BANK 1
-#define LED_3_PIN 23
-
-#define POWER_SWITCH_GPIO GPIOB,GPIO18
-
-#define CAM_SWITCH_GPIO GPIOB,GPIO22
-
-#define GPS_RESET_GPIO GPIOB,GPIO21
-
-#define Configure_GPS_RESET_Pin() gpio_setup_output(GPS_RESET_GPIO)
-#define Set_GPS_RESET_Pin_LOW() gpio_clear(GPS_RESET_GPIO)
-#define Open_GPS_RESET_Pin() gpio_setup_input(GPS_RESET_GPIO)
-
-/* Default actuators driver */
-#define DEFAULT_ACTUATORS "subsystems/actuators/actuators_4017.h"
-#define ActuatorDefaultSet(_x,_y) Actuator4017Set(_x,_y)
-#define ActuatorsDefaultInit() Actuators4017Init()
-#define ActuatorsDefaultCommit() Actuators4017Commit()
-
-/* P0.5 aka MAT0.1 */
-#define SERVO_CLOCK_PIN 5
-#define SERVO_CLOCK_PINSEL PINSEL0
-#define SERVO_CLOCK_PINSEL_VAL 0x02
-#define SERVO_CLOCK_PINSEL_BIT 10
-/* p1.20 */
-#define SERVO_RESET_PIN 20
-
-/* PPM : rc rx on P0.6*/
-#define PPM_PINSEL PINSEL0
-#define PPM_PINSEL_VAL 0x02
-#define PPM_PINSEL_BIT 12
-#define PPM_CRI TIR_CR2I
-#define PPM_CCR_CRF TCCR_CR2_F
-#define PPM_CCR_CRR TCCR_CR2_R
-#define PPM_CCR_CRI TCCR_CR2_I
-#define PPM_CR T0CR2
-
-/* ADC */
-
-#define ADC_0 AdcBank1(6)
-#if USE_ADC_0
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_6
-#endif
-
-#define ADC_1 AdcBank1(7)
-#if USE_ADC_1
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_7
-#endif
-
-
-#define ADC_2 AdcBank0(4)
-#if USE_ADC_2
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_4
-#endif
-
-#define ADC_3 AdcBank0(6)
-#if USE_ADC_3
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_6
-#endif
-
-#define ADC_4 AdcBank0(3)
-#if USE_ADC_4
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_3
-#endif
-
-#define ADC_5 AdcBank0(2)
-#if USE_ADC_5
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_2
-#endif
-
-#define ADC_6 AdcBank0(1)
-#if USE_ADC_6
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_1
-#endif
-
-#define ADC_7 AdcBank1(3)
-#if USE_ADC_7
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_3
-#endif
-
-/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
-#ifndef ADC_CHANNEL_VSUPPLY
-#define ADC_CHANNEL_VSUPPLY AdcBank1(5)
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_5
-#endif
-
-
-#define DefaultVoltageOfAdc(adc) (0.01787109375*adc)
-
-#define SPI_SELECT_SLAVE0_PORT 0
-#define SPI_SELECT_SLAVE0_PIN 20
-#define SPI_SELECT_SLAVE0_PINSEL PINSEL1
-#define SPI_SELECT_SLAVE0_PINSEL_BIT 8
-#define SPI_SELECT_SLAVE0_PINSEL_VAL 0
-
-#define SPI1_DRDY_PINSEL PINSEL1
-#define SPI1_DRDY_PINSEL_BIT 0
-#define SPI1_DRDY_PINSEL_VAL 1
-#define SPI1_DRDY_EINT 0
-#define SPI1_DRDY_VIC_IT VIC_EINT0
-
-
-/* MAX1168 EOC pin (e.g. booz2 imu) */
-#define MAX1168_EOC_PIN 16
-#define MAX1168_EOC_PINSEL PINSEL1
-#define MAX1168_EOC_PINSEL_BIT 0
-#define MAX1168_EOC_PINSEL_VAL 1
-#define MAX1168_EOC_EINT 0
-#define MAX1168_EOC_VIC_IT VIC_EINT0
-
-#endif /* CONFIG_TINY_H */
diff --git a/sw/airborne/boards/tiny_2.11.h b/sw/airborne/boards/tiny_2.11.h
deleted file mode 100644
index 207c90cfe9..0000000000
--- a/sw/airborne/boards/tiny_2.11.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#include "boards/tiny_2.1.h"
-
-#undef DefaultVoltageOfAdc
-#define DefaultVoltageOfAdc(adc) (0.0247311828*adc)
diff --git a/sw/airborne/boards/twog_1.0.h b/sw/airborne/boards/twog_1.0.h
deleted file mode 100644
index 207c90cfe9..0000000000
--- a/sw/airborne/boards/twog_1.0.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#include "boards/tiny_2.1.h"
-
-#undef DefaultVoltageOfAdc
-#define DefaultVoltageOfAdc(adc) (0.0247311828*adc)
diff --git a/sw/airborne/boards/umarim/baro_board.c b/sw/airborne/boards/umarim/baro_board.c
deleted file mode 100644
index 19928cb5e1..0000000000
--- a/sw/airborne/boards/umarim/baro_board.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
-* Copyright (C) 2010-2013 Gautier Hattenberger
-*
-* This file is part of paparazzi.
-*
-* paparazzi is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2, or (at your option)
-* any later version.
-*
-* paparazzi is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with paparazzi; see the file COPYING. If not, write to
-* the Free Software Foundation, 59 Temple Place - Suite 330,
-* Boston, MA 02111-1307, USA.
-*
-*/
-
-
-/* driver for the analog Barometer Mpxa6115 using ADC ads1114 (16 bits I2C 860SpS max) from Texas instruments
- * Navarro & Gorraz & Hattenberger
- */
-
-#include "std.h"
-#include "baro_board.h"
-#include "subsystems/sensors/baro.h"
-#include "peripherals/ads1114.h"
-#include "subsystems/abi.h"
-#include "led.h"
-
-// ADC for absolute pressure
-#ifndef BARO_ABS_ADS
-#define BARO_ABS_ADS ads1114_1
-#endif
-
-// FIXME
-#ifndef UMARIM_BARO_SENS
-#define UMARIM_BARO_SENS 0.0274181
-#endif
-
-/* Counter to init ads1114 at startup */
-#define BARO_STARTUP_COUNTER 200
-uint16_t startup_cnt;
-
-void baro_init(void)
-{
- ads1114_init();
-#ifdef BARO_LED
- LED_OFF(BARO_LED);
-#endif
- startup_cnt = BARO_STARTUP_COUNTER;
-}
-
-void baro_periodic(void)
-{
-
- // Run some loops to get correct readings from the adc
- if (startup_cnt > 0) {
- --startup_cnt;
-#ifdef BARO_LED
- LED_TOGGLE(BARO_LED);
- if (startup_cnt == 0) {
- LED_ON(BARO_LED);
- }
-#endif
- }
- // Read the ADC
- ads1114_read(&BARO_ABS_ADS);
-}
-
-void umarim_baro_event(void)
-{
- Ads1114Event();
- if (BARO_ABS_ADS.data_available) {
- if (startup_cnt == 0) {
- uint32_t now_ts = get_sys_time_usec();
- float pressure = UMARIM_BARO_SENS * Ads1114GetValue(BARO_ABS_ADS);
- AbiSendMsgBARO_ABS(BARO_BOARD_SENDER_ID, now_ts, pressure);
- }
- BARO_ABS_ADS.data_available = false;
- }
-}
-
diff --git a/sw/airborne/boards/umarim/baro_board.h b/sw/airborne/boards/umarim/baro_board.h
deleted file mode 100644
index b6c79bc7e4..0000000000
--- a/sw/airborne/boards/umarim/baro_board.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2010-2013 Gautier Hattenberger
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/* driver for the analog Barometer Mpxa6115 using ADC ads1114 (16 bits I2C 860SpS max) from Texas instruments
- * Navarro & Gorraz & Hattenberger
- */
-
-
-
-#ifndef BOARDS_UMARIM_BARO_H
-#define BOARDS_UMARIM_BARO_H
-
-// only for printing the baro type during compilation
-#define BARO_BOARD BARO_BOARD_MPXA6115
-
-extern void umarim_baro_event(void);
-#define BaroEvent umarim_baro_event
-
-#endif // BOARDS_UMARIM_BARO_H
diff --git a/sw/airborne/boards/umarim/imu_umarim.c b/sw/airborne/boards/umarim/imu_umarim.c
deleted file mode 100644
index 6d6ef57d30..0000000000
--- a/sw/airborne/boards/umarim/imu_umarim.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (C) 2011 Gautier Hattenberger
- * Derived from Aspirin and ppzuavimu drivers
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/**
- * @file boards/umarim/imu_umarim.c
- *
- * Driver for the IMU on the Umarim board.
- *
- * - Gyroscope: Invensense ITG-3200
- * - Accelerometer: Analog Devices ADXL345
- */
-
-#include
-#include "imu_umarim.h"
-#include "mcu_periph/i2c.h"
-#include "generated/airframe.h"
-#include "subsystems/abi.h"
-
-// Downlink
-#include "mcu_periph/uart.h"
-#include "pprzlink/messages.h"
-#include "subsystems/datalink/downlink.h"
-
-
-#ifndef UMARIM_ACCEL_RANGE
-#define UMARIM_ACCEL_RANGE ADXL345_RANGE_16G
-#endif
-PRINT_CONFIG_VAR(UMARIM_ACCEL_RANGE)
-
-#ifndef UMARIM_ACCEL_RATE
-#define UMARIM_ACCEL_RATE ADXL345_RATE_50HZ
-#endif
-PRINT_CONFIG_VAR(UMARIM_ACCEL_RATE)
-
-
-/* default gyro internal lowpass frequency and sample rate divider */
-#if !defined UMARIM_GYRO_LOWPASS && !defined UMARIM_GYRO_SMPLRT_DIV
-#define UMARIM_GYRO_LOWPASS ITG3200_DLPF_20HZ
-#define UMARIM_GYRO_SMPLRT_DIV 19
-PRINT_CONFIG_MSG("Gyro output rate is 50Hz")
-#endif
-PRINT_CONFIG_VAR(UMARIM_GYRO_LOWPASS)
-PRINT_CONFIG_VAR(UMARIM_GYRO_SMPLRT_DIV)
-
-struct ImuUmarim imu_umarim;
-
-void imu_umarim_init(void)
-{
- /////////////////////////////////////////////////////////////////////
- // ITG3200
- itg3200_init(&imu_umarim.itg, &(IMU_UMARIM_I2C_DEV), ITG3200_ADDR_ALT);
- // change the default configuration
- imu_umarim.itg.config.smplrt_div = UMARIM_GYRO_SMPLRT_DIV;
- imu_umarim.itg.config.dlpf_cfg = UMARIM_GYRO_LOWPASS;
-
- /////////////////////////////////////////////////////////////////////
- // ADXL345
- adxl345_i2c_init(&imu_umarim.adxl, &(IMU_UMARIM_I2C_DEV), ADXL345_ADDR_ALT);
- // change the default data rate
- imu_umarim.adxl.config.rate = UMARIM_ACCEL_RATE;
- imu_umarim.adxl.config.range = UMARIM_ACCEL_RANGE;
-}
-
-void imu_umarim_periodic(void)
-{
- // Start reading the latest gyroscope data
- itg3200_periodic(&imu_umarim.itg);
-
- // Start reading the latest accelerometer data
- adxl345_i2c_periodic(&imu_umarim.adxl);
-
- //RunOnceEvery(10,imu_umarim_downlink_raw());
-}
-
-void imu_umarim_downlink_raw(void)
-{
- DOWNLINK_SEND_IMU_GYRO_RAW(DefaultChannel, DefaultDevice, &imu.gyro_unscaled.p, &imu.gyro_unscaled.q,
- &imu.gyro_unscaled.r);
- DOWNLINK_SEND_IMU_ACCEL_RAW(DefaultChannel, DefaultDevice, &imu.accel_unscaled.x, &imu.accel_unscaled.y,
- &imu.accel_unscaled.z);
-}
-
-
-void imu_umarim_event(void)
-{
- uint32_t now_ts = get_sys_time_usec();
-
- // If the itg3200 I2C transaction has succeeded: convert the data
- itg3200_event(&imu_umarim.itg);
- if (imu_umarim.itg.data_available) {
- RATES_COPY(imu.gyro_unscaled, imu_umarim.itg.data.rates);
- imu_umarim.itg.data_available = false;
- imu_scale_gyro(&imu);
- AbiSendMsgIMU_GYRO_INT32(IMU_BOARD_ID, now_ts, &imu.gyro);
- }
-
- // If the adxl345 I2C transaction has succeeded: convert the data
- adxl345_i2c_event(&imu_umarim.adxl);
- if (imu_umarim.adxl.data_available) {
- VECT3_ASSIGN(imu.accel_unscaled, imu_umarim.adxl.data.vect.y, -imu_umarim.adxl.data.vect.x,
- imu_umarim.adxl.data.vect.z);
- imu_umarim.adxl.data_available = false;
- imu_scale_accel(&imu);
- AbiSendMsgIMU_ACCEL_INT32(IMU_BOARD_ID, now_ts, &imu.accel);
- }
-}
-
diff --git a/sw/airborne/boards/umarim/imu_umarim.h b/sw/airborne/boards/umarim/imu_umarim.h
deleted file mode 100644
index e5bcfcc968..0000000000
--- a/sw/airborne/boards/umarim/imu_umarim.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (C) 2011 Gautier Hattenberger
- * Derived from Aspirin and ppzuavimu drivers
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/**
- * @file boards/navgo/imu_navgo.h
- *
- * Interface for the IMU on the Umarim board.
- *
- * - Gyroscope: Invensense ITG-3200
- * - Accelerometer: Analog Devices ADXL345
- */
-
-#ifndef IMU_UMARIM_H
-#define IMU_UMARIM_H
-
-#include "std.h"
-#include "generated/airframe.h"
-#include "subsystems/imu.h"
-
-#include "peripherals/itg3200.h"
-#include "peripherals/adxl345_i2c.h"
-
-// Default configuration
-#if !defined IMU_GYRO_P_SIGN & !defined IMU_GYRO_Q_SIGN & !defined IMU_GYRO_R_SIGN
-#define IMU_GYRO_P_SIGN 1
-#define IMU_GYRO_Q_SIGN 1
-#define IMU_GYRO_R_SIGN 1
-#endif
-#if !defined IMU_ACCEL_X_SIGN & !defined IMU_ACCEL_Y_SIGN & !defined IMU_ACCEL_Z_SIGN
-#define IMU_ACCEL_X_SIGN 1
-#define IMU_ACCEL_Y_SIGN 1
-#define IMU_ACCEL_Z_SIGN 1
-#endif
-
-/** default gyro sensitivy and neutral from the datasheet
- * ITG3200 has 14.375 LSB/(deg/s)
- * sens = 1/14.375 * pi/180 * 2^INT32_RATE_FRAC
- * sens = 1/14.375 * pi/180 * 4096 = 4.973126
- */
-#if !defined IMU_GYRO_P_SENS & !defined IMU_GYRO_Q_SENS & !defined IMU_GYRO_R_SENS
-#define IMU_GYRO_P_SENS 4.973
-#define IMU_GYRO_P_SENS_NUM 4973
-#define IMU_GYRO_P_SENS_DEN 1000
-#define IMU_GYRO_Q_SENS 4.973
-#define IMU_GYRO_Q_SENS_NUM 4973
-#define IMU_GYRO_Q_SENS_DEN 1000
-#define IMU_GYRO_R_SENS 4.973
-#define IMU_GYRO_R_SENS_NUM 4973
-#define IMU_GYRO_R_SENS_DEN 1000
-#endif
-#if !defined IMU_GYRO_P_NEUTRAL & !defined IMU_GYRO_Q_NEUTRAL & !defined IMU_GYRO_R_NEUTRAL
-#define IMU_GYRO_P_NEUTRAL 0
-#define IMU_GYRO_Q_NEUTRAL 0
-#define IMU_GYRO_R_NEUTRAL 0
-#endif
-
-
-/** default accel sensitivy from the ADXL345 datasheet
- * sensitivity of x & y axes depends on supply voltage:
- * - 256 LSB/g @ 2.5V
- * - 265 LSB/g @ 3.3V
- * z sensitivity stays at 256 LSB/g
- * fixed point sens: 9.81 [m/s^2] / 256 [LSB/g] * 2^INT32_ACCEL_FRAC
- * x/y sens = 9.81 / 265 * 1024 = 37.91
- * z sens = 9.81 / 256 * 1024 = 39.24
- *
- * what about the offset at 3.3V?
- */
-#if !defined IMU_ACCEL_X_SENS & !defined IMU_ACCEL_Y_SENS & !defined IMU_ACCEL_Z_SENS
-#define IMU_ACCEL_X_SENS 37.91
-#define IMU_ACCEL_X_SENS_NUM 3791
-#define IMU_ACCEL_X_SENS_DEN 100
-#define IMU_ACCEL_Y_SENS 37.91
-#define IMU_ACCEL_Y_SENS_NUM 3791
-#define IMU_ACCEL_Y_SENS_DEN 100
-#define IMU_ACCEL_Z_SENS 39.24
-#define IMU_ACCEL_Z_SENS_NUM 39.24
-#define IMU_ACCEL_Z_SENS_DEN 100
-#endif
-#if !defined IMU_ACCEL_X_NEUTRAL & !defined IMU_ACCEL_Y_NEUTRAL & !defined IMU_ACCEL_Z_NEUTRAL
-#define IMU_ACCEL_X_NEUTRAL 0
-#define IMU_ACCEL_Y_NEUTRAL 0
-#define IMU_ACCEL_Z_NEUTRAL 0
-#endif
-
-extern volatile bool gyr_valid;
-extern volatile bool acc_valid;
-
-struct ImuUmarim {
- struct Itg3200 itg;
- struct Adxl345_I2c adxl;
-};
-
-extern struct ImuUmarim imu_umarim;
-
-extern void imu_umarim_init(void);
-extern void imu_umarim_periodic(void);
-extern void imu_umarim_event(void);
-extern void imu_umarim_downlink_raw(void);
-
-#endif // PPZUAVIMU_H
diff --git a/sw/airborne/boards/umarim_1.0.h b/sw/airborne/boards/umarim_1.0.h
deleted file mode 100644
index 42608c8e7b..0000000000
--- a/sw/airborne/boards/umarim_1.0.h
+++ /dev/null
@@ -1,123 +0,0 @@
-#ifndef CONFIG_UMARIM_V1_0_H
-#define CONFIG_UMARIM_V1_0_H
-
-/* Master oscillator freq. */
-#define FOSC (12000000)
-
-/* PLL multiplier */
-#define PLL_MUL (5)
-
-/* CPU clock freq. */
-#define CCLK (FOSC * PLL_MUL)
-
-/* Peripheral bus speed mask 0x00->4, 0x01-> 1, 0x02 -> 2 */
-#define PBSD_BITS 0x02
-#define PBSD_VAL 2
-
-/* Peripheral bus clock freq. */
-#define PCLK (CCLK / PBSD_VAL)
-
-/* Onboard LEDs */
-#ifndef USE_LED_1
-#define USE_LED_1 1
-#endif
-#define LED_1_BANK 1
-#define LED_1_PIN 25
-
-#ifndef USE_LED_2
-#define USE_LED_2 1
-#endif
-#define LED_2_BANK 1
-#define LED_2_PIN 24
-
-/* Default actuators driver */
-#define DEFAULT_ACTUATORS "subsystems/actuators/actuators_4017.h"
-#define ActuatorDefaultSet(_x,_y) Actuator4017Set(_x,_y)
-#define ActuatorsDefaultInit() Actuators4017Init()
-#define ActuatorsDefaultCommit() Actuators4017Commit()
-
-/* P0.5 aka MAT0.1 */
-#define SERVO_CLOCK_PIN 5
-#define SERVO_CLOCK_PINSEL PINSEL0
-#define SERVO_CLOCK_PINSEL_VAL 0x02
-#define SERVO_CLOCK_PINSEL_BIT 10
-/* p1.20 */
-#define SERVO_RESET_PIN 20
-
-/* PPM : rc rx on P0.28 ( CAP0.2 ) */
-#define PPM_PINSEL PINSEL1
-#define PPM_PINSEL_VAL 0x02
-#define PPM_PINSEL_BIT 24
-#define PPM_CRI TIR_CR2I
-#define PPM_CCR_CRF TCCR_CR2_F
-#define PPM_CCR_CRR TCCR_CR2_R
-#define PPM_CCR_CRI TCCR_CR2_I
-#define PPM_CR T0CR2
-
-/* ADC */
-
-#define ADC_0 AdcBank1(5)
-#if USE_ADC_0
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_5
-#endif
-
-#define ADC_1 AdcBank1(4)
-#if USE_ADC_1
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_4
-#endif
-
-#define ADC_2 AdcBank1(3)
-#if USE_ADC_2
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_3
-#endif
-
-#define ADC_3 AdcBank1(2)
-#if USE_ADC_3
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_2
-#endif
-
-
-/* battery */
-/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
-#ifndef ADC_CHANNEL_VSUPPLY
-#define ADC_CHANNEL_VSUPPLY AdcBank0(2)
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_2
-#endif
-
-#define DefaultVoltageOfAdc(adc) (0.0247*adc)
-
-/* SPI (SSP) */
-#define SPI_SELECT_SLAVE0_PORT 0
-#define SPI_SELECT_SLAVE0_PIN 20
-#define SPI_SELECT_SLAVE0_PINSEL PINSEL1
-#define SPI_SELECT_SLAVE0_PINSEL_BIT 8
-#define SPI_SELECT_SLAVE0_PINSEL_VAL 0
-
-#define SPI1_DRDY_PINSEL PINSEL1
-#define SPI1_DRDY_PINSEL_BIT 0
-#define SPI1_DRDY_PINSEL_VAL 1
-#define SPI1_DRDY_EINT 0
-#define SPI1_DRDY_VIC_IT VIC_EINT0
-
-
-/* by default enable onboard baro */
-#ifndef USE_BARO_BOARD
-#define USE_BARO_BOARD 1
-#endif
-
-#endif /* CONFIG_UMARIM_V1_0_H */
diff --git a/sw/airborne/boards/umarim_lite_2.0.h b/sw/airborne/boards/umarim_lite_2.0.h
deleted file mode 100644
index e5a610c03a..0000000000
--- a/sw/airborne/boards/umarim_lite_2.0.h
+++ /dev/null
@@ -1,117 +0,0 @@
-#ifndef CONFIG_UMARIM_LITE_V2_0_H
-#define CONFIG_UMARIM_LITE_V2_0_H
-
-/* Master oscillator freq. */
-#define FOSC (12000000)
-
-/* PLL multiplier */
-#define PLL_MUL (5)
-
-/* CPU clock freq. */
-#define CCLK (FOSC * PLL_MUL)
-
-/* Peripheral bus speed mask 0x00->4, 0x01-> 1, 0x02 -> 2 */
-#define PBSD_BITS 0x02
-#define PBSD_VAL 2
-
-/* Peripheral bus clock freq. */
-#define PCLK (CCLK / PBSD_VAL)
-
-/* Onboard LEDs */
-#ifndef USE_LED_1
-#define USE_LED_1 1
-#endif
-#define LED_1_BANK 1
-#define LED_1_PIN 25
-
-#ifndef USE_LED_2
-#define USE_LED_2 1
-#endif
-#define LED_2_BANK 1
-#define LED_2_PIN 24
-
-/* Default actuators driver */
-#define DEFAULT_ACTUATORS "subsystems/actuators/actuators_4017.h"
-#define ActuatorDefaultSet(_x,_y) Actuator4017Set(_x,_y)
-#define ActuatorsDefaultInit() Actuators4017Init()
-#define ActuatorsDefaultCommit() Actuators4017Commit()
-
-/* P0.5 aka MAT0.1 */
-#define SERVO_CLOCK_PIN 5
-#define SERVO_CLOCK_PINSEL PINSEL0
-#define SERVO_CLOCK_PINSEL_VAL 0x02
-#define SERVO_CLOCK_PINSEL_BIT 10
-/* p1.20 */
-#define SERVO_RESET_PIN 20
-
-/* PPM : rc rx on P0.28 ( CAP0.2 ) */
-#define PPM_PINSEL PINSEL1
-#define PPM_PINSEL_VAL 0x02
-#define PPM_PINSEL_BIT 24
-#define PPM_CRI TIR_CR2I
-#define PPM_CCR_CRF TCCR_CR2_F
-#define PPM_CCR_CRR TCCR_CR2_R
-#define PPM_CCR_CRI TCCR_CR2_I
-#define PPM_CR T0CR2
-
-/* ADC */
-
-#define ADC_0 AdcBank1(5)
-#if USE_ADC_0
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_5
-#endif
-
-#define ADC_1 AdcBank1(4)
-#if USE_ADC_1
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_4
-#endif
-
-#define ADC_2 AdcBank1(3)
-#if USE_ADC_2
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_3
-#endif
-
-#define ADC_3 AdcBank1(2)
-#if USE_ADC_3
-#ifndef USE_AD1
-#define USE_AD1
-#endif
-#define USE_AD1_2
-#endif
-
-
-/* battery */
-/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
-#ifndef ADC_CHANNEL_VSUPPLY
-#define ADC_CHANNEL_VSUPPLY AdcBank0(2)
-#ifndef USE_AD0
-#define USE_AD0
-#endif
-#define USE_AD0_2
-#endif
-
-#define DefaultVoltageOfAdc(adc) (0.0247*adc)
-
-/* SPI (SSP) */
-#define SPI_SELECT_SLAVE0_PORT 0
-#define SPI_SELECT_SLAVE0_PIN 20
-#define SPI_SELECT_SLAVE0_PINSEL PINSEL1
-#define SPI_SELECT_SLAVE0_PINSEL_BIT 8
-#define SPI_SELECT_SLAVE0_PINSEL_VAL 0
-
-#define SPI1_DRDY_PINSEL PINSEL1
-#define SPI1_DRDY_PINSEL_BIT 0
-#define SPI1_DRDY_PINSEL_VAL 1
-#define SPI1_DRDY_EINT 0
-#define SPI1_DRDY_VIC_IT VIC_EINT0
-
-#endif /* CONFIG_UMARIM_LITE_V2_0_H */
diff --git a/sw/airborne/boards/yapa_2.0.h b/sw/airborne/boards/yapa_2.0.h
deleted file mode 100644
index 9fc0a0163c..0000000000
--- a/sw/airborne/boards/yapa_2.0.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "boards/tiny_2.1.h"
-
-
-// ADC / 1023 * 3.3V * (10k + 1k5) / 1k5
-#undef DefaultVoltageOfAdc
-#define DefaultVoltageOfAdc(adc) (0.0247311828*adc)
diff --git a/sw/airborne/firmwares/logger/main_logger.c b/sw/airborne/firmwares/logger/main_logger.c
deleted file mode 100644
index 32f8ab4da9..0000000000
--- a/sw/airborne/firmwares/logger/main_logger.c
+++ /dev/null
@@ -1,610 +0,0 @@
-/*
- * Copyright (C) 2009 Martin Mueller
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/** \file main_logger.c
- * \brief Logger application
- *
- * This collects telemetry received through a serial port and writes that
- * to a (micro) SD card through the efsl library
- */
-
-/* XBee-message: ABCDxxxxxxxE
- A XBEE_START (0x7E)
- B LENGTH_MSB (D->D)
- C LENGTH_LSB
- D XBEE_PAYLOAD
- 0 XBEE_TX16 (0x01) / XBEE_RX16 (0x81)
- 1 FRAME_ID (0) / SRC_ID_MSB
- 2 DEST_ID_MSB / SRC_ID_LSB
- 3 DEST_ID_LSB / XBEE_RSSI
- 4 TX16_OPTIONS (0) / RX16_OPTIONS
- 5 PPRZ_DATA
- 0 SENDER_ID
- 1 MSG_ID
- 2 MSG_PAYLOAD
- . DATA (messages.xml)
- E XBEE_CHECKSUM (sum[A->D])
-
- ID is AC_ID for aircraft, 0x100 for ground station
-*/
-
-/* PPRZ-message: ABCxxxxxxxDE
- A PPRZ_STX (0x99)
- B LENGTH (A->E)
- C PPRZ_DATA
- 0 SENDER_ID
- 1 MSG_ID
- 2 MSG_PAYLOAD
- . DATA (messages.xml)
- D PPRZ_CHECKSUM_A (sum[B->C])
- E PPRZ_CHECKSUM_B (sum[ck_a])
-*/
-
-/* LOG-message: ABCDEFGHxxxxxxxI
- A PPRZ_STX (0x99)
- B LENGTH (H->H)
- C SOURCE (0=uart0, 1=uart1, 2=i2c0, ...)
- D TIMESTAMP_LSB (100 microsec raster)
- E TIMESTAMP
- F TIMESTAMP
- G TIMESTAMP_MSB
- H PPRZ_DATA
- 0 SENDER_ID
- 1 MSG_ID
- 2 MSG_PAYLOAD
- . DATA (messages.xml)
- I CHECKSUM (sum[B->H])
-*/
-
-#include "std.h"
-#include "mcu.h"
-#include "mcu_periph/uart.h"
-#include "mcu_periph/sys_time.h"
-#include "led.h"
-
-#include "usb_msc_hw.h"
-
-#include "efs.h"
-#include "ls.h"
-
-#ifdef USE_MAX11040
-#include "max11040.h"
-#endif
-
-#include "LPC21xx.h"
-
-
-#ifndef FALSE
-#define FALSE 0
-#endif
-#ifndef TRUE
-#define TRUE (!FALSE)
-#endif
-
-#ifndef LOG_STOP_KEY
-/* BUTTON that stops logging (PPM_IN = P0.6, BUTTON = P0.7, DTR = P0.13, INT1 = P0.14) */
-#define LOG_STOP_KEY 7
-#endif
-
-/*
-#ifndef POWER_DETECT_PIN
-// Pin 0.10
-#define POWER_DETECT_PIN 6
-#endif
-
-#ifndef CARD_DETECT_PIN
-// Pin 1.20
-#define CARD_DETECT_PIN 20
-#endif
-*/
-
-#ifndef LED_GREEN
-#define LED_GREEN 3
-#endif
-
-#ifndef LED_YELLOW
-#define LED_YELLOW 2
-#endif
-
-#ifndef LED_RED
-#define LED_RED 1
-#endif
-
-
-/* USB Vbus (= P0.23) */
-#define VBUS_PIN 23
-
-/** Constants for the API protocol */
-#define XBEE_START 0x7e
-#define XBEE_TX16_ID 0x01
-#define TX16_OPTIONS 0x00
-#define NO_FRAME_ID 0
-#define XBEE_RFDATA_OFFSET 5
-#define XBEE_RX16_ID 0x81
-
-/** Status of the API packet receiver automata */
-#define XBEE_UNINIT 0
-#define XBEE_GOT_START 1
-#define XBEE_GOT_LENGTH_MSB 2
-#define XBEE_GOT_LENGTH_LSB 3
-#define XBEE_GOT_PAYLOAD 4
-#define XBEE_PAYLOAD_LEN 256
-
-/** Receiving pprz messages */
-#define STX 0x99
-#define UNINIT 0
-#define GOT_STX 1
-#define GOT_LENGTH 2
-#define GOT_PAYLOAD 3
-#define GOT_CRC1 4
-#define PPRZ_PAYLOAD_LEN 256
-#define PPRZ_DATA_OFFSET 2
-
-/** logging messages **/
-#define LOG_DATA_OFFSET 7
-#define MSG_SIZE 256
-/* logging frequency in Hz */
-#define LOG_FREQ 10000
-/* T0_CLK = PCLK / T0_PCLK_DIV (shall be 15MHz)
- frequency = T0_CLK / LOG_FREQ (10kHz = 100micro seconds) */
-#define LOG_DIV ((PCLK / T0_PCLK_DIV) / LOG_FREQ)
-
-#define LOG_SOURCE_UART0 0
-#define LOG_SOURCE_UART1 1
-#define LOG_SOURCE_I2C0 2
-#define LOG_SOURCE_I2C1 3
-
-static inline void main_init(void);
-static inline void main_periodic_task(void);
-int main_log(void);
-
-void set_filename(unsigned int local, char *name);
-unsigned char checksum(unsigned char start, unsigned char *data, int length);
-unsigned int getclock(void);
-void log_payload(int len, unsigned char source, unsigned int timestamp);
-void log_xbee(unsigned char c, unsigned char source);
-void log_pprz(unsigned char c, unsigned char source);
-int do_log(void);
-
-DirList list;
-EmbeddedFileSystem efs;
-EmbeddedFile filer;
-EmbeddedFile filew;
-
-unsigned char xbeel_payload[XBEE_PAYLOAD_LEN];
-unsigned char pprzl_payload[PPRZ_PAYLOAD_LEN];
-volatile unsigned char xbeel_payload_len;
-volatile unsigned char pprzl_payload_len;
-unsigned char xbeel_error;
-unsigned char pprzl_error;
-unsigned char log_buffer[MSG_SIZE] __attribute__((aligned));
-static unsigned int xbeel_timestamp = 0;
-static unsigned int pprzl_timestamp = 0;
-unsigned int nb_messages = 0;
-unsigned int nb_fail_write = 0;
-int bytes = 0;
-unsigned int clock_msb = 0;
-unsigned int clock_lsb_last = 0;
-
-void set_filename(unsigned int local, char *name)
-{
- /* do not use sprintf or similar */
- int i;
-
- for (i = 7; i >= 0; i--) {
- name[i] = (local % 10) + '0';
- local /= 10;
- }
- name[8] = '.'; name[9] = 't'; name[10] = 'l'; name[11] = 'm'; name[12] = 0;
-}
-
-unsigned char checksum(unsigned char start, unsigned char *data, int length)
-{
- int i;
- unsigned char retval = start;
- for (i = 0; i < length; i++) { retval += data[i]; }
-
- return retval;
-}
-
-unsigned int getclock(void)
-{
- uint64_t clock;
- uint32_t clock_lsb;
-
- clock_lsb = T0TC;
-
- if (clock_lsb < clock_lsb_last) { clock_msb++; }
- clock_lsb_last = clock_lsb;
-
- clock = (((uint64_t)clock_msb << 32) | (uint64_t)clock_lsb) / LOG_DIV;
-
- return (clock & 0xFFFFFFFF);
-}
-
-/** Parsing a frame data and copy the payload to the log buffer */
-void log_payload(int len, unsigned char source, unsigned int timestamp)
-{
- unsigned char chk;
-
- /* start delimiter */
- log_buffer[0] = STX;
-
- /* length is just payload */
- log_buffer[1] = len & 0xFF;
-
- /* source */
- log_buffer[2] = source;
-
- /* add a 32bit timestamp */
- log_buffer[3] = (timestamp) & 0xFF; // LSB first
- log_buffer[4] = (timestamp >> 8) & 0xFF;
- log_buffer[5] = (timestamp >> 16) & 0xFF;
- log_buffer[6] = (timestamp >> 24) & 0xFF;
-
- /* data is already written */
-
- /* calculate checksum over start+length+timestamp+data */
- log_buffer[LOG_DATA_OFFSET + len] = checksum(0, &log_buffer[1], LOG_DATA_OFFSET + len - 1);
-
- /* write data, start+length+timestamp+data+checksum */
- chk = file_write(&filew, LOG_DATA_OFFSET + len + 1, log_buffer);
-
- if (len != chk) {
- nb_fail_write++;
- }
-
- bytes += chk;
- nb_messages++;
-// dl_parse_msg();
-}
-
-/** Parsing a XBee API frame */
-void log_xbee(unsigned char c, unsigned char source)
-{
- static unsigned char xbeel_status = XBEE_UNINIT;
- static unsigned char cs, payload_idx, i;
-
- switch (xbeel_status) {
- case XBEE_UNINIT:
- if (c == XBEE_START) {
- // serial receive broken with MAX
-#ifndef USE_MAX11040
- xbeel_timestamp = getclock();
-#endif
- xbeel_status++;
- }
- break;
- case XBEE_GOT_START:
- xbeel_payload_len = c << 8;
- xbeel_status++;
- break;
- case XBEE_GOT_LENGTH_MSB:
- xbeel_payload_len |= c;
- xbeel_status++;
- payload_idx = 0;
- cs = 0;
- break;
- case XBEE_GOT_LENGTH_LSB:
- xbeel_payload[payload_idx] = c;
- cs += c;
- payload_idx++;
- if (payload_idx == xbeel_payload_len) {
- xbeel_status++;
- }
- break;
- case XBEE_GOT_PAYLOAD:
- if (c + cs != 0xff) {
- goto error;
- }
- if ((xbeel_payload[0] != XBEE_RX16_ID) &&
- (xbeel_payload[0] != XBEE_TX16_ID)) {
- goto error;
- }
- /* copy the XBee message to the logger buffer */
- for (i = 0; i < xbeel_payload_len - XBEE_RFDATA_OFFSET; i++) {
- log_buffer[i + LOG_DATA_OFFSET] = xbeel_payload[i + XBEE_RFDATA_OFFSET];
- }
- // serial receive broken with MAX
-#ifndef USE_MAX11040
- log_payload(xbeel_payload_len - XBEE_RFDATA_OFFSET, source, xbeel_timestamp);
-#endif
- LED_TOGGLE(LED_GREEN);
- goto restart;
- }
- return;
-error:
- xbeel_error++;
-restart:
- xbeel_status = XBEE_UNINIT;
- return;
-}
-
-void log_pprz(unsigned char c, unsigned char source)
-{
- static unsigned char pprzl_status = UNINIT;
- static unsigned char _ck_a, _ck_b, payload_idx, i;
-
- switch (pprzl_status) {
- case UNINIT:
- if (c == STX)
- // serial receive broken with MAX
-#ifndef USE_MAX11040
- pprzl_timestamp = getclock();
-#endif
- pprzl_status++;
- break;
- case GOT_STX:
- pprzl_payload_len = c - 4; /* Counting STX, LENGTH and CRC1 and CRC2 */
- _ck_a = _ck_b = c;
- pprzl_status++;
- payload_idx = 0;
- break;
- case GOT_LENGTH:
- pprzl_payload[payload_idx] = c;
- _ck_a += c; _ck_b += _ck_a;
- payload_idx++;
- if (payload_idx == pprzl_payload_len) {
- pprzl_status++;
- }
- break;
- case GOT_PAYLOAD:
- if (c != _ck_a) {
- goto error;
- }
- pprzl_status++;
- break;
- case GOT_CRC1:
- if (c != _ck_b) {
- goto error;
- }
- /* copy the pprz message to the logger buffer */
- for (i = 0; i < pprzl_payload_len; i++) {
- log_buffer[i + LOG_DATA_OFFSET] = pprzl_payload[i];
- }
- // serial receive broken with MAX
-#ifndef USE_MAX11040
- log_payload(pprzl_payload_len, source, pprzl_timestamp);
-#endif
- LED_TOGGLE(LED_GREEN);
- goto restart;
- }
- return;
-error:
- pprzl_error++;
-restart:
- pprzl_status = UNINIT;
- return;
-}
-
-int do_log(void)
-{
- unsigned int count;
- unsigned char name[13];
- unsigned char inc;
- int temp;
-
- if (efs_init(&efs, 0) != 0) {
- return (-1);
- }
-
- /* find an unused file number the dumb way */
- for (count = 1; count < 0xFFFFFFF; count++) {
- set_filename(count, name);
- if (file_fopen(&filer, &efs.myFs, name, 'r') != 0) { break; }
- file_fclose(&filer);
- }
-
- if (file_fopen(&filew, &efs.myFs, name, 'w') != 0) {
- return (-1);
- }
-
- /* write to SD until key is pressed */
- while ((IO0PIN & (1 << LOG_STOP_KEY)) >> LOG_STOP_KEY) {
-
-#ifdef USE_MAX11040
- if ((max11040_data == MAX11040_DATA_AVAILABLE) &&
- (max11040_buf_in != max11040_buf_out)) {
- // LED_TOGGLE(LED_GREEN);
- int i;
-
- max11040_data = MAX11040_IDLE;
-
- log_buffer[LOG_DATA_OFFSET + 0] = AC_ID; // sender_id
- log_buffer[LOG_DATA_OFFSET + 1] = 61; // message_id (DL_TURB_PRESSURE_RAW)
-
- while (max11040_buf_in != max11040_buf_out) {
- for (i = 0; i < 16; i++) {
- log_buffer[LOG_DATA_OFFSET + 2 + i * 4 + 0] = (max11040_values[max11040_buf_out][i]) & 0xFF;
- log_buffer[LOG_DATA_OFFSET + 2 + i * 4 + 1] = (max11040_values[max11040_buf_out][i] >> 8) & 0xFF;
- log_buffer[LOG_DATA_OFFSET + 2 + i * 4 + 2] = (max11040_values[max11040_buf_out][i] >> 16) & 0xFF;
- log_buffer[LOG_DATA_OFFSET + 2 + i * 4 + 3] = (max11040_values[max11040_buf_out][i] >> 24) & 0xFF;
-
- }
- log_payload(2 + 16 * 4, LOG_SOURCE_UART0, max11040_timestamp[max11040_buf_out]);
- i = max11040_buf_out + 1;
- if (i >= MAX11040_BUF_SIZE) { i = 0; }
- max11040_buf_out = i;
- }
- }
-#endif
-
-#if USE_UART0
- temp = 0;
- while (uart_char_available(&uart0) && (temp++ < 128)) {
- // LED_TOGGLE(LED_GREEN);
- inc = uart_getch(&uart1);
-#ifdef LOG_XBEE
- log_xbee(inc, LOG_SOURCE_UART0);
-#else
-#ifdef LOG_PPRZ
- log_pprz(inc, LOG_SOURCE_UART0);
-#else
-#error no log transport protocol selected
-#endif
-#endif
- }
-#endif
-#if USE_UART1
- temp = 0;
- while (uart_char_available(&uart1) && (temp++ < 128)) {
- // LED_TOGGLE(LED_GREEN);
- inc = uart_getch(&uart1);
-#ifdef LOG_XBEE
- log_xbee(inc, LOG_SOURCE_UART1);
-#else
-#ifdef LOG_PPRZ
- log_pprz(inc, LOG_SOURCE_UART1);
-#else
-#error no log transport protocol selected
-#endif
-#endif
- }
-#endif
- }
- LED_OFF(LED_GREEN);
-
- file_fclose(&filew);
- fs_umount(&efs.myFs) ;
-
- return 0;
-}
-
-int main(void)
-{
- int waitloop, ledcount;
- main_init();
-
-#ifdef _DEBUG_BOARD_
- while (1) {
- if (IO0PIN & (1 << LOG_STOP_KEY)) {
- LED_ON(LED_YELLOW);
- } else {
- LED_OFF(LED_YELLOW);
- }
-
- if (IO1PIN & (1 << CARD_DETECT_PIN)) {
- LED_OFF(LED_GREEN);
- } else {
- LED_ON(LED_GREEN);
- }
-
- if (IO0PIN & (1 << POWER_DETECT_PIN))
-// if (IO0PIN & (1 << VBUS_PIN))
- {
- LED_ON(LED_RED);
- } else {
- LED_OFF(LED_RED);
- }
- }
-#endif
-
-
-#ifdef _DEBUG_BOARD_
- while (1) {
- if (IO0PIN & (1 << LOG_STOP_KEY)) {
- LED_ON(LED_YELLOW);
- } else {
- LED_OFF(LED_YELLOW);
- }
-
- if (IO1PIN & (1 << CARD_DETECT_PIN)) {
- LED_OFF(LED_GREEN);
- } else {
- LED_ON(LED_GREEN);
- }
-
- if (IO0PIN & (1 << POWER_DETECT_PIN))
-// if (IO0PIN & (1 << VBUS_PIN))
- {
- LED_ON(LED_RED);
- } else {
- LED_OFF(LED_RED);
- }
- }
-#endif
-
- // Direct SD Reader Mode
- if ((IO0PIN & _BV(VBUS_PIN)) >> VBUS_PIN) {
- LED_OFF(LED_YELLOW);
- LED_ON(LED_RED);
- main_mass_storage();
- }
-
- while (1) {
- LED_ON(LED_YELLOW);
- do_log();
- LED_OFF(LED_YELLOW);
-
- waitloop = 0;
- ledcount = 0;
-
- while (waitloop < 20) {
- sys_time_usleep(100000);
-
- {
- if (ledcount++ > 9) {
- ledcount = 0;
- LED_ON(LED_YELLOW);
- } else {
- LED_OFF(LED_YELLOW);
- }
- if (((IO0PIN & _BV(LOG_STOP_KEY)) >> LOG_STOP_KEY) == 1) {
- waitloop = 0;
- } else {
- waitloop++;
- }
- }
-
- if ((IO0PIN & _BV(VBUS_PIN)) >> VBUS_PIN) {
- LED_OFF(LED_YELLOW);
- LED_ON(LED_RED);
- main_mass_storage();
- }
- }
- LED_ON(LED_YELLOW);
- while (((IO0PIN & _BV(LOG_STOP_KEY)) >> LOG_STOP_KEY) == 0);
- }
-
- return 0;
-}
-
-static inline void main_init(void)
-{
- mcu_init();
- sys_time_init();
- led_init();
-
-
-#ifdef USE_MAX11040
- max11040_init_ssp();
- max11040_init();
-#endif
-
- mcu_int_enable();
-
- PINSEL2 = ~(0x0c);
-}
-
-static inline void main_periodic_task(void)
-{
-}
diff --git a/sw/airborne/firmwares/motor_bench/main_motor_bench.c b/sw/airborne/firmwares/motor_bench/main_motor_bench.c
deleted file mode 100644
index 438e4500c6..0000000000
--- a/sw/airborne/firmwares/motor_bench/main_motor_bench.c
+++ /dev/null
@@ -1,132 +0,0 @@
-
-#include "std.h"
-#include "mcu.h"
-#include "mcu_periph/sys_time.h"
-#include "led.h"
-#include "mb_tacho.h"
-#include "mb_servo.h"
-#include "i2c.h"
-#include "mb_twi_controller_asctech.h"
-//#include "mb_twi_controller_mkk.h"
-#include "mb_current.h"
-#include "mb_scale.h"
-
-
-#include "mcu_periph/uart.h"
-#include "pprzlink/messages.h"
-#include "subsystems/datalink/downlink.h"
-
-#include "generated/settings.h"
-
-
-#include "mb_modes.h"
-//#include "mb_static.h"
-
-static inline void main_init(void);
-static inline void main_periodic_task(void);
-static inline void main_event_task(void);
-
-static inline void main_dl_parse_msg(void);
-
-int main(void)
-{
- main_init();
- while (1) {
- if (sys_time_check_and_ack_timer(0)) {
- main_periodic_task();
- }
- main_event_task();
- }
- return 0;
-}
-
-static inline void main_init(void)
-{
-
- mcu_init();
- sys_time_register_timer((1. / PERIODIC_FREQUENCY), NULL);
- mb_tacho_init();
-
-#if defined USE_TWI_CONTROLLER
- i2c0_init();
- mb_twi_controller_init();
-#endif
-
- mb_servo_init();
- mb_servo_set_range(1090000, 1910000);
-
- mb_current_init();
- mb_scale_init();
-
- uart0_init();
- mb_mode_init();
-
- mcu_int_enable();
-}
-
-static inline void main_periodic_task(void)
-{
- float rpm = mb_tacho_get_averaged();
- mb_current_periodic();
- float amps = mb_current_amp;
- float thrust = mb_scale_thrust;
- float torque = 0.;
-
- mb_mode_periodic(rpm, thrust, amps);
-
- float throttle = mb_modes_throttle;
-
-#if defined USE_TWI_CONTROLLER
- mb_twi_controller_set(throttle);
-#endif
- mb_servo_set(throttle);
-
-
- RunOnceEvery(125, {
- DOWNLINK_SEND_ALIVE(DefaultChannel, DefaultDevice, 16, MD5SUM);
- PeriodicSendDlValue(DefaultChannel);
- });
- uint16_t time_secs = sys_time.nb_sec;
- DOWNLINK_SEND_MOTOR_BENCH_STATUS(DefaultChannel, DefaultDevice, &sys_time.nb_sec_rem, &throttle, &rpm, &s , &thrust,
- &torque, &time_secs, &mb_modes_mode);
-
-
-
-
-}
-
-static inline void main_event_task(void)
-{
- if (PprzBuffer()) {
- ReadPprzBuffer();
- if (pprz_msg_received) {
- pprz_parse_payload();
- pprz_msg_received = false;
- }
- }
- if (dl_msg_available) {
- main_dl_parse_msg();
- dl_msg_available = false;
- }
-}
-
-bool dl_msg_available;
-
-#define MSG_SIZE 256
-uint8_t dl_buffer[MSG_SIZE] __attribute__((aligned));
-
-
-#define IdOfMsg(x) (x[1])
-
-static inline void main_dl_parse_msg(void)
-{
- uint8_t msg_id = IdOfMsg(dl_buffer);
- // if (msg_id == DL_PING) {}
- if (msg_id == DL_SETTING) {
- LED_TOGGLE(1);
- uint8_t i = DL_SETTING_index(dl_buffer);
- float var = DL_SETTING_value(dl_buffer);
- DlSetting(i, var);
- DOWNLINK_SEND_DL_VALUE(DefaultChannel, DefaultDevice, &i, &var);
- }
-}
diff --git a/sw/airborne/firmwares/motor_bench/main_turntable.c b/sw/airborne/firmwares/motor_bench/main_turntable.c
deleted file mode 100644
index 86d28b29de..0000000000
--- a/sw/airborne/firmwares/motor_bench/main_turntable.c
+++ /dev/null
@@ -1,83 +0,0 @@
-#include "std.h"
-#include "mcu.h"
-#include "mcu_periph/sys_time.h"
-#include "led.h"
-#include "mcu_periph/usb_serial.h"
-#include "mcu_periph/uart.h"
-#include "mcu_arch.h"
-
-#include "pprzlink/messages.h"
-#include "subsystems/datalink/downlink.h"
-
-#include "armVIC.h"
-
-#ifndef NB_STEP
-#define NB_STEP 256
-#endif
-
-static inline void main_init(void);
-static inline void main_periodic(void);
-static inline void main_event(void);
-
-static inline void main_init_tacho(void);
-uint32_t lp_pulse;
-uint32_t nb_pulse = 0;
-static float omega_rad;
-
-
-int main(void)
-{
- main_init();
- while (1) {
- if (sys_time_check_and_ack_timer(0)) {
- main_periodic();
- }
- main_event();
- }
- return 0;
-}
-
-static inline void main_init(void)
-{
- mcu_init();
- sys_time_register_timer(1. / PERIODIC_FREQUENCY, NULL);
- main_init_tacho();
- mcu_int_enable();
-}
-
-static inline void main_periodic(void)
-{
-
- RunOnceEvery(50, {
- const float tach_to_rpm = 15000000.*2 * M_PI / (float)NB_STEP;
- omega_rad = tach_to_rpm / lp_pulse;
- DOWNLINK_SEND_IMU_TURNTABLE(DefaultChannel, DefaultDevice, &omega_rad);
- }
- // float foo = nb_pulse;
- // DOWNLINK_SEND_IMU_TURNTABLE(DefaultChannel, DefaultDevice, &foo);}
- );
- RunOnceEvery(100, {DOWNLINK_SEND_ALIVE(DefaultChannel, DefaultDevice, 16, MD5SUM);});
-
-}
-
-
-static inline void main_event(void)
-{
-
-}
-
-
-
-
-/* INPUT CAPTURE CAP0.0 on P0.22*/
-#define TT_TACHO_PINSEL PINSEL1
-#define TT_TACHO_PINSEL_VAL 0x02
-#define TT_TACHO_PINSEL_BIT 12
-
-static inline void main_init_tacho(void)
-{
- /* select pin for capture */
- TT_TACHO_PINSEL |= TT_TACHO_PINSEL_VAL << TT_TACHO_PINSEL_BIT;
- /* enable capture 0.2 on falling edge + trigger interrupt */
- T0CCR |= TCCR_CR0_F | TCCR_CR0_I;
-}
diff --git a/sw/airborne/firmwares/motor_bench/mb_current.c b/sw/airborne/firmwares/motor_bench/mb_current.c
deleted file mode 100644
index e3f1425b3e..0000000000
--- a/sw/airborne/firmwares/motor_bench/mb_current.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#include "mb_current.h"
-
-#include "mcu_periph/adc.h"
-
-static struct adc_buf mb_current_buf;
-
-float mb_current_amp;
-
-void mb_current_init(void)
-{
- adc_buf_channel(4, &mb_current_buf, 16);
-
-}
-
-
-void mb_current_periodic(void)
-{
- mb_current_amp = (float)mb_current_buf.sum * 0.00113607 - 2.8202;
-}
diff --git a/sw/airborne/firmwares/motor_bench/mb_current.h b/sw/airborne/firmwares/motor_bench/mb_current.h
deleted file mode 100644
index cd911455ea..0000000000
--- a/sw/airborne/firmwares/motor_bench/mb_current.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef MB_CURRENT_H
-#define MB_CURRENT_H
-
-#include "std.h"
-
-extern void mb_current_init(void);
-extern void mb_current_periodic(void);
-
-extern float mb_current_amp;
-
-#endif /* MB_CURRENT_H */
diff --git a/sw/airborne/firmwares/motor_bench/mb_modes.c b/sw/airborne/firmwares/motor_bench/mb_modes.c
deleted file mode 100644
index f7644edd75..0000000000
--- a/sw/airborne/firmwares/motor_bench/mb_modes.c
+++ /dev/null
@@ -1,124 +0,0 @@
-#include "mb_modes.h"
-
-//#include "mb_static.h"
-
-#include "mcu_periph/adc.h"
-#include "mcu_periph/sys_time.h"
-
-
-uint8_t mb_modes_mode;
-float mb_modes_throttle;
-
-float mb_modes_last_change_time;
-
-float mb_modes_ramp_duration;
-
-float mb_modes_step_low_throttle;
-float mb_modes_step_high_throttle;
-float mb_modes_step_duration;
-
-float mb_modes_sine_freq;
-float mb_modes_sine_mean;
-float mb_modes_sine_ampl;
-
-static void mb_modes_manual(void);
-static void mb_modes_ramp(void);
-static void mb_modes_step(void);
-static void mb_modes_prbs(void);
-static void mb_modes_sine(void);
-
-static struct adc_buf mb_modes_adc_buf; /* manual mode */
-
-void mb_mode_init(void)
-{
- adc_buf_channel(1, &mb_modes_adc_buf, 16);
- mb_modes_mode = MB_MODES_IDLE;
- mb_modes_throttle = 0.;
-
- mb_modes_ramp_duration = 200;
-
- mb_modes_step_low_throttle = 0.48;
- mb_modes_step_high_throttle = 0.65;
- mb_modes_step_duration = 0.5;
-
- mb_modes_sine_freq = 80.;
- mb_modes_sine_mean = 0.5;
- mb_modes_sine_ampl = 0.1;
-
- // mb_static_init();
-
-}
-
-void mb_mode_event(void) {}
-
-void mb_mode_periodic(float rpm, float thrust, float current)
-{
- switch (mb_modes_mode) {
- case MB_MODES_IDLE :
- mb_modes_throttle = 0.;
- break;
- case MB_MODES_MANUAL :
- mb_modes_manual();
- break;
- case MB_MODES_RAMP :
- // mb_static_periodic(rpm, thrust, current);
- // mb_modes_throttle = (float)mb_static_throttle / (float)MB_STATIC_MAX_THROTTLE;
- mb_modes_ramp();
- break;
- case MB_MODES_STEP :
- mb_modes_step();
- break;
- case MB_MODES_SINE :
- mb_modes_sine();
- break;
- // case MB_MODES_FIXED_RPM :
- // mb_mode_fixed_rpm_periodic(rpm, thrust, current);
- // mb_modes_throttle = mb_mode_fixed_rpm_throttle;
- // break;
- default:
- mb_modes_throttle = 0.;
- }
-}
-
-
-static void mb_modes_manual(void)
-{
- uint16_t poti = mb_modes_adc_buf.sum;
- mb_modes_throttle = (float)poti / (16.*1024.);
-}
-
-static void mb_modes_ramp(void)
-{
- float now = get_sys_time_float();
- float elapsed = now - mb_modes_last_change_time;
- if (elapsed < mb_modes_ramp_duration) {
- mb_modes_throttle = elapsed / mb_modes_ramp_duration;
- } else if (elapsed < 2 * mb_modes_ramp_duration) {
- mb_modes_throttle = 2 - elapsed / mb_modes_ramp_duration;
- } else {
- mb_modes_last_change_time = now;
- mb_modes_throttle = 0.;
- }
-}
-
-
-static void mb_modes_step(void)
-{
- float now = get_sys_time_float();
- float elapsed = now - mb_modes_last_change_time;
- if (elapsed < mb_modes_step_duration) {
- mb_modes_throttle = mb_modes_step_low_throttle;
- } else if (elapsed < 2 * mb_modes_step_duration) {
- mb_modes_throttle = mb_modes_step_high_throttle;
- } else {
- mb_modes_last_change_time = now;
- mb_modes_throttle = mb_modes_step_low_throttle;
- }
-}
-
-static void mb_modes_sine(void)
-{
- float now = get_sys_time_float();
- float alpha = 2. * M_PI * mb_modes_sine_freq * now;
- mb_modes_throttle = mb_modes_sine_mean + mb_modes_sine_ampl * sin(alpha);
-}
diff --git a/sw/airborne/firmwares/motor_bench/mb_modes.h b/sw/airborne/firmwares/motor_bench/mb_modes.h
deleted file mode 100644
index ac952b4c3f..0000000000
--- a/sw/airborne/firmwares/motor_bench/mb_modes.h
+++ /dev/null
@@ -1,41 +0,0 @@
-#ifndef MB_MODES_H
-#define MB_MODES_H
-
-#include "std.h"
-
-//#include "mb_mode_fixed_rpm.h"
-
-#define MB_MODES_IDLE 0
-#define MB_MODES_MANUAL 1
-#define MB_MODES_RAMP 2
-#define MB_MODES_STEP 3
-#define MB_MODES_PRBS 4
-#define MB_MODES_SINE 5
-#define MB_MODES_FIXED_RPM 6
-
-extern uint8_t mb_modes_mode;
-extern float mb_modes_throttle;
-
-extern float mb_modes_last_change_time;
-
-extern float mb_modes_ramp_duration;
-
-extern float mb_modes_step_low_throttle;
-extern float mb_modes_step_high_throttle;
-extern float mb_modes_step_duration;
-
-
-extern void mb_mode_init(void);
-extern void mb_mode_event(void);
-extern void mb_mode_periodic(float rpm, float thrust, float current);
-
-#define mb_modes_SetMode(_val) { \
- mb_modes_mode = _val; \
- mb_modes_last_change_time = get_sys_time_float(); \
- /*if (mb_modes_mode == MB_MODES_RAMP) \
- mb_static_init(); \
- if (mb_modes_mode == MB_MODES_FIXED_RPM) \
- mb_mode_fixed_rpm_init();*/ \
- }
-
-#endif /* MB_MODES_H */
diff --git a/sw/airborne/firmwares/motor_bench/mb_scale.c b/sw/airborne/firmwares/motor_bench/mb_scale.c
deleted file mode 100644
index ca4245241e..0000000000
--- a/sw/airborne/firmwares/motor_bench/mb_scale.c
+++ /dev/null
@@ -1,20 +0,0 @@
-#include "mb_scale.h"
-
-volatile uint32_t mb_scale_pulse_len;
-volatile float mb_scale_thrust;
-volatile float mb_scale_torque;
-
-volatile uint32_t mb_scale_neutral = 2892000; //2944640;
-float mb_scale_gain = 0.0018584; //1;
-volatile uint8_t mb_scale_calib;
-
-void mb_scale_init(void)
-{
- /* select pin for capture */
- ICP_PINSEL |= ICP_PINSEL_VAL << ICP_PINSEL_BIT;
- /* enable capture 0.3 on falling edge + trigger interrupt */
- T0CCR |= TCCR_CR3_F | TCCR_CR3_I;
- mb_scale_thrust = 0.;
- mb_scale_torque = 0.;
- mb_scale_calib = 0;
-}
diff --git a/sw/airborne/firmwares/motor_bench/mb_scale.h b/sw/airborne/firmwares/motor_bench/mb_scale.h
deleted file mode 100644
index 37f91cdaa8..0000000000
--- a/sw/airborne/firmwares/motor_bench/mb_scale.h
+++ /dev/null
@@ -1,51 +0,0 @@
-#ifndef MB_SCALE_H
-#define MB_SCALE_H
-
-#include "std.h"
-#include "LPC21xx.h"
-
-/* P0.29 CAP0.3 */
-#define ICP_PINSEL PINSEL1
-#define ICP_PINSEL_VAL 0x02
-#define ICP_PINSEL_BIT 26
-
-extern volatile uint32_t mb_scale_pulse_len;
-extern volatile float mb_scale_thrust;
-extern volatile float mb_scale_torque;
-
-extern volatile uint32_t mb_scale_neutral;
-extern float mb_scale_gain;
-extern volatile uint8_t mb_scale_calib;
-
-#define MB_SCALE_NB_CALIB 50
-
-
-void mb_scale_init(void);
-
-#define MB_SCALE_IT TIR_CR3I
-#define MB_SCALE_ICP_ISR() { \
- static uint32_t last; \
- uint32_t now = T0CR3; \
- mb_scale_pulse_len = now - last; \
- last = now; \
- if (mb_scale_calib > 0) { \
- mb_scale_thrust += mb_scale_pulse_len; \
- if (mb_scale_calib >= MB_SCALE_NB_CALIB) { \
- mb_scale_neutral = mb_scale_thrust / MB_SCALE_NB_CALIB; \
- mb_scale_calib = 0; \
- } \
- else \
- mb_scale_calib++; \
- } \
- else { \
- int32_t diff = (int32_t)mb_scale_pulse_len - (int32_t)mb_scale_neutral; \
- mb_scale_thrust = mb_scale_gain * diff; \
- } \
- }
-
-#define mb_scale_Calib(_val) { \
- mb_scale_calib = 1; \
- mb_scale_thrust = 0.; \
- }
-
-#endif /* MB_SCALE_H */
diff --git a/sw/airborne/firmwares/motor_bench/mb_servo.c b/sw/airborne/firmwares/motor_bench/mb_servo.c
deleted file mode 100644
index b8d9d62dc8..0000000000
--- a/sw/airborne/firmwares/motor_bench/mb_servo.c
+++ /dev/null
@@ -1,72 +0,0 @@
-#include "mb_servo.h"
-
-#include "mcu_periph/sys_time.h"
-#define MY_NB_CLOCK_TIMER_PWM(time_us) cpu_ticks_of_usec(time_us)
-
-uint32_t mb_servo_max_pulse_ns, mb_servo_min_pulse_ns;
-
-void mb_servo_set_ns(uint32_t duration_ns);
-
-void mb_servo_init(void)
-{
- /* set P0.21 as PWM5 output */
- PINSEL1 |= (0X01 << 10);
- /* enable and select the type of PWM channel */
- PWMPCR |= PWMPCR_ENA5;
- /* set Match0 value (refresh rate) */
- PWMMR0 = MY_NB_CLOCK_TIMER_PWM(5000);
- /* commit PWMMRx changes */
- PWMLER = PWMLER_LATCH0;
- /* enable PWM timer in PWM mode */
- PWMTCR = PWMTCR_COUNTER_ENABLE | PWMTCR_PWM_ENABLE;
- mb_servo_min_pulse_ns = MIN_SERVO_NS;
- mb_servo_max_pulse_ns = MAX_SERVO_NS;
-}
-
-void mb_servo_set_range(uint32_t min_pulse_ns, uint32_t max_pulse_ns)
-{
- mb_servo_min_pulse_ns = min_pulse_ns;
- mb_servo_max_pulse_ns = max_pulse_ns;
-}
-
-void mb_servo_set_us(uint32_t duration_us)
-{
- /* set Match5 value (pulse duration )*/
- PWMMR5 = MY_NB_CLOCK_TIMER_PWM(duration_us);
- /* commit PWMMRx changes */
- PWMLER = PWMLER_LATCH5;
-}
-
-void mb_servo_set_ns(uint32_t duration_ns)
-{
- /* set Match5 value (pulse duration )*/
- PWMMR5 = cpu_ticks_of_nsec(duration_ns);
- /* commit PWMMRx changes */
- PWMLER = PWMLER_LATCH5;
-}
-
-/* normalized throttle between 0. and 1. */
-void mb_servo_set(float throttle)
-{
- uint32_t range = mb_servo_max_pulse_ns - mb_servo_min_pulse_ns;
- uint32_t pulse_ns = mb_servo_min_pulse_ns + throttle * (range);
- mb_servo_set_ns(pulse_ns);
-}
-
-#define FOO_DELAY() { \
- uint32_t foo = 0; \
- while (foo<10000000) foo++; \
- }
-
-
-/* arm the brushless controller */
-
-void mb_servo_arm(void)
-{
- mb_servo_set(0.);
- FOO_DELAY();
- mb_servo_set(1.);
- FOO_DELAY();
- mb_servo_set(0.);
-}
-
diff --git a/sw/airborne/firmwares/motor_bench/mb_servo.h b/sw/airborne/firmwares/motor_bench/mb_servo.h
deleted file mode 100644
index 075a272a52..0000000000
--- a/sw/airborne/firmwares/motor_bench/mb_servo.h
+++ /dev/null
@@ -1,19 +0,0 @@
-
-#ifndef MB_SERVO_H
-#define MB_SERVO_H
-
-#include "std.h"
-
-#define MIN_SERVO_US 1000
-#define MAX_SERVO_US 2000
-#define MIN_SERVO_NS 1000000
-#define MAX_SERVO_NS 2000000
-#define RANGE_SERVO_US (MAX_SERVO_US - MIN_SERVO_US)
-
-void mb_servo_init(void);
-void mb_servo_set_range(uint32_t min_pulse_ns, uint32_t max_pulse_ns);
-void mb_servo_set_us(uint32_t duration_us);
-//void mb_servo_set_ns(uint32_t duration_ns);
-void mb_servo_set(float throttle);
-void mb_servo_arm(void);
-#endif /* MB_SERVO_H */
diff --git a/sw/airborne/firmwares/motor_bench/mb_tacho.c b/sw/airborne/firmwares/motor_bench/mb_tacho.c
deleted file mode 100644
index 02fb07af7d..0000000000
--- a/sw/airborne/firmwares/motor_bench/mb_tacho.c
+++ /dev/null
@@ -1,65 +0,0 @@
-#include "mb_tacho.h"
-
-#include "LPC21xx.h"
-
-#include "mcu.h"
-
-volatile uint32_t mb_tacho_duration;
-volatile uint8_t got_one_pulse;
-volatile float mb_tacho_averaged;
-volatile uint16_t mb_tacho_nb_pulse;
-
-/* INPUT CAPTURE CAP0.0 on P0.22*/
-#define MB_TACHO_PINSEL PINSEL1
-#define MB_TACHO_PINSEL_VAL 0x02
-#define MB_TACHO_PINSEL_BIT 12
-
-#define MB_TACHO_NB_SLOT 65
-//#define MB_TACHO_NB_SLOT 36
-
-void mb_tacho_init(void)
-{
- /* select pin for capture */
- MB_TACHO_PINSEL |= MB_TACHO_PINSEL_VAL << MB_TACHO_PINSEL_BIT;
- /* enable capture 0.2 on falling edge + trigger interrupt */
- T0CCR |= TCCR_CR0_F | TCCR_CR0_I;
-}
-
-uint32_t mb_tacho_get_duration(void)
-{
- int_disable();
- uint32_t my_duration = 0;
- if (got_one_pulse) {
- my_duration = mb_tacho_duration;
- }
- got_one_pulse = false;
- mcu_int_enable();
- return my_duration;
-}
-
-float mb_tacho_get_averaged(void)
-{
-
- int_disable();
- float ret;
- float tacho;
- const float tach_to_rpm = 15000000.*60. / (float)MB_TACHO_NB_SLOT;
- if (mb_tacho_nb_pulse) {
- tacho = mb_tacho_averaged / (float)mb_tacho_nb_pulse ;
- } else {
- tacho = 0.;
- }
-
- if (tacho == 0) {
- ret = 0;
- } else {
- ret = tach_to_rpm / tacho;
- }
-
- mb_tacho_averaged = 0.;
- mb_tacho_nb_pulse = 0;
- mcu_int_enable();
-
- return ret;
-
-}
diff --git a/sw/airborne/firmwares/motor_bench/mb_tacho.h b/sw/airborne/firmwares/motor_bench/mb_tacho.h
deleted file mode 100644
index bd1bcc341b..0000000000
--- a/sw/airborne/firmwares/motor_bench/mb_tacho.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef MB_TACHO_H
-#define MB_TACHO_H
-
-#include "std.h"
-
-extern void mb_tacho_init(void);
-extern uint32_t mb_tacho_get_duration(void);
-extern float mb_tacho_get_averaged(void);
-
-extern volatile uint32_t mb_tacho_duration;
-extern volatile uint8_t got_one_pulse;
-extern volatile float mb_tacho_averaged;
-extern volatile uint16_t mb_tacho_nb_pulse;
-
-#define MB_TACHO_IT TIR_CR0I
-#define MB_TACHO_ISR() { \
- static uint32_t tmb_last; \
- uint32_t t_now = T0CR0; \
- uint32_t diff = t_now - tmb_last; \
- mb_tacho_duration = diff; \
- mb_tacho_averaged += diff; \
- mb_tacho_nb_pulse++; \
- tmb_last = t_now; \
- got_one_pulse = true; \
- }
-
-#endif /* MB_TACHO_H */
diff --git a/sw/airborne/firmwares/motor_bench/mb_twi_controller.c b/sw/airborne/firmwares/motor_bench/mb_twi_controller.c
deleted file mode 100644
index 30722eac96..0000000000
--- a/sw/airborne/firmwares/motor_bench/mb_twi_controller.c
+++ /dev/null
@@ -1,33 +0,0 @@
-#include "mb_twi_controller.h"
-
-#include
-
-#include "i2c.h"
-
-uint16_t mb_twi_command;
-
-uint8_t mb_twi_nb_overun;
-uint8_t mb_twi_i2c_done;
-
-
-void mb_twi_controller_init(void)
-{
- mb_twi_nb_overun = 0;
- mb_twi_i2c_done = true;
-}
-
-void mb_twi_controller_set(float throttle)
-{
-
- LED_TOGGLE(1);
-
- if (mb_twi_i2c_done) {
- mb_twi_command = throttle * MB_TWI_CONTROLLER_MAX_CMD;
- i2c_buf[0] = (uint8_t)(mb_twi_command & 0xFF);
- i2c_buf[1] = (uint8_t)(mb_twi_command >> 8);
- i2c_transmit(MB_TWI_CONTROLLER_ADDR, 2, &mb_twi_i2c_done);
- } else {
- mb_twi_nb_overun++;
- }
-
-}
diff --git a/sw/airborne/firmwares/motor_bench/mb_twi_controller.h b/sw/airborne/firmwares/motor_bench/mb_twi_controller.h
deleted file mode 100644
index 01c333df00..0000000000
--- a/sw/airborne/firmwares/motor_bench/mb_twi_controller.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef MB_TWI_CONTROLLER_H
-#define MB_TWI_CONTROLLER_H
-
-#include "std.h"
-
-extern void mb_twi_controller_init(void);
-
-extern void mb_twi_controller_set(float throttle);
-
-#define MB_TWI_CONTROLLER_MAX_CMD 65535
-/*
- Slave address
- front = 0x52
- back = 0x54
- right = 0x56
- left = 0x58
-*/
-#define MB_TWI_CONTROLLER_ADDR 0x52
-
-#endif /* MB_TWI_CONTROLLER_H */
-
-
diff --git a/sw/airborne/firmwares/motor_bench/mb_twi_controller_asctech.c b/sw/airborne/firmwares/motor_bench/mb_twi_controller_asctech.c
deleted file mode 100644
index e23f4e8aa9..0000000000
--- a/sw/airborne/firmwares/motor_bench/mb_twi_controller_asctech.c
+++ /dev/null
@@ -1,94 +0,0 @@
-//#include "mb_twi_controller.h"
-#include "mb_twi_controller_asctech.h"
-
-#include "i2c.h"
-
-#include "led.h"
-
-bool mb_twi_controller_asctech_command;
-uint8_t mb_twi_controller_asctech_command_type;
-
-#define MB_TWI_CONTROLLER_ASCTECH_ADDR_FRONT 0
-#define MB_TWI_CONTROLLER_ASCTECH_ADDR_BACK 1
-#define MB_TWI_CONTROLLER_ASCTECH_ADDR_LEFT 2
-#define MB_TWI_CONTROLLER_ASCTECH_ADDR_RIGHT 3
-uint8_t mb_twi_controller_asctech_addr;
-uint8_t mb_twi_controller_asctech_new_addr;
-
-uint8_t mb_twi_nb_overun;
-uint8_t mb_twi_i2c_done;
-
-
-#define MB_TWI_CONTROLLER_MAX_CMD 200
-#define MB_TWI_CONTROLLER_ADDR 0x02
-
-void mb_twi_controller_init(void)
-{
- mb_twi_nb_overun = 0;
- mb_twi_i2c_done = true;
- mb_twi_controller_asctech_command = false;
- mb_twi_controller_asctech_command_type = MB_TWI_CONTROLLER_COMMAND_NONE;
- mb_twi_controller_asctech_addr = MB_TWI_CONTROLLER_ASCTECH_ADDR_FRONT;
-}
-
-void mb_twi_controller_set(float throttle)
-{
-
- if (mb_twi_i2c_done) {
- if (mb_twi_controller_asctech_command) {
- mb_twi_controller_asctech_command = false;
- switch (mb_twi_controller_asctech_command_type) {
-
- case MB_TWI_CONTROLLER_COMMAND_TEST :
- i2c0_buf[0] = 251;
- i2c0_buf[1] = mb_twi_controller_asctech_addr;
- i2c0_buf[2] = 0;
- i2c0_buf[3] = 231 + mb_twi_controller_asctech_addr;
- // mb_twi_i2c_done = false;
- i2c0_transmit(MB_TWI_CONTROLLER_ADDR, 4, &mb_twi_i2c_done);
- break;
-
- case MB_TWI_CONTROLLER_COMMAND_REVERSE :
- i2c0_buf[0] = 254;
- i2c0_buf[1] = mb_twi_controller_asctech_addr;
- i2c0_buf[2] = 0;
- i2c0_buf[3] = 234 + mb_twi_controller_asctech_addr;
- // mb_twi_i2c_done = false;
- i2c0_transmit(MB_TWI_CONTROLLER_ADDR, 4, &mb_twi_i2c_done);
- break;
-
- case MB_TWI_CONTROLLER_COMMAND_SET_ADDR :
- i2c0_buf[0] = 250;
- i2c0_buf[1] = mb_twi_controller_asctech_addr;
- i2c0_buf[2] = mb_twi_controller_asctech_new_addr;
- i2c0_buf[3] = 230 + mb_twi_controller_asctech_addr +
- mb_twi_controller_asctech_new_addr;
- mb_twi_controller_asctech_addr = mb_twi_controller_asctech_new_addr;
- // mb_twi_i2c_done = false;
- i2c0_transmit(MB_TWI_CONTROLLER_ADDR, 4, &mb_twi_i2c_done);
- break;
-
- }
- } else {
-
- uint8_t pitch = 100;
- uint8_t roll = 100;
- uint8_t yaw = 100;
- uint8_t power = throttle * MB_TWI_CONTROLLER_MAX_CMD;
- i2c0_buf[0] = pitch;
- i2c0_buf[1] = roll;
- i2c0_buf[2] = yaw;
- i2c0_buf[3] = power;
- // mb_twi_i2c_done = false;
- i2c0_transmit(MB_TWI_CONTROLLER_ADDR, 4, &mb_twi_i2c_done);
- }
- } else {
- mb_twi_nb_overun++;
- }
-}
-
-void mb_twi_controller_set_raw(uint8_t throttle)
-{
-
-
-}
diff --git a/sw/airborne/firmwares/motor_bench/mb_twi_controller_asctech.h b/sw/airborne/firmwares/motor_bench/mb_twi_controller_asctech.h
deleted file mode 100644
index 69eb13c43a..0000000000
--- a/sw/airborne/firmwares/motor_bench/mb_twi_controller_asctech.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef MB_TWI_CONTROLLER_ASCTECH_H
-#define MB_TWI_CONTROLLER_ASCTECH_H
-
-#include "std.h"
-
-extern void mb_twi_controller_init(void);
-extern void mb_twi_controller_set(float throttle);
-extern void mb_twi_controller_set_raw(uint8_t throttle);
-
-#define MB_TWI_CONTROLLER_COMMAND_NONE 0
-#define MB_TWI_CONTROLLER_COMMAND_TEST 1
-#define MB_TWI_CONTROLLER_COMMAND_REVERSE 2
-#define MB_TWI_CONTROLLER_COMMAND_SET_ADDR 3
-
-
-extern bool mb_twi_controller_asctech_command;
-extern uint8_t mb_twi_controller_asctech_command_type;
-extern uint8_t mb_twi_controller_asctech_addr;
-extern uint8_t mb_twi_controller_asctech_new_addr;
-
-#define mb_twi_controller_asctech_SetCommand(value) { \
- mb_twi_controller_asctech_command = true; \
- mb_twi_controller_asctech_command_type = value; \
- }
-
-#define mb_twi_controller_asctech_SetAddr(value) { \
- mb_twi_controller_asctech_command = true; \
- mb_twi_controller_asctech_command_type = MB_TWI_CONTROLLER_COMMAND_SET_ADDR; \
- mb_twi_controller_asctech_new_addr = value; \
- }
-
-
-#endif /* MB_TWI_CONTROLLER_ASCTECH_H */
diff --git a/sw/airborne/firmwares/motor_bench/mb_twi_controller_mkk.c b/sw/airborne/firmwares/motor_bench/mb_twi_controller_mkk.c
deleted file mode 100644
index cf4e19119a..0000000000
--- a/sw/airborne/firmwares/motor_bench/mb_twi_controller_mkk.c
+++ /dev/null
@@ -1,38 +0,0 @@
-#include "mb_twi_controller_mkk.h"
-
-#include
-
-#include "i2c.h"
-
-uint8_t mb_buss_twi_command;
-
-uint8_t mb_buss_twi_nb_overun;
-uint8_t mb_buss_twi_i2c_done;
-
-
-#define MB_BUSS_TWI_CONTROLLER_MAX_CMD 200
-/*
- Slave address
- front = 0x52
- back = 0x54
- right = 0x56
- left = 0x58
-*/
-#define MB_BUSS_TWI_CONTROLLER_ADDR 0x56
-
-void mb_twi_controller_init(void)
-{
- mb_buss_twi_nb_overun = 0;
- mb_buss_twi_i2c_done = true;
-}
-
-void mb_twi_controller_set(float throttle)
-{
- if (mb_buss_twi_i2c_done) {
- mb_buss_twi_command = throttle * MB_BUSS_TWI_CONTROLLER_MAX_CMD;
- i2c_buf[0] = mb_buss_twi_command;
- i2c_transmit(MB_BUSS_TWI_CONTROLLER_ADDR, 1, &mb_buss_twi_i2c_done);
- } else {
- mb_buss_twi_nb_overun++;
- }
-}
diff --git a/sw/airborne/firmwares/motor_bench/mb_twi_controller_mkk.h b/sw/airborne/firmwares/motor_bench/mb_twi_controller_mkk.h
deleted file mode 100644
index ee20bfef00..0000000000
--- a/sw/airborne/firmwares/motor_bench/mb_twi_controller_mkk.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef MB_TWI_CONTROLLER_MKK_H
-#define MB_TWI_CONTROLLER_MKK_H
-
-#include "std.h"
-
-extern void mb_twi_controller_init(void);
-
-extern void mb_twi_controller_set(float throttle);
-
-#endif /* MB_TWI_CONTROLLER_MKK_H */
-
-
diff --git a/sw/airborne/firmwares/motor_bench/turntable_systime.c b/sw/airborne/firmwares/motor_bench/turntable_systime.c
deleted file mode 100644
index 34c8cfc2a5..0000000000
--- a/sw/airborne/firmwares/motor_bench/turntable_systime.c
+++ /dev/null
@@ -1,91 +0,0 @@
-#include "armVIC.h"
-#include "mcu_periph/sys_time.h"
-#include "led.h"
-
-#define SYS_TICK_IT TIR_MR0I
-
-#define TIMER0_IT_MASK (SYS_TICK_IT | \
- TIR_CR0I)
-
-void sys_time_arch_init(void)
-{
- /* setup Timer 0 to count forever */
- /* reset & disable timer 0 */
- T0TCR = TCR_RESET;
- /* set the prescale divider */
- T0PR = T0_PCLK_DIV - 1;
- /* enable interrupt on match0 */
- T0MCR = TMCR_MR0_I;
- /* disable capture registers */
- T0CCR = 0;
- /* disable external match register */
- T0EMR = 0;
- /* enable timer 0 */
- T0TCR = TCR_ENABLE;
-
- /* set first sys tick interrupt */
- T0MR0 = sys_time.resolution_cpu_ticks;
-
- /* select TIMER0 as IRQ */
- VICIntSelect &= ~VIC_BIT(VIC_TIMER0);
- /* enable TIMER0 interrupt */
- VICIntEnable = VIC_BIT(VIC_TIMER0);
- /* on slot vic slot 1 */
- _VIC_CNTL(TIMER0_VIC_SLOT) = VIC_ENABLE | VIC_TIMER0;
- /* address of the ISR */
- _VIC_ADDR(TIMER0_VIC_SLOT) = (uint32_t)TIMER0_ISR;
-}
-
-static inline void sys_tick_irq_handler(void)
-{
- /* set match register for next interrupt */
- T0MR0 += ticks_resolution - 1;
-
- sys_time.nb_tick++;
- sys_time.nb_sec_rem += sys_time.resolution_cpu_ticks;
- if (sys_time.nb_sec_rem >= sys_time.ticks_per_sec) {
- sys_time.nb_sec_rem -= sys_time.ticks_per_sec;
- sys_time.nb_sec++;
-#ifdef SYS_TIME_LED
- LED_TOGGLE(SYS_TIME_LED);
-#endif
- }
- for (unsigned int i = 0; i < SYS_TIME_NB_TIMER; i++) {
- if (sys_time.timer[i].in_use &&
- sys_time.nb_tick >= sys_time.timer[i].end_time) {
- sys_time.timer[i].end_time += sys_time.timer[i].duration;
- sys_time.timer[i].elapsed = true;
- if (sys_time.timer[i].cb) { sys_time.timer[i].cb(i); }
- }
- }
-}
-
-extern uint32_t lp_pulse;
-extern uint32_t nb_pulse;
-
-void TIMER0_ISR(void)
-{
- ISR_ENTRY();
-
- while (T0IR & TIMER0_IT_MASK) {
-
- if (T0IR & SYS_TICK_IT) {
- sys_tick_irq_handler();
- T0IR = SYS_TICK_IT;
- }
-
- if (T0IR & TIR_CR0I) {
- static uint32_t pulse_last_t;
- uint32_t t_now = T0CR0;
- uint32_t diff = t_now - pulse_last_t;
- lp_pulse = (lp_pulse + diff) / 2;
- pulse_last_t = t_now;
- nb_pulse++;
- // got_one_pulse = true;
- T0IR = TIR_CR0I;
- }
- }
-
- VICVectAddr = 0x00000000;
- ISR_EXIT();
-}
diff --git a/sw/airborne/firmwares/wind_tunnel/main.c b/sw/airborne/firmwares/wind_tunnel/main.c
deleted file mode 100644
index 9346a19872..0000000000
--- a/sw/airborne/firmwares/wind_tunnel/main.c
+++ /dev/null
@@ -1,115 +0,0 @@
-
-#define MODULES_C
-
-#include "std.h"
-#include "mcu.h"
-#include "mcu_periph/sys_time.h"
-#include "led.h"
-#include "mcu_periph/uart.h"
-
-#include "pprzlink/messages.h"
-#include "subsystems/datalink/downlink.h"
-
-#include "subsystems/datalink/datalink.h"
-#include "generated/settings.h"
-#include "generated/modules.h"
-#include "pprzlink/dl_protocol.h"
-
-#include "wt_servo.h"
-
-#include "spi.h"
-#include "wt_baro.h"
-
-static inline void main_init(void);
-static inline void main_periodic_task(void);
-static inline void main_event_task(void);
-
-
-uint16_t motor_power;
-uint8_t dl_buffer[MSG_SIZE] __attribute__((aligned));
-bool dl_msg_available;
-uint16_t datalink_time;
-
-int main(void)
-{
- main_init();
- while (1) {
- if (sys_time_check_and_ack_timer(0)) {
- main_periodic_task();
- }
- main_event_task();
- }
- return 0;
-}
-
-static inline void main_init(void)
-{
- mcu_init();
- sys_time_register_timer((1. / PERIODIC_FREQUENCY), NULL);
- led_init();
- uart0_init();
-
- motor_power = 0;
- wt_servo_init();
- wt_servo_set(500);
-
- spi_init();
- wt_baro_init();
- modules_init();
-
- mcu_int_enable();
-}
-
-static inline void main_periodic_task(void)
-{
- LED_TOGGLE(1);
- DOWNLINK_SEND_TAKEOFF(&motor_power);
- wt_baro_periodic();
- modules_periodic_task();
- DOWNLINK_SEND_DEBUG(3, buf_input);
-}
-
-static inline void main_event_task(void)
-{
- modules_event_task();
-
- // spi baro
- if (spi_message_received) {
- /* Got a message on SPI. */
- spi_message_received = false;
- wt_baro_event();
- uint16_t temp = 0;
- float alt = 0.;
- DOWNLINK_SEND_BARO_MS5534A(&wt_baro_pressure, &temp, &alt);
- }
-
-}
-
-
-#define IdOfMsg(x) (x[1])
-
-void dl_parse_msg(struct link_device *dev __attribute__((unused)), struct transport_tx *trans __attribute__((unused)), uint8_t *buf)
-{
-
- LED_TOGGLE(1);
-
- uint8_t msg_id = IdOfMsg(buf);
- switch (msg_id) {
-
- case DL_PING: {
- DOWNLINK_SEND_PONG();
- break;
- }
-
- case DL_SETTING : {
- uint8_t i = DL_SETTING_index(buf);
- float var = DL_SETTING_value(buf);
- DlSetting(i, var);
- DOWNLINK_SEND_DL_VALUE(&i, &var);
- break;
- }
-
- }
-}
-
-
diff --git a/sw/airborne/firmwares/wind_tunnel/main_mb.c b/sw/airborne/firmwares/wind_tunnel/main_mb.c
deleted file mode 100644
index 0ce0ec18de..0000000000
--- a/sw/airborne/firmwares/wind_tunnel/main_mb.c
+++ /dev/null
@@ -1,108 +0,0 @@
-#define MODULES_C
-
-#include "std.h"
-#include "mcu.h"
-#include "mcu_periph/sys_time.h"
-#include "led.h"
-#include "mcu_periph/uart.h"
-
-#include "pprzlink/messages.h"
-#include "subsystems/datalink/downlink.h"
-
-#include "subsystems/datalink/datalink.h"
-#include "generated/settings.h"
-#include "generated/modules.h"
-#include "pprzlink/dl_protocol.h"
-
-#include "i2c.h"
-#include "mb_twi_controller_mkk.h"
-#include "mb_tacho.h"
-
-static inline void main_init(void);
-static inline void main_periodic_task(void);
-static inline void main_event_task(void);
-
-
-//uint16_t motor_power;
-uint8_t dl_buffer[MSG_SIZE] __attribute__((aligned));
-bool dl_msg_available;
-uint16_t datalink_time;
-
-int main(void)
-{
- main_init();
- while (1) {
- if (sys_time_check_and_ack_timer(0)) {
- main_periodic_task();
- }
- main_event_task();
- }
- return 0;
-}
-
-static inline void main_init(void)
-{
- mcu_init();
- sys_time_register_timer((1. / PERIODIC_FREQUENCY), NULL);
- led_init();
- uart0_init();
-
- i2c_init();
- mb_twi_controller_init();
-
- mb_tacho_init();
- modules_init();
-
- //motor_power = 0;
-
- mcu_int_enable();
-}
-
-static inline void main_periodic_task(void)
-{
- LED_TOGGLE(1);
- // DOWNLINK_SEND_TAKEOFF(&wt_servo_motor_power);
- // DOWNLINK_SEND_DEBUG(3,buf_input);
-
- float rpm = mb_tacho_get_averaged();
- DOWNLINK_SEND_WT(&rpm);
-
- float throttle = (float)wt_servo_motor_power / 1000.;
- mb_twi_controller_set(throttle);
-
- modules_periodic_task();
-}
-
-static inline void main_event_task(void)
-{
- modules_event_task();
-}
-
-
-#define IdOfMsg(x) (x[1])
-
-void dl_parse_msg(struct link_device *dev __attribute__((unused)), struct transport_tx *trans __attribute__((unused)), uint8_t *buf)
-{
-
- LED_TOGGLE(1);
-
- uint8_t msg_id = IdOfMsg(buf);
- switch (msg_id) {
-
- case DL_PING: {
- DOWNLINK_SEND_PONG();
- break;
- }
-
- case DL_SETTING : {
- uint8_t i = DL_SETTING_index(buf);
- float var = DL_SETTING_value(buf);
- DlSetting(i, var);
- DOWNLINK_SEND_DL_VALUE(&i, &var);
- break;
- }
-
- }
-}
-
-
diff --git a/sw/airborne/firmwares/wind_tunnel/wt_baro.c b/sw/airborne/firmwares/wind_tunnel/wt_baro.c
deleted file mode 100644
index bf74ccf75b..0000000000
--- a/sw/airborne/firmwares/wind_tunnel/wt_baro.c
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (C) 2007 ENAC
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/** \file
- * \brief
- *
- */
-
-#include "wt_baro.h"
-#include "spi.h"
-
-uint32_t wt_baro_pressure;
-bool wt_baro_available;
-
-static bool status_read_data;
-
-#define CMD_INIT_1 0x24 // set chanel AIN1/AIN2 and next operation on filter high
-#define CMD_INIT_2 0xCF // set unipolar mode, 24 bits, no boost, filter high
-#define CMD_INIT_3 0x34 // set chanel AIN1/AIN2 and next operation on filter low
-#define CMD_INIT_4 0x00 // set low filter
-#define CMD_INIT_5 0x14 // set chanel AIN1/AIN2 and next operation on mode register
-#define CMD_INIT_6 0x20 // set gain to 1, burnout current off, no filter sync, self calibration
-#define CMD_MEASUREMENT 0x54 // set chanel AIN1/AIN2 and next operation on data register
-
-
-uint8_t buf_input[3];
-uint8_t buf_output[3];
-
-#define Uint24(buf_input) (((uint32_t)buf_input[0]) << 16 |((uint16_t)buf_input[1]) << 8 | buf_input[2])
-
-
-static void send1_on_spi(uint8_t d)
-{
- buf_output[0] = d;
- spi_buffer_length = 1;
-
- spi_buffer_input = (uint8_t *)&buf_input;
- spi_buffer_output = (uint8_t *)&buf_output;
- SpiStart();
-}
-
-
-void wt_baro_init(void)
-{
-
- wt_baro_pressure = 0;
-
- send1_on_spi(CMD_INIT_1);
- send1_on_spi(CMD_INIT_2);
- send1_on_spi(CMD_INIT_3);
- send1_on_spi(CMD_INIT_4);
- send1_on_spi(CMD_INIT_5);
- send1_on_spi(CMD_INIT_6);
-
- status_read_data = false;
- wt_baro_available = false;
-
-}
-
-void wt_baro_periodic(void)
-{
- if (!SpiCheckAvailable()) {
- SpiOverRun();
- return;
- }
-
- if (status_read_data) {
- buf_output[0] = buf_output[1] = buf_output[2] = 0;
- spi_buffer_length = 3;
- } else {
- buf_output[0] = CMD_MEASUREMENT;
- spi_buffer_length = 1;
- }
-
- spi_buffer_input = (uint8_t *)&buf_input;
- spi_buffer_output = (uint8_t *)&buf_output;
- //if (status_read_data)
- // SpiSetCPHA();
- //else
- // SpiClrCPHA();
- SpiStart();
-}
-
-static uint32_t data;
-
-/* Handle the SPI message, i.e. store the received values in variables */
-void wt_baro_event(void)
-{
-
- if (status_read_data) {
- data = Uint24(buf_input);
- /* Compute pressure */
- wt_baro_pressure = data;
- wt_baro_available = true;
- } /* else nothing to read */
-
- status_read_data = !status_read_data;
-
- //if (!status_read_data) {
- // /* Ask next conversion now */
- // baro_MS5534A_send();
- //}
-}
-
diff --git a/sw/airborne/firmwares/wind_tunnel/wt_baro.h b/sw/airborne/firmwares/wind_tunnel/wt_baro.h
deleted file mode 100644
index 804b189e96..0000000000
--- a/sw/airborne/firmwares/wind_tunnel/wt_baro.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2007 ENAC
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/** \file
- * \brief
- *
- */
-
-#include "std.h"
-
-extern uint8_t buf_input[3];
-extern uint8_t buf_output[3];
-
-extern bool wt_baro_available;
-extern uint32_t wt_baro_pressure;
-
-extern void wt_baro_init(void);
-extern void wt_baro_periodic(void);
-extern void wt_baro_event(void);
-
diff --git a/sw/airborne/firmwares/wind_tunnel/wt_servo.c b/sw/airborne/firmwares/wind_tunnel/wt_servo.c
deleted file mode 100644
index 67d51249fd..0000000000
--- a/sw/airborne/firmwares/wind_tunnel/wt_servo.c
+++ /dev/null
@@ -1,46 +0,0 @@
-#include "wt_servo.h"
-
-#include "LPC21xx.h"
-
-#include "mcu_periph/sys_time.h"
-
-uint16_t wt_servo_motor_power;
-
-#define MY_NB_CLOCK_TIMER_PWM(time_us) cpu_ticks_of_usec(time_us)
-
-void mb_servo_set_ns(uint32_t duration_ns);
-
-void wt_servo_init(void)
-{
-
- /* set P0.21 as PWM5 output */
- PINSEL1 |= (0X01 << 10);
- /* enable and select the type of PWM channel */
- PWMPCR |= PWMPCR_ENA5;
- /* set Match0 value (refresh rate) */
- PWMMR0 = MY_NB_CLOCK_TIMER_PWM(20000);
- /* commit PWMMRx changes */
- PWMLER = PWMLER_LATCH0;
- /* enable PWM timer in PWM mode */
- PWMTCR = PWMTCR_COUNTER_ENABLE | PWMTCR_PWM_ENABLE;
-
-}
-
-#define MB_SERVO_MIN_PULSE_NS 1000000
-#define MB_SERVO_RANGE_PULSE_NS 1000
-
-void wt_servo_set(uint16_t val)
-{
-
- uint32_t pulse_ns = MB_SERVO_MIN_PULSE_NS + val * MB_SERVO_RANGE_PULSE_NS;
- mb_servo_set_ns(pulse_ns);
-
-}
-
-void mb_servo_set_ns(uint32_t duration_ns)
-{
- /* set Match5 value (pulse duration )*/
- PWMMR5 = cpu_ticks_of_nsec(duration_ns);
- /* commit PWMMRx changes */
- PWMLER = PWMLER_LATCH5;
-}
diff --git a/sw/airborne/firmwares/wind_tunnel/wt_servo.h b/sw/airborne/firmwares/wind_tunnel/wt_servo.h
deleted file mode 100644
index cd92c9a459..0000000000
--- a/sw/airborne/firmwares/wind_tunnel/wt_servo.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef WT_SERVO_H
-#define WT_SERVO_H
-
-#include "std.h"
-
-extern void wt_servo_init(void);
-extern void wt_servo_set(uint16_t val);
-
-extern uint16_t wt_servo_motor_power;
-
-#define wt_servo_SetPower(_val) { \
- wt_servo_motor_power = _val; \
- wt_servo_set(wt_servo_motor_power); \
- }
-
-
-
-#endif /* WT_SERVO_H */
-
diff --git a/sw/airborne/modules/display/lcd_dogm.c b/sw/airborne/modules/display/lcd_dogm.c
deleted file mode 100644
index a549225994..0000000000
--- a/sw/airborne/modules/display/lcd_dogm.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (C) 2010 Martin Mueller
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/*
- initial version, needs polishing!
-
- 3 line LCD at 3.3V
-
- EA DOGM163 <-> LPC2148 SPI1
-
- SI MOSI
- CLK SCK
- RS DRDY (used to switch cmd/data)
- CSB SSEL
-
-*/
-
-#include "display/lcd_dogm_hw.h"
-#include "lcd_dogm.h"
-
-
-void lcd_cmd(uint8_t command)
-{
- uint32_t i;
- for (i = 0; i < 20000; i++);
- lcddogmSelect();
- lcddogmCmdMode();
- lcd_spi_tx(command);
-}
-
-void lcd_data(uint8_t data)
-{
- uint32_t i;
- for (i = 0; i < 100000; i++);
- lcddogmSelect();
- lcddogmDataMode();
- lcd_spi_tx(data);
-}
-
-void lcd_dogm_init(void)
-{
- uint32_t i;
-
- for (i = 0; i < 100000; i++);
- lcd_dogm_init_hw();
-
- /* Write configuration */
- lcd_cmd(DOGM_FUN_SET_1);
- lcd_cmd(DOGM_BIAS_SET);
- lcd_cmd(DOGM_PWR_CTRL);
- lcd_cmd(DOGM_FOLLOWER);
- lcd_cmd(DOGM_CONTRAST);
- lcd_cmd(DOGM_DISP_ON);
- lcd_cmd(DOGM_CLEAR);
- lcd_cmd(DOGM_ENTRY_MODE);
-
- /* sample data */
- lcd_data('C');
- lcd_data('i');
- lcd_data('r');
- lcd_data('c');
- lcd_data('l');
- lcd_data('e');
- lcd_data('C');
- lcd_data('W');
- lcd_data(' ');
- lcd_data('9');
- lcd_data('9');
- lcd_data(' ');
- lcd_data('1');
- lcd_data('0');
- lcd_data('.');
- lcd_data('3');
-
- lcd_data('1');
- lcd_data('2');
- lcd_data('.');
- lcd_data('6');
- lcd_data(' ');
- lcd_data('M');
- lcd_data(' ');
- lcd_data('1');
- lcd_data('2');
- lcd_data('+');
- lcd_data('3');
- lcd_data(' ');
- lcd_data('1');
- lcd_data('4');
- lcd_data('9');
- lcd_data('3');
-
- lcd_data('o');
- lcd_data('k');
- lcd_data(' ');
- lcd_data('3');
- lcd_data(' ');
- lcd_data('0');
- lcd_data('2');
- lcd_data('1');
- lcd_data(':');
- lcd_data('3');
- lcd_data('4');
- lcd_data(' ');
- lcd_data('1');
- lcd_data('5');
- lcd_data('0');
- lcd_data('0');
-}
-
diff --git a/sw/airborne/modules/display/lcd_dogm.h b/sw/airborne/modules/display/lcd_dogm.h
deleted file mode 100644
index 7a59477237..0000000000
--- a/sw/airborne/modules/display/lcd_dogm.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef LCD_DOGM_H
-#define LCD_DOGM_H
-
-#include
-#include "std.h"
-#include "mcu_periph/spi.h"
-#include "led.h"
-
-/* EA DOGM163, 3 line LCD at 3.3V */
-#define DOGM_FUN_SET_1 0x39
-#define DOGM_BIAS_SET 0x15
-#define DOGM_PWR_CTRL 0x55
-#define DOGM_FOLLOWER 0x6E
-#define DOGM_CONTRAST 0x70
-#define DOGM_FUN_SET_2 0x38
-#define DOGM_DISP_ON 0x0C
-#define DOGM_CLEAR 0x01
-#define DOGM_ENTRY_MODE 0x06
-
-extern void lcd_cmd(uint8_t command);
-extern void lcd_data(uint8_t data);
-extern void lcd_dogm_init(void);
-
-#endif /* LCD_DOGM_H */
-
diff --git a/sw/airborne/modules/sensors/baro_scp.c b/sw/airborne/modules/sensors/baro_scp.c
deleted file mode 100644
index 94107ea8bc..0000000000
--- a/sw/airborne/modules/sensors/baro_scp.c
+++ /dev/null
@@ -1,199 +0,0 @@
-#include "std.h"
-#include "mcu_periph/sys_time.h"
-#include "led.h"
-#include "mcu.h"
-#include "subsystems/abi.h"
-
-#include "mcu_periph/uart.h"
-#include "pprzlink/messages.h"
-#include "subsystems/datalink/downlink.h"
-
-#include "mcu_periph/spi.h"
-
-#include "modules/sensors/baro_scp.h"
-
-#ifndef SENSOR_SYNC_SEND
-#warning set SENSOR_SYNC_SEND to use baro_scp
-#endif
-
-
-#define STA_UNINIT 0
-#define STA_INITIALISING 1
-#define STA_IDLE 2
-
-uint8_t baro_scp_status;
-uint32_t baro_scp_pressure;
-uint16_t baro_scp_temperature;
-bool baro_scp_available;
-
-static void baro_scp_start_high_res_measurement(void);
-static void baro_scp_read(void);
-static void EXTINT_ISR(void) __attribute__((naked));
-static void SPI1_ISR(void) __attribute__((naked));
-
-void baro_scp_periodic(void)
-{
- if (baro_scp_status == STA_UNINIT && sys_time.nb_sec > 1) {
- baro_scp_start_high_res_measurement();
- baro_scp_status = STA_INITIALISING;
- }
-}
-
-/* ssp input clock 468.75kHz, clock that divided by SCR+1 */
-#define SSP_CLOCK 468750
-
-/* SSPCR0 settings */
-#define SSP_DDS 0x07 << 0 /* data size : 8 bits */
-#define SSP_FRF 0x00 << 4 /* frame format : SPI */
-#define SSP_CPOL 0x00 << 6 /* clock polarity : data captured on first clock transition */
-#define SSP_CPHA 0x00 << 7 /* clock phase : SCK idles low */
-#define SSP_SCR 0x0F << 8 /* serial clock rate : divide by 16 */
-
-/* SSPCR1 settings */
-#define SSP_LBM 0x00 << 0 /* loopback mode : disabled */
-#define SSP_SSE 0x00 << 1 /* SSP enable : disabled */
-#define SSP_MS 0x00 << 2 /* master slave mode : master */
-#define SSP_SOD 0x00 << 3 /* slave output disable : don't care when master */
-
-#define SS_PIN 20
-#define SS_IODIR IO0DIR
-#define SS_IOSET IO0SET
-#define SS_IOCLR IO0CLR
-
-#define ScpSelect() SetBit(SS_IOCLR,SS_PIN)
-#define ScpUnselect() SetBit(SS_IOSET,SS_PIN)
-
-#warning "This driver should be updated to use the new SPI peripheral"
-
-#ifndef SPI1_VIC_SLOT
-#define SPI1_VIC_SLOT 7
-#endif
-
-void baro_scp_init(void)
-{
- /* setup pins for SSP (SCK, MISO, MOSI) */
- PINSEL1 |= 2 << 2 | 2 << 4 | 2 << 6;
-
- /* setup SSP */
- SSPCR0 = SSP_DDS | SSP_FRF | SSP_CPOL | SSP_CPHA | SSP_SCR;
- SSPCR1 = SSP_LBM | SSP_MS | SSP_SOD;
- /* set prescaler for SSP clock */
- SSPCPSR = PCLK / SSP_CLOCK;
-
- /* initialize interrupt vector */
- VICIntSelect &= ~VIC_BIT(VIC_SPI1); // SPI1 selected as IRQ
- VICIntEnable = VIC_BIT(VIC_SPI1); // SPI1 interrupt enabled
- _VIC_CNTL(SPI1_VIC_SLOT) = VIC_ENABLE | VIC_SPI1;
- _VIC_CNTL(SPI1_VIC_SLOT) = (uint32_t)SPI1_ISR; /* address of the ISR */
-
- /* configure SS pin */
- SetBit(SS_IODIR, SS_PIN); /* pin is output */
- ScpUnselect(); /* pin idles high */
-
- /* configure DRDY pin */
- /* connected pin to EXINT */
- SPI1_DRDY_PINSEL |= SPI1_DRDY_PINSEL_VAL << SPI1_DRDY_PINSEL_BIT;
- SetBit(EXTMODE, SPI1_DRDY_EINT); /* EINT is edge trigered */
- SetBit(EXTPOLAR, SPI1_DRDY_EINT); /* EINT is trigered on rising edge */
- SetBit(EXTINT, SPI1_DRDY_EINT); /* clear pending EINT */
-
- /* initialize interrupt vector */
- VICIntSelect &= ~VIC_BIT(SPI1_DRDY_VIC_IT); /* select EINT as IRQ source */
- VICIntEnable = VIC_BIT(SPI1_DRDY_VIC_IT); /* enable it */
- VICVectCntl11 = VIC_ENABLE | SPI1_DRDY_VIC_IT;
- VICVectAddr11 = (uint32_t)EXTINT_ISR; // address of the ISR
-
- baro_scp_status = STA_UNINIT;
-}
-
-void SPI1_ISR(void)
-{
- ISR_ENTRY();
-
- if (baro_scp_status == STA_INITIALISING) {
- uint8_t foo1 = SSPDR;
- uint8_t foo2 = SSPDR;
- baro_scp_status = STA_IDLE;
- foo1 = foo2;
- } else if (baro_scp_status == STA_IDLE) {
-
- uint8_t foo0 = SSPDR;
- baro_scp_temperature = SSPDR << 8;
- baro_scp_temperature += SSPDR;
- if (baro_scp_temperature & 0x2000) {
- baro_scp_temperature |= 0xC000;
- }
- baro_scp_temperature *= 5;
-
- uint8_t foo1 = SSPDR;
- uint32_t datard8 = SSPDR << 16;
- uint8_t foo2 = SSPDR;
- baro_scp_pressure = SSPDR << 8;
- baro_scp_pressure += SSPDR;
- baro_scp_pressure += datard8;
- baro_scp_pressure *= 25;
- baro_scp_available = true;
- foo1 = foo2;
- foo0 = foo2;
- }
-
- ScpUnselect();
- SpiClearRti();
- SpiDisable();
-
- VICVectAddr = 0x00000000; /* clear this interrupt from the VIC */
- ISR_EXIT();
-}
-
-void EXTINT_ISR(void)
-{
- ISR_ENTRY();
- baro_scp_read();
-
- SetBit(EXTINT, SPI1_DRDY_EINT); /* clear EINT2 */
- VICVectAddr = 0x00000000; /* clear this interrupt from the VIC */
- ISR_EXIT();
-}
-
-/* write 0x0A to 0x03 */
-static void baro_scp_start_high_res_measurement(void)
-{
- uint8_t cmd = 0x03 << 2 | 0x02;
- uint8_t data = 0x0A;
- ScpSelect();
- SSPDR = cmd;
- SSPDR = data;
- SpiEnableRti();
- SpiEnable();
-}
-
-/* read 0x21 (TEMP), 0x1F (MSB) and 0x20 (LSB) */
-static void baro_scp_read(void)
-{
- uint8_t cmd0 = 0x21 << 2;
- uint8_t cmd1 = 0x1F << 2;
- uint8_t cmd2 = 0x20 << 2;
- ScpSelect();
- SSPDR = cmd0;
- SSPDR = 0;
- SSPDR = 0;
- SSPDR = cmd1;
- SSPDR = 0;
- SSPDR = cmd2;
- SSPDR = 0;
- SSPDR = 0;
- SpiEnable();
-}
-
-void baro_scp_event(void)
-{
- if (baro_scp_available == TRUE) {
- uint32_t now_ts = get_sys_time_usec();
- float pressure = (float)baro_scp_pressure;
- AbiSendMsgBARO_ABS(BARO_SCP_SENDER_ID, now_ts, pressure);
-#ifdef SENSOR_SYNC_SEND
- DOWNLINK_SEND_SCP_STATUS(DefaultChannel, DefaultDevice, &baro_scp_pressure, &baro_scp_temperature);
-#endif
- baro_scp_available = false;
- }
-}
diff --git a/sw/airborne/modules/sensors/baro_scp.h b/sw/airborne/modules/sensors/baro_scp.h
deleted file mode 100644
index 96bd0388e0..0000000000
--- a/sw/airborne/modules/sensors/baro_scp.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef BARO_SCP_H
-#define BARO_SCP_H
-
-#include "std.h"
-
-#ifdef STM32
-#error LPC21_only
-#endif
-
-#define STA_UNINIT 0
-#define STA_INITIALISING 1
-#define STA_IDLE 2
-
-extern uint8_t baro_scp_status;
-extern uint32_t baro_scp_pressure;
-extern uint16_t baro_scp_temperature;
-extern bool baro_scp_available;
-
-void baro_scp_init(void);
-void baro_scp_periodic(void);
-void baro_scp_event(void);
-
-#endif
diff --git a/sw/airborne/modules/sensors/trigger_ext.c b/sw/airborne/modules/sensors/trigger_ext.c
deleted file mode 100644
index ad03829cc8..0000000000
--- a/sw/airborne/modules/sensors/trigger_ext.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2010 Martin Mueller
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/**
- * @file modules/sensors/trigger_ext.c
- * Measure external trigger pulse at PPM input
- *
- * This measures a trigger pulse length (e.g. duration of a wind turbine
- * rotation) and sends a message with the info.
- */
-
-
-#include "trigger_ext.h"
-#include "modules/sensors/trig_ext_hw.h"
-#include "subsystems/gps.h"
-#include "mcu_periph/sys_time.h"
-#include "mcu_periph/uart.h"
-#include "pprzlink/messages.h"
-#include "subsystems/datalink/downlink.h"
-
-
-void trigger_ext_init(void)
-{
- trig_ext_init();
-}
-
-void trigger_ext_periodic(void)
-{
- if (trig_ext_valid == TRUE) {
- uint8_t ac_id = 0;
- uint8_t turb_id = TURBINE_ID;
- uint32_t sync_itow, cycle_time;
-
- sync_itow = gps_tow_from_sys_ticks(trigger_t0);
- cycle_time = msec_of_sys_time_ticks(delta_t0);
-
- DOWNLINK_SEND_WINDTURBINE_STATUS_(DefaultChannel, DefaultDevice,
- &ac_id,
- &turb_id,
- &sync_itow,
- &cycle_time);
- trig_ext_valid = false;
- }
-}
-
diff --git a/sw/airborne/modules/sensors/trigger_ext.h b/sw/airborne/modules/sensors/trigger_ext.h
deleted file mode 100644
index 7d6f6e1ab2..0000000000
--- a/sw/airborne/modules/sensors/trigger_ext.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2010 Martin Mueller
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/**
- * @file modules/sensors/trigger_ext.h
- * Measure external trigger pulse at PPM input
- *
- * This measures a trigger pulse length (e.g. duration of a wind turbine
- * rotation) and sends a message with the info.
- */
-
-#ifndef TRIGGER_EXT_H
-#define TRIGGER_EXT_H
-
-
-void trigger_ext_init(void);
-void trigger_ext_periodic(void);
-
-#endif
-
-
diff --git a/sw/airborne/subsystems/actuators/actuators_4015.h b/sw/airborne/subsystems/actuators/actuators_4015.h
deleted file mode 100644
index 07cd56875d..0000000000
--- a/sw/airborne/subsystems/actuators/actuators_4015.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2012 Gautier Hattenberger
- *
- * This file is part of Paparazzi.
- *
- * Paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * Paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef ACTUATORS_4015_H
-#define ACTUATORS_4015_H
-
-#include "subsystems/actuators/servos_4015_MAT_hw.h"
-
-#endif /* ACTUATORS_4015_H */
diff --git a/sw/airborne/subsystems/actuators/actuators_4017.h b/sw/airborne/subsystems/actuators/actuators_4017.h
deleted file mode 100644
index 315382d628..0000000000
--- a/sw/airborne/subsystems/actuators/actuators_4017.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2012 Gautier Hattenberger
- *
- * This file is part of Paparazzi.
- *
- * Paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * Paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef ACTUATORS_4017_H
-#define ACTUATORS_4017_H
-
-#include "subsystems/actuators/servos_4017_hw.h"
-
-#endif /* ACTUATORS_4017_H */
diff --git a/sw/airborne/subsystems/actuators/actuators_skiron.c b/sw/airborne/subsystems/actuators/actuators_skiron.c
deleted file mode 100644
index 082e52f8d5..0000000000
--- a/sw/airborne/subsystems/actuators/actuators_skiron.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2011 Gautier Hattenberger
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/** @file actuators_skiron.c
- * Skiron motor speed controller by Michel.
- */
-
-#include "subsystems/actuators.h"
-#include "subsystems/actuators/actuators_skiron.h"
-
-#include "mcu_periph/i2c.h"
-#include "mcu_periph/sys_time.h"
-
-PRINT_CONFIG_VAR(ACTUATORS_SKIRON_I2C_DEV)
-
-struct ActuatorsSkiron actuators_skiron;
-
-
-void actuators_skiron_init(void)
-{
-
- actuators_skiron.trans.type = I2CTransTx;
- actuators_skiron.trans.len_w = SERVOS_SKIRON_NB;
- actuators_skiron.trans.slave_addr = ACTUATORS_SKIRON_I2C_ADDR;
- actuators_skiron.trans.status = I2CTransDone;
-
-}
-
-void actuators_skiron_set(void)
-{
-#if defined ACTUATORS_START_DELAY && ! defined SITL
- if (!actuators_delay_done) {
- if (SysTimeTimer(actuators_delay_time) < USEC_OF_SEC(ACTUATORS_START_DELAY)) { return; }
- else { actuators_delay_done = true; }
- }
-#endif
-
-#ifdef KILL_MOTORS
- for (uint8_t i = 0; i < ACTUATORS_SKIRON_NB; i++) {
- actuators_skiron.trans.buf[i] = 0;
- }
-#endif
-
- i2c_submit(&ACTUATORS_SKIRON_I2C_DEV, &actuators_skiron.trans);
-}
diff --git a/sw/airborne/subsystems/actuators/actuators_skiron.h b/sw/airborne/subsystems/actuators/actuators_skiron.h
deleted file mode 100644
index 7c8aebdcaf..0000000000
--- a/sw/airborne/subsystems/actuators/actuators_skiron.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2011 Gautier Hattenberger
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/** @file actuators_skiron.h
- * Skiron motor speed controller by Michel.
- */
-
-#ifndef ACTUATORS_SKIRON_H
-#define ACTUATORS_SKIRON_H
-
-#include "std.h"
-#include "mcu_periph/i2c.h"
-
-#include "generated/airframe.h"
-
-// Use I2C broadcast adderss
-#define ACTUATORS_SKIRON_I2C_ADDR 0x00
-
-struct ActuatorsSkiron {
- struct i2c_transaction trans;
-};
-
-extern struct ActuatorsSkiron actuators_skiron;
-
-extern void actuators_skiron_init(void);
-extern void actuators_skiron_set(void);
-
-#define ActuatorSkironSet(_i, _v) { actuators_skiron.trans.buf[_i] = _v; }
-#define ActuatorsSkironInit() actuators_skiron_init()
-#define ActuatorsSkironCommit() actuators_skiron_set()
-
-#endif /* ACTUATORS_SKIRON_H */
diff --git a/sw/airborne/subsystems/imu/imu_analog.c b/sw/airborne/subsystems/imu/imu_analog.c
deleted file mode 100644
index 3991c6eb4d..0000000000
--- a/sw/airborne/subsystems/imu/imu_analog.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (C) 2010 The Paparazzi Team
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "imu_analog.h"
-#include "mcu_periph/adc.h"
-#include "subsystems/abi.h"
-
-int imu_overrun;
-
-static struct adc_buf analog_imu_adc_buf[NB_ANALOG_IMU_ADC];
-
-void imu_analog_init(void)
-{
-
- imu_overrun = 0;
-
-#ifdef ADC_CHANNEL_GYRO_P
- adc_buf_channel(ADC_CHANNEL_GYRO_P, &analog_imu_adc_buf[0], ADC_CHANNEL_GYRO_NB_SAMPLES);
-#endif
-#ifdef ADC_CHANNEL_GYRO_Q
- adc_buf_channel(ADC_CHANNEL_GYRO_Q, &analog_imu_adc_buf[1], ADC_CHANNEL_GYRO_NB_SAMPLES);
-#endif
-#ifdef ADC_CHANNEL_GYRO_R
- adc_buf_channel(ADC_CHANNEL_GYRO_R, &analog_imu_adc_buf[2], ADC_CHANNEL_GYRO_NB_SAMPLES);
-#endif
-#ifdef ADC_CHANNEL_ACCEL_X
- adc_buf_channel(ADC_CHANNEL_ACCEL_X, &analog_imu_adc_buf[3], ADC_CHANNEL_ACCEL_NB_SAMPLES);
-#endif
-#ifdef ADC_CHANNEL_ACCEL_Y
- adc_buf_channel(ADC_CHANNEL_ACCEL_Y, &analog_imu_adc_buf[4], ADC_CHANNEL_ACCEL_NB_SAMPLES);
-#endif
-#ifdef ADC_CHANNEL_ACCEL_Z
- adc_buf_channel(ADC_CHANNEL_ACCEL_Z, &analog_imu_adc_buf[5], ADC_CHANNEL_ACCEL_NB_SAMPLES);
-#endif
-
-}
-
-void imu_analog_periodic(void)
-{
- // Actual Nr of ADC measurements per channel per periodic loop
- static int last_head = 0;
-
- uint32_t now_ts = get_sys_time_usec();
-
- imu_overrun = analog_imu_adc_buf[0].head - last_head;
- if (imu_overrun < 0) {
- imu_overrun += ADC_CHANNEL_GYRO_NB_SAMPLES;
- }
- last_head = analog_imu_adc_buf[0].head;
-
- // Read All Measurements
-#ifdef ADC_CHANNEL_GYRO_P
- imu.gyro_unscaled.p = analog_imu_adc_buf[0].sum / ADC_CHANNEL_GYRO_NB_SAMPLES;
-#endif
-#ifdef ADC_CHANNEL_GYRO_Q
- imu.gyro_unscaled.q = analog_imu_adc_buf[1].sum / ADC_CHANNEL_GYRO_NB_SAMPLES;
-#endif
-#ifdef ADC_CHANNEL_GYRO_R
- imu.gyro_unscaled.r = analog_imu_adc_buf[2].sum / ADC_CHANNEL_GYRO_NB_SAMPLES;
-#endif
-#ifdef ADC_CHANNEL_ACCEL_X
- imu.accel_unscaled.x = analog_imu_adc_buf[3].sum / ADC_CHANNEL_ACCEL_NB_SAMPLES;
-#endif
-#ifdef ADC_CHANNEL_ACCEL_Y
- imu.accel_unscaled.y = analog_imu_adc_buf[4].sum / ADC_CHANNEL_ACCEL_NB_SAMPLES;
-#endif
-#ifdef ADC_CHANNEL_ACCEL_Z
- imu.accel_unscaled.z = analog_imu_adc_buf[5].sum / ADC_CHANNEL_ACCEL_NB_SAMPLES;
-#endif
-
- imu_scale_gyro(&imu);
- imu_scale_accel(&imu);
- AbiSendMsgIMU_GYRO_INT32(IMU_ANALOG_ID, now_ts, &imu.gyro);
- AbiSendMsgIMU_ACCEL_INT32(IMU_ANALOG_ID, now_ts, &imu.accel);
-}
-
-// if not all gyros are used, override the imu_scale_gyro handler
-#if defined ADC_CHANNEL_GYRO_P && defined ADC_CHANNEL_GYRO_Q && ! defined ADC_CHANNEL_GYRO_R
-
-void imu_scale_gyro(struct Imu *_imu)
-{
- _imu->gyro.p = ((_imu->gyro_unscaled.p - _imu->gyro_neutral.p) * IMU_GYRO_P_SIGN * IMU_GYRO_P_SENS_NUM) /
- IMU_GYRO_P_SENS_DEN;
- _imu->gyro.q = ((_imu->gyro_unscaled.q - _imu->gyro_neutral.q) * IMU_GYRO_Q_SIGN * IMU_GYRO_Q_SENS_NUM) /
- IMU_GYRO_Q_SENS_DEN;
-}
-
-#elif defined ADC_CHANNEL_GYRO_P && ! defined ADC_CHANNEL_GYRO_Q && ! defined ADC_CHANNEL_GYRO_R
-
-void imu_scale_gyro(struct Imu *_imu)
-{
- _imu->gyro.p = ((_imu->gyro_unscaled.p - _imu->gyro_neutral.p) * IMU_GYRO_P_SIGN * IMU_GYRO_P_SENS_NUM) /
- IMU_GYRO_P_SENS_DEN;
-}
-
-#endif
-
-// if we don't have any accelerometers, set an empty imu_scale_accel handler
-#if ! defined ADC_CHANNEL_ACCEL_X && ! defined ADC_CHANNEL_ACCEL_Z && ! defined ADC_CHANNEL_ACCEL_Z
-void imu_scale_accel(struct Imu *_imu __attribute__((unused))) {}
-#endif
diff --git a/sw/airborne/subsystems/imu/imu_analog.h b/sw/airborne/subsystems/imu/imu_analog.h
deleted file mode 100644
index 82a4fea514..0000000000
--- a/sw/airborne/subsystems/imu/imu_analog.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2010 The Paparazzi Team
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/**
- * @file subsystems/imu/imu_analog.h
- * Inertial Measurement Unit using onboard ADCs.
- */
-
-#ifndef IMU_ANALOG_H
-#define IMU_ANALOG_H
-
-
-#define NB_ANALOG_IMU_ADC 6
-
-// if not all gyros are used, override the imu_scale_gyro handler
-#if defined ADC_CHANNEL_GYRO_P && defined ADC_CHANNEL_GYRO_Q && ! defined ADC_CHANNEL_GYRO_R
-
-#define IMU_GYRO_R_SIGN 1
-#define IMU_GYRO_R_NEUTRAL 0
-#define IMU_GYRO_R_SENS_NUM 1
-#define IMU_GYRO_R_SENS_DEN 1
-
-#elif defined ADC_CHANNEL_GYRO_P && ! defined ADC_CHANNEL_GYRO_Q && ! defined ADC_CHANNEL_GYRO_R
-
-#define IMU_GYRO_Q_SIGN 1
-#define IMU_GYRO_Q_NEUTRAL 0
-#define IMU_GYRO_Q_SENS_NUM 1
-#define IMU_GYRO_Q_SENS_DEN 1
-#define IMU_GYRO_R_SIGN 1
-#define IMU_GYRO_R_NEUTRAL 0
-#define IMU_GYRO_R_SENS_NUM 1
-#define IMU_GYRO_R_SENS_DEN 1
-
-#endif
-
-#if ! defined ADC_CHANNEL_ACCEL_X && ! defined ADC_CHANNEL_ACCEL_Z && ! defined ADC_CHANNEL_ACCEL_Z
-
-#define IMU_ACCEL_X_SENS_NUM 1
-#define IMU_ACCEL_X_SENS_DEN 1
-#define IMU_ACCEL_Y_SENS_NUM 1
-#define IMU_ACCEL_Y_SENS_DEN 1
-#define IMU_ACCEL_Z_SENS_NUM 1
-#define IMU_ACCEL_Z_SENS_DEN 1
-
-#endif
-
-
-/*
- * we include imh.h after the definitions of the neutrals
- */
-#include "subsystems/imu.h"
-
-
-extern int imu_overrun;
-
-extern void imu_analog_init(void);
-extern void imu_analog_periodic(void);
-
-#endif /* IMU_ANALOG_H */
diff --git a/sw/airborne/subsystems/imu/imu_b2.c b/sw/airborne/subsystems/imu/imu_b2.c
deleted file mode 100644
index 879ad182d1..0000000000
--- a/sw/airborne/subsystems/imu/imu_b2.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Copyright (C) 2008-2009 Antoine Drouin
- * Copyright (C) 2012 Gautier Hattenberger
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/**
- * @file subsystems/imu/imu_b2.c
- *
- * Driver for the Booz2 IMUs.
- *
- * Analog gyros and accelerometers are read via MAX1168 16-bit SPI ADC.
- * Depending on version, different I2C or SPI magnetometers are used.
- */
-
-#include "subsystems/imu.h"
-
-struct ImuBooz2 imu_b2;
-
-PRINT_CONFIG_VAR(IMU_B2_MAG_TYPE)
-
-void imu_b2_init(void)
-{
-
- max1168_init();
-#if defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_MS2100
- ms2100_init(&ms2100, &(MS2100_SPI_DEV), MS2100_SLAVE_IDX);
-#elif defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_AMI601
- ami601_init();
-#elif defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_HMC5843
- hmc5843_init();
-#elif defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_HMC58XX
- hmc58xx_init(&imu_b2.mag_hmc, &(IMU_B2_I2C_DEV), HMC58XX_ADDR);
- // Booz2 v1.2 has HMC5843
- imu_b2.mag_hmc.type = HMC_TYPE_5843;
-#endif
-
-}
-
-#include "led.h"
-void imu_b2_periodic(void)
-{
-
- // read adc
- Max1168Periodic();
- // read mag
-#if defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_MS2100
- ms2100_periodic(&ms2100);
-#elif defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_AMI601
- RunOnceEvery(10, { ami601_read(); });
-#elif defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_HMC58XX
- RunOnceEvery(5, hmc58xx_periodic(&imu_b2.mag_hmc));
-#endif
-
-}
-
-#if defined IMU_MAG_45_HACK
-void imu_scale_mag(struct Imu *_imu)
-{
- int32_t msx = ((_imu->mag_unscaled.x - _imu->mag_neutral.x) * IMU_MAG_X_SIGN * IMU_MAG_X_SENS_NUM) / IMU_MAG_X_SENS_DEN;
- int32_t msy = ((_imu->mag_unscaled.y - _imu->mag_neutral.y) * IMU_MAG_Y_SIGN * IMU_MAG_Y_SENS_NUM) / IMU_MAG_Y_SENS_DEN;
- _imu->mag.x = msx - msy;
- _imu->mag.y = msx + msy;
- _imu->mag.z = ((_imu->mag_unscaled.z - _imu->mag_neutral.z) * IMU_MAG_Z_SIGN * IMU_MAG_Z_SENS_NUM) / IMU_MAG_Z_SENS_DEN;
-}
-#elif defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_NONE
-void imu_scale_mag(struct Imu *_imu __attribute__((unused))) {}
-#endif
-
-
-
-/** Event functions for imu_b2.
- */
-#include "subsystems/abi.h"
-#include "mcu_periph/sys_time.h"
-
-#if defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_MS2100
-static inline void ImuMagEvent(void)
-{
- ms2100_event(&ms2100);
- if (ms2100.status == MS2100_DATA_AVAILABLE) {
- imu.mag_unscaled.x = ms2100.data.value[IMU_MAG_X_CHAN];
- imu.mag_unscaled.y = ms2100.data.value[IMU_MAG_Y_CHAN];
- imu.mag_unscaled.z = ms2100.data.value[IMU_MAG_Z_CHAN];
- ms2100.status = MS2100_IDLE;
- imu_scale_mag(&imu);
- AbiSendMsgIMU_MAG_INT32(IMU_B2_ID, get_sys_time_usec(), &imu.mag);
- }
-}
-#elif defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_AMI601
-static inline void foo_handler(void) {}
-static inline void ImuMagEvent(void)
-{
- AMI601Event(foo_handler);
- if (ami601_status == AMI601_DATA_AVAILABLE) {
- imu.mag_unscaled.x = ami601_values[IMU_MAG_X_CHAN];
- imu.mag_unscaled.y = ami601_values[IMU_MAG_Y_CHAN];
- imu.mag_unscaled.z = ami601_values[IMU_MAG_Z_CHAN];
- ami601_status = AMI601_IDLE;
- imu_scale_mag(&imu);
- AbiSendMsgIMU_MAG_INT32(IMU_B2_ID, get_sys_time_usec(), &imu.mag);
- }
-}
-#elif defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_HMC5843
-static inline void foo_handler(void) {}
-static inline void ImuMagEvent(void)
-{
- hmc5843_idle_task();
- if (hmc5843.data_available) {
- imu.mag_unscaled.x = hmc5843.data.value[IMU_MAG_X_CHAN];
- imu.mag_unscaled.y = hmc5843.data.value[IMU_MAG_Y_CHAN];
- imu.mag_unscaled.z = hmc5843.data.value[IMU_MAG_Z_CHAN];
- imu_scale_mag(&imu);
- AbiSendMsgIMU_MAG_INT32(IMU_B2_ID, get_sys_time_usec(), &imu.mag);
- hmc5843.data_available = false;
- }
-}
-#elif defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_HMC58XX
-static inline void ImuMagEvent(void)
-{
- hmc58xx_event(&imu_b2.mag_hmc);
- if (imu_b2.mag_hmc.data_available) {
- imu.mag_unscaled.x = imu_b2.mag_hmc.data.value[IMU_MAG_X_CHAN];
- imu.mag_unscaled.y = imu_b2.mag_hmc.data.value[IMU_MAG_Y_CHAN];
- imu.mag_unscaled.z = imu_b2.mag_hmc.data.value[IMU_MAG_Z_CHAN];
- imu_scale_mag(&imu);
- AbiSendMsgIMU_MAG_INT32(IMU_B2_ID, get_sys_time_usec(), &imu.mag);
- imu_b2.mag_hmc.data_available = false;
- }
-}
-#else
-#define ImuMagEvent() {}
-#endif
-
-
-void imu_b2_event(void)
-{
- max1168_event();
- if (max1168_status == MAX1168_DATA_AVAILABLE) {
- uint32_t now_ts = get_sys_time_usec();
- imu.gyro_unscaled.p = max1168_values[IMU_GYRO_P_CHAN];
- imu.gyro_unscaled.q = max1168_values[IMU_GYRO_Q_CHAN];
- imu.gyro_unscaled.r = max1168_values[IMU_GYRO_R_CHAN];
- imu.accel_unscaled.x = max1168_values[IMU_ACCEL_X_CHAN];
- imu.accel_unscaled.y = max1168_values[IMU_ACCEL_Y_CHAN];
- imu.accel_unscaled.z = max1168_values[IMU_ACCEL_Z_CHAN];
- max1168_status = MAX1168_IDLE;
- imu_scale_gyro(&imu);
- imu_scale_accel(&imu);
- AbiSendMsgIMU_GYRO_INT32(IMU_ASPIRIN2_ID, now_ts, &imu.gyro);
- AbiSendMsgIMU_ACCEL_INT32(IMU_ASPIRIN2_ID, now_ts, &imu.accel);
- }
- ImuMagEvent();
-}
diff --git a/sw/airborne/subsystems/imu/imu_b2.h b/sw/airborne/subsystems/imu/imu_b2.h
deleted file mode 100644
index 66b2103ef5..0000000000
--- a/sw/airborne/subsystems/imu/imu_b2.h
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Copyright (C) 2008-2009 Antoine Drouin
- * Copyright (C) 2012 Gautier Hattenberger
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/**
- * @file subsystems/imu/imu_b2.h
- *
- * Interface for the Booz2 IMUs.
- */
-
-
-#ifndef IMU_B2_H
-#define IMU_B2_H
-
-#include "generated/airframe.h"
-
-#include "peripherals/max1168.h"
-
-/* type of magnetometer */
-#define IMU_B2_MAG_NONE 0
-#define IMU_B2_MAG_MS2100 1
-#define IMU_B2_MAG_AMI601 2
-#define IMU_B2_MAG_HMC5843 3
-#define IMU_B2_MAG_HMC58XX 4
-
-#if defined IMU_B2_MAG_TYPE
-#if IMU_B2_MAG_TYPE == IMU_B2_MAG_HMC58XX
-#include "peripherals/hmc58xx.h"
-#elif IMU_B2_MAG_TYPE == IMU_B2_MAG_MS2100
-#include "peripherals/ms2100.h"
-#elif IMU_B2_MAG_TYPE == IMU_B2_MAG_AMI601
-#include "peripherals/ami601.h"
-#elif IMU_B2_MAG_TYPE == IMU_B2_MAG_HMC5843
-#include "peripherals/hmc5843.h"
-#endif
-#endif
-
-#ifdef IMU_B2_VERSION_1_0
-/* Default IMU b2 sensors connection */
-#if !defined IMU_GYRO_P_CHAN & !defined IMU_GYRO_Q_CHAN & !defined IMU_GYRO_R_CHAN
-#define IMU_GYRO_P_CHAN 1
-#define IMU_GYRO_Q_CHAN 0
-#define IMU_GYRO_R_CHAN 2
-#endif
-#if !defined IMU_ACCEL_X_CHAN & !defined IMU_ACCEL_Y_CHAN & !defined IMU_ACCEL_Z_CHAN
-#define IMU_ACCEL_X_CHAN 3
-#define IMU_ACCEL_Y_CHAN 5
-#define IMU_ACCEL_Z_CHAN 6
-#endif
-#if !defined IMU_MAG_X_CHAN & !defined IMU_MAG_Y_CHAN & !defined IMU_MAG_Z_CHAN
-#define IMU_MAG_X_CHAN 0
-#define IMU_MAG_Y_CHAN 1
-#define IMU_MAG_Z_CHAN 2
-#endif
-
-#if !defined IMU_GYRO_P_SIGN & !defined IMU_GYRO_Q_SIGN & !defined IMU_GYRO_R_SIGN
-#define IMU_GYRO_P_SIGN 1
-#define IMU_GYRO_Q_SIGN -1
-#define IMU_GYRO_R_SIGN -1
-#endif
-#if !defined IMU_ACCEL_X_SIGN & !defined IMU_ACCEL_Y_SIGN & !defined IMU_ACCEL_Z_SIGN
-#define IMU_ACCEL_X_SIGN -1
-#define IMU_ACCEL_Y_SIGN -1
-#define IMU_ACCEL_Z_SIGN -1
-#endif
-#if !defined IMU_MAG_X_SIGN & !defined IMU_MAG_Y_SIGN & !defined IMU_MAG_Z_SIGN
-#define IMU_MAG_X_SIGN 1
-#define IMU_MAG_Y_SIGN -1
-#define IMU_MAG_Z_SIGN -1
-#endif
-#endif /* IMU_B2_VERSION_1_0 */
-
-
-#ifdef IMU_B2_VERSION_1_1
-/* Default IMU b2 sensors connection */
-#if !defined IMU_GYRO_P_CHAN & !defined IMU_GYRO_Q_CHAN & !defined IMU_GYRO_R_CHAN
-#define IMU_GYRO_P_CHAN 1
-#define IMU_GYRO_Q_CHAN 0
-#define IMU_GYRO_R_CHAN 2
-#endif
-#if !defined IMU_ACCEL_X_CHAN & !defined IMU_ACCEL_Y_CHAN & !defined IMU_ACCEL_Z_CHAN
-#define IMU_ACCEL_X_CHAN 5
-#define IMU_ACCEL_Y_CHAN 3
-#define IMU_ACCEL_Z_CHAN 4
-#endif
-#if !defined IMU_MAG_X_CHAN & !defined IMU_MAG_Y_CHAN & !defined IMU_MAG_Z_CHAN
-#define IMU_MAG_X_CHAN 0
-#define IMU_MAG_Y_CHAN 1
-#define IMU_MAG_Z_CHAN 2
-#endif
-
-#if !defined IMU_GYRO_P_SIGN & !defined IMU_GYRO_Q_SIGN & !defined IMU_GYRO_R_SIGN
-#define IMU_GYRO_P_SIGN 1
-#define IMU_GYRO_Q_SIGN -1
-#define IMU_GYRO_R_SIGN -1
-#endif
-#if !defined IMU_ACCEL_X_SIGN & !defined IMU_ACCEL_Y_SIGN & !defined IMU_ACCEL_Z_SIGN
-#define IMU_ACCEL_X_SIGN -1
-#define IMU_ACCEL_Y_SIGN -1
-#define IMU_ACCEL_Z_SIGN -1
-#endif
-#if !defined IMU_MAG_X_SIGN & !defined IMU_MAG_Y_SIGN & !defined IMU_MAG_Z_SIGN
-#define IMU_MAG_X_SIGN 1
-#define IMU_MAG_Y_SIGN -1
-#define IMU_MAG_Z_SIGN -1
-#endif
-#endif /* IMU_B2_VERSION_1_1 */
-
-#ifdef IMU_B2_VERSION_1_2
-/* Default IMU b2 sensors connection */
-#if !defined IMU_GYRO_P_CHAN & !defined IMU_GYRO_Q_CHAN & !defined IMU_GYRO_R_CHAN
-#define IMU_GYRO_P_CHAN 1
-#define IMU_GYRO_Q_CHAN 0
-#define IMU_GYRO_R_CHAN 2
-#endif
-#if !defined IMU_ACCEL_X_CHAN & !defined IMU_ACCEL_Y_CHAN & !defined IMU_ACCEL_Z_CHAN
-#define IMU_ACCEL_X_CHAN 4
-#define IMU_ACCEL_Y_CHAN 5
-#define IMU_ACCEL_Z_CHAN 3
-#endif
-#if !defined IMU_MAG_X_CHAN & !defined IMU_MAG_Y_CHAN & !defined IMU_MAG_Z_CHAN
-#define IMU_MAG_X_CHAN 0
-#define IMU_MAG_Y_CHAN 1
-#define IMU_MAG_Z_CHAN 2
-#endif
-
-#if !defined IMU_GYRO_P_SIGN & !defined IMU_GYRO_Q_SIGN & !defined IMU_GYRO_R_SIGN
-#define IMU_GYRO_P_SIGN 1
-#define IMU_GYRO_Q_SIGN -1
-#define IMU_GYRO_R_SIGN -1
-#endif
-#if !defined IMU_ACCEL_X_SIGN & !defined IMU_ACCEL_Y_SIGN & !defined IMU_ACCEL_Z_SIGN
-#define IMU_ACCEL_X_SIGN 1
-#define IMU_ACCEL_Y_SIGN -1
-#define IMU_ACCEL_Z_SIGN 1
-#endif
-#if !defined IMU_MAG_X_SIGN & !defined IMU_MAG_Y_SIGN & !defined IMU_MAG_Z_SIGN
-#define IMU_MAG_X_SIGN -1
-#define IMU_MAG_Y_SIGN -1
-#define IMU_MAG_Z_SIGN 1
-#endif
-#endif /* IMU_B2_VERSION_1_2 */
-
-/*
- * we include imh.h after the definitions channels and signs
- */
-#include "subsystems/imu.h"
-
-
-struct ImuBooz2 {
-#if defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_HMC58XX
- struct Hmc58xx mag_hmc;
-#endif
-};
-
-extern struct ImuBooz2 imu_b2;
-
-extern void imu_b2_init(void);
-extern void imu_b2_periodic(void);
-extern void imu_b2_event(void);
-
-#endif /* IMU_B2_H */
diff --git a/sw/ground_segment/lpc21iap/Makefile b/sw/ground_segment/lpc21iap/Makefile
deleted file mode 100644
index a65cd0a9f6..0000000000
--- a/sw/ground_segment/lpc21iap/Makefile
+++ /dev/null
@@ -1,53 +0,0 @@
-#MS VC: cl lpc21iap.c elf.c lpcusb.c libusb.lib
-
-# Quiet compilation
-Q=@
-
-LIBNAME = usb
-APPNAME = lpc21iap
-
-# Package definitions
-PKG_NAME = lpc21iap
-DATE = $$(date +%Y%m%d)
-DATEL = $$(date +%Y%m%d-%H%M)
-
-# Tool definitions
-CC = gcc
-LD = ld
-AR = ar
-AS = as
-CP = objcopy
-OD = objdump
-RM = rm
-TAR = tar
-
-UNAME = $(shell uname -s)
-ifeq ("$(UNAME)","Darwin")
- LIBRARYS = $(shell if test -d /opt/paparazzi/lib; then echo "-L/opt/paparazzi/lib"; elif test -d /opt/local/lib; then echo "-L/opt/local/lib"; fi)
- INCLUDES = $(shell if test -d /opt/paparazzi/include; then echo "-I/opt/paparazzi/include"; elif test -d /opt/local/include; then echo "-I/opt/local/include"; fi)
-endif
-
-CFLAGS = -Wall -g -fPIC $(INCLUDES) $(LIBRARYS)
-
-SOURCES = lpc21iap.c elf.c lpcusb.c
-
-all: $(APPNAME)
-
-clean:
- $(Q)$(RM) -f core $(APPNAME).o $(APPNAME) $(APPNAME).obj $(APPNAME).exe
-
-app: $(APPNAME)
-
-$(APPNAME): $(SOURCES) Makefile
- @echo LD $@
- $(Q)$(CC) $(CFLAGS) $(SOURCES) -o $(APPNAME) -l$(LIBNAME)
-
-# Builds archive tar file
-arch: clean
- cd .. && $(TAR) --exclude={CVS,cvs} -cvzf $(PKG_NAME)-$(DATEL).tar.gz $(PKG_NAME)
-
-# Builds release tar file
-dist: clean
- cd .. && $(TAR) --exclude={CVS,cvs} -cvzf $(PKG_NAME)-$(DATE).tar.gz $(PKG_NAME)
-
-.PHONY: all clean app arch dist
diff --git a/sw/ground_segment/lpc21iap/README.TXT b/sw/ground_segment/lpc21iap/README.TXT
deleted file mode 100644
index 68d2509610..0000000000
--- a/sw/ground_segment/lpc21iap/README.TXT
+++ /dev/null
@@ -1,95 +0,0 @@
-simple answer
-=============
-
-[preliminary]
-
-link your airborne programs using the bootloader-specific linker script
-make AIRCRAFT=TJ1 LDSCRIPT=arm7/LPC2148-ROM-bl.ld clean_ac fbw.compile
-make AIRCRAFT=TJ1 LDSCRIPT=arm7/LPC2148-ROM-bl.ld ap.compile
-
-
-apt-get install libusb
-( warning on sid I had to do apt-get install libusb-0.1-4 )
-apt-get install libusb-dev
-(maybe this also needs a version?)
-
-cp $PAPARAZZI_SRC/conf/system/udev/rules/10-paparazzi.rules /etc/udev/rules.d/
-cd $PAPARAZZI_SRC/sw/airborne/arm7/test/bootloader/
-make
-lpc21isp -control bl.hex /dev/ttyS0 38400 12000
-cd $PAPARAZZI_SRC/sw/ground_segment/lpc21iap/
-make
-./lpc21iap $PAPARAZZI_SRC/var/(your aircraft)/ap/ap.elf
-./lpc21iap $PAPARAZZI_SRC/var/(your aircraft)/fbw/fbw.elf
-
-lpc21iap
-========
-
-This is a download application for Philips LPC processors. So far only the LPC214x series is supported (as only they have USB function). The built-in bootloader serial download for the LPC processors is not the fastest. An USB download might be much faster and convenient.
-
-An entire LPC2148 is re-flashed (erase, download, flash and verify 500kB) in a couple of seconds. Multiple LPC processors can be used and flashed with specific flash images by having different serial numbers.
-
-Bertrik Sikken provided a neat and easy-to-use USB library that is the base for the embedded software. The lpc21isp software from Martin Maurer inspired the PC software. Use it to download the bootloader. The libusb package is the API to have an easy access to the USB with Linux, Cygwin and Windows.
-
-Get libusb from sourceforge, install it. You might have to fiddle with hotplug or udev when using Linux for appropriate USB device access rights. Make lpc21iap and the bootloader software for the target. Flash the bootloader bl.hex with lpc21isp.
-
-The first four 4096 bytes sectors are reserved for the bootloader. Your application should be linked to 0x4000 (don't forget the '-n' option when linking!). The bootloader interrupt vectors are re-directed to 0x4000 execept the reset and the irq vector. After a reset the bootloader will check the Vbus (P0.23) pin (or any other, change it easily in crt.s) if it is set. If yes, the bootloader is started. Otherwise it will jump to 0x4000. The irq vector will read the reset vector from the VIC register. If you want to use USB in your application, change either the bootpin in crt.s or set it to one manually by writing '1' to GPIO P0.23.
-
-If you want to flash the first four sectors with lpc21iap you have to use the RAM version bl_ram.elf.
-
-The used USB vendor/device ID is made up (0x7070/0x1234). Someone willing to donate one?
-
-Protocol
-========
-
-The Philips LPC21 ISP and IAP commands are used to communicate with the device. They are transparently transferred over USB. Either of the protocols can be used (each command set includes commands the other one does not support). Some proprietary bootloader BTL commands are added as well.
-
-Every command consists of up to three phases. In the first phase the command plus parameters are given to the device and immediately executed. The host might receive a result in the second phase (not mandatory). The third phase is used to transfer data to/from the device. Some commands consist only of one phase (eg. GO), some need all three phases (eg. WRITE_TO_RAM).
-
-The IAP and ISP commands are mapped to (endpoint 0) vendor requests. The switching between command and result is done by the direction bit in bmRequestType (Host-to-device = command). The bRequest is defined as:
-
- REQ_ISP_COMMAND 0xF0
- REQ_IAP_COMMAND 0xF1
- REQ_BTL_COMMAND 0xF2
- REQ_DATA_TRANSFER 0xF3
-
-The wValue and wIndex of the request are reserved, write them as zero. The wLength defines the number of bytes to be transferred to/from device in this request. Command, result and data is transferred during the data phase of the vendor request. wLength is 20 bytes (5 words) in the command phase, 32 bytes (3 + 5 words) in result phase and can be any size in data phase. Little endian format is used for any data.
-
-The command consists of 5 words as defined by Philips IAP/ISP definition. Word 0 is the command (eg. ASCII value 'G' for ISP_GO in ISP or value 56 in IAP for IAP_COMPARE. Word 1-4 give additional parameters.
-
-The result size is 8 words. Word 0 gives the result and word 1-2 contains additional response information. Word 3-7 contain the original command that the result came from.
-
-Some commands require additional data to be transferred. This data is send with one or more DATA_TRANSFER requests. The total length of data is defined in the command (eg. READ_MEMORY) phase. Data transfer sizes bigger than 4kBytes have to be split in several data transfer requests.
-
-Example:
-
-direction host->device
-request REQ_ISP_COMMAND
-command[0] ISP_WRITE_TO_RAM
-command[1] (startaddress)
-command[2] (size)
-command[3] (undefined)
-command[4] (undefined)
-
-direction host<-device
-request REQ_ISP_COMMAND
-result[0] CMD_SUCCESS
-result[1] (undefined)
-result[2] (undefined)
-result[3] ISP_WRITE_TO_RAM
-result[4] (startaddress)
-result[5] (size)
-result[6] (undefined)
-result[7] (undefined)
-
-direction host->device
-request REQ_DATA_TRANSFER
-data[0] (data)
- ...
-data[n] (data)
-
-direction host->device
-request REQ_DATA_TRANSFER
-data[n+1] (data)
- ...
-data[size] (data)
diff --git a/sw/ground_segment/lpc21iap/elf.c b/sw/ground_segment/lpc21iap/elf.c
deleted file mode 100644
index 4ea86d7e2a..0000000000
--- a/sw/ground_segment/lpc21iap/elf.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/* $Id$
- *
- * lpc21iap, an USB download application for Philips LPC processors
- * Copyright (C) 2006 Martin Mueller
- *
- * This file is part of paparazzi.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-#include "elf.h"
-
-char ELFCheckHeader(unsigned char * binElf)
-{
- Elf32_Ehdr * eHdr = (Elf32_Ehdr*) binElf;
-
- if ((eHdr->e_ident[EI_MAG0] == ELFMAG0) &&
- (eHdr->e_ident[EI_MAG1] == ELFMAG1) &&
- (eHdr->e_ident[EI_MAG2] == ELFMAG2) &&
- (eHdr->e_ident[EI_MAG3] == ELFMAG3) &&
- (eHdr->e_ident[EI_CLASS] == ELFCLASS32) &&
- (eHdr->e_ident[EI_DATA] == ELFDATA2LSB) &&
- (eHdr->e_ident[EI_VERSION] == EV_CURRENT) &&
- ((eHdr->e_ident[EI_OSABI] == ELFOSABI_ARM) ||
- (eHdr->e_ident[EI_OSABI] == ELFOSABI_NONE)) &&
- (eHdr->e_type == ET_EXEC) &&
- (eHdr->e_machine == EM_ARM) &&
- (eHdr->e_version == EV_CURRENT))
- {
- return(1);
- }
-
- return(0);
-}
-
-unsigned int ELFHdrFlags(unsigned char * binElf)
-{
- Elf32_Ehdr * eHdr = (Elf32_Ehdr*) binElf;
-
- return(eHdr->e_flags);
-}
-
-unsigned int ELFEntryAddr(unsigned char * binElf)
-{
- Elf32_Ehdr * eHdr = (Elf32_Ehdr*) binElf;
-
- return(eHdr->e_entry);
-}
-
-/* program header functions */
-
-int ELFNoPSections(unsigned char * binElf)
-{
- Elf32_Ehdr * eHdr = (Elf32_Ehdr*) binElf;
-
- return(eHdr->e_phnum);
-}
-
-unsigned int ELFTypePSection(unsigned char * binElf, int count)
-{
- Elf32_Ehdr * eHdr = (Elf32_Ehdr*) binElf;
- Elf32_Phdr * pHdr;
-
- pHdr = (Elf32_Phdr *) (binElf + eHdr->e_phoff);
- pHdr += count;
-
- return(pHdr->p_type);
-}
-
-unsigned int ELFFlagPSection(unsigned char * binElf, int count)
-{
- Elf32_Ehdr * eHdr = (Elf32_Ehdr*) binElf;
- Elf32_Phdr * pHdr;
-
- pHdr = (Elf32_Phdr *) (binElf + eHdr->e_phoff);
- pHdr += count;
-
- return(pHdr->p_flags);
-}
-unsigned int ELFOffsPSection(unsigned char * binElf, int count)
-{
- Elf32_Ehdr * eHdr = (Elf32_Ehdr*) binElf;
- Elf32_Phdr * pHdr;
-
- pHdr = (Elf32_Phdr *) (binElf + eHdr->e_phoff);
- pHdr += count;
-
- return(pHdr->p_offset);
-}
-
-
-unsigned int ELFAddrPSection(unsigned char * binElf, int count)
-{
- Elf32_Ehdr * eHdr = (Elf32_Ehdr*) binElf;
- Elf32_Phdr * pHdr;
-
- pHdr = (Elf32_Phdr *) (binElf + eHdr->e_phoff);
- pHdr += count;
-
- return(pHdr->p_paddr);
-}
-
-unsigned int ELFSizePSection(unsigned char * binElf, int count)
-{
- Elf32_Ehdr * eHdr = (Elf32_Ehdr*) binElf;
- Elf32_Phdr * pHdr;
-
- pHdr = (Elf32_Phdr *) (binElf + eHdr->e_phoff);
- pHdr += count;
-
- return(pHdr->p_filesz);
-}
-
diff --git a/sw/ground_segment/lpc21iap/elf.h b/sw/ground_segment/lpc21iap/elf.h
deleted file mode 100644
index 7391f6ea1f..0000000000
--- a/sw/ground_segment/lpc21iap/elf.h
+++ /dev/null
@@ -1,340 +0,0 @@
-/*
-elf.h - various ELF informations collected from libelf
-Copyright (C) 1995 - 1998 Michael Riepe
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-/* @(#) $Id$ */
-
-/*
- * ELF header
- */
-#define EI_NIDENT 16
-
-typedef struct {
- unsigned char e_ident[EI_NIDENT];
- unsigned short e_type;
- unsigned short e_machine;
- unsigned int e_version;
- unsigned int e_entry;
- unsigned int e_phoff;
- unsigned int e_shoff;
- unsigned int e_flags;
- unsigned short e_ehsize;
- unsigned short e_phentsize;
- unsigned short e_phnum;
- unsigned short e_shentsize;
- unsigned short e_shnum;
- unsigned short e_shstrndx;
-} Elf32_Ehdr;
-
-/*
- * e_ident
- */
-#define EI_MAG0 0
-#define EI_MAG1 1
-#define EI_MAG2 2
-#define EI_MAG3 3
-#define EI_CLASS 4
-#define EI_DATA 5
-#define EI_VERSION 6
-#define EI_OSABI 7
-#define EI_ABIVERSION 8
-#define EI_PAD 9
-
-#define ELFMAG0 0x7f
-#define ELFMAG1 'E'
-#define ELFMAG2 'L'
-#define ELFMAG3 'F'
-#define ELFMAG "\177ELF"
-#define SELFMAG 4
-
-/*
- * e_ident[EI_CLASS]
- */
-#define ELFCLASSNONE 0
-#define ELFCLASS32 1
-#define ELFCLASS64 2
-#define ELFCLASSNUM 3
-
-/*
- * e_ident[EI_DATA]
- */
-#define ELFDATANONE 0
-#define ELFDATA2LSB 1
-#define ELFDATA2MSB 2
-#define ELFDATANUM 3
-
-/*
- * e_ident[EI_OSABI]
- */
-#define ELFOSABI_NONE 0 /* No extensions or unspecified */
-#define ELFOSABI_SYSV ELFOSABI_NONE
-#define ELFOSABI_HPUX 1 /* Hewlett-Packard HP-UX */
-#define ELFOSABI_NETBSD 2 /* NetBSD */
-#define ELFOSABI_LINUX 3 /* Linux */
-#define ELFOSABI_SOLARIS 6 /* Sun Solaris */
-#define ELFOSABI_AIX 7 /* AIX */
-#define ELFOSABI_IRIX 8 /* IRIX */
-#define ELFOSABI_FREEBSD 9 /* FreeBSD */
-#define ELFOSABI_TRU64 10 /* Compaq TRU64 UNIX */
-#define ELFOSABI_MODESTO 11 /* Novell Modesto */
-#define ELFOSABI_OPENBSD 12 /* Open BSD */
-#define ELFOSABI_OPENVMS 13 /* Open VMS */
-#define ELFOSABI_NSK 14 /* Hewlett-Packard Non-Stop Kernel */
-#define ELFOSABI_AROS 15 /* Amiga Research OS */
-/* these are probably obsolete: */
-#define ELFOSABI_ARM 97 /* ARM */
-#define ELFOSABI_STANDALONE 255 /* standalone (embedded) application */
-
-/*
- * e_type
- */
-#define ET_NONE 0
-#define ET_REL 1
-#define ET_EXEC 2
-#define ET_DYN 3
-#define ET_CORE 4
-#define ET_NUM 5
-#define ET_LOOS 0xfe00
-#define ET_HIOS 0xfeff
-#define ET_LOPROC 0xff00
-#define ET_HIPROC 0xffff
-
-/*
- * e_machine
- */
-#define EM_NONE 0 /* No machine */
-#define EM_M32 1 /* AT&T WE 32100 */
-#define EM_SPARC 2 /* SPARC */
-#define EM_386 3 /* Intel 80386 */
-#define EM_68K 4 /* Motorola 68000 */
-#define EM_88K 5 /* Motorola 88000 */
-#define EM_486 6 /* Intel i486 (DO NOT USE THIS ONE) */
-#define EM_860 7 /* Intel 80860 */
-#define EM_MIPS 8 /* MIPS I Architecture */
-#define EM_S370 9 /* IBM System/370 Processor */
-#define EM_MIPS_RS3_LE 10 /* MIPS RS3000 Little-endian */
-#define EM_SPARC64 11 /* SPARC 64-bit */
-#define EM_PARISC 15 /* Hewlett-Packard PA-RISC */
-#define EM_VPP500 17 /* Fujitsu VPP500 */
-#define EM_SPARC32PLUS 18 /* Enhanced instruction set SPARC */
-#define EM_960 19 /* Intel 80960 */
-#define EM_PPC 20 /* PowerPC */
-#define EM_PPC64 21 /* 64-bit PowerPC */
-#define EM_S390 22 /* IBM System/390 Processor */
-#define EM_V800 36 /* NEC V800 */
-#define EM_FR20 37 /* Fujitsu FR20 */
-#define EM_RH32 38 /* TRW RH-32 */
-#define EM_RCE 39 /* Motorola RCE */
-#define EM_ARM 40 /* Advanced RISC Machines ARM */
-#define EM_ALPHA 41 /* Digital Alpha */
-#define EM_SH 42 /* Hitachi SH */
-#define EM_SPARCV9 43 /* SPARC Version 9 */
-#define EM_TRICORE 44 /* Siemens TriCore embedded processor */
-#define EM_ARC 45 /* Argonaut RISC Core, Argonaut Technologies Inc. */
-#define EM_H8_300 46 /* Hitachi H8/300 */
-#define EM_H8_300H 47 /* Hitachi H8/300H */
-#define EM_H8S 48 /* Hitachi H8S */
-#define EM_H8_500 49 /* Hitachi H8/500 */
-#define EM_IA_64 50 /* Intel IA-64 processor architecture */
-#define EM_MIPS_X 51 /* Stanford MIPS-X */
-#define EM_COLDFIRE 52 /* Motorola ColdFire */
-#define EM_68HC12 53 /* Motorola M68HC12 */
-#define EM_MMA 54 /* Fujitsu MMA Multimedia Accelerator */
-#define EM_PCP 55 /* Siemens PCP */
-#define EM_NCPU 56 /* Sony nCPU embedded RISC processor */
-#define EM_NDR1 57 /* Denso NDR1 microprocessor */
-#define EM_STARCORE 58 /* Motorola Star*Core processor */
-#define EM_ME16 59 /* Toyota ME16 processor */
-#define EM_ST100 60 /* STMicroelectronics ST100 processor */
-#define EM_TINYJ 61 /* Advanced Logic Corp. TinyJ embedded processor family */
-#define EM_X86_64 62 /* AMD x86-64 architecture */
-#define EM_PDSP 63 /* Sony DSP Processor */
-#define EM_FX66 66 /* Siemens FX66 microcontroller */
-#define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 bit microcontroller */
-#define EM_ST7 68 /* STMicroelectronics ST7 8-bit microcontroller */
-#define EM_68HC16 69 /* Motorola MC68HC16 Microcontroller */
-#define EM_68HC11 70 /* Motorola MC68HC11 Microcontroller */
-#define EM_68HC08 71 /* Motorola MC68HC08 Microcontroller */
-#define EM_68HC05 72 /* Motorola MC68HC05 Microcontroller */
-#define EM_SVX 73 /* Silicon Graphics SVx */
-#define EM_ST19 74 /* STMicroelectronics ST19 8-bit microcontroller */
-#define EM_VAX 75 /* Digital VAX */
-#define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */
-#define EM_JAVELIN 77 /* Infineon Technologies 32-bit embedded processor */
-#define EM_FIREPATH 78 /* Element 14 64-bit DSP Processor */
-#define EM_ZSP 79 /* LSI Logic 16-bit DSP Processor */
-#define EM_MMIX 80 /* Donald Knuth's educational 64-bit processor */
-#define EM_HUANY 81 /* Harvard University machine-independent object files */
-#define EM_PRISM 82 /* SiTera Prism */
-#define EM_AVR 83 /* Atmel AVR 8-bit microcontroller */
-#define EM_FR30 84 /* Fujitsu FR30 */
-#define EM_D10V 85 /* Mitsubishi D10V */
-#define EM_D30V 86 /* Mitsubishi D30V */
-#define EM_V850 87 /* NEC v850 */
-#define EM_M32R 88 /* Mitsubishi M32R */
-#define EM_MN10300 89 /* Matsushita MN10300 */
-#define EM_MN10200 90 /* Matsushita MN10200 */
-#define EM_PJ 91 /* picoJava */
-#define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */
-#define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */
-#define EM_XTENSA 94 /* Tensilica Xtensa Architecture */
-#define EM_VIDEOCORE 95 /* Alphamosaic VideoCore processor */
-#define EM_TMM_GPP 96 /* Thompson Multimedia General Purpose Processor */
-#define EM_NS32K 97 /* National Semiconductor 32000 series */
-#define EM_TPC 98 /* Tenor Network TPC processor */
-#define EM_SNP1K 99 /* Trebia SNP 1000 processor */
-#define EM_ST200 100 /* STMicroelectronics (www.st.com) ST200 microcontroller */
-#define EM_IP2K 101 /* Ubicom IP2xxx microcontroller family */
-#define EM_MAX 102 /* MAX Processor */
-#define EM_CR 103 /* National Semiconductor CompactRISC microprocessor */
-#define EM_F2MC16 104 /* Fujitsu F2MC16 */
-#define EM_MSP430 105 /* Texas Instruments embedded microcontroller msp430 */
-#define EM_BLACKFIN 106 /* Analog Devices Blackfin (DSP) processor */
-#define EM_SE_C33 107 /* S1C33 Family of Seiko Epson processors */
-#define EM_SEP 108 /* Sharp embedded microprocessor */
-#define EM_ARCA 109 /* Arca RISC Microprocessor */
-#define EM_UNICORE 110 /* Microprocessor series from PKU-Unity Ltd. and MPRC of Peking University */
-#define EM_NUM 111
-
-/*
- * e_ident[EI_VERSION], e_version
- */
-#define EV_NONE 0
-#define EV_CURRENT 1
-#define EV_NUM 2
-
-/*
- * e_flags
- */
-#define EF_ARM_RELEXEC 0x01
-#define EF_ARM_HASENTRY 0x02
-#define EF_ARM_INTERWORK 0x04
-
-/*
- * Program header
- */
-typedef struct {
- unsigned int p_type;
- unsigned int p_offset;
- unsigned int p_vaddr;
- unsigned int p_paddr;
- unsigned int p_filesz;
- unsigned int p_memsz;
- unsigned int p_flags;
- unsigned int p_align;
-} Elf32_Phdr;
-
-/*
- * p_type
- */
-#define PT_NULL 0
-#define PT_LOAD 1
-#define PT_DYNAMIC 2
-#define PT_INTERP 3
-#define PT_NOTE 4
-#define PT_SHLIB 5
-#define PT_PHDR 6
-#define PT_TLS 7
-#define PT_NUM 8
-#define PT_LOOS 0x60000000
-#define PT_HIOS 0x6fffffff
-#define PT_LOPROC 0x70000000
-#define PT_HIPROC 0x7fffffff
-#define SHT_ARM_EXIDX 0x70000001
-
-/*
- * p_flags
- */
-#define PF_X 0x1
-#define PF_W 0x2
-#define PF_R 0x4
-#define PF_MASKOS 0x0ff00000
-#define PF_MASKPROC 0xf0000000
-
-/*
- * Section header
- */
-typedef struct {
- unsigned int sh_name;
- unsigned int sh_type;
- unsigned int sh_flags;
- unsigned int sh_addr;
- unsigned int sh_offset;
- unsigned int sh_size;
- unsigned int sh_link;
- unsigned int sh_info;
- unsigned int sh_addralign;
- unsigned int sh_entsize;
-} Elf32_Shdr;
-
-/*
- * sh_type
- */
-#define SHT_NULL 0
-#define SHT_PROGBITS 1
-#define SHT_SYMTAB 2
-#define SHT_STRTAB 3
-#define SHT_RELA 4
-#define SHT_HASH 5
-#define SHT_DYNAMIC 6
-#define SHT_NOTE 7
-#define SHT_NOBITS 8
-#define SHT_REL 9
-#define SHT_SHLIB 10
-#define SHT_DYNSYM 11
-#define SHT_INIT_ARRAY 14
-#define SHT_FINI_ARRA 15
-#define SHT_PREINIT_ARRAY 16
-#define SHT_GROUP 17
-#define SHT_SYMTAB_SHNDX 18
-#define SHT_NUM 19
-#define SHT_LOOS 0x60000000
-#define SHT_HIOS 0x6fffffff
-#define SHT_LOPROC 0x70000000
-#define SHT_HIPROC 0x7fffffff
-#define SHT_LOUSER 0x80000000
-#define SHT_HIUSER 0xffffffff
-
-/*
- * sh_flags
- */
-#define SHF_WRITE 0x1
-#define SHF_ALLOC 0x2
-#define SHF_EXECINSTR 0x4
-#define SHF_MERGE 0x10
-#define SHF_STRINGS 0x20
-#define SHF_INFO_LINK 0x40
-#define SHF_LINK_ORDER 0x80
-#define SHF_OS_NONCONFORMING 0x100
-#define SHF_GROUP 0x200
-#define SHF_TLS 0x400
-#define SHF_MASKOS 0x0ff00000
-#define SHF_MASKPROC 0xf0000000
-
-/* functions */
-
-char ELFCheckHeader(unsigned char * binElf);
-unsigned int ELFHdrFlags(unsigned char * binElf);
-unsigned int ELFEntryAddr(unsigned char * binElf);
-int ELFNoPSections(unsigned char * binElf);
-unsigned int ELFTypePSection(unsigned char * binElf, int count);
-unsigned int ELFFlagPSection(unsigned char * binElf, int count);
-unsigned int ELFOffsPSection(unsigned char * binElf, int count);
-unsigned int ELFAddrPSection(unsigned char * binElf, int count);
-unsigned int ELFSizePSection(unsigned char * binElf, int count);
-
diff --git a/sw/ground_segment/lpc21iap/lpc21iap-win32.zip b/sw/ground_segment/lpc21iap/lpc21iap-win32.zip
deleted file mode 100755
index c29580d253..0000000000
Binary files a/sw/ground_segment/lpc21iap/lpc21iap-win32.zip and /dev/null differ
diff --git a/sw/ground_segment/lpc21iap/lpc21iap.c b/sw/ground_segment/lpc21iap/lpc21iap.c
deleted file mode 100644
index c49e19eb1e..0000000000
--- a/sw/ground_segment/lpc21iap/lpc21iap.c
+++ /dev/null
@@ -1,573 +0,0 @@
-/* $Id$
- *
- * lpc21iap, an USB download application for Philips LPC processors
- * Copyright (C) 2006 Martin Mueller
- *
- * This file is part of paparazzi.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-
-#define LPC21IAP_VER_MAJ 1
-#define LPC21IAP_VER_MIN 4
-
-
-#if defined(_WIN32) && !defined(__CYGWIN__)
- #define COMPILE_FOR_WINDOWS
-#elif defined(__CYGWIN__)
- #define COMPILE_FOR_CYGWIN
-#else
- #define COMPILE_FOR_LINUX
-#endif
-
-#if defined COMPILE_FOR_WINDOWS || defined COMPILE_FOR_CYGWIN
-#include
-#include
-#endif // defined COMPILE_FOR_WINDOWS || defined COMPILE_FOR_CYGWIN
-
-#if defined COMPILE_FOR_WINDOWS
-#include
-#endif // defined COMPILE_FOR_WINDOWS
-
-#if defined COMPILE_FOR_LINUX
-#include
-#include
-#include
-#include
-#include
-#include
-#endif // defined COMPILE_FOR_LINUX
-
-#if defined COMPILE_FOR_LINUX || defined COMPILE_FOR_CYGWIN
-#include
-#include // for read and return value of lseek
-#endif // defined COMPILE_FOR_LINUX || defined COMPILE_FOR_CYGWIN
-
-#include // isdigit()
-#include // stdout
-#include
-#include
-#include // libusb
-
-#include "elf.h"
-#include "lpcusb.h"
-#include "lpc21iap.h"
-
-#ifndef O_BINARY
-#define O_BINARY 0
-#endif // O_BINARY
-
-/* LPC214x maximum sector size */
-#define MAX_SECT 0x1000
-/* number of sectors used for bootloader */
-#define BOOTLOAD_SECT 4
-
-typedef struct
-{
- unsigned int id;
- char name[50];
-} LPC_DEVICE;
-
-typedef struct
-{
- unsigned int start;
- void * next;
- unsigned char data[MAX_SECT];
-} tIntermediateBuffer;
-
-static int SectorTable_214x[] = { 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096,
- 32768, 32768, 32768, 32768, 32768, 32768, 32768, 32768,
- 32768, 32768, 32768, 32768, 32768, 32768,
- 4096, 4096, 4096, 4096, 4096 };
-
-static LPC_DEVICE LPCtypes[] =
-{
- { 0x0402FF01, "LPC2141, 32k Flash, 8k RAM" },
- { 0x0402FF11, "LPC2142, 64k Flash, 16k RAM" },
- { 0x0402FF12, "LPC2144, 128k Flash, 16k RAM" },
- { 0x0402FF23, "LPC2146, 256k Flash, 32k+8k RAM" },
- { 0x0402FF25, "LPC2148, 512k Flash, 32k+8k RAM" },
- { 0, "unknown" },
-};
-
-
-#if defined COMPILE_FOR_LINUX
-void Sleep(unsigned long msec)
-{
- usleep(msec*1000); //convert to microseconds
-}
-#endif // defined COMPILE_FOR_LINUX
-
-/* gives the sector number in which the given address is in */
-int getSec(unsigned int adrFlash)
-{
- int count;
- int temp = 0;
-
- for (count=0;
- count < sizeof(SectorTable_214x)/sizeof(SectorTable_214x[0]);
- count++)
- {
- temp += SectorTable_214x[count];
- if (temp > adrFlash)
- {
- return(count);
- }
- }
- return(-1);
-}
-
-int main(int argc, char *argv[])
-{
- int fdElf;
- int lenElf;
- unsigned char * binElf;
- unsigned int entryElf;
- unsigned int flagsElf;
- unsigned int ramAddr;
- unsigned int romram;
- int secElf;
- int count;
- int temp;
- unsigned int utemp;
- int startSec, endSec;
- unsigned int start, src, size, end, type, flag;
- unsigned int maxFlash, lowFlash, highFlash;
- usb_dev_handle *udev;
- struct usb_device *dev;
- int found;
- struct usb_bus *bus;
- char cserial[256];
- tIntermediateBuffer* actBuf = NULL;
- tIntermediateBuffer* startBuf = NULL;
-
- printf("lpc21iap v%d.%d\n", LPC21IAP_VER_MAJ, LPC21IAP_VER_MIN);
-
- if ((argc < 2) || (argc > 3))
- {
- printf("usage: %s file.elf [usb_serial_number]\n", argv[0]);
- exit(1);
- }
-
- fdElf = open(argv[1], O_RDONLY | O_BINARY);
-
- if(fdElf < 0)
- {
- perror("open file");
- exit(1);
- }
-
- lenElf = lseek(fdElf, 0, SEEK_END);
-
- if(lenElf <= 0)
- {
- perror("file length");
- exit(1);
- }
-
- lseek(fdElf, 0, SEEK_SET);
-
- binElf = malloc(lenElf);
-
- if (binElf == NULL)
- {
- perror("malloc failed");
- exit(1);
- }
-
- startBuf = malloc(sizeof(tIntermediateBuffer));
- if (startBuf == NULL)
- {
- perror("malloc failed");
- exit(1);
- }
- startBuf->start = 0xFFFFFFFF;
- startBuf->next = NULL;
-
- memset(startBuf->data, 0xFF, MAX_SECT);
-
- count = 0;
- while (count < lenElf)
- {
- temp = read(fdElf, binElf+count, lenElf-count);
- if (temp <= 0)
- {
- perror("could not read");
- exit(1);
- }
- count += temp;
- }
-
- close(fdElf);
-
- /* check ELF header */
- if (!ELFCheckHeader(binElf))
- {
- perror("no ELF header" );
- exit(1);
- }
-
- flagsElf = ELFHdrFlags(binElf);
- if (EF_ARM_HASENTRY == (flagsElf & EF_ARM_HASENTRY))
- {
- entryElf = ELFEntryAddr(binElf);
- }
-
- secElf = ELFNoPSections(binElf);
-
- found = 0;
- usb_init();
- usb_find_busses();
-
- for(count = 0; count < 100 && !found; count++)
- {
- printf(".");
- fflush(stdout);
-
- if (usb_find_devices())
- {
- for (bus = usb_get_busses(); bus && (!found); bus = bus->next)
- {
- for (dev = bus->devices; dev && (!found); dev = dev->next)
- {
- if ((dev->descriptor.idVendor == VENDOR_ID) &&
- (dev->descriptor.idProduct == DEVICE_ID))
- {
- udev = usb_open(dev);
-
- if (udev)
- {
- printf("\nFound USB device\n");
- if (argc==3)
- {
- if (dev->descriptor.iSerialNumber)
- {
- if (usb_get_string_simple(udev, dev->descriptor.iSerialNumber, cserial, sizeof(cserial)) > 0)
- {
- if (strncmp(argv[2], cserial, strlen(argv[2])) == 0)
- {
- found = 1;
- }
- else
- {
- printf("Serial Number does not match: %s\n", cserial);
- }
- }
- else
- {
- printf("could not get serial number\n");
- }
- }
- else
- {
- printf("no serial number\n");
- }
-
- if (!found) usb_close(udev);
- }
- else found = 1;
- }
- }
- }
- }
- }
- Sleep(200);
- }
-
- if(!found)
- {
- printf("\nno USB device\n");
- exit(1);
- }
-
-
- if (!unlock(udev)) exit(1);
-
- if (!readBootCode(udev, &utemp)) exit(1);
- printf("BootROM code: %d.%d\n", (utemp >> 8) & 0xFF, utemp & 0xFF);
-
- if (!readPartID(udev, &utemp)) exit(1);
- for (count = 0; LPCtypes[count].id != 0; count++)
- {
- if (utemp == LPCtypes[count].id) break;
- }
- printf("Part ID: 0x%08X (%s)\n", utemp, LPCtypes[count].name);
-
- if (!readBootloaderVersion(udev, &utemp)) exit(1);
- printf("BootLoader version: %d.%d\n", (utemp >> 8) & 0xFF, utemp & 0xFF);
-
- if (!readRAMAddress(udev, &ramAddr)) exit(1);
-
- if (!readBootloaderLocation(udev, &romram)) exit(1);
-
- /* find used sectors (kill the unused in-betweens, speed optimized) */
-
- /* calc maximum usable flash address */
- maxFlash = 0;
- for (count=0;
- count < sizeof(SectorTable_214x)/sizeof(SectorTable_214x[0]);
- count++)
- {
- maxFlash += SectorTable_214x[count];
- }
-
- /* find min and max used flash address */
- lowFlash = maxFlash;
- highFlash = 0;
- for (count=0; count < secElf; count++)
- {
- start = ELFAddrPSection(binElf, count);
- src = ELFOffsPSection(binElf, count);
- size = ELFSizePSection(binElf, count);
- type = ELFTypePSection(binElf, count);
- flag = ELFFlagPSection(binElf, count);
-
- if ((size > 0) &&
- (src != 0) &&
- (type == PT_LOAD) &&
- (flag & (PF_X | PF_W | PF_R)) &&
- (start+size <= maxFlash))
- {
- if (start+size > highFlash) highFlash = start+size;
- if (start < lowFlash) lowFlash = start;
- }
- }
-
- if ((romram == RUN_ROM) && (lowFlash < BOOTLOAD_SECT*MAX_SECT))
- {
- printf("running from ROM, can not flash low sectors, load RAM version first\n");
- exit(2);
- }
-
- /* flashing code: persistent settings needs highest sector to be erased */
- if (highFlash >= BOOTLOAD_SECT*MAX_SECT)
- {
- highFlash = maxFlash-1;
- }
-
- /* anything to flash erase? */
- if (lowFlash != maxFlash)
- {
- startSec = getSec(lowFlash);
- endSec = getSec(highFlash);
-
- /* prepare sectors for erase */
- if (!prepareSectors(udev, startSec, endSec)) exit(1);
-
- /* erase sectors */
- if (!eraseSectors(udev, startSec, endSec)) exit(1);
- }
-
- for (count=0; count < secElf; count++)
- {
- start = ELFAddrPSection(binElf, count);
- src = ELFOffsPSection(binElf, count);
- size = ELFSizePSection(binElf, count);
- type = ELFTypePSection(binElf, count);
- flag = ELFFlagPSection(binElf, count);
-
- /* adjust size to 32 bit alignment */
- size = (size + 3) & 0xFFFFFFFC;
-
- if ((size > 0) &&
- (src != 0) &&
- (type == PT_LOAD) &&
- (flag & (PF_X | PF_W | PF_R)))
- {
-
- if (start+size <= maxFlash)
- {
- unsigned int cnt;
- unsigned int startPage, endPage, countPage;
- unsigned int splitGap, splitCnt;
-
-#if 0
- /* Flash */
- printf( "Flash sect = %02d, start = 0x%08X, src = 0x%08X, size = 0x%08X, type = 0x%08X, flag = 0x%08X\n",
- count,
- start,
- src,
- size,
- type,
- flag);
-#endif
-
- /* end address in flash */
- end = start + size;
-
- cnt = 0;
-
- /* page address of the first sector */
- startPage = start & ~(MAX_SECT-1);
- /* page address of the end sector */
- endPage = (end+MAX_SECT) & ~(MAX_SECT-1);
-
- /* always 4k "blocks" are written */
- for (countPage = startPage; countPage < endPage; countPage += MAX_SECT)
- {
- /* do checksum for first block (LE machines) */
- if (countPage == 0)
- {
- unsigned int * dat = (unsigned int *) (binElf+src);
- unsigned int crc = 0;
- int count;
-
- dat[5] = 0;
-
- for(count = 0; count < 8; count++) {
- crc += dat[count];
- }
-
- dat[5] = (unsigned long) -crc;
-
- printf("changing vector table\n");
- }
-
- printf("#");
- fflush(stdout);
-
- splitCnt = MAX_SECT;
-
- /* The LPC214x does not allow pages (4k) to be
- programmed twice without erasing in between, not even
- with 0xFF's being filled into the gaps. So we have to
- store all the partly filled pages until the end and
- flash them in one flush. */
-
- /* first page, not beginning at page start */
- if ((countPage == startPage) && (start != startPage))
- {
- /* gap of non programmed bytes at the beginning of page */
- splitGap = start % MAX_SECT;
- /* number of bytes in the first block */
- if ((splitGap + size) < MAX_SECT) {
- /* data ends within first page */
- splitCnt = size;
- }
- else {
- /* data until end of page */
- splitCnt = MAX_SECT - splitGap;
- }
- }
- /* last page, not ending at page end */
- else if ((countPage+MAX_SECT == endPage) && (end != endPage))
- {
- /* no gap at beginning */
- splitGap = 0;
- /* number of bytes in the last sector */
- splitCnt = end % MAX_SECT;
- }
- if ((splitCnt != MAX_SECT) && (splitCnt > 0))
- {
- /* keep partly filled pages for later programming */
- actBuf = startBuf;
- while (1)
- {
- if (actBuf->start == countPage)
- {
- break;
- }
- if (actBuf->next == NULL)
- {
- actBuf->next = malloc(sizeof(tIntermediateBuffer));
- if (actBuf->next == NULL)
- {
- perror("malloc failed");
- exit(1);
- }
- actBuf = actBuf->next;
- actBuf->start = countPage;
- actBuf->next = NULL;
- memset(actBuf->data, 0xFF, MAX_SECT);
- break;
- }
- actBuf = actBuf->next;
- }
-
- /* copy data to buffer */
- // read(startBuf->data + splitGap, splitCnt):
- memcpy(actBuf->data + splitGap, binElf+src+cnt, splitCnt);
- }
- else
- {
- /* flash full filled 4k block */
-
- /* copy data to buffer */
- // read(startBuf->data, MAX_SECT):
- memcpy(startBuf->data, binElf+src+cnt, MAX_SECT);
-
- if (!writeRAM(udev, ramAddr, MAX_SECT)) exit(1);
- if (!USBReqData(udev, startBuf->data, MAX_SECT)) exit(1);
- if (!prepareSectors(udev, getSec(countPage), getSec(countPage))) exit(1);
- if (!copyRAMFlash(udev, countPage, ramAddr, MAX_SECT)) exit(1);
- if (!compareMem(udev, countPage, ramAddr, MAX_SECT)) exit(1);
- }
- cnt += splitCnt;
- }
- }
- else
- {
-#if 0
- /* RAM */
- printf( "RAM sect = %02d, start = 0x%08X, src = 0x%08X, size = 0x%08X, type = 0x%08X, flag = 0x%08X\n",
- count,
- start,
- src,
- size,
- type,
- flag);
-#endif
-
- /* copy it in one piece */
- if (!writeRAM(udev, start, size)) exit(1);
- if (!USBReqData(udev, (unsigned char*) (binElf+src), size)) exit(1);
- }
- }
- }
-
- actBuf = startBuf;
-
- /* go through all the split sectors */
- while (actBuf != NULL)
- {
- if (actBuf->start != 0xFFFFFFFF)
- {
- if (!writeRAM(udev, ramAddr, MAX_SECT)) exit(1);
- if (!USBReqData(udev, actBuf->data, MAX_SECT)) exit(1);
- if (!prepareSectors(udev, getSec(actBuf->start), getSec(actBuf->start))) exit(1);
- if (!copyRAMFlash(udev, actBuf->start & ~(MAX_SECT-1), ramAddr, MAX_SECT)) exit(1);
- if (!compareMem(udev, actBuf->start & ~(MAX_SECT-1), ramAddr, MAX_SECT)) exit(1);
- }
- startBuf = actBuf;
- actBuf = actBuf->next;
- free(startBuf);
- }
-
- printf("\n");
-
- free(binElf);
-
- if (EF_ARM_HASENTRY == (flagsElf & EF_ARM_HASENTRY))
- {
- printf( "Starting software at 0x%08X\n", entryElf );
- if (!goSw(udev, entryElf)) exit(1);
- Sleep(250);
- }
-
- return(0);
-}
diff --git a/sw/ground_segment/lpc21iap/lpc21iap.h b/sw/ground_segment/lpc21iap/lpc21iap.h
deleted file mode 100644
index f97222349d..0000000000
--- a/sw/ground_segment/lpc21iap/lpc21iap.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* $Id$
- *
- * lpc21iap, an USB download application for Philips LPC processors
- * Copyright (C) 2006 Martin Mueller
- *
- * This file is part of paparazzi.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/* Philips proprietary defines */
-
-#define CMD_SUCCESS 0
-#define INVALID_COMMAND 1
-#define SRC_ADDR_ERROR 2
-#define DST_ADDR_ERROR 3
-#define SRC_ADDR_NOT_MAPPED 4
-#define DST_ADDR_NOT_MAPPED 5
-#define COUNT_ERROR 6
-#define INVALID_SECTOR 7
-#define SECTOR_NOT_BLANK 8
-#define SECTOR_NOT_PREPARED_FOR_WRITE_OPERATION 9
-#define COMPARE_ERROR 10
-#define BUSY 11
-#define PARAM_ERROR 12
-#define ADDR_ERROR 13
-#define ADDR_NOT_MAPPED 14
-#define CMD_LOCKED 15
-#define INVALID_CODE 16
-#define INVALID_BAUD_RATE 17
-#define INVALID_STOP_BIT 18
-#define CODE_READ_PROTECTION_ENABLED 19
-
-#define ISP_UNLOCK 'U'
-#define ISP_SET_BAUD_RATE 'B'
-#define ISP_ECHO 'A'
-#define ISP_WRITE_TO_RAM 'W'
-#define ISP_READ_MEMORY 'R'
-#define ISP_PREPARE_SECTORS 'P'
-#define ISP_COPY_RAM_TO_FLASH 'C'
-#define ISP_GO 'G'
-#define ISP_ERASE_SECTORS 'E'
-#define ISP_BLANK_CHECK_SECTORS 'I'
-#define ISP_READ_PART_ID 'J'
-#define ISP_READ_BOOT_CODE_VERSION 'K'
-#define ISP_COMPARE 'M'
-
-#define IAP_PREPARE_SECTORS 50
-#define IAP_COPY_RAM_TO_FLASH 51
-#define IAP_ERASE_SECTORS 52
-#define IAP_BLANK_CHECK_SECTORS 53
-#define IAP_READ_PART_ID 54
-#define IAP_READ_BOOT_CODE_VERSION 55
-#define IAP_COMPARE 56
-#define IAP_REINVOKE_ISP 57
-
-#define ARM_CODE 'A'
-#define THUMB_CODE 'T'
-
-#define UNLOCK_CODE 23130
-#define CODE_PROTECT_ADDR 0x1FC
-#define CODE_PROTECT_DATA 0x87654321
-#define IAP_LOCATION 0x7FFFFFF1
-
-
-/* our own proprietary defines */
-
-#define REQ_ISP_COMMAND 0xF0
-#define REQ_IAP_COMMAND 0xF1
-#define REQ_BTL_COMMAND 0xF2
-#define REQ_DATA_TRANSFER 0xF3
-
-#define BTL_READ_VERSION 10
-#define BTL_READ_LOCATION 11
-#define BTL_READ_RAM_ADDR 12
-
-#define RUN_ROM 0
-#define RUN_RAM 1
-
-/* this USB vendor/device ID is fake - someone willing to donate one? */
-#define VENDOR_ID 0x7070
-#define DEVICE_ID 0x1234
-
-
diff --git a/sw/ground_segment/lpc21iap/lpcusb.c b/sw/ground_segment/lpc21iap/lpcusb.c
deleted file mode 100644
index 15b0879835..0000000000
--- a/sw/ground_segment/lpc21iap/lpcusb.c
+++ /dev/null
@@ -1,557 +0,0 @@
-/* $Id$
- *
- * lpc21iap, an USB download application for Philips LPC processors
- * Copyright (C) 2006 Martin Mueller
- *
- * This file is part of paparazzi.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-#if defined(_WIN32) && !defined(__CYGWIN__)
- #define COMPILE_FOR_WINDOWS
-#elif defined(__CYGWIN__)
- #define COMPILE_FOR_CYGWIN
-#else
- #define COMPILE_FOR_LINUX
-#endif
-
-#if defined COMPILE_FOR_WINDOWS || defined COMPILE_FOR_CYGWIN
-#include
-#include
-#endif // defined COMPILE_FOR_WINDOWS || defined COMPILE_FOR_CYGWIN
-
-#if defined COMPILE_FOR_WINDOWS
-#include
-#endif // defined COMPILE_FOR_WINDOWS
-
-#if defined COMPILE_FOR_LINUX
-#include
-#include
-#include
-#include
-#include
-#include
-#endif // defined COMPILE_FOR_LINUX
-
-#if defined COMPILE_FOR_LINUX || defined COMPILE_FOR_CYGWIN
-#include
-#include // for read and return value of lseek
-#include // for select_time
-#endif // defined COMPILE_FOR_LINUX || defined COMPILE_FOR_CYGWIN
-
-#include // isdigit()
-#include // stdout
-#include
-#include
-#include
-#include // libusb
-
-#include "lpcusb.h"
-#include "lpc21iap.h"
-
-#if defined COMPILE_FOR_LINUX
-void Sleep(unsigned long msec);
-#endif // defined COMPILE_FOR_LINUX
-
-#define USB_MAXCHUNK 4096
-
-#define ERR_MAXLEN 40
-
-char cUnkownError[ERR_MAXLEN] = {
-"unknown error"};
-
-char cIspError[][ERR_MAXLEN] = {
-"CMD_SUCCESS",
-"INVALID_COMMAND",
-"SRC_ADDR_ERROR",
-"DST_ADDR_ERROR",
-"SRC_ADDR_NOT_MAPPED",
-"DST_ADDR_NOT_MAPPED",
-"COUNT_ERROR",
-"INVALID_SECTOR",
-"SECTOR_NOT_BLANK",
-"SECTOR_NOT_PREPARED_FOR_WRITE_OPERATION",
-"COMPARE_ERROR",
-"BUSY",
-"PARAM_ERROR",
-"ADDR_ERROR",
-"ADDR_NOT_MAPPED",
-"CMD_LOCKED",
-"INVALID_CODE",
-"INVALID_BAUD_RATE",
-"INVALID_STOP_BIT",
-"CODE_READ_PROTECTION_ENABLED"};
-
-#define LPC_MAX_ERROR (sizeof(cIspError) / sizeof(cIspError[0]))
-
-char * IspError(unsigned char cErr)
-{
- if (cErr < LPC_MAX_ERROR)
- {
- return(cIspError[cErr]);
- }
- else
- {
- return(cUnkownError);
- }
-}
-
-int USBFindDevice(usb_dev_handle *udev)
-{
- int count, found;
- struct usb_bus *bus;
-
- found = 0;
- usb_init();
- usb_find_busses();
-
- for(count = 0; count < 100 && !found; count++)
- {
- printf(".");
-
- if (usb_find_devices())
- {
- for (bus = usb_get_busses(); bus && (!found); bus = bus->next)
- {
- struct usb_device *dev;
-
- for (dev = bus->devices; dev && (!found); dev = dev->next)
- {
- if ((dev->descriptor.idVendor == VENDOR_ID) &&
- (dev->descriptor.idProduct == DEVICE_ID))
- {
- udev = usb_open(dev);
-
- if (udev)
- {
- // TODO check USB serial number
-
- found = 1;
- }
- }
- }
- }
- }
- Sleep(200);
- }
-
- if(!found)
- {
- printf("no USB device\n");
- return(0);
- }
- return(1);
-}
-
-int USBReqISP(usb_dev_handle *udev,
- unsigned int *command,
- unsigned int *result)
-{
- int cmdret;
- int resret;
-
- // default to unknown error
- result[0] = LPC_MAX_ERROR;
-
- cmdret = usb_control_msg(
- udev, // dev_handle
- 0x00 | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, // requesttype
- REQ_ISP_COMMAND, // request
- 0, // value
- 0, // index
- (char*) command, // *bytes
- 20, // size
- 40000); // timeout
-
- if (cmdret < 0)
- {
- perror("USB error");
- return(0);
- }
-
- resret = usb_control_msg(
- udev, // dev_handle
- 0x80 | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, // requesttype
- REQ_ISP_COMMAND, // request
- 0, // value
- 0, // index
- (char*) result, // *bytes
- 12+20, // size
- 100); // timeout
-//printf("\ncmdret %d, resret %d cmd %d res %d cmdo %d \n",cmdret, resret, command[0], result[0], result[3]);
-//printf("\ncmdret %d, cmd0 %d/%c, cmd1 0x%08X, cmd2 0x%08X, cmd3 0x%08X\n", cmdret, command[0], command[0], command[1], command[2], command[3]);
-
- if (resret < 0)
- {
- perror("USB error");
- return(0);
- }
-
- if (result[0] != 0)
- {
- printf("ISP error (%d:%s)\n", result[0]&0xFF, IspError(result[0]&0xFF));
- return(0);
- }
- if ((cmdret != 20) ||
- (resret != 12+20) ||
- (memcmp(command, &result[3], 20)))
- {
- printf("Unknown error\n");
- return(0);
- }
-
- return(1);
-}
-
-int USBReqData(usb_dev_handle *udev, unsigned char* data, int size)
-{
- int datret;
- int size1, size2;
- int count;
-
- /* make small chunks for libusb */
- for (count = 0; count < size; count += USB_MAXCHUNK)
- {
- size1 = ((size-count)/USB_MAXCHUNK) > 0 ? USB_MAXCHUNK : size%USB_MAXCHUNK;
- size2 = size1;
-
- datret = usb_control_msg(
- udev, // dev_handle
- 0x00 | USB_TYPE_VENDOR | USB_RECIP_INTERFACE,// requesttype
- REQ_DATA_TRANSFER, // request
- 0, // value
- 0, // index
- (char*)(data+count),// *bytes
- size1, // size
- 1000); // timeout
-
-// printf("\ndatret %d, size %d\n", datret, size);
-// printf(" %d %d\n", size1, size2);
-
- if (datret < 0)
- {
- perror("USB error");
- return(0);
- }
-
- if (size1 != size2)
- {
- printf("write data failed\n");
- return(0);
- }
- }
- return(1);
-}
-
-int USBReqBTL(usb_dev_handle *udev,
- unsigned int *command,
- unsigned int *result)
-{
- int cmdret;
- int resret;
-
- // default to unknown error
- result[0] = LPC_MAX_ERROR;
-
- cmdret = usb_control_msg(
- udev, // dev_handle
- 0x00 | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, // requesttype
- REQ_BTL_COMMAND, // request
- 0, // value
- 0, // index
- (char*) command, // *bytes
- 20, // size
- 40000); // timeout
-
- if (cmdret < 0)
- {
- perror("USB error");
- return(0);
- }
-
- resret = usb_control_msg(
- udev, // dev_handle
- 0x80 | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, // requesttype
- REQ_ISP_COMMAND, // request
- 0, // value
- 0, // index
- (char*) result, // *bytes
- 12+20, // size
- 100); // timeout
-//printf("\ncmdret %d, resret %d cmd %d res %d cmdo %d \n",cmdret, resret, command[0], result[0], result[3]);
-//printf("\ncmdret %d, cmd0 %d/%c, cmd1 0x%08X, cmd2 0x%08X, cmd3 0x%08X\n", cmdret, command[0], command[0], command[1], command[2], command[3]);
-
- if (resret < 0)
- {
- perror("USB error");
- return(0);
- }
-
- if (result[0] != 0)
- {
- printf("BTL error (%d:%s)\n", result[0]&0xFF, IspError(result[0]&0xFF));
- return(0);
- }
- if ((cmdret != 20) ||
- (resret != 12+20) ||
- (memcmp(command, &result[3], 20)))
- {
- printf("Unknown error\n");
- return(0);
- }
-
- return(1);
-}
-
-int unlock(usb_dev_handle *udev)
-{
- unsigned int command[5];
- unsigned int result[8];
-
- command[0] = ISP_UNLOCK;
- command[1] = UNLOCK_CODE;
-
- if (!USBReqISP(udev, command, result))
- {
- printf("unlock failed\n");
- return(0);
- }
- return(1);
-}
-
-int readBootCode(usb_dev_handle *udev, unsigned int * bootCode)
-{
- unsigned int command[5];
- unsigned int result[8];
-
- command[0] = ISP_READ_BOOT_CODE_VERSION;
-
- if (!USBReqISP(udev, command, result))
- {
- printf("read boot code failed\n");
- return(0);
- }
-
- *bootCode = result[1];
-
- return(1);
-}
-
-int readPartID(usb_dev_handle *udev, unsigned int * partID)
-{
- unsigned int command[5];
- unsigned int result[8];
-
- command[0] = ISP_READ_PART_ID;
-
- if (!USBReqISP(udev, command, result))
- {
- printf("read part ID failed\n");
- return(0);
- }
-
- *partID = result[1];
-
- return(1);
-}
-
-int prepareSectors(usb_dev_handle *udev, int startSec, int endSec)
-{
- unsigned int command[5];
- unsigned int result[8];
-
- command[0] = ISP_PREPARE_SECTORS;
- command[1] = startSec;
- command[2] = endSec;
-
- if (!USBReqISP(udev, command, result))
- {
- printf("prepare failed at sectors %d-%d", startSec, endSec);
- return(0);
- }
- return(1);
-}
-
-int eraseSectors(usb_dev_handle *udev, int startSec, int endSec)
-{
- unsigned int command[5];
- unsigned int result[8];
-
- command[0] = ISP_ERASE_SECTORS;
- command[1] = startSec;
- command[2] = endSec;
-
- if (!USBReqISP(udev, command, result))
- {
- printf("erase failed at sectors %d-%d\n", startSec, endSec);
- return(0);
- }
- return(1);
-}
-
-int blankCheckSectors(usb_dev_handle *udev, int startSec, int endSec)
-{
- unsigned int command[5];
- unsigned int result[8];
-
- /* blank check sector 0 always fails */
- if (startSec == 0)
- {
- if (endSec == 0)
- {
- return(1);
- }
- startSec = 1;
- }
-
- command[0] = ISP_BLANK_CHECK_SECTORS;
- command[1] = startSec;
- command[2] = endSec;
-
- if (!USBReqISP(udev, command, result))
- {
- printf("blank check failed at sectors %d-%d\n", startSec, endSec);
- return(0);
- }
- return(1);
-}
-
-int writeRAM(usb_dev_handle *udev, unsigned int startAdr, unsigned int size)
-{
- unsigned int command[5];
- unsigned int result[8];
-
- command[0] = ISP_WRITE_TO_RAM;
- command[1] = startAdr;
- command[2] = size;
-
- if (!USBReqISP(udev, command, result))
- {
- printf("write failed at 0x%08X size 0x%08X\n", startAdr, size);
- return(0);
- }
- return(1);
-}
-
-int copyRAMFlash(usb_dev_handle *udev, unsigned int startAdr, unsigned int base, unsigned int size)
-{
- unsigned int command[5];
- unsigned int result[8];
-
- command[0] = ISP_COPY_RAM_TO_FLASH;
- command[1] = startAdr;
- command[2] = base;
- command[3] = size;
-
- if (!USBReqISP(udev, command, result))
- {
- printf("copy RAM to flash failed at 0x%08X base 0x%08X size 0x%08X\n", startAdr, base, size);
- return(0);
- }
- return(1);
-}
-
-int compareMem(usb_dev_handle *udev, unsigned int dst, unsigned int src, unsigned int size)
-{
- unsigned int command[5];
- unsigned int result[8];
-
- command[0] = ISP_COMPARE;
- command[1] = dst;
- command[2] = src;
- command[3] = size;
-
- if (!USBReqISP(udev, command, result))
- {
- printf("compare MEM failed at 0x%08X base 0x%08X size 0x%08X\n", dst, src, size);
- return(0);
- }
- return(1);
-}
-
-int goSw(usb_dev_handle *udev, unsigned int startAdr)
-{
- unsigned int command[5];
- unsigned int result[8];
-
- command[0] = ISP_GO;
- command[1] = startAdr;
- command[2] = ARM_CODE;
-
- if (!USBReqISP(udev, command, result))
- {
- printf("go failed at 0x%08X\n", startAdr);
- return(0);
- }
-
- return(1);
-}
-
-int readBootloaderVersion(usb_dev_handle *udev, unsigned int * bootVersion)
-{
- unsigned int command[5];
- unsigned int result[8];
-
- command[0] = BTL_READ_VERSION;
-
- if (!USBReqBTL(udev, command, result))
- {
- printf("read bootloader version failed\n");
- return(0);
- }
-
- *bootVersion = result[1];
-
- return(1);
-}
-
-int readBootloaderLocation(usb_dev_handle *udev, unsigned int * bootLocation)
-{
- unsigned int command[5];
- unsigned int result[8];
-
- command[0] = BTL_READ_LOCATION;
-
- if (!USBReqBTL(udev, command, result))
- {
- printf("read bootloader location failed\n");
- return(0);
- }
-
- *bootLocation = result[1];
-
- return(1);
-}
-
-int readRAMAddress(usb_dev_handle *udev, unsigned int * ramAddr)
-{
- unsigned int command[5];
- unsigned int result[8];
-
- command[0] = BTL_READ_RAM_ADDR;
-
- if (!USBReqBTL(udev, command, result))
- {
- printf("read RAM load address failed\n");
- return(0);
- }
-
- *ramAddr = result[1];
-
- return(1);
-}
diff --git a/sw/ground_segment/lpc21iap/lpcusb.h b/sw/ground_segment/lpc21iap/lpcusb.h
deleted file mode 100644
index 09639442de..0000000000
--- a/sw/ground_segment/lpc21iap/lpcusb.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* $Id$
- *
- * lpc21iap, an USB download application for Philips LPC processors
- * Copyright (C) 2006 Martin Mueller
- *
- * This file is part of paparazzi.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-int USBFindDevice(usb_dev_handle *udev);
-int USBReqISP(usb_dev_handle *udev,
- unsigned int *command,
- unsigned int *result);
-int USBReqData(usb_dev_handle *udev, unsigned char* data, int size);
-int unlock(usb_dev_handle *udev);
-int readBootCode(usb_dev_handle *udev, unsigned int * bootCode);
-int readPartID(usb_dev_handle *udev, unsigned int * partID);
-int prepareSectors(usb_dev_handle *udev, int startSec, int endSec);
-int eraseSectors(usb_dev_handle *udev, int startSec, int endSec);
-int blankCheckSectors(usb_dev_handle *udev, int startSec, int endSec);
-int writeRAM(usb_dev_handle *udev, unsigned int startAdr, unsigned int size);
-int copyRAMFlash(usb_dev_handle *udev, unsigned int startAdr, unsigned int base, unsigned int size);
-int compareMem(usb_dev_handle *udev, unsigned int dst, unsigned int src, unsigned int size);
-int goSw(usb_dev_handle *udev, unsigned int startAdr);
-int readBootloaderVersion(usb_dev_handle *udev, unsigned int * bootVersion);
-int readBootloaderLocation(usb_dev_handle *udev, unsigned int * bootLocation);
-int readRAMAddress(usb_dev_handle *udev, unsigned int * ramAddr);