armadeus-commitlog Mailing List for armadeus (Page 108)
Brought to you by:
sszy
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(43) |
Feb
(8) |
Mar
(7) |
Apr
(8) |
May
(14) |
Jun
(6) |
Jul
(4) |
Aug
(17) |
Sep
(18) |
Oct
(19) |
Nov
(52) |
Dec
(30) |
| 2008 |
Jan
(6) |
Feb
(6) |
Mar
(15) |
Apr
(22) |
May
(13) |
Jun
(11) |
Jul
(41) |
Aug
(10) |
Sep
(14) |
Oct
(21) |
Nov
(4) |
Dec
(66) |
| 2009 |
Jan
(67) |
Feb
(57) |
Mar
(90) |
Apr
(54) |
May
(64) |
Jun
(76) |
Jul
(14) |
Aug
(18) |
Sep
(18) |
Oct
(20) |
Nov
(15) |
Dec
(36) |
| 2010 |
Jan
(28) |
Feb
(25) |
Mar
(32) |
Apr
(23) |
May
(22) |
Jun
(62) |
Jul
(36) |
Aug
(16) |
Sep
(12) |
Oct
(20) |
Nov
(44) |
Dec
(25) |
| 2011 |
Jan
(36) |
Feb
(49) |
Mar
(28) |
Apr
(38) |
May
(26) |
Jun
(52) |
Jul
(33) |
Aug
(32) |
Sep
(19) |
Oct
(26) |
Nov
(13) |
Dec
(32) |
| 2012 |
Jan
(38) |
Feb
(34) |
Mar
(91) |
Apr
(35) |
May
(31) |
Jun
(72) |
Jul
(23) |
Aug
(13) |
Sep
(33) |
Oct
(47) |
Nov
(18) |
Dec
(22) |
| 2013 |
Jan
(31) |
Feb
(22) |
Mar
(26) |
Apr
(11) |
May
(38) |
Jun
(15) |
Jul
(37) |
Aug
(68) |
Sep
(34) |
Oct
(11) |
Nov
(26) |
Dec
(31) |
| 2014 |
Jan
(60) |
Feb
(55) |
Mar
(21) |
Apr
(31) |
May
(17) |
Jun
(35) |
Jul
(24) |
Aug
(17) |
Sep
(11) |
Oct
(23) |
Nov
(10) |
Dec
(23) |
| 2015 |
Jan
(15) |
Feb
(34) |
Mar
(46) |
Apr
(23) |
May
(12) |
Jun
(14) |
Jul
(18) |
Aug
(22) |
Sep
(6) |
Oct
(2) |
Nov
(1) |
Dec
(6) |
| 2016 |
Jan
(5) |
Feb
(7) |
Mar
(10) |
Apr
(10) |
May
(17) |
Jun
(6) |
Jul
(4) |
Aug
(6) |
Sep
(22) |
Oct
(8) |
Nov
(9) |
Dec
(5) |
| 2017 |
Jan
(11) |
Feb
(12) |
Mar
(27) |
Apr
(9) |
May
(1) |
Jun
(5) |
Jul
(11) |
Aug
(10) |
Sep
(6) |
Oct
(10) |
Nov
(4) |
Dec
(6) |
| 2018 |
Jan
(6) |
Feb
(13) |
Mar
(9) |
Apr
(7) |
May
(10) |
Jun
(9) |
Jul
(21) |
Aug
(13) |
Sep
(10) |
Oct
(4) |
Nov
(6) |
Dec
(1) |
| 2019 |
Jan
(6) |
Feb
(2) |
Mar
(5) |
Apr
(6) |
May
(19) |
Jun
(14) |
Jul
(18) |
Aug
(3) |
Sep
(5) |
Oct
(7) |
Nov
(8) |
Dec
(4) |
| 2020 |
Jan
(10) |
Feb
(3) |
Mar
(9) |
Apr
(7) |
May
(2) |
Jun
(18) |
Jul
(3) |
Aug
|
Sep
|
Oct
(7) |
Nov
|
Dec
(1) |
| 2021 |
Jan
(9) |
Feb
(6) |
Mar
(4) |
Apr
(11) |
May
(7) |
Jun
(5) |
Jul
(2) |
Aug
(4) |
Sep
(10) |
Oct
(9) |
Nov
(5) |
Dec
|
| 2022 |
Jan
(2) |
Feb
(12) |
Mar
(3) |
Apr
(5) |
May
(1) |
Jun
(3) |
Jul
(2) |
Aug
(1) |
Sep
(4) |
Oct
(4) |
Nov
(1) |
Dec
(3) |
| 2023 |
Jan
(5) |
Feb
(3) |
Mar
(3) |
Apr
(2) |
May
(1) |
Jun
(3) |
Jul
(3) |
Aug
(2) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(4) |
| 2024 |
Jan
(2) |
Feb
(3) |
Mar
(8) |
Apr
(4) |
May
(1) |
Jun
(13) |
Jul
(7) |
Aug
(1) |
Sep
(6) |
Oct
(5) |
Nov
(11) |
Dec
(7) |
| 2025 |
Jan
(3) |
Feb
(1) |
Mar
(6) |
Apr
(4) |
May
(4) |
Jun
(1) |
Jul
(1) |
Aug
(7) |
Sep
(4) |
Oct
(4) |
Nov
(4) |
Dec
(1) |
| 2026 |
Jan
(3) |
Feb
(7) |
Mar
(3) |
Apr
(1) |
May
(6) |
Jun
(3) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Julien B a. A. <ar...@us...> - 2010-06-08 19:45:33
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 0aec528c8888f3c4d08844ec329e22e2492bc157 (commit)
via 112ffab995c8571286e248df573b5a9aa5203c6d (commit)
from 281d8e6b63a7bf2bf2dccd8388e211f446ac4c9b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0aec528c8888f3c4d08844ec329e22e2492bc157
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jun 8 21:43:48 2010 +0200
[TESTS] Add test for Bluetooth
commit 112ffab995c8571286e248df573b5a9aa5203c6d
Author: Julien Boibessot <jul...@ar...>
Date: Mon Jun 7 17:09:54 2010 +0200
[BUILDROOT] Add a file in rootfs to know armadeus bsp version used
-----------------------------------------------------------------------
Summary of changes:
.../rootfs/target_skeleton/etc/armadeus-version | 1 +
target/test/test_bluetooth.sh | 60 ++++++++++++++++++++
2 files changed, 61 insertions(+), 0 deletions(-)
create mode 100644 buildroot/target/device/armadeus/rootfs/target_skeleton/etc/armadeus-version
create mode 100755 target/test/test_bluetooth.sh
diff --git a/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/armadeus-version b/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/armadeus-version
new file mode 100644
index 0000000..2b29883
--- /dev/null
+++ b/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/armadeus-version
@@ -0,0 +1 @@
+3.2-git
diff --git a/target/test/test_bluetooth.sh b/target/test/test_bluetooth.sh
new file mode 100755
index 0000000..0c9b3b7
--- /dev/null
+++ b/target/test/test_bluetooth.sh
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+#
+# Script to test Armadeus Software release
+#
+# Copyright (C) 2010 The Armadeus Project
+#
+# 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 of the License, or
+# (at your option) any later version.
+#
+
+source ./test_helpers.sh
+#source ./test_env.sh
+
+test_bluetooth()
+{
+ show_test_banner "Bluetooth"
+
+ modprobe btusb
+ if [ "$?" != 0 ]; then
+ echo "Unable to launch USB<->Bluetooth layer !!"
+ exit_failed
+ fi
+
+ ask_user "Please insert your USB dongle, then press ENTER"
+
+ hciconfig hci0 up piscan
+ sleep 1
+ hciconfig
+ ask_user "Do you see your dongle ? (Y/n)"
+ if [ "$response" == "n" ] || [ "$response" == "no" ]; then
+ exit_failed
+ fi
+
+ ask_user "Be sure that your Host has its Bluetooth interface up and running (hciconfig hci0 up piscan), then press ENTER"
+
+ MY_BTADDR=`hcitool dev | grep hci0 | cut -f 3`
+ if [ "$MY_BTADDR" == "" ]; then
+ echo "unable to get dongle BT MAC"
+ exit_failed
+ fi
+
+ # Setup serial terminal over BT:
+ RFCOMM_CHANNEL=7
+ mknod /dev/rfcomm0 c 216 0
+ rfcomm -i hci0 listen /dev/rfcomm0 $RFCOMM_CHANNEL &
+
+ ask_user "Launch: \"rfcomm connect 0 $MY_BTADDR $RFCOMM_CHANNEL\" on you PC, then press ENTER"
+ getty 38400 /dev/rfcomm0 &
+ ask_user "Launch: \"minicom -o\" on you PC, you should see APF login prompt, then press ENTER"
+
+ # APW: To be done...
+
+ echo_test_ok
+}
+
+test_bluetooth
+
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2010-06-07 15:05:22
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 281d8e6b63a7bf2bf2dccd8388e211f446ac4c9b (commit)
from 1026324a201bad25e1e3502d9052f918d0ea3062 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 281d8e6b63a7bf2bf2dccd8388e211f446ac4c9b
Author: Julien Boibessot <jul...@ar...>
Date: Mon Jun 7 16:57:31 2010 +0200
[BUILDROOT] wolf3d: remove old unsupported version and replace it with wolf4SDL
-----------------------------------------------------------------------
Summary of changes:
patches/buildroot/107-games-add_wolf4sdl.patch | 91 +
.../buildroot/2010.02/107-games-add_wolf4sdl.patch | 91 +
patches/buildroot/2010.02/cleanup_buildroot.sh | 1 +
patches/buildroot/cleanup_buildroot.sh | 1 +
target/demos/wolfenstein3d/BUGS.txt | 30 -
target/demos/wolfenstein3d/IDEAS | 22 -
target/demos/wolfenstein3d/Makefile | 69 -
target/demos/wolfenstein3d/NOTES | 71 -
target/demos/wolfenstein3d/README | 74 -
target/demos/wolfenstein3d/TODO | 137 -
target/demos/wolfenstein3d/audiosod.h | 122 -
target/demos/wolfenstein3d/audiowl6.h | 137 -
target/demos/wolfenstein3d/docs/goodstuf.txt | 56 -
target/demos/wolfenstein3d/docs/release.txt | 53 -
target/demos/wolfenstein3d/fmopl.c | 1026 ------
target/demos/wolfenstein3d/fmopl.h | 108 -
target/demos/wolfenstein3d/foreign.h | 148 -
target/demos/wolfenstein3d/gfxv_sdm.h | 197 --
target/demos/wolfenstein3d/gfxv_sod.h | 248 --
target/demos/wolfenstein3d/gfxv_wl1.h | 194 --
target/demos/wolfenstein3d/gfxv_wl6.h | 189 --
target/demos/wolfenstein3d/id_ca.c | 867 -----
target/demos/wolfenstein3d/id_ca.h | 78 -
target/demos/wolfenstein3d/id_heads.h | 92 -
target/demos/wolfenstein3d/id_us.c | 499 ---
target/demos/wolfenstein3d/id_us.h | 44 -
target/demos/wolfenstein3d/id_vh.c | 415 ---
target/demos/wolfenstein3d/id_vh.h | 56 -
target/demos/wolfenstein3d/misc.c | 320 --
target/demos/wolfenstein3d/misc.h | 63 -
target/demos/wolfenstein3d/objs.c | 151 -
target/demos/wolfenstein3d/sd_comm.c | 124 -
target/demos/wolfenstein3d/sd_comm.h | 44 -
target/demos/wolfenstein3d/sd_null.c | 139 -
target/demos/wolfenstein3d/sd_oss.c | 634 ----
target/demos/wolfenstein3d/version.h | 56 -
target/demos/wolfenstein3d/vi_comm.c | 457 ---
target/demos/wolfenstein3d/vi_comm.h | 175 -
target/demos/wolfenstein3d/vi_sdl.c | 421 ---
target/demos/wolfenstein3d/wl_act1.c | 874 -----
target/demos/wolfenstein3d/wl_act2.c | 2515 ---------------
target/demos/wolfenstein3d/wl_act3.c | 638 ----
target/demos/wolfenstein3d/wl_act3.h | 622 ----
target/demos/wolfenstein3d/wl_agent.c | 1327 --------
target/demos/wolfenstein3d/wl_debug.c | 235 --
target/demos/wolfenstein3d/wl_def.h | 1008 ------
target/demos/wolfenstein3d/wl_draw.c | 1348 --------
target/demos/wolfenstein3d/wl_game.c | 1227 -------
target/demos/wolfenstein3d/wl_inter.c | 1094 -------
target/demos/wolfenstein3d/wl_main.c | 1293 --------
target/demos/wolfenstein3d/wl_menu.c | 3392 --------------------
target/demos/wolfenstein3d/wl_menu.h | 226 --
target/demos/wolfenstein3d/wl_play.c | 1264 --------
target/demos/wolfenstein3d/wl_state.c | 1402 --------
target/demos/wolfenstein3d/wl_text.c | 702 ----
55 files changed, 184 insertions(+), 26683 deletions(-)
create mode 100644 patches/buildroot/107-games-add_wolf4sdl.patch
create mode 100644 patches/buildroot/2010.02/107-games-add_wolf4sdl.patch
delete mode 100644 target/demos/wolfenstein3d/BUGS.txt
delete mode 100644 target/demos/wolfenstein3d/IDEAS
delete mode 100644 target/demos/wolfenstein3d/Makefile
delete mode 100644 target/demos/wolfenstein3d/NOTES
delete mode 100644 target/demos/wolfenstein3d/README
delete mode 100644 target/demos/wolfenstein3d/TODO
delete mode 100644 target/demos/wolfenstein3d/audiosod.h
delete mode 100644 target/demos/wolfenstein3d/audiowl6.h
delete mode 100644 target/demos/wolfenstein3d/docs/goodstuf.txt
delete mode 100644 target/demos/wolfenstein3d/docs/release.txt
delete mode 100644 target/demos/wolfenstein3d/fmopl.c
delete mode 100644 target/demos/wolfenstein3d/fmopl.h
delete mode 100644 target/demos/wolfenstein3d/foreign.h
delete mode 100644 target/demos/wolfenstein3d/gfxv_sdm.h
delete mode 100644 target/demos/wolfenstein3d/gfxv_sod.h
delete mode 100644 target/demos/wolfenstein3d/gfxv_wl1.h
delete mode 100644 target/demos/wolfenstein3d/gfxv_wl6.h
delete mode 100644 target/demos/wolfenstein3d/id_ca.c
delete mode 100644 target/demos/wolfenstein3d/id_ca.h
delete mode 100644 target/demos/wolfenstein3d/id_heads.h
delete mode 100644 target/demos/wolfenstein3d/id_us.c
delete mode 100644 target/demos/wolfenstein3d/id_us.h
delete mode 100644 target/demos/wolfenstein3d/id_vh.c
delete mode 100644 target/demos/wolfenstein3d/id_vh.h
delete mode 100644 target/demos/wolfenstein3d/misc.c
delete mode 100644 target/demos/wolfenstein3d/misc.h
delete mode 100644 target/demos/wolfenstein3d/objs.c
delete mode 100644 target/demos/wolfenstein3d/sd_comm.c
delete mode 100644 target/demos/wolfenstein3d/sd_comm.h
delete mode 100644 target/demos/wolfenstein3d/sd_null.c
delete mode 100644 target/demos/wolfenstein3d/sd_oss.c
delete mode 100644 target/demos/wolfenstein3d/version.h
delete mode 100644 target/demos/wolfenstein3d/vi_comm.c
delete mode 100644 target/demos/wolfenstein3d/vi_comm.h
delete mode 100644 target/demos/wolfenstein3d/vi_sdl.c
delete mode 100644 target/demos/wolfenstein3d/wl_act1.c
delete mode 100644 target/demos/wolfenstein3d/wl_act2.c
delete mode 100644 target/demos/wolfenstein3d/wl_act3.c
delete mode 100644 target/demos/wolfenstein3d/wl_act3.h
delete mode 100644 target/demos/wolfenstein3d/wl_agent.c
delete mode 100644 target/demos/wolfenstein3d/wl_debug.c
delete mode 100644 target/demos/wolfenstein3d/wl_def.h
delete mode 100644 target/demos/wolfenstein3d/wl_draw.c
delete mode 100644 target/demos/wolfenstein3d/wl_game.c
delete mode 100644 target/demos/wolfenstein3d/wl_inter.c
delete mode 100644 target/demos/wolfenstein3d/wl_main.c
delete mode 100644 target/demos/wolfenstein3d/wl_menu.c
delete mode 100644 target/demos/wolfenstein3d/wl_menu.h
delete mode 100644 target/demos/wolfenstein3d/wl_play.c
delete mode 100644 target/demos/wolfenstein3d/wl_state.c
delete mode 100644 target/demos/wolfenstein3d/wl_text.c
diff --git a/patches/buildroot/107-games-add_wolf4sdl.patch b/patches/buildroot/107-games-add_wolf4sdl.patch
new file mode 100644
index 0000000..6b7e12d
--- /dev/null
+++ b/patches/buildroot/107-games-add_wolf4sdl.patch
@@ -0,0 +1,91 @@
+Add Wolf4SDL to BR.
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+Index: buildroot/package/games/wolf4sdl/Config.in
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ buildroot/package/games/wolf4sdl/Config.in 2010-06-07 16:17:18.000000000 +0200
+@@ -0,0 +1,11 @@
++config BR2_PACKAGE_WOLF4SDL
++ bool "Wolf4SDL"
++ select BR2_PACKAGE_SDL
++ select BR2_PACKAGE_SDL_MIXER
++ help
++ Wolf4SDL is an open-source port of id Software's classic first-person
++ shooter Wolfenstein 3D to the cross-plattform multimedia library
++ "Simple DirectMedia Layer (SDL)". It is meant to keep the original
++ feel while taking advantage of some improvements (see README).
++
++ http://www.stud.uni-karlsruhe.de/~uvaue/chaos/main.html
+Index: buildroot/package/games/wolf4sdl/wolf4sdl.mk
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ buildroot/package/games/wolf4sdl/wolf4sdl.mk 2010-06-07 16:36:19.000000000 +0200
+@@ -0,0 +1,55 @@
++#############################################################
++#
++# Wolf4SDL
++#
++#############################################################
++WOLF4SDL_VERSION:=1.6
++WOLF4SDL_SOURCE = Wolf4SDL-$(WOLF4SDL_VERSION)-src.zip
++WOLF4SDL_SITE = http://www.stud.uni-karlsruhe.de/~uvaue/chaos/bins/
++WOLF4SDL_TARGET_BIN:=/usr/local/bin/wolf3d
++WOLF4SDL_DIR:=$(BUILD_DIR)/Wolf4SDL-$(WOLF4SDL_VERSION)-src
++
++#WOLF4SDL_INSTALL_STAGING = NO
++#WOLF4SDL_INSTALL_TARGET = YES
++#WOLF4SDL_DEPENDENCIES = sdl sdl_mixer
++#$(eval $(call AUTOTARGETS,package/games,wolf4sdl))
++
++$(DL_DIR)/$(WOLF4SDL_SOURCE):
++ $(WGET) -P $(DL_DIR) $(WOLF4SDL_SITE)/$(WOLF4SDL_SOURCE)
++
++wolf4sdl-source: $(DL_DIR)/$(WOLF4SDL_SOURCE)
++
++$(WOLF4SDL_DIR)/.unpacked: $(DL_DIR)/$(WOLF4SDL_SOURCE)
++ unzip $(DL_DIR)/$(WOLF4SDL_SOURCE) -d $(BUILD_DIR)
++# mv $(BUILD_DIR)/Wolf4SDL-$(WOLF4SDL_VERSION)-src/* $(WOLF4SDL_DIR)
++# rm -rf $(BUILD_DIR)/Wolf4SDL-$(WOLF4SDL_VERSION)-src
++ touch $@
++
++$(WOLF4SDL_DIR)/wolf3d: $(WOLF4SDL_DIR)/.unpacked
++ $(MAKE) CC=$(TARGET_CC) CXX=$(TARGET_CXX) PREFIX=$(TARGET_DIR)/usr/local \
++ SDL_CONFIG=$(STAGING_DIR)/usr/bin/sdl-config \
++ -C $(WOLF4SDL_DIR)
++
++$(TARGET_DIR)/$(WOLF4SDL_TARGET_BIN): $(WOLF4SDL_DIR)/wolf3d
++ $(MAKE) PREFIX=$(TARGET_DIR)/usr/local \
++ INSTALL=$(INSTALL) \
++ INSTALL_PROGRAM="$(INSTALL) -m 775" \
++ install -C $(WOLF4SDL_DIR)
++ $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/$(WOLF4SDL_TARGET_BIN)
++
++WOLF4SDL wolf4sdl: sdl sdl_mixer $(TARGET_DIR)/$(WOLF4SDL_TARGET_BIN)
++
++wolf4sdl-clean:
++ -$(MAKE) -C $(WOLF4SDL_DIR) clean
++
++wolf4sdl-dirclean:
++ rm -rf $(WOLF4SDL_DIR)
++
++#############################################################
++#
++# Toplevel Makefile options
++#
++#############################################################
++ifeq ($(strip $(BR2_PACKAGE_WOLF4SDL)),y)
++TARGETS+=wolf4sdl
++endif
+Index: buildroot/package/games/Config.in
+===================================================================
+--- buildroot.orig/package/games/Config.in 2010-06-07 16:15:27.000000000 +0200
++++ buildroot/package/games/Config.in 2010-06-07 16:18:33.000000000 +0200
+@@ -15,5 +15,6 @@
+ source "package/games/rubix/Config.in"
+ source "package/games/sdlquake/Config.in"
+ source "package/games/vice/Config.in"
++source "package/games/wolf4sdl/Config.in"
+ source "package/games/xboard/Config.in"
+ endif
diff --git a/patches/buildroot/2010.02/107-games-add_wolf4sdl.patch b/patches/buildroot/2010.02/107-games-add_wolf4sdl.patch
new file mode 100644
index 0000000..6b7e12d
--- /dev/null
+++ b/patches/buildroot/2010.02/107-games-add_wolf4sdl.patch
@@ -0,0 +1,91 @@
+Add Wolf4SDL to BR.
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+Index: buildroot/package/games/wolf4sdl/Config.in
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ buildroot/package/games/wolf4sdl/Config.in 2010-06-07 16:17:18.000000000 +0200
+@@ -0,0 +1,11 @@
++config BR2_PACKAGE_WOLF4SDL
++ bool "Wolf4SDL"
++ select BR2_PACKAGE_SDL
++ select BR2_PACKAGE_SDL_MIXER
++ help
++ Wolf4SDL is an open-source port of id Software's classic first-person
++ shooter Wolfenstein 3D to the cross-plattform multimedia library
++ "Simple DirectMedia Layer (SDL)". It is meant to keep the original
++ feel while taking advantage of some improvements (see README).
++
++ http://www.stud.uni-karlsruhe.de/~uvaue/chaos/main.html
+Index: buildroot/package/games/wolf4sdl/wolf4sdl.mk
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ buildroot/package/games/wolf4sdl/wolf4sdl.mk 2010-06-07 16:36:19.000000000 +0200
+@@ -0,0 +1,55 @@
++#############################################################
++#
++# Wolf4SDL
++#
++#############################################################
++WOLF4SDL_VERSION:=1.6
++WOLF4SDL_SOURCE = Wolf4SDL-$(WOLF4SDL_VERSION)-src.zip
++WOLF4SDL_SITE = http://www.stud.uni-karlsruhe.de/~uvaue/chaos/bins/
++WOLF4SDL_TARGET_BIN:=/usr/local/bin/wolf3d
++WOLF4SDL_DIR:=$(BUILD_DIR)/Wolf4SDL-$(WOLF4SDL_VERSION)-src
++
++#WOLF4SDL_INSTALL_STAGING = NO
++#WOLF4SDL_INSTALL_TARGET = YES
++#WOLF4SDL_DEPENDENCIES = sdl sdl_mixer
++#$(eval $(call AUTOTARGETS,package/games,wolf4sdl))
++
++$(DL_DIR)/$(WOLF4SDL_SOURCE):
++ $(WGET) -P $(DL_DIR) $(WOLF4SDL_SITE)/$(WOLF4SDL_SOURCE)
++
++wolf4sdl-source: $(DL_DIR)/$(WOLF4SDL_SOURCE)
++
++$(WOLF4SDL_DIR)/.unpacked: $(DL_DIR)/$(WOLF4SDL_SOURCE)
++ unzip $(DL_DIR)/$(WOLF4SDL_SOURCE) -d $(BUILD_DIR)
++# mv $(BUILD_DIR)/Wolf4SDL-$(WOLF4SDL_VERSION)-src/* $(WOLF4SDL_DIR)
++# rm -rf $(BUILD_DIR)/Wolf4SDL-$(WOLF4SDL_VERSION)-src
++ touch $@
++
++$(WOLF4SDL_DIR)/wolf3d: $(WOLF4SDL_DIR)/.unpacked
++ $(MAKE) CC=$(TARGET_CC) CXX=$(TARGET_CXX) PREFIX=$(TARGET_DIR)/usr/local \
++ SDL_CONFIG=$(STAGING_DIR)/usr/bin/sdl-config \
++ -C $(WOLF4SDL_DIR)
++
++$(TARGET_DIR)/$(WOLF4SDL_TARGET_BIN): $(WOLF4SDL_DIR)/wolf3d
++ $(MAKE) PREFIX=$(TARGET_DIR)/usr/local \
++ INSTALL=$(INSTALL) \
++ INSTALL_PROGRAM="$(INSTALL) -m 775" \
++ install -C $(WOLF4SDL_DIR)
++ $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/$(WOLF4SDL_TARGET_BIN)
++
++WOLF4SDL wolf4sdl: sdl sdl_mixer $(TARGET_DIR)/$(WOLF4SDL_TARGET_BIN)
++
++wolf4sdl-clean:
++ -$(MAKE) -C $(WOLF4SDL_DIR) clean
++
++wolf4sdl-dirclean:
++ rm -rf $(WOLF4SDL_DIR)
++
++#############################################################
++#
++# Toplevel Makefile options
++#
++#############################################################
++ifeq ($(strip $(BR2_PACKAGE_WOLF4SDL)),y)
++TARGETS+=wolf4sdl
++endif
+Index: buildroot/package/games/Config.in
+===================================================================
+--- buildroot.orig/package/games/Config.in 2010-06-07 16:15:27.000000000 +0200
++++ buildroot/package/games/Config.in 2010-06-07 16:18:33.000000000 +0200
+@@ -15,5 +15,6 @@
+ source "package/games/rubix/Config.in"
+ source "package/games/sdlquake/Config.in"
+ source "package/games/vice/Config.in"
++source "package/games/wolf4sdl/Config.in"
+ source "package/games/xboard/Config.in"
+ endif
diff --git a/patches/buildroot/2010.02/cleanup_buildroot.sh b/patches/buildroot/2010.02/cleanup_buildroot.sh
index 8d6bf15..659f014 100755
--- a/patches/buildroot/2010.02/cleanup_buildroot.sh
+++ b/patches/buildroot/2010.02/cleanup_buildroot.sh
@@ -19,3 +19,4 @@ rm -f buildroot/package/busybox/busybox-1.15.3-speed_table-B921600.patch
rm -rf buildroot/package/firmware/
rm -f buildroot/toolchain/gcc/4.2.1/999-4.2.1-armeabi-aapcs-linux.patch
rm -f buildroot/toolchain/gcc/4.2.4/999-4.2.4-armeabi-aapcs-linux.patch
+rm -rf buildroot/package/games/wolf4sdl/
diff --git a/patches/buildroot/cleanup_buildroot.sh b/patches/buildroot/cleanup_buildroot.sh
index 023b3a8..9d02929 100755
--- a/patches/buildroot/cleanup_buildroot.sh
+++ b/patches/buildroot/cleanup_buildroot.sh
@@ -22,3 +22,4 @@ rm -f buildroot/package/strace/strace-arm-eabi-fix.patch
rm -f buildroot/package/strace/strace-arm-no-cachectl.patch
rm -f buildroot/toolchain/gcc/4.2.1/999-4.2.1-armeabi-aapcs-linux.patch
rm -f buildroot/toolchain/gcc/4.2.4/999-4.2.4-armeabi-aapcs-linux.patch
+rm -rf buildroot/package/games/wolf4sdl/
diff --git a/target/demos/wolfenstein3d/BUGS.txt b/target/demos/wolfenstein3d/BUGS.txt
deleted file mode 100644
index e98e387..0000000
--- a/target/demos/wolfenstein3d/BUGS.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-LIST OF BUGS on Armadeus Project port:
---------------------------------------
-
-1]-----------
-
-When shooting, player can't stop and when no more ammunition game exits with an error.
-When provocating a SegFault instead of an error, here is the backtrace:
-
-Core was generated by `../sdlwolf3d'.
-Program terminated with signal 11, Segmentation fault.
-#0 0x0000b6c0 in PML_ReadFromFile (buf=0xb6bb8 "", offset=0, length=0)
- at id_ca.c:767
-767 id_ca.c: No such file or directory.
- in id_ca.c
-(gdb) bt
-#0 0x0000b6c0 in PML_ReadFromFile (buf=0xb6bb8 "", offset=0, length=0)
- at id_ca.c:767
-#1 0x0000ba60 in PM_GetPage (pagenum=636) at id_ca.c:832
-#2 0x0002d4c0 in DeCompileSprite (shapenum=530) at wl_draw.c:768
-#3 0x0002d7ec in SimpleScaleShape (xcenter=120, shapenum=530, height=121)
- at wl_draw.c:825
-#4 0x0002c6b8 in DrawPlayerWeapon () at wl_draw.c:419
-#5 0x0002d030 in ThreeDRefresh () at wl_draw.c:673
-#6 0x00022894 in PlayLoop () at wl_play.c:1218
-#7 0x00018364 in GameLoop () at wl_game.c:1067
-#8 0x0002a1c8 in DemoLoop () at wl_main.c:1253
-#9 0x0002a298 in WolfMain (argc=1, argv=0xbe8efdc4) at wl_main.c:1288
-#10 0x0002ea40 in main (argc=1, argv=0xbe8efdc4) at vi_sdl.c:14
-
-Bug doesn't occur when game is compiled for PC
\ No newline at end of file
diff --git a/target/demos/wolfenstein3d/IDEAS b/target/demos/wolfenstein3d/IDEAS
deleted file mode 100644
index 6dd9f2b..0000000
--- a/target/demos/wolfenstein3d/IDEAS
+++ /dev/null
@@ -1,22 +0,0 @@
-* One binary, any game type.
-* A key to change viewsize while playing
-* Game able to work with any resolution in software mode
-* Audio support using OpenAL
-* Add support for the Mac version, if possible
-* Network support!
-* Fully compile with no warnings/errors using -Wall -ansi -pedantic and with
- other compilers (would need to turn off warnings about unused parameters)
-* Port to: Linux/SVGAlib, Unix/OpenGL?, Linux/SDL, DOS/Allegro?, Win32/GDI?,
- Win32/DX?, Win32/D3D?, Win32/OpenGL?, BeOS?, MacOS?, QNX?
-* Ease in using demos. Playing demos from files, recording to files, batch
- playing, and so on.
-* Make Wolf3D the game it was originally planned to be... More strategy...
-* Empty TODO File
-* Test with other available mods (that were compatible with the original
- game)
-* Unified input handling
-* Configuration files and save games which work regardless of operating
- system/processor/binary build
-* Suite of utilities to edit the game data.
-* Resolve any endian issues
-* Add a ViewMap?
diff --git a/target/demos/wolfenstein3d/Makefile b/target/demos/wolfenstein3d/Makefile
deleted file mode 100644
index 80a97b2..0000000
--- a/target/demos/wolfenstein3d/Makefile
+++ /dev/null
@@ -1,69 +0,0 @@
-ifeq ($(TARGET),arm)
-INCLUDE_PATH="../../../buildroot/build_arm_nofpu/SDL-1.2.11/include/"
-LIBRARY_PATH="../../../buildroot/build_arm_nofpu/root/usr/lib/"
-INSTALL_DIR="../../../buildroot/build_arm_nofpu/root/usr/bin/"
-CC:=../../../buildroot/build_arm_nofpu/staging_dir/bin/arm-linux-gcc
-DEFINES=TARGET
-ROOT=../../../buildroot/build_arm_nofpu/staging_dir/
-else
-INCLUDE_PATH="/usr/include/SDL"
-LIBRARY_PATH="/usr/lib/"
-INSTALL_DIR="."
-CC=gcc
-DEFINES=HOST
-endif
-
-CFLAGS = -O2 -Wall
-#CFLAGS = -g -Wall -pedantic
-#CFLAGS = -g -O2 -Wall -pedantic
-#CFLAGS = -Wall -O6 -fomit-frame-pointer -ffast-math -funroll-loops -mpentiumpro -mcpu=pentiumpro -march=pentiumpro
-#CFLAGS = -g -Wall -pedantic -std=gnu99
-#CFLAGS = -Os -Wall -pedantic
-#CFLAGS = -Os -Wall -fomit-frame-pointer -ffast-math -mpentiumpro -mcpu=pentiumpro -march=pentiumpro
-
-OBJS = objs.o misc.o id_ca.o id_vh.o id_us.o \
- wl_act1.o wl_act2.o wl_act3.o wl_agent.o wl_game.o \
- wl_inter.o wl_menu.o wl_play.o wl_state.o wl_text.o wl_main.o \
- wl_debug.o vi_comm.o sd_comm.o
-ROBJS = wl_draw.o
-DOBJS = $(OBJS) $(ROBJS) vi_sdl.o
-
-LFLAGS = -lm
-
-OBJS += sd_null.o
-#OBJS += sd_oss.o fmopl.o
-#CFLAGS += -D_REENTRANT
-#LFLAGS += -lpthread
-
-CFLAGS += `$(ROOT)/usr/bin/sdl-config --cflags`
-
-DLFLAGS = $(LFLAGS) `$(ROOT)/usr/bin/sdl-config --libs`
-
-NASM = nasm
-
-.SUFFIXES: .asm
-
-all: sdlwolf3d
-
-$(DOBJS): version.h id_heads.h wl_def.h
-
-.asm.o:
- $(NASM) -f elf -o $@ $<
-
-swolf3d: $(SOBJS)
- $(CC) -o swolf3d $(SOBJS) $(SLFLAGS)
-
-xwolf3d: $(XOBJS)
- $(CC) -o xwolf3d $(XOBJS) $(XLFLAGS)
-
-sdlwolf3d: $(DOBJS)
- $(CC) -o sdlwolf3d $(DOBJS) $(DLFLAGS)
-
-clean:
- rm -rf swolf3d xwolf3d sdlwolf3d *.o
-
-distclean: clean
- rm -rf *~ DEADJOE
-
-forced: distclean all
- rm -rf *.o
diff --git a/target/demos/wolfenstein3d/NOTES b/target/demos/wolfenstein3d/NOTES
deleted file mode 100644
index a5c445a..0000000
--- a/target/demos/wolfenstein3d/NOTES
+++ /dev/null
@@ -1,71 +0,0 @@
-Just some random facts/thoughts/ideas/musings:
-
-* Wolfenstein 3D for:
- - PC [May 5, 1992]
- - PC (Spear of Destiny) [September 18, 1992]
- - SNES
- - Macintosh
- - Jaguar
- - Apple IIGS: http://www.sheppyware.com/products/a2/wolf3d/
- - 3DO
- - Acorn/Archemedes: http://www.users.globalnet.co.uk/~brlowe/info2.htm
-
-* Rumored/Never Released?
- - Atari Lynx
- - Sega Genesis (was cancelled after a month)
- - Japanese PC Version (referenced in source)
- - Spanish PC Version (referenced in source)
- - Japanese Mac Version (referenced in source ??)
-
-* Unofficial ports:
- - Linux (this, xwolf, wolfgl)
- XWolf: http://www.sirius.demon.co.uk/xwolf/
- - Amiga (port of my first pc wolf3d linux port)
- http://www.silab.dsi.unimi.it/~cs556770/wolf3d/
- - Windows
- WolfGL: http://www.sourceforge.net/projects/wolfgl/
- Wolf DX: http://www.phoebe.co.uk/glwolf/
- NewWolf: http://wolfgl.narod.ru/
-
-* PC source released Jul 21, 1995 [http://www.3dgamers.com/games/wolfenstein3d/]
- - ftp://ftp.idsoftware.com/idstuff/source/wolfsrc.zip
- * now many ports, projects, etc
- - http://www.abraxis.com/brucel/wolf3d.html
- - http://www.wolf3dbunker.com
- - http://www.wolf3dmansion.com/index.phtml
-* Macintosh source released January 21, 2000
- - http://www.maccentral.com/news/0001/24.wolf3d.shtml
-* TED5 source (map editor used for tons of games including wolf3d)
- - ftp://ftp.3drealms.com/misc/ted5.zip
-* Games which used the Wolfenstein 3D Engine:
- - Blake Stone (Aliens of Gold, Planet Strike)
- - Corridor 7
- - Operation Body Count
-
-Apogee FAQ (lots of information regarding Wolf3D):
-- http://www.rinkworks.com/apogee/
-
-Wolfenstein 3D FAQ:
-- http://www.wolf3d.co.uk/Wolfenstein-3D.faq
-
-How to get Wolfenstein 3D:
-- Wolfenstein 3D Shareware:
- ftp://ftp.gamers.org/pub/games/wolf3d/official/1wolf14.zip
- http://www.3drealms.com/downloads.html
-- Spear of Destiny Demo:
- ftp://ftp.gamers.org/pub/3daction/00archives/speardestiny/releases/soddemo2.zip
-- Macintosh versions:
- - Search for the shareware version (First Encounter) on Macintosh Shareware
- websites.
- - The commercial Macintosh version (Second Encounter, not Third) is out of
- print, but you may find someone selling it on websites such as
- http://www.ebay.com.
-- Where to Buy:
- http://www.3drealms.com
- http://www.idsoftware.com (look for how to order direct, etc)
- http://www.activison.com
-
-
------
-Steven Fuller
-re...@ic...
diff --git a/target/demos/wolfenstein3d/README b/target/demos/wolfenstein3d/README
deleted file mode 100644
index 9e3b09c..0000000
--- a/target/demos/wolfenstein3d/README
+++ /dev/null
@@ -1,74 +0,0 @@
-This is a "quick and dirty" port of "Wolfenstein 3D Linux" to the Armadeus Project
-boards. You will need a keyboard connected to your board to appreciate this game ! ;-)
-
-Original sources were found here: http://www.icculus.org/wolf3d/
-
-To compile it:
-- for your Host: make
-- for your board; make TARGET=arm
-
-To use it you will need to have original game data (wolfdata.zip):
-http://sourceforge.net/project/showfiles.php?group_id=11904
-Launch the game executable (sdlwolf3d) from the data directory.
-
-There is still some bugs, please consult BUGS.txt.
-
-Julien Boibessot
-jul...@ar...
-
-
-Original text start here: --------------------------->>>>
-
-This is a October 28, 2001 Snapshot of "Wolfenstein 3D Linux" by Steven
-Fuller. It is an unofficial Linux port of the id Software game, Wolfenstein
-3D (1992).
-
-I am releasing this snapshot to find out what still needs to be done to make
-this port 'complete.' So all feedback is welcome.
-
-My Goal:
-Take the 1992 DOS game, and bring it to Linux. Extra features will be kept
-at a minimum.
-
-To compile, type: make
-Be sure to have SDL 1.2 (http://www.libsdl.org) installed.
-
-To change which version of the game is used, edit version.h (change the
-#define WMODE <number> line, replacing <number> with: 0 for the Wolfenstein
-3D Shareware (WL1), Wolfenstein 3D registered, all six episodes (WL6), the
-Spear of Destiny Demo (SDM), and Spear of Destiny (SOD). Make sure you have
-the latest versions of the game). Wolfenstein 3D, the first three episodes
-(WL3) is not supported; let me know if you have a copy (or you could pick up
-a copy of the full version...). To find out where to get the
-demos/shareware, look in NOTES.
-
-Sound support is there. Edit the Makefile (find the line that has 'OBJS +=
-sd_null.o'. Add a # in front of it, and remove the # from the next three
-lines. Recompile and sound should work.)
-
-If you have anything to contribute to NOTES (interesting facts, etc),
-please let me know.
-
-Note:
-Config files are not implemented. They should be implemented in the next
-release.
-
-If you like your Wolf3D with OpenGL, be sure to check out WolfGL:
-http://www.sourceforge.net/projects/wolfgl/
-
-
-Thanks:
-* id Software
-* David Haslam
-* Ryan Gordon
-* Bill Heineman
-* Dan Olson
-* Leonardo Zide
-* Tatsuyuki Satoh
-* Chuck Mason
-* And everyone who has emailed me about this code! Thanks!
-
------
-Steven Fuller
-re...@ic...
-http://icculus.org/wolf3d/
diff --git a/target/demos/wolfenstein3d/TODO b/target/demos/wolfenstein3d/TODO
deleted file mode 100644
index fbe3433..0000000
--- a/target/demos/wolfenstein3d/TODO
+++ /dev/null
@@ -1,137 +0,0 @@
-Priority Levels: I > R > M (I, R required to be complete before full release)
-Program: P=PC Wolf3D, M=Mac Wolf3D, B=Both
-P R - create a better "read direction" for menu movement
-P M - convert while (Keyboard[sc_Blah]) IN_CheckAck() to IN_WaitKeyDown(sc..
-P I - finish changing the game movement to the new style
-P R - update input menus/config
-P M - cleanup/rewrite menu code
-P R - update sound menus/config
-P I - rewrite sound code: get rid of packed structs, clean up thread stuff
-P I - fix issues (speed, hacks) with variable screen size
-P M - BSP trees (or something similar), then OpenGL support
-M R - port menu code (after fixed up)
-M R - add sound
-M M - complete/fix opengl mode
-M M - add music (would need to RE the sound lib)
-B I - complete savegame, config formats
-M I - add SDL
-B R - decide if to keep SVGA/X11 targets
-B M - configure scripts? (autoconf/automake/etc)
-B M - port to dreamcast?
-B M - add compression to savegames/config
-B I - play through game (w/ sound and music) to make sure things work
-B M - use stdint.h where appropiate
-B M - finish serializing reads/writes, endian issues.
- - PC version should be OK for loading -- savegames not yet tested.
-P M - fix raycast bug where at certain points you can see through corners
-B I - merge other TODO lists into this list
-B M - use something like config file or getenv to point at data directories
-P I - finish handling/mapping for all keys in sys. specific code
-B I - add mouse support
-B M - add joystick/gamepad support
-P I - fill in the new fizzlefade function
-P I - add sound "emulation" to the necessary targets so WaitSoundDone works
-P R - change boolean SD_PlaySound to void SD_PlaySound
-P M - position pushwall sounds
-P M - id_ca.c cache code: fix/readd/rewrite the "garbage collection" system
-P M - rewrite id_ca.c: uniform memory handling system
-P M - either move id_heads into wl_def or split header files apart
-P R - rewrite fmopl.c to avoid licensing issues (or provide as a separate patch? may not be advisable since id owns copyright on wolf code)
-P R - remove CA_LoadAllSounds now that the sound code does everything
-B I - README, etc.
-B M - Code Documentation
-P M - rename visable to visible
-B M - change the commandline handling (use something like getopt?)
-P R - rewrite RLEWexpand to not use words
-B M - openal support
-B I - when window loses focus, it should clear the keys
-B M - [X11] use the data in the visual/image for formatting colors
-
-Complete:
-P I - fix or remove fizzle fade
- - Removed [nice, but very hacky effect]
-------------------------------------------------------------------------------
-* what exactly is the point of all the DigiMode checks in wl_act2.c?
-* add ylookup?
-* remove farmapylookup?
-* would be nice if Quit() used vsnprintf, etc
-* actor walking through door is drawn in front of door: near end of E1M1 for
-example (is this reproducible?)
-* use static and const where appropriate
-* clean up header files, especially wl_def.h, where some declarations aren't
-in the right place
-* remove check for debugmode?
-* check filehandling (ex, file missing, bad file type, and such)
-PlayDemoFromFile specifically
-* deathcam went by too fast, same with the spear of destiny ending animation
- - probably due to waiting for sounds to finish
-* split wl_draw into two files (draw independent, draw dependent)
-------------------------------------------------------------------------------
-void ControlMovement(objtype *ob) (wl_agent.c)
-void UpdateInput() / void PollControls() (wl_play.c)
-------------------------------------------------------------------------------
-Control Menu:
-* TODO
-
-Sound Menu:
-* Digital Sound Effects:
-- On [PCM]
-- Off
-* Sound Effects
-- On [AdLib/OPL2]
-- PC Speaker?
-- Off
-* Music:
-- On [AdLib/OPL2]
-- Off
-------------------------------------------------------------------------------
-Where to Look for/Save Files:
-
-~/.wolf3d
-cwd
-/usr/games/share
-$ENVIRONMENT_VARIABLE
-
-Need to establish where to look, order to look, strict/lenient loading (load
-all files from the determined game directory, or look in order for each
-file), and where to put savegames and config files.
-------------------------------------------------------------------------------
-Save game header:
-8 bytes: WOLF3D, 0, 0
-4 bytes: SAV, 0
-4 bytes: version (integer)
-4 bytes: game type (WL1, WL6, SDM, SOD)
-4 bytes: seconds past 1970 (time(NULL))
-4 bytes: padding
-4 bytes: checksum for the data (after text string)
-32 bytes: text string
-
-Version 0xFFFFFFFF Data: (Unofficial Save Game data)
-<see wl_main.c>
-
-Version 0x00000000 Data: (Official)
-<undetermined>
-
-Version 0x00000001 Data: (Official)
-<undetermined but will be compressed>
-
----
-
-Config header:
-8 bytes: WOLF3D, 0, 0
-4 bytes: CFG, 0
-4 bytes: version (integer)
-4 bytes: game type (WL1, WL6, SDM, SOD)
-4 bytes: seconds past 1970 (time(NULL))
-4 bytes: padding
-4 bytes: checksum for the data
-
-Version 0xFFFFFFFF Data: (Unofficial Config data)
-<see wl_main.c>
-
-Version 0x00000000 Data: (Official)
-<undetermined>
-
-Version 0x00000001 Data: (Official)
-<undetermined but will be compressed>
-
diff --git a/target/demos/wolfenstein3d/audiosod.h b/target/demos/wolfenstein3d/audiosod.h
deleted file mode 100644
index d12d0c0..0000000
--- a/target/demos/wolfenstein3d/audiosod.h
+++ /dev/null
@@ -1,122 +0,0 @@
-#define NUMSOUNDS 81
-#define NUMSNDCHUNKS 267
-
-/* Sound names & indexes */
-typedef enum {
- HITWALLSND, // 0
- MISSILEHITSND, // 1
- SELECTITEMSND, // 2
- GHOSTSIGHTSND, // 3
- MOVEGUN2SND, // 4
- MOVEGUN1SND, // 5
- NOWAYSND, // 6
- NAZIHITPLAYERSND, // 7
- MISSILEFIRESND, // 8
- PLAYERDEATHSND, // 9
- DOGDEATHSND, // 10
- ATKGATLINGSND, // 11
- GETKEYSND, // 12
- NOITEMSND, // 13
- WALK1SND, // 14
- WALK2SND, // 15
- TAKEDAMAGESND, // 16
- GAMEOVERSND, // 17
- OPENDOORSND, // 18
- CLOSEDOORSND, // 19
- DONOTHINGSND, // 20
- HALTSND, // 21
- DEATHSCREAM2SND, // 22
- ATKKNIFESND, // 23
- ATKPISTOLSND, // 24
- DEATHSCREAM3SND, // 25
- ATKMACHINEGUNSND, // 26
- HITENEMYSND, // 27
- SHOOTDOORSND, // 28
- DEATHSCREAM1SND, // 29
- GETMACHINESND, // 30
- GETAMMOSND, // 31
- SHOOTSND, // 32
- HEALTH1SND, // 33
- HEALTH2SND, // 34
- BONUS1SND, // 35
- BONUS2SND, // 36
- BONUS3SND, // 37
- GETGATLINGSND, // 38
- ESCPRESSEDSND, // 39
- LEVELDONESND, // 40
- DOGBARKSND, // 41
- ENDBONUS1SND, // 42
- ENDBONUS2SND, // 43
- BONUS1UPSND, // 44
- BONUS4SND, // 45
- PUSHWALLSND, // 46
- NOBONUSSND, // 47
- PERCENT100SND, // 48
- BOSSACTIVESND, // 49
- DEATHSCREAM4SND, // 50
- SCHUTZADSND, // 51
- AHHHGSND, // 52
- DEATHSCREAM5SND, // 53
- DEATHSCREAM7SND, // 54
- DEATHSCREAM8SND, // 55
- LEBENSND, // 56
- DEATHSCREAM6SND, // 57
- NAZIFIRESND, // 58
- BOSSFIRESND, // 59
- SSFIRESND, // 60
- SLURPIESND, // 61
- GHOSTFADESND, // 62
- DEATHSCREAM9SND, // 63
- GETAMMOBOXSND, // 64
- ANGELSIGHTSND, // 65
- SPIONSND, // 66
- NEINSOVASSND, // 67
- DOGATTACKSND, // 68
- ANGELFIRESND, // 69
- TRANSSIGHTSND, // 70
- TRANSDEATHSND, // 71
- WILHELMSIGHTSND, // 72
- WILHELMDEATHSND, // 73
- UBERDEATHSND, // 74
- KNIGHTSIGHTSND, // 75
- KNIGHTDEATHSND, // 76
- ANGELDEATHSND, // 77
- KNIGHTMISSILESND, // 78
- GETSPEARSND, // 79
- ANGELTIREDSND, // 80
- LASTSOUND
- } soundnames;
-
-/* Base offsets */
-#define STARTPCSOUNDS 0
-#define STARTADLIBSOUNDS 81
-#define STARTMUSIC 243
-
-/* Music names & indexes */
-typedef enum {
- XFUNKIE_MUS, // 0
- DUNGEON_MUS, // 1
- XDEATH_MUS, // 2
- GETTHEM_MUS, // 3
- XTIPTOE_MUS, // 4
- GOINGAFT_MUS, // 5
- URAHERO_MUS, // 6
- XTHEEND_MUS, // 7
- NAZI_OMI_MUS, // 8
- POW_MUS, // 9
- TWELFTH_MUS, // 10
- SEARCHN_MUS, // 11
- SUSPENSE_MUS, // 12
- ZEROHOUR_MUS, // 13
- WONDERIN_MUS, // 14
- ULTIMATE_MUS, // 15
- ENDLEVEL_MUS, // 16
- XEVIL_MUS, // 17
- XJAZNAZI_MUS, // 18
- COPYPRO_MUS, // 19
- XAWARD_MUS, // 20
- XPUTIT_MUS, // 21
- XGETYOU_MUS, // 22
- XTOWER2_MUS, // 23
- LASTMUSIC
- } musicnames;
diff --git a/target/demos/wolfenstein3d/audiowl6.h b/target/demos/wolfenstein3d/audiowl6.h
deleted file mode 100644
index 1cc9f15..0000000
--- a/target/demos/wolfenstein3d/audiowl6.h
+++ /dev/null
@@ -1,137 +0,0 @@
-#define NUMSOUNDS 87
-#define NUMSNDCHUNKS 288
-
-//
-// Sound names & indexes
-//
-typedef enum {
- HITWALLSND, // 0
- SELECTWPNSND, // 1
- SELECTITEMSND, // 2
- HEARTBEATSND, // 3
- MOVEGUN2SND, // 4
- MOVEGUN1SND, // 5
- NOWAYSND, // 6
- NAZIHITPLAYERSND, // 7
- SCHABBSTHROWSND, // 8
- PLAYERDEATHSND, // 9
- DOGDEATHSND, // 10
- ATKGATLINGSND, // 11
- GETKEYSND, // 12
- NOITEMSND, // 13
- WALK1SND, // 14
- WALK2SND, // 15
- TAKEDAMAGESND, // 16
- GAMEOVERSND, // 17
- OPENDOORSND, // 18
- CLOSEDOORSND, // 19
- DONOTHINGSND, // 20
- HALTSND, // 21
- DEATHSCREAM2SND, // 22
- ATKKNIFESND, // 23
- ATKPISTOLSND, // 24
- DEATHSCREAM3SND, // 25
- ATKMACHINEGUNSND, // 26
- HITENEMYSND, // 27
- SHOOTDOORSND, // 28
- DEATHSCREAM1SND, // 29
- GETMACHINESND, // 30
- GETAMMOSND, // 31
- SHOOTSND, // 32
- HEALTH1SND, // 33
- HEALTH2SND, // 34
- BONUS1SND, // 35
- BONUS2SND, // 36
- BONUS3SND, // 37
- GETGATLINGSND, // 38
- ESCPRESSEDSND, // 39
- LEVELDONESND, // 40
- DOGBARKSND, // 41
- ENDBONUS1SND, // 42
- ENDBONUS2SND, // 43
- BONUS1UPSND, // 44
- BONUS4SND, // 45
- PUSHWALLSND, // 46
- NOBONUSSND, // 47
- PERCENT100SND, // 48
- BOSSACTIVESND, // 49
- MUTTISND, // 50
- SCHUTZADSND, // 51
- AHHHGSND, // 52
- DIESND, // 53
- EVASND, // 54
- GUTENTAGSND, // 55
- LEBENSND, // 56
- SCHEISTSND, // 57
- NAZIFIRESND, // 58
- BOSSFIRESND, // 59
- SSFIRESND, // 60
- SLURPIESND, // 61
- TOT_HUNDSND, // 62
- MEINGOTTSND, // 63
- SCHABBSHASND, // 64
- HITLERHASND, // 65
- SPIONSND, // 66
- NEINSOVASSND, // 67
- DOGATTACKSND, // 68
- FLAMETHROWERSND, // 69
- MECHSTEPSND, // 70
- GOOBSSND, // 71
- YEAHSND, // 72
- DEATHSCREAM4SND, // 73
- DEATHSCREAM5SND, // 74
- DEATHSCREAM6SND, // 75
- DEATHSCREAM7SND, // 76
- DEATHSCREAM8SND, // 77
- DEATHSCREAM9SND, // 78
- DONNERSND, // 79
- EINESND, // 80
- ERLAUBENSND, // 81
- KEINSND, // 82
- MEINSND, // 83
- ROSESND, // 84
- MISSILEFIRESND, // 85
- MISSILEHITSND, // 86
- LASTSOUND
- } soundnames;
-
-//
-// Base offsets
-//
-#define STARTPCSOUNDS 0
-#define STARTADLIBSOUNDS 87
-#define STARTMUSIC 261
-
-//
-// Music names & indexes
-//
-typedef enum {
- CORNER_MUS, // 0
- DUNGEON_MUS, // 1
- WARMARCH_MUS, // 2
- GETTHEM_MUS, // 3
- HEADACHE_MUS, // 4
- HITLWLTZ_MUS, // 5
- INTROCW3_MUS, // 6
- NAZI_NOR_MUS, // 7
- NAZI_OMI_MUS, // 8
- POW_MUS, // 9
- SALUTE_MUS, // 10
- SEARCHN_MUS, // 11
- SUSPENSE_MUS, // 12
- VICTORS_MUS, // 13
- WONDERIN_MUS, // 14
- FUNKYOU_MUS, // 15
- ENDLEVEL_MUS, // 16
- GOINGAFT_MUS, // 17
- PREGNANT_MUS, // 18
- ULTIMATE_MUS, // 19
- NAZI_RAP_MUS, // 20
- ZEROHOUR_MUS, // 21
- TWELFTH_MUS, // 22
- ROSTER_MUS, // 23
- URAHERO_MUS, // 24
- VICMARCH_MUS, // 25
- PACMAN_MUS, // 26
- LASTMUSIC
- } musicnames;
diff --git a/target/demos/wolfenstein3d/docs/goodstuf.txt b/target/demos/wolfenstein3d/docs/goodstuf.txt
deleted file mode 100644
index a4af9ef..0000000
--- a/target/demos/wolfenstein3d/docs/goodstuf.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-To: ROMERO,TOM
-From: LOTHAR/JAY
-Date: 9 Aug 92 21:06:46
-Subject: AOL Message
-X-mailer: Pegasus Mail v2.3 (R2).
-
-Subj: DREAMS, FLASHBACKS
-Date: 92-08-09 03:59:55 EDT
-From: Tug Hill 2
-Posted on: America Online
-
-On a serious note...
-
-As a former POW (Vietnam), I hesitated to play WOLF for over a
-month after downloading as I feared flashbacks. I didn't want to
-remember all that I had been through all those years ago, when, as
-POW's, my friend and I decided an escape attempt would be better than
-a slow death by torture and starvation.
-
-My friend and I made crude maps and hoarded food. The day of the
-escape we clubbed the guard with stones, took his gun and fought our
-way through two levels of underground tunnels (only a few guards and
-had to crawl). I made it, my friend didn't.
-
-Dreams...NO! NIGHTMARES...YES!! However, the more I play
-WOLF the less frequently I have nightmares. The chilling part is
-turning a corner and seeing a guard with his gun drawn.
-
-WOLF is a powerful game. Fearful as well. I believe that a
-person should face the past. So... when I can play EPISODE 1
-comfortably (no nightmares), I plan on ordering the full series.
-
-Don't let a few bad dreams make you discard this game.
-
--------------------------------------------------------------------------
-
-Subj: Wolf-3D Section: Action/Arcade Games
-From: Ty Graham 72350,2636 # 191387, * No Replies *
-To: Id Software 72600,1333 Date: 24-Jul-92 18:27:27
-
-Jay, just thought I'd drop a note to let you know how popular Wolf3D is
-here at Microsoft. It seems like I can't walk down a hall without hearing
-'Mein Leben' from someone's office. I hope you guys are getting revenue
-from all this.
-
-Anyway, we were sitting around talking the other day, discussing games for
-Windows, and someone said 'What are those cool guys at Id doing?'. So how
-about it. Are you guys looking at Win games at all? Win32?
-
-In a perfect world, I'd have you guys port the Wolf engine to a multiuser
-maze game for Windows for Workgroups. We need a good M'user Win game.
-
-Anyway some thoughts.
-
-Ty Graham (Microsoft)
-
diff --git a/target/demos/wolfenstein3d/docs/release.txt b/target/demos/wolfenstein3d/docs/release.txt
deleted file mode 100644
index 5b395c5..0000000
--- a/target/demos/wolfenstein3d/docs/release.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-We are releasing this code for the entertainment of the
-user community. We don't guarentee that anything even
-builds in here. Projects just seem to rot when you leave
-them alone for long periods of time.
-
-This is all the source we have relating to the original
-PC wolfenstein 3D project. We haven't looked at this
-stuff in years, and I would probably be horribly embarassed
-to dig through my old code, so please don't ask any questions
-about it. The original project was built in borland c++ 3.0.
-I think some minor changes were required for later versions.
-
-You will need the data from a released version of wolf or spear
-to use the exe built from this code. You can just use a
-shareware version if you are really cheap.
-
-
-Some coding comments in retrospect:
-
-The ray casting refresh architecture is still reasonably
-appropriate for the game. A BSP based texture mapper could
-go faster, but ray casting was a lot simpler to do at the time.
-
-The dynamically compiled scaling routines are now a Bad Thing.
-On uncached machines (the original target) they are the fastest
-possible way to scale walls, but on modern processors you just
-wind up thrashing the code cash and wrecking performance.
-A simple looping texture mapper would be faster on 486+ machines.
-
-The whole page manager caching scheme is unecessarily complex.
-
-Way too many #ifdefs in the code!
-
-
-Some project ideas with this code:
-
-Add new monsters or weapons.
-
-Add taller walls and vertical motion. This should only be
-done if the texture mapper is rewritten.
-
-Convert to a 32 bit compiler. This would be a fair amount
-of work, but I would hate to even mess with crusty old 16
-bit code. The code would get a LOT smaller.
-
-Make a multi-player game that runs on DOOM sersetup / ipxsetup drivers.
-
-
-Have fun...
-
-John Carmack
-Technical Director
-Id Software
diff --git a/target/demos/wolfenstein3d/fmopl.c b/target/demos/wolfenstein3d/fmopl.c
deleted file mode 100644
index a976b51..0000000
--- a/target/demos/wolfenstein3d/fmopl.c
+++ /dev/null
@@ -1,1026 +0,0 @@
-/*
-**
-** File: fmopl.c -- software implementation of FM sound generator
-**
-** Copyright (C) 1999,2000 Tatsuyuki Satoh , MultiArcadeMachineEmulator development
-**
-** Version 0.37
-**
-** Modified for Wolfenstein 3D by Steven Fuller
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-#include <math.h>
-
-#include "fmopl.h"
-
-#define INLINE static /* inline */
-
-void logerror(const char *text, ...);
-
-#ifndef PI
-#define PI 3.14159265358979323846
-#endif
-
-/* -------------------- for debug --------------------- */
-/* #define OPL_OUTPUT_LOG */
-#ifdef OPL_OUTPUT_LOG
-static FILE *opl_dbg_fp = NULL;
-static FM_OPL *opl_dbg_opl[16];
-static int opl_dbg_maxchip,opl_dbg_chip;
-#endif
-
-/* -------------------- preliminary define section --------------------- */
-/* attack/decay rate */
-#define OPL_ARRATE 141280 /* RATE 4 = 2826.24ms @ 3.6MHz */
-#define OPL_DRRATE 1956000 /* RATE 4 = 39280.64ms @ 3.6MHz */
-
-#define FREQ_BITS 24 /* frequency turn */
-
-/* counter bits = 20, octave 7 */
-#define FREQ_RATE (1<<(FREQ_BITS-20))
-#define TL_BITS (FREQ_BITS+2)
-
-/* final output shift, limit minimum and maximum */
-#define OPL_OUTSB (TL_BITS+3-16) /* OPL output final shift 16bit */
-#define OPL_MAXOUT (0x7fff<<OPL_OUTSB)
-#define OPL_MINOUT (-0x8000<<OPL_OUTSB)
-
-/* -------------------- quality selection --------------------- */
-
-/* sinwave entries */
-/* used static memory = SIN_ENT * 4 (byte) */
-#define SIN_ENT 2048
-
-/* output level entries (envelope,sinwave) */
-/* envelope counter lower bits */
-#define ENV_BITS 16
-/* envelope output entries */
-#define EG_ENT 4096
-/* used dynamic memory = EG_ENT*4*4(byte)or EG_ENT*6*4(byte) */
-/* used static memory = EG_ENT*4 (byte) */
-
-#define EG_OFF ((2*EG_ENT)<<ENV_BITS) /* OFF */
-#define EG_DED EG_OFF
-#define EG_DST (EG_ENT<<ENV_BITS) /* DECAY START */
-#define EG_AED EG_DST
-#define EG_AST 0 /* ATTACK START */
-
-#define EG_STEP (96.0/EG_ENT) /* OPL is 0.1875 dB step */
-
-/* LFO table entries */
-#define VIB_ENT 512
-#define VIB_SHIFT (32-9)
-#define AMS_ENT 512
-#define AMS_SHIFT (32-9)
-
-#define VIB_RATE 256
-
-/* -------------------- local defines , macros --------------------- */
-
-/* register number to channel number , slot offset */
-#define SLOT1 0
-#define SLOT2 1
-
-/* envelope phase */
-#define ENV_MOD_RR 0x00
-#define ENV_MOD_DR 0x01
-#define ENV_MOD_AR 0x02
-
-/* -------------------- tables --------------------- */
-static const int slot_array[32]=
-{
- 0, 2, 4, 1, 3, 5,-1,-1,
- 6, 8,10, 7, 9,11,-1,-1,
- 12,14,16,13,15,17,-1,-1,
- -1,-1,-1,-1,-1,-1,-1,-1
-};
-
-/* key scale level */
-/* table is 3dB/OCT , DV converts this in TL step at 6dB/OCT */
-#define DV (EG_STEP/2)
-static const UINT32 KSL_TABLE[8*16]=
-{
- /* OCT 0 */
- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
- /* OCT 1 */
- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
- 0.000/DV, 0.750/DV, 1.125/DV, 1.500/DV,
- 1.875/DV, 2.250/DV, 2.625/DV, 3.000/DV,
- /* OCT 2 */
- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
- 0.000/DV, 1.125/DV, 1.875/DV, 2.625/DV,
- 3.000/DV, 3.750/DV, 4.125/DV, 4.500/DV,
- 4.875/DV, 5.250/DV, 5.625/DV, 6.000/DV,
- /* OCT 3 */
- 0.000/DV, 0.000/DV, 0.000/DV, 1.875/DV,
- 3.000/DV, 4.125/DV, 4.875/DV, 5.625/DV,
- 6.000/DV, 6.750/DV, 7.125/DV, 7.500/DV,
- 7.875/DV, 8.250/DV, 8.625/DV, 9.000/DV,
- /* OCT 4 */
- 0.000/DV, 0.000/DV, 3.000/DV, 4.875/DV,
- 6.000/DV, 7.125/DV, 7.875/DV, 8.625/DV,
- 9.000/DV, 9.750/DV,10.125/DV,10.500/DV,
- 10.875/DV,11.250/DV,11.625/DV,12.000/DV,
- /* OCT 5 */
- 0.000/DV, 3.000/DV, 6.000/DV, 7.875/DV,
- 9.000/DV,10.125/DV,10.875/DV,11.625/DV,
- 12.000/DV,12.750/DV,13.125/DV,13.500/DV,
- 13.875/DV,14.250/DV,14.625/DV,15.000/DV,
- /* OCT 6 */
- 0.000/DV, 6.000/DV, 9.000/DV,10.875/DV,
- 12.000/DV,13.125/DV,13.875/DV,14.625/DV,
- 15.000/DV,15.750/DV,16.125/DV,16.500/DV,
- 16.875/DV,17.250/DV,17.625/DV,18.000/DV,
- /* OCT 7 */
- 0.000/DV, 9.000/DV,12.000/DV,13.875/DV,
- 15.000/DV,16.125/DV,16.875/DV,17.625/DV,
- 18.000/DV,18.750/DV,19.125/DV,19.500/DV,
- 19.875/DV,20.250/DV,20.625/DV,21.000/DV
-};
-#undef DV
-
-/* sustain level table (3db per step) */
-/* 0 - 15: 0, 3, 6, 9,12,15,18,21,24,27,30,33,36,39,42,93 (dB)*/
-#define SC(db) (db*((3/EG_STEP)*(1<<ENV_BITS)))+EG_DST
-static const INT32 SL_TABLE[16]={
- SC( 0),SC( 1),SC( 2),SC(3 ),SC(4 ),SC(5 ),SC(6 ),SC( 7),
- SC( 8),SC( 9),SC(10),SC(11),SC(12),SC(13),SC(14),SC(31)
-};
-#undef SC
-
-#define TL_MAX (EG_ENT*2) /* limit(tl + ksr + envelope) + sinwave */
-/* TotalLevel : 48 24 12 6 3 1.5 0.75 (dB) */
-/* TL_TABLE[ 0 to TL_MAX ] : plus section */
-/* TL_TABLE[ TL_MAX to TL_MAX+TL_MAX-1 ] : minus section */
-static INT32 *TL_TABLE;
-
-/* pointers to TL_TABLE with sinwave output offset */
-static INT32 **SIN_TABLE;
-
-/* LFO table */
-static INT32 *AMS_TABLE;
-static INT32 *VIB_TABLE;
-
-/* envelope output curve table */
-/* attack + decay + OFF */
-static INT32 ENV_CURVE[2*EG_ENT+1];
-
-/* multiple table */
-#define ML 2
-static const UINT32 MUL_TABLE[16]= {
-/* 1/2, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15 */
- 0.50*ML, 1.00*ML, 2.00*ML, 3.00*ML, 4.00*ML, 5.00*ML, 6.00*ML, 7.00*ML,
- 8.00*ML, 9.00*ML,10.00*ML,10.00*ML,12.00*ML,12.00*ML,15.00*ML,15.00*ML
-};
-#undef ML
-
-/* dummy attack / decay rate ( when rate == 0 ) */
-static INT32 RATE_0[16]=
-{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
-
-/* -------------------- static state --------------------- */
-
-/* lock level of common table */
-static int num_lock = 0;
-
-/* work table */
-static void *cur_chip = NULL; /* current chip point */
-/* currenct chip state */
-/* static OPLSAMPLE *bufL,*bufR; */
-static OPL_CH *S_CH;
-static OPL_CH *E_CH;
-OPL_SLOT *SLOT7_1,*SLOT7_2,*SLOT8_1,*SLOT8_2;
-
-static INT32 outd[1];
-static INT32 ams;
-static INT32 vib;
-INT32 *ams_table;
-INT32 *vib_table;
-static INT32 amsIncr;
-static INT32 vibIncr;
-static INT32 feedback2; /* connect for SLOT 2 */
-
-/* log output level */
-#define LOG_ERR 3 /* ERROR */
-#define LOG_WAR 2 /* WARNING */
-#define LOG_INF 1 /* INFORMATION */
-
-#define LOG_LEVEL LOG_INF
-
-#define LOG(n,x) if( (n)>=LOG_LEVEL ) logerror x
-
-/* --------------------- subroutines --------------------- */
-
-INLINE int Limit( int val, int max, int min ) {
- if ( val > max )
- val = max;
- else if ( val < min )
- val = min;
-
- return val;
-}
-
-/* ----- key on ----- */
-INLINE void OPL_KEYON(OPL_SLOT *SLOT)
-{
- /* sine wave restart */
- SLOT->Cnt = 0;
- /* set attack */
- SLOT->evm = ENV_MOD_AR;
- SLOT->evs = SLOT->evsa;
- SLOT->evc = EG_AST;
- SLOT->eve = EG_AED;
-}
-/* ----- key off ----- */
-INLINE void OPL_KEYOFF(OPL_SLOT *SLOT)
-{
- if( SLOT->evm > ENV_MOD_RR)
- {
- /* set envelope counter from envleope output */
- SLOT->evm = ENV_MOD_RR;
- if( !(SLOT->evc&EG_DST) )
- SLOT->evc = (ENV_CURVE[SLOT->evc>>ENV_BITS]<<ENV_BITS) + EG_DST;
- SLOT->eve = EG_DED;
- SLOT->evs = SLOT->evsr;
- }
-}
-
-/* ---------- Envelope Generator & Phase Generator ---------- */
-/* return : envelope output */
-INLINE UINT32 OPL_CALC_SLOT( OPL_SLOT *SLOT )
-{
- /* calculate envelope generator */
- if( (SLOT->evc+=SLOT->evs) >= SLOT->eve )
- {
- switch( SLOT->evm ){
- case ENV_MOD_AR: /* ATTACK -> DECAY1 */
- /* next DR */
- SLOT->evm = ENV_MOD_DR;
- SLOT->evc = EG_DST;
- SLOT->eve = SLOT->SL;
- SLOT->evs = SLOT->evsd;
- break;
- case ENV_MOD_DR: /* DECAY -> SL or RR */
- SLOT->evc = SLOT->SL;
- SLOT->eve = EG_DED;
- if(SLOT->eg_typ)
- {
- SLOT->evs = 0;
- }
- else
- {
- SLOT->evm = ENV_MOD_RR;
- SLOT->evs = SLOT->evsr;
- }
- break;
- case ENV_MOD_RR: /* RR -> OFF */
- SLOT->evc = EG_OFF;
- SLOT->eve = EG_OFF+1;
- SLOT->evs = 0;
- break;
- }
- }
- /* calculate envelope */
- return SLOT->TLL+ENV_CURVE[SLOT->evc>>ENV_BITS]+(SLOT->ams ? ams : 0);
-}
-
-/* set algorythm connection */
-static void set_algorythm( OPL_CH *CH)
-{
- INT32 *carrier = &outd[0];
- CH->connect1 = CH->CON ? carrier : &feedback2;
- CH->connect2 = carrier;
-}
-
-/* ---------- frequency counter for operater update ---------- */
-INLINE void CALC_FCSLOT(OPL_CH *CH,OPL_SLOT *SLOT)
-{
- int ksr;
-
- /* frequency step counter */
- SLOT->Incr = CH->fc * SLOT->mul;
- ksr = CH->kcode >> SLOT->KSR;
-
- if( SLOT->ksr != ksr )
- {
- SLOT->ksr = ksr;
- /* attack , decay rate recalculation */
- SLOT->evsa = SLOT->AR[ksr];
- SLOT->evsd = SLOT->DR[ksr];
- SLOT->evsr = SLOT->RR[ksr];
- }
- SLOT->TLL = SLOT->TL + (CH->ksl_base>>SLOT->ksl);
-}
-
-/* set multi,am,vib,EG-TYP,KSR,mul */
-INLINE void set_mul(FM_OPL *OPL,int slot,int v)
-{
- OPL_CH *CH = &OPL->P_CH[slot/2];
- OPL_SLOT *SLOT = &CH->SLOT[slot&1];
-
- SLOT->mul = MUL_TABLE[v&0x0f];
- SLOT->KSR = (v&0x10) ? 0 : 2;
- SLOT->eg_typ = (v&0x20)>>5;
- SLOT->vib = (v&0x40);
- SLOT->ams = (v&0x80);
- CALC_FCSLOT(CH,SLOT);
-}
-
-/* set ksl & tl */
-INLINE void set_ksl_tl(FM_OPL *OPL,int slot,int v)
-{
- OPL_CH *CH = &OPL->P_CH[slot/2];
- OPL_SLOT *SLOT = &CH->SLOT[slot&1];
- int ksl = v>>6; /* 0 / 1.5 / 3 / 6 db/OCT */
-
- SLOT->ksl = ksl ? 3-ksl : 31;
- SLOT->TL = (v&0x3f)*(0.75/EG_STEP); /* 0.75db step */
-
- if( !(OPL->mode&0x80) )
- { /* not CSM latch total level */
- SLOT->TLL = SLOT->TL + (CH->ksl_base>>SLOT->ksl);
- }
-}
-
-/* set attack rate & decay rate */
-INLINE void set_ar_dr(FM_OPL *OPL,int slot,int v)
-{
- OPL_CH *CH = &OPL->P_CH[slot/2];
- OPL_SLOT *SLOT = &CH->SLOT[slot&1];
- int ar = v>>4;
- int dr = v&0x0f;
-
- SLOT->AR = ar ? &OPL->AR_TABLE[ar<<2] : RATE_0;
- SLOT->evsa = SLOT->AR[SLOT->ksr];
- if( SLOT->evm == ENV_MOD_AR ) SLOT->evs = SLOT->evsa;
-
- SLOT->DR = dr ? &OPL->DR_TABLE[dr<<2] : RATE_0;
- SLOT->evsd = SLOT->DR[SLOT->ksr];
- if( SLOT->evm == ENV_MOD_DR ) SLOT->evs = SLOT->evsd;
-}
-
-/* set sustain level & release rate */
-INLINE void set_sl_rr(FM_OPL *OPL,int slot,int v)
-{
- OPL_CH *CH = &OPL->P_CH[slot/2];
- OPL_SLOT *SLOT = &CH->SLOT[slot&1];
- int sl = v>>4;
- int rr = v & 0x0f;
-
- SLOT->SL = SL_TABLE[sl];
- if( SLOT->evm == ENV_MOD_DR ) SLOT->eve = SLOT->SL;
- SLOT->RR = &OPL->DR_TABLE[rr<<2];
- SLOT->evsr = SLOT->RR[SLOT->ksr];
- if( SLOT->evm == ENV_MOD_RR ) SLOT->evs = SLOT->evsr;
-}
-
-/* operator output calculator */
-#define OP_OUT(slot,env,con) slot->wavetable[((slot->Cnt+con)/(0x1000000/SIN_ENT))&(SIN_ENT-1)][env]
-/* ---------- calculate channel ---------- */
-INLINE void OPL_CALC_CH( OPL_CH *CH )
-{
- UINT32 env_out;
- OPL_SLOT *SLOT;
-
- feedback2 = 0;
- /* SLOT 1 */
- SLOT = &CH->SLOT[SLOT1];
- env_out=OPL_CALC_SLOT(SLOT);
- if( env_out < EG_ENT-1 )
- {
- /* PG */
- if(SLOT->vib) SLOT->Cnt += (SLOT->Incr*vib/VIB_RATE);
- else SLOT->Cnt += SLOT->Incr;
- /* connection */
- if(CH->FB)
- {
- int feedback1 = (CH->op1_out[0]+CH->op1_out[1])>>CH->FB;
- CH->op1_out[1] = CH->op1_out[0];
- *CH->connect1 += CH->op1_out[0] = OP_OUT(SLOT,env_out,feedback1);
- }
- else
- {
- *CH->connect1 += OP_OUT(SLOT,env_out,0);
- }
- }else
- {
- CH->op1_out[1] = CH->op1_out[0];
- CH->op1_out[0] = 0;
- }
- /* SLOT 2 */
- SLOT = &CH->SLOT[SLOT2];
- env_out=OPL_CALC_SLOT(SLOT);
- if( env_out < EG_ENT-1 )
- {
- /* PG */
- if(SLOT->vib) SLOT->Cnt += (SLOT->Incr*vib/VIB_RATE);
- else SLOT->Cnt += SLOT->Incr;
- /* connection */
- outd[0] += OP_OUT(SLOT,env_out, feedback2);
- }
-}
-
-/* ---------- calculate rythm block ---------- */
-#define WHITE_NOISE_db 6.0
-INLINE void OPL_CALC_RH( OPL_CH *CH )
-{
- UINT32 env_tam,env_sd,env_top,env_hh;
- int whitenoise = (rand()&1)*(WHITE_NOISE_db/EG_STEP);
- INT32 tone8;
-
- OPL_SLOT *SLOT;
- int env_out;
-
- /* BD : same as FM serial mode and output level is large */
- feedback2 = 0;
- /* SLOT 1 */
- SLOT = &CH[6].SLOT[SLOT1];
- env_out=OPL_CALC_SLOT(SLOT);
- if( env_out < EG_ENT-1 )
- {
- /* PG */
- if(SLOT->vib) SLOT->Cnt += (SLOT->Incr*vib/VIB_RATE);
- else SLOT->Cnt += SLOT->Incr;
- /* connectoion */
- if(CH[6].FB)
- {
- int feedback1 = (CH[6].op1_out[0]+CH[6].op1_out[1])>>CH[6].FB;
- CH[6].op1_out[1] = CH[6].op1_out[0];
- feedback2 = CH[6].op1_out[0] = OP_OUT(SLOT,env_out,feedback1);
- }
- else
- {
- feedback2 = OP_OUT(SLOT,env_out,0);
- }
- }else
- {
- feedback2 = 0;
- CH[6].op1_out[1] = CH[6].op1_out[0];
- CH[6].op1_out[0] = 0;
- }
- /* SLOT 2 */
- SLOT = &CH[6].SLOT[SLOT2];
- env_out=OPL_CALC_SLOT(SLOT);
- if( env_out < EG_ENT-1 )
- {
- /* PG */
- if(SLOT->vib) SLOT->Cnt += (SLOT->Incr*vib/VIB_RATE);
- else SLOT->Cnt += SLOT->Incr;
- /* connectoion */
- outd[0] += OP_OUT(SLOT,env_out, feedback2)*2;
- }
-
- // SD (17) = mul14[fnum7] + white noise
- // TAM (15) = mul15[fnum8]
- // TOP (18) = fnum6(mul18[fnum8]+whitenoise)
- // HH (14) = fnum7(mul18[fnum8]+whitenoise) + white noise
- env_sd =OPL_CALC_SLOT(SLOT7_2) + whitenoise;
- env_tam=OPL_CALC_SLOT(SLOT8_1);
- env_top=OPL_CALC_SLOT(SLOT8_2);
- env_hh =OPL_CALC_SLOT(SLOT7_1) + whitenoise;
-
- /* PG */
- if(SLOT7_1->vib) SLOT7_1->Cnt += (2*SLOT7_1->Incr*vib/VIB_RATE);
- else SLOT7_1->Cnt += 2*SLOT7_1->Incr;
- if(SLOT7_2->vib) SLOT7_2->Cnt += ((CH[7].fc*8)*vib/VIB_RATE);
- else SLOT7_2->Cnt += (CH[7].fc*8);
- if(SLOT8_1->vib) SLOT8_1->Cnt += (SLOT8_1->Incr*vib/VIB_RATE);
- else SLOT8_1->Cnt += SLOT8_1->Incr;
- if(SLOT8_2->vib) SLOT8_2->Cnt += ((CH[8].fc*48)*vib/VIB_RATE);
- else SLOT8_2->Cnt += (CH[8].fc*48);
-
- tone8 = OP_OUT(SLOT8_2,whitenoise,0 );
-
- /* SD */
- if( env_sd < EG_ENT-1 )
- outd[0] += OP_OUT(SLOT7_1,env_sd, 0)*8;
- /* TAM */
- if( env_tam < EG_ENT-1 )
- outd[0] += OP_OUT(SLOT8_1,env_tam, 0)*2;
- /* TOP-CY */
- if( env_top < EG_ENT-1 )
- outd[0] += OP_OUT(SLOT7_2,env_top,tone8)*2;
- /* HH */
- if( env_hh < EG_ENT-1 )
- outd[0] += OP_OUT(SLOT7_2,env_hh,tone8)*2;
-}
-
-/* ----------- initialize time tabls ----------- */
-static void init_timetables( FM_OPL *OPL , int ARRATE , int DRRATE )
-{
- int i;
- double rate;
-
- /* make attack rate & decay rate tables */
- for (i = 0;i < 4;i++) OPL->AR_TABLE[i] = OPL->DR_TABLE[i] = 0;
- for (i = 4;i <= 60;i++){
- rate = OPL->freqbase; /* frequency rate */
- if( i < 60 ) rate *= 1.0+(i&3)*0.25; /* b0-1 : x1 , x1.25 , x1.5 , x1.75 */
- rate *= 1<<((i>>2)-1); /* b2-5 : shift bit */
- rate *= (double)(EG_ENT<<ENV_BITS);
- OPL->AR_TABLE[i] = rate / ARRATE;
- OPL->DR_TABLE[i] = rate / DRRATE;
- }
- for (i = 60;i < 76;i++)
- {
- OPL->AR_TABLE[i] = EG_AED-1;
- OPL->DR_TABLE[i] = OPL->DR_TABLE[60];
- }
-#if 0
- for (i = 0;i < 64 ;i++){ /* make for overflow area */
- LOG(LOG_WAR,("rate %2d , ar %f ms , dr %f ms \n",i,
- ((double)(EG_ENT<<ENV_BITS) / OPL->AR_TABLE[i]) * (1000.0 / OPL->rate),
- ((double)(EG_ENT<<ENV_BITS) / OPL->DR_TABLE[i]) * (1000.0 / OPL->rate) ));
- }
-#endif
-}
-
-/* ---------- generic table initialize ---------- */
-static int OPLOpenTable( void )
-{
- int s,t;
- double rate;
- int i,j;
- double pom;
-
- /* allocate dynamic tables */
- if( (TL_TABLE = malloc(TL_MAX*2*sizeof(INT32))) == NULL)
- return 0;
- if( (SIN_TABLE = malloc(SIN_ENT*4 *sizeof(INT32 *))) == NULL)
- {
- free(TL_TABLE);
- return 0;
- }
- if( (AMS_TABLE = malloc(AMS_ENT*2 *sizeof(INT32))) == NULL)
- {
- free(TL_TABLE);
- free(SIN_TABLE);
- return 0;
- }
- if( (VIB_TABLE = malloc(VIB_ENT*2 *sizeof(INT32))) == NULL)
- {
- free(TL_TABLE);
- free(SIN_TABLE);
- free(AMS_TABLE);
- return 0;
- }
- /* make total level table */
- for (t = 0;t < EG_ENT-1 ;t++){
- rate = ((1<<TL_BITS)-1)/pow(10,EG_STEP*t/20); /* dB -> voltage */
- TL_TABLE[ t] = (int)rate;
- TL_TABLE[TL_MAX+t] = -TL_TABLE[t];
-/* LOG(LOG_INF,("TotalLevel(%3d) = %x\n",t...
[truncated message content] |
|
From: Julien B a. A. <ar...@us...> - 2010-06-07 10:00:45
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 1026324a201bad25e1e3502d9052f918d0ea3062 (commit)
via be79809de7cd97984073e261b11c0d4a32934d7a (commit)
from aaa5a9b55f6c29183d5f635a4c82bbb7e55ab101 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 1026324a201bad25e1e3502d9052f918d0ea3062
Author: Julien Boibessot <jul...@ar...>
Date: Mon Jun 7 11:59:40 2010 +0200
[LINUX] spi_imx: Add correct SPI clock calculation for i.MX27
commit be79809de7cd97984073e261b11c0d4a32934d7a
Author: Julien Boibessot <jul...@ar...>
Date: Mon Jun 7 11:58:51 2010 +0200
Updates cleanup_buildroot.sh
-----------------------------------------------------------------------
Summary of changes:
...s-spi_imx-add_gpio_init_and_iMX27_support.patch | 122 +++++++++++---------
patches/buildroot/2010.02/cleanup_buildroot.sh | 2 +
patches/buildroot/cleanup_buildroot.sh | 4 +
3 files changed, 74 insertions(+), 54 deletions(-)
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/293-apf27-armadeus-spi_imx-add_gpio_init_and_iMX27_support.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/293-apf27-armadeus-spi_imx-add_gpio_init_and_iMX27_support.patch
index 249071a..93bbacb 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/293-apf27-armadeus-spi_imx-add_gpio_init_and_iMX27_support.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/293-apf27-armadeus-spi_imx-add_gpio_init_and_iMX27_support.patch
@@ -5,10 +5,10 @@ Makes spi_imx driver:
Signed-off-by: Nicolas Colombain <nic...@ar...>
Signed-off-by: Julien Boibessot <jul...@ar...>
-Index: linux-2.6.29/arch/arm/mach-imx/include/mach/spi_imx.h
+Index: linux-2.6.29.6/arch/arm/mach-imx/include/mach/spi_imx.h
===================================================================
---- linux-2.6.29.orig/arch/arm/mach-imx/include/mach/spi_imx.h 2009-03-24 00:12:14.000000000 +0100
-+++ linux-2.6.29/arch/arm/mach-imx/include/mach/spi_imx.h 2009-03-31 11:22:44.000000000 +0200
+--- linux-2.6.29.6.orig/arch/arm/mach-imx/include/mach/spi_imx.h 2010-06-07 11:54:25.000000000 +0200
++++ linux-2.6.29.6/arch/arm/mach-imx/include/mach/spi_imx.h 2010-06-07 11:54:44.000000000 +0200
@@ -38,6 +38,8 @@
struct spi_imx_master {
u8 num_chipselect;
@@ -18,10 +18,10 @@ Index: linux-2.6.29/arch/arm/mach-imx/include/mach/spi_imx.h
};
/*-------------------------------------------------------------------------*/
-Index: linux-2.6.29/drivers/spi/spi_imx.c
+Index: linux-2.6.29.6/drivers/spi/spi_imx.c
===================================================================
---- linux-2.6.29.orig/drivers/spi/spi_imx.c 2009-03-24 00:12:14.000000000 +0100
-+++ linux-2.6.29/drivers/spi/spi_imx.c 2009-03-31 11:25:40.000000000 +0200
+--- linux-2.6.29.6.orig/drivers/spi/spi_imx.c 2010-06-07 11:54:25.000000000 +0200
++++ linux-2.6.29.6/drivers/spi/spi_imx.c 2010-06-07 11:56:06.000000000 +0200
@@ -36,8 +36,13 @@
#include <asm/delay.h>
@@ -36,7 +36,7 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
/*-------------------------------------------------------------------------*/
/* SPI Registers offsets from peripheral base address */
-@@ -50,38 +55,70 @@
+@@ -50,38 +55,77 @@
#define SPI_DMA (0x18)
#define SPI_RESET (0x1C)
@@ -53,11 +53,16 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
+#define SPI_CONTROL_SPIEN (0x1 << 10) /* SPI Module Enable */
+#define SPI_CONTROL_MODE_SHIFT (11)
+#define SPI_CONTROL_DRCTL_SHIFT (12)
-+#define SPI_CONTROL_DATARATE_SHIFT (16)
-+/* Data Rate Mask */
++#define SPI_CONTROL_DATARATE_SHIFT (14)
++/* Data Rate */
+#define SPI_CONTROL_DATARATE (0x1f << (SPI_CONTROL_DATARATE_SHIFT))
-+#define SPI_CLOCK_DIV_MIN (0) /* ??????? */
-+#define SPI_CLOCK_DIV_MAX (0x10) /* ????? */
++#define SPI_CLOCK_DIV_MIN (1) /* PERCLK2 / 3 */
++#define SPI_CLOCK_DIV_MAX (0x10) /* PERCLK2 /512 */
++/* First entry is reserved, second entry is valid only if SDHC_SPIEN is set
++ * (which is currently not the case in this driver)
++ */
++static int mxc_clkdivs[] = {0, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192,
++ 256, 384, 512};
+
+/* SPI Interrupt/Status Register Bit Fields & Masks */
+#define SPI_STATUS_TE (0x1 << 0) /* TXFIFO Empty Status */
@@ -123,19 +128,21 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
-#define SPI_CONTROL_DRCTL_2 (0x2 << 11) /* /SPI_RDY active low level triggers input */
+#define SPI_CONTROL_MODE_SHIFT (10)
+#define SPI_CONTROL_DRCTL_SHIFT (11)
++/* Data Rate */
#define SPI_CONTROL_DATARATE (0x7 << 13) /* Data Rate Mask */
-#define SPI_PERCLK2_DIV_MIN (0) /* PERCLK2:4 */
-#define SPI_PERCLK2_DIV_MAX (7) /* PERCLK2:512 */
-#define SPI_CONTROL_DATARATE_MIN (SPI_PERCLK2_DIV_MAX << 13)
-#define SPI_CONTROL_DATARATE_MAX (SPI_PERCLK2_DIV_MIN << 13)
-#define SPI_CONTROL_DATARATE_BAD (SPI_CONTROL_DATARATE_MIN + 1)
-+#define SPI_CLOCK_DIV_MIN (0) /* PERCLK2:4 */
-+#define SPI_CLOCK_DIV_MAX (7) /* PERCLK2:512 */
++#define SPI_CLOCK_DIV_MIN (0) /* PERCLK2 / 4 */
++#define SPI_CLOCK_DIV_MAX (7) /* PERCLK2 / 512 */
+#define SPI_CONTROL_DATARATE_SHIFT (13)
++static int mxc_clkdivs[] = {4, 8, 16, 32, 64, 128, 256, 512};
/* SPI Interrupt/Status Register Bit Fields & Masks */
#define SPI_STATUS_TE (0x1 << 0) /* TXFIFO Empty Status */
-@@ -103,6 +140,54 @@
+@@ -103,6 +147,54 @@
#define SPI_INTEN_BO (0x1 << 15) /* Bit Count Overflow Interrupt Enable */
#define SPI_INTEN (0xFF << 8) /* SPI Interrupt Enable Mask */
@@ -190,7 +197,7 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
/* SPI Test Register Bit Fields & Masks */
#define SPI_TEST_TXCNT (0xF << 0) /* TXFIFO Counter */
#define SPI_TEST_RXCNT_LSB (4) /* RXFIFO Counter LSB */
-@@ -134,6 +219,20 @@
+@@ -134,6 +226,20 @@
#define SPI_RESET_START (0x1) /* Start */
/* Default SPI configuration values */
@@ -211,7 +218,7 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
#define SPI_DEFAULT_CONTROL \
( \
SPI_CONTROL_BITCOUNT(16) | \
-@@ -145,6 +244,7 @@
+@@ -145,6 +251,7 @@
SPI_CONTROL_DRCTL_0 | \
SPI_CONTROL_DATARATE_MIN \
)
@@ -219,7 +226,7 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
#define SPI_DEFAULT_ENABLE_LOOPBACK (0)
#define SPI_DEFAULT_ENABLE_DMA (0)
#define SPI_DEFAULT_PERIOD_WAIT (8)
-@@ -154,7 +254,11 @@
+@@ -154,7 +261,11 @@
/*-------------------------------------------------------------------------*/
/* TX/RX SPI FIFO size */
#define SPI_FIFO_DEPTH (8)
@@ -231,7 +238,7 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
#define SPI_FIFO_OVERFLOW_MARGIN (2)
/* DMA burst length for half full/empty request trigger */
-@@ -332,19 +436,17 @@
+@@ -332,19 +443,17 @@
void *tx = drv_data->tx;
void *tx_end = drv_data->tx_end;
u8 n_bytes = drv_data->n_bytes;
@@ -252,7 +259,7 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
dev_dbg(&drv_data->pdev->dev,
"write type %s\n"
-@@ -352,7 +454,7 @@
+@@ -352,7 +461,7 @@
" fifo avail space = %d\n"
" fifo writes = %d\n",
(n_bytes == 1) ? "u8" : "u16",
@@ -261,7 +268,7 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
fifo_avail_space,
n);
-@@ -395,16 +497,14 @@
+@@ -395,16 +504,14 @@
void *rx = drv_data->rx;
void *rx_end = drv_data->rx_end;
u8 n_bytes = drv_data->n_bytes;
@@ -279,7 +286,7 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
dev_dbg(&drv_data->pdev->dev,
"read type %s\n"
-@@ -412,7 +512,7 @@
+@@ -412,7 +519,7 @@
" fifo rx count = %d\n"
" fifo reads = %d\n",
(n_bytes == 1) ? "u8" : "u16",
@@ -288,7 +295,7 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
fifo_rxcnt,
n);
-@@ -456,6 +556,30 @@
+@@ -456,6 +563,30 @@
return DONE_STATE;
}
@@ -319,7 +326,7 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
static int map_dma_buffers(struct driver_data *drv_data)
{
struct spi_message *msg;
-@@ -568,29 +692,6 @@
+@@ -568,29 +699,6 @@
}
}
@@ -349,7 +356,7 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
static void dma_err_handler(int channel, void *data, int errcode)
{
struct driver_data *drv_data = data;
-@@ -695,6 +796,7 @@
+@@ -695,6 +803,7 @@
/* Opps problem detected */
return IRQ_NONE;
}
@@ -357,35 +364,42 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
static irqreturn_t interrupt_wronly_transfer(struct driver_data *drv_data)
{
-@@ -858,7 +960,7 @@
+@@ -858,21 +967,26 @@
static inline u32 spi_speed_hz(struct driver_data *drv_data, u32 data_rate)
{
- return clk_get_rate(drv_data->clk) / (4 << ((data_rate) >> 13));
-+ return clk_get_rate(drv_data->clk) / (4 << ((data_rate) >> SPI_CONTROL_DATARATE_SHIFT));
++ u32 res;
++ int index;
++
++ index = ((data_rate & SPI_CONTROL_DATARATE) >> SPI_CONTROL_DATARATE_SHIFT);
++ res = clk_get_rate(drv_data->clk) / mxc_clkdivs[index];
++
++ return res;
}
static u32 spi_data_rate(struct driver_data *drv_data, u32 speed_hz)
-@@ -866,12 +968,13 @@
+ {
u32 div;
- u32 quantized_hz = clk_get_rate(drv_data->clk) >> 2;
+- u32 quantized_hz = clk_get_rate(drv_data->clk) >> 2;
++ u32 perclk2 = clk_get_rate(drv_data->clk);
- for (div = SPI_PERCLK2_DIV_MIN;
- div <= SPI_PERCLK2_DIV_MAX;
-+ for (div = SPI_CLOCK_DIV_MIN;
-+ div <= SPI_CLOCK_DIV_MAX;
- div++, quantized_hz >>= 1) {
+- div++, quantized_hz >>= 1) {
- if (quantized_hz <= speed_hz)
- /* Max available speed LEQ required speed */
- return div << 13;
-+ if (quantized_hz <= speed_hz) {
-+ /* Max available speed LEQ required speed */
-+ return div << SPI_CONTROL_DATARATE_SHIFT;
-+ }
++ for (div = SPI_CLOCK_DIV_MIN; div <= SPI_CLOCK_DIV_MAX; div++) {
++ if (perclk2/(mxc_clkdivs[div]) <= speed_hz) {
++ return div << SPI_CONTROL_DATARATE_SHIFT;
++ }
}
++
return SPI_CONTROL_DATARATE_BAD;
}
-@@ -956,6 +1059,7 @@
+
+@@ -956,6 +1070,7 @@
/* Assert device chip-select */
drv_data->cs_control(SPI_CS_ASSERT);
@@ -393,7 +407,7 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
/* DMA cannot read/write SPI FIFOs other than 16 bits at a time; hence
if bits_per_word is less or equal 8 PIO transfers are performed.
Moreover DMA is convinient for transfer length bigger than FIFOs
-@@ -1034,7 +1138,9 @@
+@@ -1034,7 +1149,9 @@
writel(SPI_DMA_THDEN, regs + SPI_DMA);
imx_dma_enable(drv_data->tx_channel);
@@ -404,7 +418,7 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
dev_dbg(&drv_data->pdev->dev,
"pump pio transfer\n"
" tx = %p\n"
-@@ -1487,7 +1593,7 @@
+@@ -1487,7 +1604,7 @@
drv_data->dummy_dma_buf = SPI_DUMMY_u32;
@@ -413,7 +427,7 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
if (IS_ERR(drv_data->clk)) {
dev_err(&pdev->dev, "probe - cannot get clock\n");
status = PTR_ERR(drv_data->clk);
-@@ -1495,6 +1601,10 @@
+@@ -1495,6 +1612,10 @@
}
clk_enable(drv_data->clk);
@@ -424,7 +438,7 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
/* Find and map resources */
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
-@@ -1516,7 +1626,6 @@
+@@ -1516,7 +1637,6 @@
status = -ENXIO;
goto err_no_iomap;
}
@@ -432,7 +446,7 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
/* Attach to IRQ */
irq = platform_get_irq(pdev, 0);
-@@ -1531,6 +1640,8 @@
+@@ -1531,6 +1651,8 @@
goto err_no_irqres;
}
@@ -441,7 +455,7 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
/* Setup DMA if requested */
drv_data->tx_channel = -1;
drv_data->rx_channel = -1;
-@@ -1583,7 +1694,7 @@
+@@ -1583,7 +1705,7 @@
BLR(drv_data->rx_channel) = SPI_DMA_BLR;
BLR(drv_data->tx_channel) = SPI_DMA_BLR;
}
@@ -450,7 +464,7 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
/* Load default SPI configuration */
writel(SPI_RESET_START, drv_data->regs + SPI_RESET);
writel(0, drv_data->regs + SPI_RESET);
-@@ -1617,9 +1728,11 @@
+@@ -1617,9 +1739,11 @@
err_spi_register:
destroy_queue(drv_data);
@@ -462,7 +476,7 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
free_irq(irq, drv_data);
err_no_irqres:
-@@ -1632,6 +1745,8 @@
+@@ -1632,6 +1756,8 @@
err_no_iores:
clk_disable(drv_data->clk);
clk_put(drv_data->clk);
@@ -471,7 +485,7 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
err_no_clk:
spi_master_put(master);
-@@ -1646,6 +1761,8 @@
+@@ -1646,6 +1772,8 @@
struct driver_data *drv_data = platform_get_drvdata(pdev);
int irq;
int status = 0;
@@ -480,7 +494,7 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
if (!drv_data)
return 0;
-@@ -1658,11 +1775,14 @@
+@@ -1658,11 +1786,14 @@
dev_err(&pdev->dev, "queue remove failed (%d)\n", status);
return status;
}
@@ -495,7 +509,7 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
/* Release DMA */
if (drv_data->master_info->enable_dma) {
RSSR(drv_data->rx_channel) = 0;
-@@ -1670,7 +1790,7 @@
+@@ -1670,7 +1801,7 @@
imx_dma_free(drv_data->tx_channel);
imx_dma_free(drv_data->rx_channel);
}
@@ -504,7 +518,7 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
/* Release IRQ */
irq = platform_get_irq(pdev, 0);
if (irq >= 0)
-@@ -1713,14 +1833,19 @@
+@@ -1713,14 +1844,19 @@
{
struct driver_data *drv_data = platform_get_drvdata(pdev);
int status = 0;
@@ -524,7 +538,7 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
return 0;
}
-@@ -1729,6 +1854,11 @@
+@@ -1729,6 +1865,11 @@
{
struct driver_data *drv_data = platform_get_drvdata(pdev);
int status = 0;
@@ -536,7 +550,7 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
/* Start the queue running */
status = start_queue(drv_data);
-@@ -1736,6 +1866,7 @@
+@@ -1736,6 +1877,7 @@
dev_err(&pdev->dev, "problem starting queue (%d)\n", status);
else
dev_dbg(&pdev->dev, "resumed\n");
@@ -544,7 +558,7 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
return status;
}
-@@ -1749,7 +1880,11 @@
+@@ -1749,7 +1891,11 @@
static struct platform_driver driver = {
.driver = {
@@ -556,10 +570,10 @@ Index: linux-2.6.29/drivers/spi/spi_imx.c
.owner = THIS_MODULE,
},
.remove = __exit_p(spi_imx_remove),
-Index: linux-2.6.29/drivers/spi/Kconfig
+Index: linux-2.6.29.6/drivers/spi/Kconfig
===================================================================
---- linux-2.6.29.orig/drivers/spi/Kconfig 2009-03-31 09:21:31.000000000 +0200
-+++ linux-2.6.29/drivers/spi/Kconfig 2009-03-31 11:22:44.000000000 +0200
+--- linux-2.6.29.6.orig/drivers/spi/Kconfig 2010-06-07 11:54:41.000000000 +0200
++++ linux-2.6.29.6/drivers/spi/Kconfig 2010-06-07 11:54:44.000000000 +0200
@@ -118,11 +118,28 @@
config SPI_IMX
diff --git a/patches/buildroot/2010.02/cleanup_buildroot.sh b/patches/buildroot/2010.02/cleanup_buildroot.sh
index 42fa09f..8d6bf15 100755
--- a/patches/buildroot/2010.02/cleanup_buildroot.sh
+++ b/patches/buildroot/2010.02/cleanup_buildroot.sh
@@ -17,3 +17,5 @@ rm -f buildroot/package/multimedia/mplayer/mplayer-1.0rc2-add_pld_asm_inst_for_
rm -f buildroot/package/multimedia/madplay/madplay-audio-alsa.patch
rm -f buildroot/package/busybox/busybox-1.15.3-speed_table-B921600.patch
rm -rf buildroot/package/firmware/
+rm -f buildroot/toolchain/gcc/4.2.1/999-4.2.1-armeabi-aapcs-linux.patch
+rm -f buildroot/toolchain/gcc/4.2.4/999-4.2.4-armeabi-aapcs-linux.patch
diff --git a/patches/buildroot/cleanup_buildroot.sh b/patches/buildroot/cleanup_buildroot.sh
index 4194e47..023b3a8 100755
--- a/patches/buildroot/cleanup_buildroot.sh
+++ b/patches/buildroot/cleanup_buildroot.sh
@@ -18,3 +18,7 @@ rm -f buildroot/package/mplayer/mplayer-1.0rc1-add_pld_asm_inst_for_non_armv5_a
rm -f buildroot/package/busybox/busybox-1.12.1-speed_table-B921600.patch
rm -rf buildroot/package/firmware/
rm -rf buildroot/package/wpa_supplicant/
+rm -f buildroot/package/strace/strace-arm-eabi-fix.patch
+rm -f buildroot/package/strace/strace-arm-no-cachectl.patch
+rm -f buildroot/toolchain/gcc/4.2.1/999-4.2.1-armeabi-aapcs-linux.patch
+rm -f buildroot/toolchain/gcc/4.2.4/999-4.2.4-armeabi-aapcs-linux.patch
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2010-06-04 14:58:01
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via aaa5a9b55f6c29183d5f635a4c82bbb7e55ab101 (commit)
from fad4744dff34a2c24c944691205335704620abe2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit aaa5a9b55f6c29183d5f635a4c82bbb7e55ab101
Author: Julien Boibessot <jul...@ar...>
Date: Fri Jun 4 16:57:35 2010 +0200
[BUILDROOT] Put correct BR2_GNU_TARGET_SUFFIX in apf9328 default configs
-----------------------------------------------------------------------
Summary of changes:
buildroot/local/apf9328_test/apf9328_test.config | 4 ++--
.../device/armadeus/apf9328/apf9328_defconfig | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/buildroot/local/apf9328_test/apf9328_test.config b/buildroot/local/apf9328_test/apf9328_test.config
index 97018fd..c660a7c 100644
--- a/buildroot/local/apf9328_test/apf9328_test.config
+++ b/buildroot/local/apf9328_test/apf9328_test.config
@@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
-# Fri Jun 4 16:29:01 2010
+# Fri Jun 4 16:31:42 2010
#
BR2_HAVE_DOT_CONFIG=y
BR2_VERSION="0.10.0-svn"
@@ -128,7 +128,7 @@ BR2_TOPDIR_SUFFIX=""
BR2_ROOTFS_PREFIX="$(BR2_BOARD_NAME)-rootfs"
BR2_ROOTFS_SUFFIX=""
BR2_GNU_BUILD_SUFFIX="pc-linux-gnu"
-BR2_GNU_TARGET_SUFFIX="linux-uclibc"
+BR2_GNU_TARGET_SUFFIX="linux-uclibcgnueabi"
BR2_JLEVEL=1
# BR2_PREFER_IMA is not set
# BR2_DEPRECATED is not set
diff --git a/buildroot/target/device/armadeus/apf9328/apf9328_defconfig b/buildroot/target/device/armadeus/apf9328/apf9328_defconfig
index ea0ad19..62d4c39 100644
--- a/buildroot/target/device/armadeus/apf9328/apf9328_defconfig
+++ b/buildroot/target/device/armadeus/apf9328/apf9328_defconfig
@@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
-# Fri Jun 4 16:29:01 2010
+# Fri Jun 4 16:31:42 2010
#
BR2_HAVE_DOT_CONFIG=y
BR2_VERSION="0.10.0-svn"
@@ -128,7 +128,7 @@ BR2_TOPDIR_SUFFIX=""
BR2_ROOTFS_PREFIX="$(BR2_BOARD_NAME)-rootfs"
BR2_ROOTFS_SUFFIX=""
BR2_GNU_BUILD_SUFFIX="pc-linux-gnu"
-BR2_GNU_TARGET_SUFFIX="linux-uclibc"
+BR2_GNU_TARGET_SUFFIX="linux-uclibcgnueabi"
BR2_JLEVEL=1
# BR2_PREFER_IMA is not set
# BR2_DEPRECATED is not set
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2010-06-04 14:32:22
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via fad4744dff34a2c24c944691205335704620abe2 (commit)
from 41349b4f214d9ea4a2beb18577dac44c071cc932 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit fad4744dff34a2c24c944691205335704620abe2
Author: Julien Boibessot <jul...@ar...>
Date: Fri Jun 4 16:31:30 2010 +0200
[BUILDROOT] apf938: updates default configs
-----------------------------------------------------------------------
Summary of changes:
buildroot/local/apf9328_test/apf9328_test.config | 18 ++++++-----
.../device/armadeus/apf9328/apf9328_defconfig | 34 ++++++++++----------
2 files changed, 27 insertions(+), 25 deletions(-)
diff --git a/buildroot/local/apf9328_test/apf9328_test.config b/buildroot/local/apf9328_test/apf9328_test.config
index b088e8e..97018fd 100644
--- a/buildroot/local/apf9328_test/apf9328_test.config
+++ b/buildroot/local/apf9328_test/apf9328_test.config
@@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
-# Tue Jun 1 17:51:37 2010
+# Fri Jun 4 16:29:01 2010
#
BR2_HAVE_DOT_CONFIG=y
BR2_VERSION="0.10.0-svn"
@@ -23,33 +23,34 @@ BR2_arm=y
# BR2_sparc64 is not set
# BR2_x86_64 is not set
# BR2_generic_arm is not set
-# BR2_arm600 is not set
+# BR2_arm7tdmi is not set
# BR2_arm610 is not set
-# BR2_arm620 is not set
# BR2_arm710 is not set
-# BR2_arm7tdmi is not set
-# BR2_arm710t is not set
# BR2_arm720t is not set
-# BR2_arm740t is not set
BR2_arm920t=y
# BR2_arm922t is not set
# BR2_arm926t is not set
-# BR2_arm926ej_s is not set
# BR2_arm10t is not set
# BR2_arm1136jf_s is not set
# BR2_arm1176jz_s is not set
# BR2_arm1176jzf_s is not set
+
+#
+# cortex-A8 needs gcc >= 4.4.x
+#
+# BR2_cortex_a8 is not set
# BR2_sa110 is not set
# BR2_sa1100 is not set
# BR2_xscale is not set
# BR2_iwmmxt is not set
BR2_ARM_TYPE="ARM920T"
-# BR2_ARM_OABI is not set
BR2_ARM_EABI=y
+# BR2_ARM_OABI is not set
BR2_ARCH="arm"
BR2_ENDIAN="LITTLE"
BR2_GCC_TARGET_TUNE="arm920t"
BR2_GCC_TARGET_ARCH="armv4t"
+BR2_GCC_TARGET_ABI="aapcs-linux"
#
# Target options
@@ -508,6 +509,7 @@ BR2_PACKAGE_CH7024CTRL=y
# BR2_PACKAGE_E2FSPROGS is not set
# BR2_PACKAGE_EEPROG is not set
# BR2_PACKAGE_FCONFIG is not set
+# BR2_PACKAGE_FIRMWARE is not set
# BR2_PACKAGE_FIS is not set
BR2_PACKAGE_FPGAREGS=y
# BR2_PACKAGE_LIBFUSE is not set
diff --git a/buildroot/target/device/armadeus/apf9328/apf9328_defconfig b/buildroot/target/device/armadeus/apf9328/apf9328_defconfig
index e7b79aa..ea0ad19 100644
--- a/buildroot/target/device/armadeus/apf9328/apf9328_defconfig
+++ b/buildroot/target/device/armadeus/apf9328/apf9328_defconfig
@@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
-# Tue Jun 1 17:51:37 2010
+# Fri Jun 4 16:29:01 2010
#
BR2_HAVE_DOT_CONFIG=y
BR2_VERSION="0.10.0-svn"
@@ -23,33 +23,34 @@ BR2_arm=y
# BR2_sparc64 is not set
# BR2_x86_64 is not set
# BR2_generic_arm is not set
-# BR2_arm600 is not set
+# BR2_arm7tdmi is not set
# BR2_arm610 is not set
-# BR2_arm620 is not set
# BR2_arm710 is not set
-# BR2_arm7tdmi is not set
-# BR2_arm710t is not set
# BR2_arm720t is not set
-# BR2_arm740t is not set
BR2_arm920t=y
# BR2_arm922t is not set
# BR2_arm926t is not set
-# BR2_arm926ej_s is not set
# BR2_arm10t is not set
# BR2_arm1136jf_s is not set
# BR2_arm1176jz_s is not set
# BR2_arm1176jzf_s is not set
+
+#
+# cortex-A8 needs gcc >= 4.4.x
+#
+# BR2_cortex_a8 is not set
# BR2_sa110 is not set
# BR2_sa1100 is not set
# BR2_xscale is not set
# BR2_iwmmxt is not set
BR2_ARM_TYPE="ARM920T"
-# BR2_ARM_OABI is not set
BR2_ARM_EABI=y
+# BR2_ARM_OABI is not set
BR2_ARCH="arm"
BR2_ENDIAN="LITTLE"
BR2_GCC_TARGET_TUNE="arm920t"
BR2_GCC_TARGET_ARCH="armv4t"
+BR2_GCC_TARGET_ABI="aapcs-linux"
#
# Target options
@@ -327,11 +328,6 @@ BR2_PACKAGE_PKGCONFIG=y
#
# BR2_PACKAGE_UUCP is not set
# BR2_PACKAGE_LIBDNET is not set
-# BR2_PACKAGE_BLUEZ_LIBS is not set
-
-#
-# bluez-utils not available (need dbus)
-#
# BR2_PACKAGE_MESALIB is not set
#
@@ -346,10 +342,12 @@ BR2_PACKAGE_IMXREGS=y
# BR2_PACKAGE_IMXSSI is not set
BR2_PACKAGE_MAX5821CTRL=y
# BR2_PACKAGE_ARMADEUS_TESTSUITE is not set
-# BR2_PACKAGE_FIRMWARE is not set
-# BR2_PACKAGE_FIRMWARE_88W8686_SDIO_V8 is not set
-# BR2_PACKAGE_FIRMWARE_88W8686_SDIO_V9 is not set
# BR2_PACKAGE_DUMMY is not set
+# BR2_PACKAGE_BLUEZ_LIBS is not set
+
+#
+# bluez-utils not available (need dbus)
+#
# BR2_PACKAGE_FBTEST is not set
# BR2_PACKAGE_SNES9X is not set
@@ -487,6 +485,7 @@ BR2_PACKAGE_PORTMAP=y
# BR2_PACKAGE_VTUN is not set
# BR2_PACKAGE_WEBIF is not set
# BR2_PACKAGE_WIRELESS_TOOLS is not set
+# BR2_PACKAGE_WPA_SUPPLICANT is not set
BR2_BLOCKDEV_SUPPORT=y
#
@@ -498,6 +497,7 @@ BR2_BLOCKDEV_SUPPORT=y
# BR2_PACKAGE_E2FSPROGS is not set
# BR2_PACKAGE_EEPROG is not set
# BR2_PACKAGE_FCONFIG is not set
+# BR2_PACKAGE_FIRMWARE is not set
# BR2_PACKAGE_FIS is not set
# BR2_PACKAGE_LIBFUSE is not set
# BR2_PACKAGE_GADGETFS_TEST is not set
@@ -794,7 +794,7 @@ BR2_TARGET_UBOOT_NETMASK=""
BR2_TARGET_UBOOT_ETHADDR=""
# BR2_TARGET_UBOOT_SILENT is not set
# BR2_TARGET_UBOOT_TOOL_MKIMAGE is not set
-# BR2_TARGET_UBOOT_TOOL_ENV is not set
+BR2_TARGET_UBOOT_TOOL_ENV=y
BR2_TARGET_UBOOT_COPYTO=""
#
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2010-06-04 13:44:05
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 41349b4f214d9ea4a2beb18577dac44c071cc932 (commit)
via c4c563b7b269591bc789150ca38c0e2c6e290098 (commit)
from e0e5362e9f57354f2d0d8841507a5fc5ea279e42 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 41349b4f214d9ea4a2beb18577dac44c071cc932
Author: Julien Boibessot <jul...@ar...>
Date: Fri Jun 4 15:43:31 2010 +0200
[BUILDROOT] Put correct BR2_GNU_TARGET_SUFFIX in apf27 BR default configs
commit c4c563b7b269591bc789150ca38c0e2c6e290098
Author: Julien Boibessot <jul...@ar...>
Date: Fri Jun 4 15:40:37 2010 +0200
[BUILDROOT] gcc 4.2.x: add support for --with-abi=aapcs-linux configure option
-----------------------------------------------------------------------
Summary of changes:
buildroot/local/apf27_test/apf27_test.config | 4 +-
.../target/device/armadeus/apf27/apf27_defconfig | 4 +-
...-linux_eabi_config_option_support_for_arm.patch | 51 ++++++++++++++++++++
...-linux_eabi_config_option_support_for_arm.patch | 51 ++++++++++++++++++++
4 files changed, 106 insertions(+), 4 deletions(-)
create mode 100644 patches/buildroot/112-gcc-4_2_x-add_aapcs-linux_eabi_config_option_support_for_arm.patch
create mode 100644 patches/buildroot/2010.02/112-gcc-4_2_x-add_aapcs-linux_eabi_config_option_support_for_arm.patch
diff --git a/buildroot/local/apf27_test/apf27_test.config b/buildroot/local/apf27_test/apf27_test.config
index 504ee04..3268f3f 100644
--- a/buildroot/local/apf27_test/apf27_test.config
+++ b/buildroot/local/apf27_test/apf27_test.config
@@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
-# Thu Jun 3 17:54:06 2010
+# Fri Jun 4 11:20:33 2010
#
BR2_HAVE_DOT_CONFIG=y
BR2_VERSION="0.10.0-svn"
@@ -132,7 +132,7 @@ BR2_TOPDIR_SUFFIX=""
BR2_ROOTFS_PREFIX="$(BR2_BOARD_NAME)-rootfs"
BR2_ROOTFS_SUFFIX=""
BR2_GNU_BUILD_SUFFIX="pc-linux-gnu"
-BR2_GNU_TARGET_SUFFIX="linux-uclibc"
+BR2_GNU_TARGET_SUFFIX="linux-uclibcgnueabi"
BR2_JLEVEL=1
# BR2_PREFER_IMA is not set
# BR2_DEPRECATED is not set
diff --git a/buildroot/target/device/armadeus/apf27/apf27_defconfig b/buildroot/target/device/armadeus/apf27/apf27_defconfig
index 4915166..aecd419 100644
--- a/buildroot/target/device/armadeus/apf27/apf27_defconfig
+++ b/buildroot/target/device/armadeus/apf27/apf27_defconfig
@@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
-# Thu Jun 3 17:54:06 2010
+# Fri Jun 4 11:20:33 2010
#
BR2_HAVE_DOT_CONFIG=y
BR2_VERSION="0.10.0-svn"
@@ -132,7 +132,7 @@ BR2_TOPDIR_SUFFIX=""
BR2_ROOTFS_PREFIX="$(BR2_BOARD_NAME)-rootfs"
BR2_ROOTFS_SUFFIX=""
BR2_GNU_BUILD_SUFFIX="pc-linux-gnu"
-BR2_GNU_TARGET_SUFFIX="linux-uclibc"
+BR2_GNU_TARGET_SUFFIX="linux-uclibcgnueabi"
BR2_JLEVEL=1
# BR2_PREFER_IMA is not set
# BR2_DEPRECATED is not set
diff --git a/patches/buildroot/112-gcc-4_2_x-add_aapcs-linux_eabi_config_option_support_for_arm.patch b/patches/buildroot/112-gcc-4_2_x-add_aapcs-linux_eabi_config_option_support_for_arm.patch
new file mode 100644
index 0000000..84a69ff
--- /dev/null
+++ b/patches/buildroot/112-gcc-4_2_x-add_aapcs-linux_eabi_config_option_support_for_arm.patch
@@ -0,0 +1,51 @@
+Allows gcc 4.2.1 & gcc 4.2.4 to accept --with-abi=aapcs-linux at configure
+stage.
+
+Taken from buildroot/toolchain/gcc/4.3.x/
+
+Index: buildroot/toolchain/gcc/4.2.1/999-4.2.1-armeabi-aapcs-linux.patch
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ buildroot/toolchain/gcc/4.2.1/999-4.2.1-armeabi-aapcs-linux.patch 2010-06-04 15:25:53.000000000 +0200
+@@ -0,0 +1,18 @@
++\\\\ followup of PR34205; trying to use aapcs-linux
++\\ gcc/ChangeLog
++\\
++\\ 2008-09-18 Bernhard Reutner-Fischer <aldot@>
++\\
++\\ * config.gcc (arm*-*-*): Add aapcs-linux to supported ABIs.
++\\
++--- gcc-4.2.1.orig/gcc/config.gcc 2008-09-18 20:33:55.000000000 +0200
+++++ gcc-4.2.1/gcc/config.gcc 2008-09-18 21:38:52.000000000 +0200
++@@ -2714,7 +2714,7 @@
++
++ case "$with_abi" in
++ "" \
++- | apcs-gnu | atpcs | aapcs | iwmmxt )
+++ | apcs-gnu | atpcs | aapcs | iwmmxt | aapcs-linux )
++ #OK
++ ;;
++ *)
+Index: buildroot/toolchain/gcc/4.2.4/999-4.2.4-armeabi-aapcs-linux.patch
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ buildroot/toolchain/gcc/4.2.4/999-4.2.4-armeabi-aapcs-linux.patch 2010-06-04 15:27:11.000000000 +0200
+@@ -0,0 +1,18 @@
++\\\\ followup of PR34205; trying to use aapcs-linux
++\\ gcc/ChangeLog
++\\
++\\ 2008-09-18 Bernhard Reutner-Fischer <aldot@>
++\\
++\\ * config.gcc (arm*-*-*): Add aapcs-linux to supported ABIs.
++\\
++--- gcc-4.2.4.orig/gcc/config.gcc 2008-09-18 20:33:55.000000000 +0200
+++++ gcc-4.2.4/gcc/config.gcc 2008-09-18 21:38:52.000000000 +0200
++@@ -2714,7 +2714,7 @@
++
++ case "$with_abi" in
++ "" \
++- | apcs-gnu | atpcs | aapcs | iwmmxt )
+++ | apcs-gnu | atpcs | aapcs | iwmmxt | aapcs-linux )
++ #OK
++ ;;
++ *)
diff --git a/patches/buildroot/2010.02/112-gcc-4_2_x-add_aapcs-linux_eabi_config_option_support_for_arm.patch b/patches/buildroot/2010.02/112-gcc-4_2_x-add_aapcs-linux_eabi_config_option_support_for_arm.patch
new file mode 100644
index 0000000..84a69ff
--- /dev/null
+++ b/patches/buildroot/2010.02/112-gcc-4_2_x-add_aapcs-linux_eabi_config_option_support_for_arm.patch
@@ -0,0 +1,51 @@
+Allows gcc 4.2.1 & gcc 4.2.4 to accept --with-abi=aapcs-linux at configure
+stage.
+
+Taken from buildroot/toolchain/gcc/4.3.x/
+
+Index: buildroot/toolchain/gcc/4.2.1/999-4.2.1-armeabi-aapcs-linux.patch
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ buildroot/toolchain/gcc/4.2.1/999-4.2.1-armeabi-aapcs-linux.patch 2010-06-04 15:25:53.000000000 +0200
+@@ -0,0 +1,18 @@
++\\\\ followup of PR34205; trying to use aapcs-linux
++\\ gcc/ChangeLog
++\\
++\\ 2008-09-18 Bernhard Reutner-Fischer <aldot@>
++\\
++\\ * config.gcc (arm*-*-*): Add aapcs-linux to supported ABIs.
++\\
++--- gcc-4.2.1.orig/gcc/config.gcc 2008-09-18 20:33:55.000000000 +0200
+++++ gcc-4.2.1/gcc/config.gcc 2008-09-18 21:38:52.000000000 +0200
++@@ -2714,7 +2714,7 @@
++
++ case "$with_abi" in
++ "" \
++- | apcs-gnu | atpcs | aapcs | iwmmxt )
+++ | apcs-gnu | atpcs | aapcs | iwmmxt | aapcs-linux )
++ #OK
++ ;;
++ *)
+Index: buildroot/toolchain/gcc/4.2.4/999-4.2.4-armeabi-aapcs-linux.patch
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ buildroot/toolchain/gcc/4.2.4/999-4.2.4-armeabi-aapcs-linux.patch 2010-06-04 15:27:11.000000000 +0200
+@@ -0,0 +1,18 @@
++\\\\ followup of PR34205; trying to use aapcs-linux
++\\ gcc/ChangeLog
++\\
++\\ 2008-09-18 Bernhard Reutner-Fischer <aldot@>
++\\
++\\ * config.gcc (arm*-*-*): Add aapcs-linux to supported ABIs.
++\\
++--- gcc-4.2.4.orig/gcc/config.gcc 2008-09-18 20:33:55.000000000 +0200
+++++ gcc-4.2.4/gcc/config.gcc 2008-09-18 21:38:52.000000000 +0200
++@@ -2714,7 +2714,7 @@
++
++ case "$with_abi" in
++ "" \
++- | apcs-gnu | atpcs | aapcs | iwmmxt )
+++ | apcs-gnu | atpcs | aapcs | iwmmxt | aapcs-linux )
++ #OK
++ ;;
++ *)
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2010-06-04 08:16:50
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via e0e5362e9f57354f2d0d8841507a5fc5ea279e42 (commit)
via 71465e31afe511137cd5721f26fc9721b457007a (commit)
from 3a8b9125f4f5b48d855ee4c7a62acad408131aae (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e0e5362e9f57354f2d0d8841507a5fc5ea279e42
Author: Julien Boibessot <jul...@ar...>
Date: Fri Jun 4 10:16:08 2010 +0200
[BUILDROOT] strace: needs patches when compiled with EABI
commit 71465e31afe511137cd5721f26fc9721b457007a
Author: Julien Boibessot <jul...@ar...>
Date: Thu Jun 3 22:25:36 2010 +0200
Indentation/cleanup
-----------------------------------------------------------------------
Summary of changes:
.../111-strace-add_some_patches_for_arm.patch | 60 ++++++++++++++++++++
target/linux/modules/gpio/core.c | 11 ++--
target/linux/modules/gpio/core.h | 11 ++--
3 files changed, 71 insertions(+), 11 deletions(-)
create mode 100644 patches/buildroot/111-strace-add_some_patches_for_arm.patch
diff --git a/patches/buildroot/111-strace-add_some_patches_for_arm.patch b/patches/buildroot/111-strace-add_some_patches_for_arm.patch
new file mode 100644
index 0000000..6048f2f
--- /dev/null
+++ b/patches/buildroot/111-strace-add_some_patches_for_arm.patch
@@ -0,0 +1,60 @@
+Patches needed to compile strace on ARM (EABI).
+
+Already included in recent BR.
+
+Index: buildroot/package/strace/strace-arm-eabi-fix.patch
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ buildroot/package/strace/strace-arm-eabi-fix.patch 2010-06-04 09:25:00.000000000 +0200
+@@ -0,0 +1,27 @@
++From f5da8d0c38ea0eb660cb17de7aa62cda6899eb75 Mon Sep 17 00:00:00 2001
++From: ldv <ldv>
++Date: Thu, 1 Jan 2009 23:20:38 +0000
++Subject: [PATCH] 2008-11-13 Kirill A. Shutemov <ki...@sh...>
++
++ * linux/arm/syscallent.h: Fix build on ARM EABI which does not
++ provide syscalls socketcall and ipc.
++
++diff --git a/linux/arm/syscallent.h b/linux/arm/syscallent.h
++index 5ccef2f..edc3641 100644
++--- a/linux/arm/syscallent.h
+++++ b/linux/arm/syscallent.h
++@@ -431,6 +431,7 @@
++ { 5, 0, printargs, "SYS_398" }, /* 398 */
++ { 5, 0, printargs, "SYS_399" }, /* 399 */
++
+++#ifndef __ARM_EABI__
++ #if SYS_socket_subcall != 400
++ #error fix me
++ #endif
++@@ -481,3 +482,4 @@
++ { 4, TI, sys_shmdt, "shmdt" }, /* 440 */
++ { 4, TI, sys_shmget, "shmget" }, /* 441 */
++ { 4, TI, sys_shmctl, "shmctl" }, /* 442 */
+++#endif
++--
++1.6.1.3
+Index: buildroot/package/strace/strace-arm-no-cachectl.patch
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ buildroot/package/strace/strace-arm-no-cachectl.patch 2010-06-04 09:25:19.000000000 +0200
+@@ -0,0 +1,19 @@
++ARM defines SYS_cacheflush, but doesn't have <asm/cachectl.h>
++---
++ system.c | 2 ++
++ 1 file changed, 2 insertions(+)
++
++--- a/system.c
+++++ b/system.c
++@@ -70,9 +70,11 @@
++ #include <linux/capability.h>
++ #endif
++
+++#ifndef ARM
++ #ifdef SYS_cacheflush
++ #include <asm/cachectl.h>
++ #endif
+++#endif
++
++ #ifdef HAVE_LINUX_USTNAME_H
++ #include <linux/utsname.h>
diff --git a/target/linux/modules/gpio/core.c b/target/linux/modules/gpio/core.c
index 6296a0a..418789e 100755
--- a/target/linux/modules/gpio/core.c
+++ b/target/linux/modules/gpio/core.c
@@ -1,7 +1,7 @@
/*
* Armadeus i.MXL/27 GPIO management driver
*
- * Copyright (C) 2006-2008 Julien Boibessot <jul...@ar...>
+ * Copyright (C) 2006-2010 Julien Boibessot <jul...@ar...>
* Nicolas Colombain <nic...@ar...>
* Armadeus Project / Armadeus Systems
*
@@ -412,7 +412,6 @@ static void set_port_pullup(unsigned int aPort, unsigned int aPullMask)
__raw_writel(aPullMask & 0xffffffff, VA_GPIO_BASE + MXC_PUEN(aPort));
}
-
static void set_port_dir(unsigned int aPort, unsigned int aDirMask)
{
__raw_writel(aDirMask & 0xffffffff, VA_GPIO_BASE + MXC_DDIR(aPort));
@@ -814,11 +813,12 @@ static unsigned int armadeus_gpio_dev_poll(struct file *filp, poll_table *wait)
spin_lock_irq(&gpio->lock);
poll_wait(filp, &gpio->change_wq, wait);
- if (gpio->changed)
- {
- mask |= (POLLIN | POLLRDNORM);
+ if (gpio->changed) {
+ mask |= (POLLIN | POLLRDNORM);
}
+
spin_unlock_irq(&gpio->lock);
+
return mask;
}
@@ -906,7 +906,6 @@ static int armadeus_gpio_proc_read(char *buffer, char **start, off_t offset,
*eof = 1;
up(&gpio_sema);
- /* Return the length */
return len;
}
diff --git a/target/linux/modules/gpio/core.h b/target/linux/modules/gpio/core.h
index 7262961..d452f46 100755
--- a/target/linux/modules/gpio/core.h
+++ b/target/linux/modules/gpio/core.h
@@ -1,7 +1,7 @@
/*
* Armadeus i.MXL GPIO management driver
*
- * Copyright (C) 2006-2008 Julien Boibessot <jul...@ar...>
+ * Copyright (C) 2006-2010 Julien Boibessot <jul...@ar...>
* Nicolas Colombain <nic...@ar...>
* Armadeus Project / Armadeus Systems
*
@@ -28,18 +28,19 @@
/* IOCTL */
-#define GPIORDDIRECTION _IOR(PP_IOCTL, 0xF0, int)/* Read/write bitmask that determine*/
-#define GPIOWRDIRECTION _IOW(PP_IOCTL, 0xF1, int)/*in/out pins (1 output, 0 input) */
+/* direction: 1 output, 0 input */
+#define GPIORDDIRECTION _IOR(PP_IOCTL, 0xF0, int)
+#define GPIOWRDIRECTION _IOW(PP_IOCTL, 0xF1, int)
#define GPIORDDATA _IOR(PP_IOCTL, 0xF2, int)
#define GPIOWRDATA _IOW(PP_IOCTL, 0xF3, int)
-
+/* mode: 1 GPIO, 0 device function */
#define GPIORDMODE _IOR(PP_IOCTL, 0xF4, int)
#define GPIOWRMODE _IOW(PP_IOCTL, 0xF5, int)
#define GPIORDPULLUP _IOR(PP_IOCTL, 0xF6, int)
#define GPIOWRPULLUP _IOW(PP_IOCTL, 0xF7, int)
-
+/* 2bits per pin for IRQ mode: 0 none, 1 rising, 2 falling, 3 both */
#define GPIORDIRQMODE_H _IOR(PP_IOCTL, 0xF8, int)
#define GPIORDIRQMODE_L _IOR(PP_IOCTL, 0xF9, int)
#define GPIOWRIRQMODE_H _IOW(PP_IOCTL, 0xFA, int)
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2010-06-03 16:18:07
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 3a8b9125f4f5b48d855ee4c7a62acad408131aae (commit)
via a80a284e704bbe7b381b0b68dd2a218b58811097 (commit)
via 1a12f439b809960ed8f544e8be1cb461c6483491 (commit)
via ca104b773d8affba4c7497720491c1b3389f7111 (commit)
from 34c7c2ddbe769c3cfd041e782f6d8bee1f7f59bb (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 3a8b9125f4f5b48d855ee4c7a62acad408131aae
Author: Julien Boibessot <jul...@ar...>
Date: Thu Jun 3 18:16:51 2010 +0200
[BUILDROOT] bluez: improve package config/compilation
commit a80a284e704bbe7b381b0b68dd2a218b58811097
Author: Julien Boibessot <jul...@ar...>
Date: Thu Jun 3 18:06:01 2010 +0200
[BUILDROOT] Move package/bluez -> package/bluez3, as there will be a bluez4 package
commit 1a12f439b809960ed8f544e8be1cb461c6483491
Merge: ca104b773d8affba4c7497720491c1b3389f7111 34c7c2ddbe769c3cfd041e782f6d8bee1f7f59bb
Author: Julien Boibessot <jul...@ar...>
Date: Thu Jun 3 18:02:50 2010 +0200
Merge branch 'master' of ssh://artemys@armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit ca104b773d8affba4c7497720491c1b3389f7111
Author: Julien Boibessot <jul...@ar...>
Date: Thu Jun 3 18:00:09 2010 +0200
[BUILDROOT] Updates GCC optim & EABI flags selection for ARM926
-----------------------------------------------------------------------
Summary of changes:
buildroot/configs/apf27_defconfig | 4 +-
buildroot/local/apf27_test/apf27_test.config | 21 ++-
buildroot/package/{bluez => bluez3}/Config.in | 0
buildroot/package/{bluez => bluez3}/bluetooth.conf | 0
.../package/{bluez => bluez3}/bluetooth.default | 0
buildroot/package/{bluez => bluez3}/bluetooth.init | 0
buildroot/package/{bluez => bluez3}/bluez-libs.mk | 0
.../package/{bluez => bluez3}/bluez-pand-devup.sh | 0
.../{bluez => bluez3}/bluez-utils-bluepin.sh | 0
.../bluez-utils-bluez-include-patch.patch | 0
buildroot/package/{bluez => bluez3}/bluez-utils.mk | 25 ++-
buildroot/package/{bluez => bluez3}/hcid.conf | 0
buildroot/package/{bluez => bluez3}/rfcomm-getty | 0
buildroot/package/{bluez => bluez3}/rfcomm.conf | 0
.../target/device/armadeus/apf27/apf27_defconfig | 21 ++-
patches/buildroot/030-gcc.patch | 181 +++++++++++---------
16 files changed, 138 insertions(+), 114 deletions(-)
rename buildroot/package/{bluez => bluez3}/Config.in (100%)
rename buildroot/package/{bluez => bluez3}/bluetooth.conf (100%)
rename buildroot/package/{bluez => bluez3}/bluetooth.default (100%)
rename buildroot/package/{bluez => bluez3}/bluetooth.init (100%)
rename buildroot/package/{bluez => bluez3}/bluez-libs.mk (100%)
rename buildroot/package/{bluez => bluez3}/bluez-pand-devup.sh (100%)
rename buildroot/package/{bluez => bluez3}/bluez-utils-bluepin.sh (100%)
rename buildroot/package/{bluez => bluez3}/bluez-utils-bluez-include-patch.patch (100%)
rename buildroot/package/{bluez => bluez3}/bluez-utils.mk (83%)
rename buildroot/package/{bluez => bluez3}/hcid.conf (100%)
rename buildroot/package/{bluez => bluez3}/rfcomm-getty (100%)
rename buildroot/package/{bluez => bluez3}/rfcomm.conf (100%)
diff --git a/buildroot/configs/apf27_defconfig b/buildroot/configs/apf27_defconfig
index 2d12fe9..eb801a8 100644
--- a/buildroot/configs/apf27_defconfig
+++ b/buildroot/configs/apf27_defconfig
@@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
-# Tue Jun 1 17:51:37 2010
+# Thu Jun 3 17:54:06 2010
#
BR2_HAVE_DOT_CONFIG=y
BR2_VERSION="2010.02-rc1"
@@ -48,7 +48,7 @@ BR2_ARM_EABI=y
# BR2_ARM_OABI is not set
BR2_ARCH="arm"
BR2_ENDIAN="LITTLE"
-BR2_GCC_TARGET_TUNE="arm9tdmi"
+BR2_GCC_TARGET_TUNE="arm926ej-s"
BR2_GCC_TARGET_ARCH="armv5te"
BR2_GCC_TARGET_ABI="aapcs-linux"
diff --git a/buildroot/local/apf27_test/apf27_test.config b/buildroot/local/apf27_test/apf27_test.config
index 0db703c..504ee04 100644
--- a/buildroot/local/apf27_test/apf27_test.config
+++ b/buildroot/local/apf27_test/apf27_test.config
@@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
-# Tue Jun 1 17:51:37 2010
+# Thu Jun 3 17:54:06 2010
#
BR2_HAVE_DOT_CONFIG=y
BR2_VERSION="0.10.0-svn"
@@ -23,33 +23,34 @@ BR2_arm=y
# BR2_sparc64 is not set
# BR2_x86_64 is not set
# BR2_generic_arm is not set
-# BR2_arm600 is not set
+# BR2_arm7tdmi is not set
# BR2_arm610 is not set
-# BR2_arm620 is not set
# BR2_arm710 is not set
-# BR2_arm7tdmi is not set
-# BR2_arm710t is not set
# BR2_arm720t is not set
-# BR2_arm740t is not set
# BR2_arm920t is not set
# BR2_arm922t is not set
-# BR2_arm926t is not set
-BR2_arm926ej_s=y
+BR2_arm926t=y
# BR2_arm10t is not set
# BR2_arm1136jf_s is not set
# BR2_arm1176jz_s is not set
# BR2_arm1176jzf_s is not set
+
+#
+# cortex-A8 needs gcc >= 4.4.x
+#
+# BR2_cortex_a8 is not set
# BR2_sa110 is not set
# BR2_sa1100 is not set
# BR2_xscale is not set
# BR2_iwmmxt is not set
-BR2_ARM_TYPE="ARM926EJ_S"
-# BR2_ARM_OABI is not set
+BR2_ARM_TYPE="ARM926T"
BR2_ARM_EABI=y
+# BR2_ARM_OABI is not set
BR2_ARCH="arm"
BR2_ENDIAN="LITTLE"
BR2_GCC_TARGET_TUNE="arm926ej-s"
BR2_GCC_TARGET_ARCH="armv5te"
+BR2_GCC_TARGET_ABI="aapcs-linux"
#
# Target options
diff --git a/buildroot/package/bluez/Config.in b/buildroot/package/bluez3/Config.in
similarity index 100%
rename from buildroot/package/bluez/Config.in
rename to buildroot/package/bluez3/Config.in
diff --git a/buildroot/package/bluez/bluetooth.conf b/buildroot/package/bluez3/bluetooth.conf
similarity index 100%
rename from buildroot/package/bluez/bluetooth.conf
rename to buildroot/package/bluez3/bluetooth.conf
diff --git a/buildroot/package/bluez/bluetooth.default b/buildroot/package/bluez3/bluetooth.default
similarity index 100%
rename from buildroot/package/bluez/bluetooth.default
rename to buildroot/package/bluez3/bluetooth.default
diff --git a/buildroot/package/bluez/bluetooth.init b/buildroot/package/bluez3/bluetooth.init
similarity index 100%
rename from buildroot/package/bluez/bluetooth.init
rename to buildroot/package/bluez3/bluetooth.init
diff --git a/buildroot/package/bluez/bluez-libs.mk b/buildroot/package/bluez3/bluez-libs.mk
similarity index 100%
rename from buildroot/package/bluez/bluez-libs.mk
rename to buildroot/package/bluez3/bluez-libs.mk
diff --git a/buildroot/package/bluez/bluez-pand-devup.sh b/buildroot/package/bluez3/bluez-pand-devup.sh
similarity index 100%
rename from buildroot/package/bluez/bluez-pand-devup.sh
rename to buildroot/package/bluez3/bluez-pand-devup.sh
diff --git a/buildroot/package/bluez/bluez-utils-bluepin.sh b/buildroot/package/bluez3/bluez-utils-bluepin.sh
similarity index 100%
rename from buildroot/package/bluez/bluez-utils-bluepin.sh
rename to buildroot/package/bluez3/bluez-utils-bluepin.sh
diff --git a/buildroot/package/bluez/bluez-utils-bluez-include-patch.patch b/buildroot/package/bluez3/bluez-utils-bluez-include-patch.patch
similarity index 100%
rename from buildroot/package/bluez/bluez-utils-bluez-include-patch.patch
rename to buildroot/package/bluez3/bluez-utils-bluez-include-patch.patch
diff --git a/buildroot/package/bluez/bluez-utils.mk b/buildroot/package/bluez3/bluez-utils.mk
similarity index 83%
rename from buildroot/package/bluez/bluez-utils.mk
rename to buildroot/package/bluez3/bluez-utils.mk
index 02575d0..a833043 100644
--- a/buildroot/package/bluez/bluez-utils.mk
+++ b/buildroot/package/bluez3/bluez-utils.mk
@@ -12,13 +12,14 @@ BLUEZ_UTILS_SOURCE=bluez-utils-$(BLUEZ_UTILS_VERSION).tar.gz
ifeq ($(strip $(BR2_PACKAGE_ALSA-LIB)),y)
+ALSA_DEP=alsa
WITH_ALSA=--with-alsa=$(STAGING_DIR)
else
WITH_ALSA=--without-alsa
endif
ifeq ($(strip $(BR2_PACKAGE_OPENOBEX)),y)
-OBEX_DEP=$(STAGING_DIR)/lib/libopenobex.so
+OBEX_DEP=openobex
WITH_OBEX=--with-openobex=$(STAGING_DIR)
else
OBEX_DEP=
@@ -28,14 +29,14 @@ endif
BLUEZ_UTILS_CONF_OPT = \
$(WITH_OBEX) \
$(WITH_ALSA) \
+ --disable-pie \
--disable-expat \
--enable-network \
--enable-serial \
- --disable-audio \
- --disable-input \
+ --enable-audio \
+ --enable-input \
--enable-sync \
--enable-hcid \
- --enable-sdpd \
--enable-hidd \
--enable-pand \
--disable-test \
@@ -46,17 +47,25 @@ BLUEZ_UTILS_CONF_OPT = \
--disable-bccmd \
--enable-avctrl \
--enable-hid2hci \
- --disable-dfutool \
-
-# --disable-audio : otherwise link problem with Host libasound
+ --disable-dfutool
+# --disable-pie: uClibc doesn't handle "position independent executables" (segfault at launching)
+# sdpd is obsolete
#$(BLUEZ_UTILS_BUILD_DIR)/.configured: $(BLUEZ_UTILS_BUILD_DIR)/.unpacked $(TARGET_DIR)/usr/lib/libbluetooth.so $(OBEX_DEP)
-BLUEZ_UTILS_DEPENDENCIES = bluez-libs dbus
+BLUEZ_UTILS_DEPENDENCIES = bluez-libs dbus $(OBEX_DEP) $(ALSA_DEP)
$(eval $(call AUTOTARGETS,package,bluez-utils))
+# Hook to prevent link with Host asound and libusb
+# (seems not needed with recent BR)
+$(BLUEZ_UTILS_HOOK_POST_CONFIGURE):
+ @$(call MESSAGE,"Post configuring")
+ $(SED) 's,^sys_lib_search_path_spec=.*,sys_lib_search_path_spec="$(STAGING_DIR)/usr/lib $(STAGING_DIR)/lib",' $(@D)/libtool
+ touch $@
+
+
$(BLUEZ_HCIDUMP_BUILD_DIR)/hcidump: $(BLUEZ_HCIDUMP_BUILD_DIR)/.configured
$(MAKE) -C $(BLUEZ_HCIDUMP_BUILD_DIR)
diff --git a/buildroot/package/bluez/hcid.conf b/buildroot/package/bluez3/hcid.conf
similarity index 100%
rename from buildroot/package/bluez/hcid.conf
rename to buildroot/package/bluez3/hcid.conf
diff --git a/buildroot/package/bluez/rfcomm-getty b/buildroot/package/bluez3/rfcomm-getty
similarity index 100%
rename from buildroot/package/bluez/rfcomm-getty
rename to buildroot/package/bluez3/rfcomm-getty
diff --git a/buildroot/package/bluez/rfcomm.conf b/buildroot/package/bluez3/rfcomm.conf
similarity index 100%
rename from buildroot/package/bluez/rfcomm.conf
rename to buildroot/package/bluez3/rfcomm.conf
diff --git a/buildroot/target/device/armadeus/apf27/apf27_defconfig b/buildroot/target/device/armadeus/apf27/apf27_defconfig
index efa07aa..4915166 100644
--- a/buildroot/target/device/armadeus/apf27/apf27_defconfig
+++ b/buildroot/target/device/armadeus/apf27/apf27_defconfig
@@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
-# Tue Jun 1 17:51:37 2010
+# Thu Jun 3 17:54:06 2010
#
BR2_HAVE_DOT_CONFIG=y
BR2_VERSION="0.10.0-svn"
@@ -23,33 +23,34 @@ BR2_arm=y
# BR2_sparc64 is not set
# BR2_x86_64 is not set
# BR2_generic_arm is not set
-# BR2_arm600 is not set
+# BR2_arm7tdmi is not set
# BR2_arm610 is not set
-# BR2_arm620 is not set
# BR2_arm710 is not set
-# BR2_arm7tdmi is not set
-# BR2_arm710t is not set
# BR2_arm720t is not set
-# BR2_arm740t is not set
# BR2_arm920t is not set
# BR2_arm922t is not set
-# BR2_arm926t is not set
-BR2_arm926ej_s=y
+BR2_arm926t=y
# BR2_arm10t is not set
# BR2_arm1136jf_s is not set
# BR2_arm1176jz_s is not set
# BR2_arm1176jzf_s is not set
+
+#
+# cortex-A8 needs gcc >= 4.4.x
+#
+# BR2_cortex_a8 is not set
# BR2_sa110 is not set
# BR2_sa1100 is not set
# BR2_xscale is not set
# BR2_iwmmxt is not set
-BR2_ARM_TYPE="ARM926EJ_S"
-# BR2_ARM_OABI is not set
+BR2_ARM_TYPE="ARM926T"
BR2_ARM_EABI=y
+# BR2_ARM_OABI is not set
BR2_ARCH="arm"
BR2_ENDIAN="LITTLE"
BR2_GCC_TARGET_TUNE="arm926ej-s"
BR2_GCC_TARGET_ARCH="armv5te"
+BR2_GCC_TARGET_ABI="aapcs-linux"
#
# Target options
diff --git a/patches/buildroot/030-gcc.patch b/patches/buildroot/030-gcc.patch
index 5a2cbd3..6583db8 100644
--- a/patches/buildroot/030-gcc.patch
+++ b/patches/buildroot/030-gcc.patch
@@ -1,109 +1,120 @@
+Updates gcc optim/ABI flags (for ARM) to state of the art.
+
Can be removed when updating to 2010.02 Buildroot.
---- buildroot/target/Config.in.arch.ref 2008-11-03 09:15:12.000000000 +0100
-+++ buildroot/target/Config.in.arch 2008-11-23 23:08:56.000000000 +0100
-@@ -59,20 +59,30 @@ choice
-
- config BR2_generic_arm
- bool "generic_arm"
--config BR2_arm7tdmi
-- bool "arm7tdmi"
-+config BR2_arm600
-+ bool "arm600"
- config BR2_arm610
- bool "arm610"
-+config BR2_arm620
-+ bool "arm620"
- config BR2_arm710
- bool "arm710"
-+config BR2_arm7tdmi
-+ bool "arm7tdmi"
-+config BR2_arm710t
-+ bool "arm710t"
- config BR2_arm720t
- bool "arm720t"
-+config BR2_arm740t
-+ bool "arm740t"
- config BR2_arm920t
- bool "arm920t"
+Index: buildroot/target/Config.in.arch
+===================================================================
+--- buildroot.orig/target/Config.in.arch 2008-11-03 09:15:12.000000000 +0100
++++ buildroot/target/Config.in.arch 2010-06-03 17:39:10.000000000 +0200
+@@ -13,7 +13,6 @@
+ config BR2_avr32
+ bool "avr32"
+ select BR2_SOFT_FLOAT
+-
+ config BR2_cris
+ bool "cris"
+ config BR2_ia64
+@@ -72,7 +71,7 @@
config BR2_arm922t
bool "arm922t"
config BR2_arm926t
- bool "arm926t"
-+config BR2_arm926ej_s
-+ bool "arm926ej-s"
+- bool "arm926t"
++ bool "arm926ej-s (arm926t)"
config BR2_arm10t
bool "arm10t"
config BR2_arm1136jf_s
-@@ -94,13 +104,18 @@ endchoice
- config BR2_ARM_TYPE
- string
- default GENERIC_ARM if BR2_generic_arm
-+ default ARM600 if BR2_arm600
- default ARM610 if BR2_arm610
-+ default ARM620 if BR2_arm620
- default ARM710 if BR2_arm710
- default ARM7TDMI if BR2_arm7tdmi
-+ default ARM710T if BR2_arm710t
- default ARM720T if BR2_arm720t
-+ default ARM720T if BR2_arm740t
- default ARM920T if BR2_arm920t
- default ARM922T if BR2_arm922t
- default ARM926T if BR2_arm926t
-+ default ARM926EJ_S if BR2_arm926ej_s
- default ARM10T if BR2_arm10t
- default ARM1136JF_S if BR2_arm1136jf_s
- default ARM1176JZ_S if BR2_arm1176jz_s
-@@ -569,13 +584,17 @@ config BR2_GCC_TARGET_TUNE
- default arm600 if BR2_arm600
- default arm610 if BR2_arm610
- default arm620 if BR2_arm620
-+ default arm710 if BR2_arm710
- default arm7tdmi if BR2_arm7tdmi
-+ default arm7tdmi if BR2_arm710t
- default arm7tdmi if BR2_arm720t
- default arm7tdmi if BR2_arm740t
+@@ -81,6 +80,9 @@
+ bool "arm1176jz-s"
+ config BR2_arm1176jzf_s
+ bool "arm1176jzf-s"
++comment "cortex-A8 needs gcc >= 4.4.x"
++config BR2_cortex_a8
++ bool "cortex-A8"
+ config BR2_sa110
+ bool "sa110"
+ config BR2_sa1100
+@@ -109,18 +111,22 @@
+ default ARM_SA1100 if BR2_sa1100
+ default ARM_XSCALE if BR2_xscale
+ default ARM_IWMMXT if BR2_iwmmxt
++ default ARM_CORTEXA8 if BR2_cortex_a8
+
+ choice
+ prompt "Target ABI"
+ depends on BR2_arm || BR2_armeb
+- default BR2_ARM_OABI
++ default BR2_ARM_EABI
+ help
+ Application Binary Interface to use
+
+-config BR2_ARM_OABI
+- bool "OABI"
++ Note:
++ Using OABI is discouraged.
++
+ config BR2_ARM_EABI
+ bool "EABI"
++config BR2_ARM_OABI
++ bool "OABI"
+ endchoice
+
+ choice
+@@ -575,11 +581,13 @@
default arm920 if BR2_arm920
-- default arm920t if BR2_arm920t
-- default arm922t if BR2_arm922t
-+ default arm920t if BR2_arm920t
-+ default arm922t if BR2_arm922t
- default arm9tdmi if BR2_arm926t
-+ default arm926ej-s if BR2_arm926ej_s
+ default arm920t if BR2_arm920t
+ default arm922t if BR2_arm922t
+- default arm9tdmi if BR2_arm926t
++ default arm926ej-s if BR2_arm926t
+ default arm10tdmi if BR2_arm10t
default arm1136j-s if BR2_arm1136j_s
default arm1136jf-s if BR2_arm1136jf_s
default arm1176jz-s if BR2_arm1176jz_s
-@@ -686,6 +705,26 @@ config BR2_GCC_TARGET_ARCH
+ default arm1176jzf-s if BR2_arm1176jzf_s
++ default cortex-a8 if BR2_cortex_a8
+ default strongarm110 if BR2_sa110
+ default strongarm1100 if BR2_sa1100
+ default xscale if BR2_xscale
+@@ -686,6 +694,21 @@
default winchip2 if BR2_x86_winchip2
default c3 if BR2_x86_c3
default geode if BR2_x86_geode
-+ default armv3 if BR2_arm600
++ default armv4t if BR2_arm7tdmi
+ default armv3 if BR2_arm610
-+ default armv3 if BR2_arm620
+ default armv3 if BR2_arm710
-+ default armv4t if BR2_arm7tdmi
+ default armv4t if BR2_arm720t
-+ default armv4t if BR2_arm740t
-+ default armv4 if BR2_arm920
-+ default armv4t if BR2_arm920t
++ default armv4t if BR2_arm920t
+ default armv4t if BR2_arm922t
-+ default armv5te if BR2_arm926t
-+ default armv5te if BR2_arm926ej_s
++ default armv5te if BR2_arm926t
+ default armv5t if BR2_arm10t
-+ default armv6j if BR2_arm1136j_s
+ default armv6j if BR2_arm1136jf_s
-+ default armv6z if BR2_arm1176jz_s
-+ default armv6z if BR2_arm1176jzf_s
++ default armv6zk if BR2_arm1176jz_s
++ default armv6zk if BR2_arm1176jzf_s
++ default armv7-a if BR2_cortex_a8
+ default armv4 if BR2_sa110
+ default armv4 if BR2_sa1100
-+ default armv5te if BR2_xscale
++ default armv5te if BR2_xscale
default iwmmxt if BR2_iwmmxt
default v0 if BR2_cris_unknown
default v10 if BR2_cris_generic
---- buildroot/project/Makefile.in.ref 2008-11-21 09:15:04.000000000 +0100
-+++ buildroot/project/Makefile.in 2008-11-23 23:10:32.000000000 +0100
-@@ -11,6 +11,8 @@ QUIET:=$(if $(findstring s,$(MAKEFLAGS))
+@@ -706,11 +729,10 @@
+
+ config BR2_GCC_TARGET_ABI
+ string
+- default apcs-gnu if BR2_arm_dunno
++ default apcs-gnu if BR2_ARM_OABI
+ default atpcs if BR2_arm_dunno
+ default aapcs if BR2_arm_dunno
+- default aapcs-linux if BR2_arm_dunno
+- default iwmmxt if BR2_iwmmxt
++ default aapcs-linux if BR2_ARM_EABI
+ default 32 if BR2_MIPS_OABI32
+ default n32 if BR2_MIPS_ABI32
+ default eabi if BR2_MIPS_EABI
+Index: buildroot/project/Makefile.in
+===================================================================
+--- buildroot.orig/project/Makefile.in 2008-11-03 09:15:03.000000000 +0100
++++ buildroot/project/Makefile.in 2010-06-03 17:05:17.000000000 +0200
+@@ -11,6 +11,8 @@
# Strip off the annoying quoting
ARCH:=$(strip $(subst ",, $(BR2_ARCH)))
#"))
@@ -112,7 +123,7 @@ Can be removed when updating to 2010.02 Buildroot.
WGET:=$(strip $(subst ",, $(BR2_WGET))) $(SPIDER) $(QUIET)
#"))
SVN_CO:=$(strip $(subst ",, $(BR2_SVN_CO))) $(QUIET)
-@@ -60,7 +62,12 @@ DL_DIR:=$(BASE_DIR)/dl
+@@ -60,7 +62,12 @@
endif
# All non-configurable packages should be built in BUILD_DIR
@@ -125,7 +136,7 @@ Can be removed when updating to 2010.02 Buildroot.
GNU_TARGET_SUFFIX:=-$(strip $(subst ",, $(BR2_GNU_TARGET_SUFFIX)))
#"))
-@@ -70,7 +77,11 @@ STAGING_DIR:=$(strip $(subst ",, $(BR2_S
+@@ -70,7 +77,11 @@
# All configurable packages (like Busybox,Linux etc) should be built
# in PROJECT_BUILD_DIR
@@ -137,9 +148,11 @@ Can be removed when updating to 2010.02 Buildroot.
BINARIES_DIR:=$(BASE_DIR)/binaries/$(PROJECT)
TARGET_DIR:=$(PROJECT_BUILD_DIR)/root
---- buildroot/package/Makefile.in.ref 2008-11-03 09:15:31.000000000 +0100
-+++ buildroot/package/Makefile.in 2008-11-24 21:02:43.000000000 +0100
-@@ -110,7 +110,11 @@ COND_ARCH_FPU_SUFFIX:=
+Index: buildroot/package/Makefile.in
+===================================================================
+--- buildroot.orig/package/Makefile.in 2008-11-03 09:15:31.000000000 +0100
++++ buildroot/package/Makefile.in 2010-06-03 15:29:24.000000000 +0200
+@@ -110,7 +110,11 @@
endif
ifeq ($(BR2_TOOLCHAIN_SOURCE),y)
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2010-06-03 15:47:26
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 34c7c2ddbe769c3cfd041e782f6d8bee1f7f59bb (commit)
via 722ddfd1db7938a18cf26036e4b1c9f033a2d036 (commit)
via 92b802738699d0df30d0f1cc78e748cb37796f64 (commit)
via 85879ff87b4be857cd6f2bda99ba8a33d5b49932 (commit)
from a2a46d3af3ae68e818466187cf83990fb096440c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 34c7c2ddbe769c3cfd041e782f6d8bee1f7f59bb
Merge: 722ddfd1db7938a18cf26036e4b1c9f033a2d036 a2a46d3af3ae68e818466187cf83990fb096440c
Author: Fabien Marteau <fab...@ar...>
Date: Thu Jun 3 17:46:46 2010 +0200
Merge branch 'master' of git://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 722ddfd1db7938a18cf26036e4b1c9f033a2d036
Author: Fabien Marteau <fab...@ar...>
Date: Thu Jun 3 17:46:23 2010 +0200
[as_devices] adding timeout for blocking read
commit 92b802738699d0df30d0f1cc78e748cb37796f64
Author: Fabien Marteau <fab...@ar...>
Date: Thu Jun 3 17:44:38 2010 +0200
[kernel] adding poll capability in gpio driver (for select() )
commit 85879ff87b4be857cd6f2bda99ba8a33d5b49932
Author: Fabien Marteau <fab...@ar...>
Date: Thu Jun 3 11:52:41 2010 +0200
[kernel] Adding interrupt status read/write capability on gpio driver
-----------------------------------------------------------------------
Summary of changes:
target/linux/modules/gpio/core.c | 48 ++++++++++-
target/linux/modules/gpio/core.h | 9 ++-
target/packages/as_devices/c/as_gpio.c | 141 +++++++++++++++++++++-----------
target/packages/as_devices/c/as_gpio.h | 8 ++-
target/packages/as_devices/test_c.h | 4 +-
5 files changed, 150 insertions(+), 60 deletions(-)
diff --git a/target/linux/modules/gpio/core.c b/target/linux/modules/gpio/core.c
index b07c7ef..6296a0a 100755
--- a/target/linux/modules/gpio/core.c
+++ b/target/linux/modules/gpio/core.c
@@ -35,6 +35,7 @@
#include <linux/cdev.h> /* struct cdev */
#include <mach/hardware.h>
#include <asm/mach/map.h>
+#include <linux/poll.h>
#ifdef CONFIG_ARCH_MX2
#include <mach/iomux-mx1-mx2.h>
#endif
@@ -390,9 +391,20 @@ static unsigned int get_port_mode(unsigned int aPort)
return value;
}
+
+static unsigned int get_port_isr(unsigned int aPort)
+{
+ return __raw_readl(VA_GPIO_BASE + MXC_ISR(aPort));
+}
+
+static void set_port_isr(unsigned int aPort, unsigned int aIsr)
+{
+ __raw_writel(aIsr & 0xffffffff, VA_GPIO_BASE + MXC_ISR(aPort));
+}
+
static unsigned int get_port_pull_up(unsigned int aPort)
{
- return __raw_readl(VA_GPIO_BASE + MXC_PUEN(aPort));
+ return __raw_readl(VA_GPIO_BASE + MXC_PUEN(aPort));
}
static void set_port_pullup(unsigned int aPort, unsigned int aPullMask)
@@ -538,7 +550,6 @@ static irqreturn_t armadeus_gpio_interrupt(int irq, void *dev_id)
return IRQ_HANDLED;
}
-/* Handles open() done on /dev/gpioxx */
static int armadeus_gpio_dev_open(struct inode *inode, struct file *file)
{
unsigned minor = MINOR(inode->i_rdev);
@@ -764,6 +775,18 @@ int armadeus_gpio_dev_ioctl(struct inode *inode, struct file *filp,
}
break;
+ case GPIORDISR:
+ value = get_port_isr(MAX_MINOR - minor);
+ ret = __put_user(value, (unsigned int *)arg);
+ break;
+
+ case GPIOWRISR:
+ ret = __get_user(value, (unsigned int *)arg);
+ if (ret == 0) {
+ set_port_isr(MAX_MINOR - minor, value);
+ }
+ break;
+
default:
printk("IOCTL not supported\n");
ret = -ENOTTY;
@@ -776,13 +799,29 @@ out:
return ret;
}
-static int armadeus_gpio_fasync(int fd, struct file* filp, int on)
+static int armadeus_gpio_dev_fasync(int fd, struct file* filp, int on)
{
struct gpio_item* gpio = filp->private_data;
return fasync_helper(fd, filp, on, &(gpio->async_queue));
}
+static unsigned int armadeus_gpio_dev_poll(struct file *filp, poll_table *wait)
+{
+ struct gpio_item *gpio = filp->private_data;
+ unsigned int mask = 0;
+
+ spin_lock_irq(&gpio->lock);
+
+ poll_wait(filp, &gpio->change_wq, wait);
+ if (gpio->changed)
+ {
+ mask |= (POLLIN | POLLRDNORM);
+ }
+ spin_unlock_irq(&gpio->lock);
+ return mask;
+}
+
static struct file_operations gpio_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
@@ -791,7 +830,8 @@ static struct file_operations gpio_fops = {
.open = armadeus_gpio_dev_open,
.release = armadeus_gpio_dev_release,
.ioctl = armadeus_gpio_dev_ioctl,
- .fasync = armadeus_gpio_fasync,
+ .fasync = armadeus_gpio_dev_fasync,
+ .poll = armadeus_gpio_dev_poll,
};
diff --git a/target/linux/modules/gpio/core.h b/target/linux/modules/gpio/core.h
index 9307e45..7262961 100755
--- a/target/linux/modules/gpio/core.h
+++ b/target/linux/modules/gpio/core.h
@@ -38,12 +38,15 @@
#define GPIOWRMODE _IOW(PP_IOCTL, 0xF5, int)
#define GPIORDPULLUP _IOR(PP_IOCTL, 0xF6, int)
-#define GPIOWRPULLUP _IOR(PP_IOCTL, 0xF7, int)
+#define GPIOWRPULLUP _IOW(PP_IOCTL, 0xF7, int)
#define GPIORDIRQMODE_H _IOR(PP_IOCTL, 0xF8, int)
#define GPIORDIRQMODE_L _IOR(PP_IOCTL, 0xF9, int)
-#define GPIOWRIRQMODE_H _IOR(PP_IOCTL, 0xFA, int)
-#define GPIOWRIRQMODE_L _IOR(PP_IOCTL, 0xFB, int)
+#define GPIOWRIRQMODE_H _IOW(PP_IOCTL, 0xFA, int)
+#define GPIOWRIRQMODE_L _IOW(PP_IOCTL, 0xFB, int)
+
+#define GPIORDISR _IOR(PP_IOCTL, 0xFC, int)
+#define GPIOWRISR _IOW(PP_IOCTL, 0xFD, int)
/* Pretend we're PPDEV for IOCTL */
#include <linux/ppdev.h>
diff --git a/target/packages/as_devices/c/as_gpio.c b/target/packages/as_devices/c/as_gpio.c
index 737af96..eef3f1e 100644
--- a/target/packages/as_devices/c/as_gpio.c
+++ b/target/packages/as_devices/c/as_gpio.c
@@ -1,23 +1,23 @@
/*
-** The ARMadeus Project
-**
-** Copyright (C) 2009-2010 The armadeus systems team
-** Fabien Marteau <fab...@ar...>
-**
-** 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+ ** The ARMadeus Project
+ **
+ ** Copyright (C) 2009-2010 The armadeus systems team
+ ** Fabien Marteau <fab...@ar...>
+ **
+ ** 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
#include "as_gpio.h"
@@ -25,6 +25,7 @@
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h> /* for close() */
+#include <sys/select.h>
#include <sys/ioctl.h>
#include <linux/ppdev.h>
@@ -38,12 +39,15 @@
#define GPIOWRMODE _IOW(PP_IOCTL, 0xF5, int)
#define GPIORDPULLUP _IOR(PP_IOCTL, 0xF6, int)
-#define GPIOWRPULLUP _IOR(PP_IOCTL, 0xF7, int)
+#define GPIOWRPULLUP _IOW(PP_IOCTL, 0xF7, int)
#define GPIORDIRQMODE_H _IOR(PP_IOCTL, 0xF8, int)
#define GPIORDIRQMODE_L _IOR(PP_IOCTL, 0xF9, int)
-#define GPIOWRIRQMODE_H _IOR(PP_IOCTL, 0xFA, int)
-#define GPIOWRIRQMODE_L _IOR(PP_IOCTL, 0xFB, int)
+#define GPIOWRIRQMODE_H _IOW(PP_IOCTL, 0xFA, int)
+#define GPIOWRIRQMODE_L _IOW(PP_IOCTL, 0xFB, int)
+
+#define GPIORDISR _IOR(PP_IOCTL, 0xFC, int)
+#define GPIOWRISR _IOW(PP_IOCTL, 0xFD, int)
#define GPIO_BASE_PORT ("/dev/gpio/port")
#define GPIO_BASE_PIN ("/dev/gpio/P")
@@ -67,8 +71,7 @@
/*------------------------------------------------------------------------------*/
-struct as_gpio_device *
-as_gpio_open(char aPortChar)
+struct as_gpio_device *as_gpio_open(char aPortChar)
{
struct as_gpio_device *dev;
char gpio_file_path[50];
@@ -83,7 +86,7 @@ as_gpio_open(char aPortChar)
/* make gpio port string path */
ret = snprintf(gpio_file_path,50, "%s%c",
- GPIO_BASE_PORT, aPortChar);
+ GPIO_BASE_PORT, aPortChar);
if (ret < 0) {
ERROR("Can't forge gpio port path\n");
return NULL;
@@ -116,10 +119,9 @@ as_gpio_open(char aPortChar)
/*------------------------------------------------------------------------------*/
-int32_t
-as_gpio_set_pin_direction(struct as_gpio_device *aDev,
- int aPinNum,
- int aDirection)
+int32_t as_gpio_set_pin_direction(struct as_gpio_device *aDev,
+ int aPinNum,
+ int aDirection)
{
int ret=0;
int portval;
@@ -162,10 +164,9 @@ as_gpio_set_pin_direction(struct as_gpio_device *aDev,
/*------------------------------------------------------------------------------*/
-int32_t
-as_gpio_set_pin_value(struct as_gpio_device *aDev,
- int aPinNum,
- int aValue)
+int32_t as_gpio_set_pin_value(struct as_gpio_device *aDev,
+ int aPinNum,
+ int aValue)
{
int ret=0;
int portval;
@@ -214,15 +215,22 @@ int32_t as_gpio_get_pin_value(struct as_gpio_device *aDev,
/*------------------------------------------------------------------------------*/
int32_t as_gpio_blocking_get_pin_value(struct as_gpio_device *aDev,
- int aPinNum)
+ int aPinNum,
+ int aDelay_s,
+ int aDelay_us)
{
int ret;
char value;
+ fd_set rfds;
+ struct timeval tv;
+ int retval;
+
+
if (aPinNum >= PORT_SIZE )
{
ERROR("Pin num %d upper than port size (%d)\n", aPinNum, PORT_SIZE);
- return -1; /* aPinNum wrong */
+ return -1;
}
if (aPinNum < 0 )
{
@@ -236,17 +244,32 @@ int32_t as_gpio_blocking_get_pin_value(struct as_gpio_device *aDev,
return -1;
}
- ret = read(aDev->fpin[aPinNum], &value, 1);
- if (ret < 0)
+ FD_ZERO(&rfds);
+ FD_SET(aDev->fpin[aPinNum], &rfds);
+
+ tv.tv_sec = aDelay_s;
+ tv.tv_usec = aDelay_us;
+
+ /* flush the file */
+ retval = select(aDev->fpin[aPinNum]+1, &rfds, NULL, NULL, &tv);
+ if (retval > 0)
{
- ERROR("can't read pin %d value \n",aPinNum);
- return ret;
+ printf("DEBUG: read value\n");
+ ret = read(aDev->fpin[aPinNum], &value, 1);
+ if (ret < 0)
+ {
+ ERROR("Can't read pin value\n");
+ return -1;
+ }
+ if (value != 0)
+ return 1;
+ else return 0;
+ } else if (retval == 0) {
+ return -10;
+ } else {
+ return -1;
}
- if (value != 0)
- return 1;
- else return 0;
-
}
/*------------------------------------------------------------------------------*/
@@ -350,6 +373,11 @@ int32_t as_gpio_set_irq_mode(struct as_gpio_device *aDev,
int portval;
char buffer[BUFF_SIZE];
+ fd_set rfds;
+ struct timeval tv;
+ int retval;
+
+
/* check mode value */
if (aMode > 3)
{
@@ -361,7 +389,7 @@ int32_t as_gpio_set_irq_mode(struct as_gpio_device *aDev,
if (aPinNum >= PORT_SIZE)
{
ERROR("Pin num %d upper than port size (%d)\n", aPinNum, PORT_SIZE);
- return -1;
+ return -2;
}
/* close fpin file */
@@ -388,7 +416,7 @@ int32_t as_gpio_set_irq_mode(struct as_gpio_device *aDev,
return ret;
}
-} else {
+ } else {
ret = ioctl(aDev->fdev, GPIORDIRQMODE_H, &portval);
if (ret < 0) {
@@ -406,11 +434,11 @@ int32_t as_gpio_set_irq_mode(struct as_gpio_device *aDev,
}
}
- /* open fpin file */
if ((aMode != GPIO_IRQ_MODE_NOINT) && (aDev->fpin[aPinNum] == -1))
{
+ /* open fpin file */
ret = snprintf(buffer, BUFF_SIZE, "%s%c%d",
- GPIO_BASE_PIN, aDev->port_letter, aPinNum);
+ GPIO_BASE_PIN, aDev->port_letter, aPinNum);
if (ret < 0)
{
ERROR("Can't forge fpin path\n");
@@ -424,6 +452,22 @@ int32_t as_gpio_set_irq_mode(struct as_gpio_device *aDev,
return ret;
}
aDev->fpin[aPinNum] = ret;
+
+ }
+
+
+ FD_ZERO(&rfds);
+ FD_SET(aDev->fpin[aPinNum], &rfds);
+
+ tv.tv_sec = 0;
+ tv.tv_usec = 1;
+
+
+ /* flush the file */
+ retval = select(aDev->fpin[aPinNum]+1, &rfds, NULL, NULL, &tv);
+ if (retval)
+ {
+ read(aDev->fpin[aPinNum], buffer, BUFF_SIZE);
}
aDev->irq_mode[aPinNum] = aMode;
@@ -432,8 +476,7 @@ int32_t as_gpio_set_irq_mode(struct as_gpio_device *aDev,
/*------------------------------------------------------------------------------*/
-int32_t
-as_gpio_close(struct as_gpio_device *aDev)
+int32_t as_gpio_close(struct as_gpio_device *aDev)
{
int i;
close(aDev->fdev);
diff --git a/target/packages/as_devices/c/as_gpio.h b/target/packages/as_devices/c/as_gpio.h
index edda56b..d644511 100644
--- a/target/packages/as_devices/c/as_gpio.h
+++ b/target/packages/as_devices/c/as_gpio.h
@@ -93,11 +93,15 @@ int32_t as_gpio_get_pin_value(struct as_gpio_device *aDev,
*
* @param aDev as_gpio_device pointer structure
* @param aPinNum pin number
+ * @param aDelay_s waiting delay in seconds
+ * @param aDelay_us waiting delay in useconds (plus delay in seconds)
*
- * @return pin value if positive or null, error if negative
+ * @return pin value if positive or null, read error if -1, timeout if -10
*/
int32_t as_gpio_blocking_get_pin_value(struct as_gpio_device *aDev,
- int aPinNum);
+ int aPinNum,
+ int aDelay_s,
+ int aDelay_us);
/** @brief Get pin pull-up value
*
diff --git a/target/packages/as_devices/test_c.h b/target/packages/as_devices/test_c.h
index b763ed6..04fa50c 100644
--- a/target/packages/as_devices/test_c.h
+++ b/target/packages/as_devices/test_c.h
@@ -437,7 +437,7 @@ void test_gpio()
char c_value;
int32_t value;
char port_letter = 'F';
- int pin_num = 14;
+ int pin_num = 13;
int port_direction = 0;
int port_value = 1;
int pullup=1;
@@ -621,7 +621,7 @@ void test_gpio()
pressEnterToContinue();
break;
case 'a' : printf("Blocking read \n");
- ret = as_gpio_blocking_get_pin_value(gpio_dev, pin_num);
+ ret = as_gpio_blocking_get_pin_value(gpio_dev, pin_num, 10, 0);
if (ret < 0)
{
printf("Error, can't read value\n");
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2010-06-02 13:32:22
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via a2a46d3af3ae68e818466187cf83990fb096440c (commit)
via 43f5af3cc3460a26a9a4dee44702c949e18fa22c (commit)
via 999c005f09ba8c688b7a6fd39a081c7112b8bf18 (commit)
from 01cdde8afaf246b8e9f6cce2eb37ad450730dad4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a2a46d3af3ae68e818466187cf83990fb096440c
Merge: 43f5af3cc3460a26a9a4dee44702c949e18fa22c 01cdde8afaf246b8e9f6cce2eb37ad450730dad4
Author: Julien Boibessot <jul...@ar...>
Date: Wed Jun 2 15:31:43 2010 +0200
Merge branch 'master' of ssh://artemys@armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 43f5af3cc3460a26a9a4dee44702c949e18fa22c
Author: Julien Boibessot <jul...@ar...>
Date: Wed Jun 2 15:31:17 2010 +0200
[BUILDROOT] Updates default configs
commit 999c005f09ba8c688b7a6fd39a081c7112b8bf18
Author: Julien Boibessot <jul...@ar...>
Date: Wed Jun 2 15:30:03 2010 +0200
[BUILDROOT] uClibc: takes errno from kernel instead of redefining them
-----------------------------------------------------------------------
Summary of changes:
buildroot/configs/apf27_defconfig | 6 +-
buildroot/configs/apf9328_defconfig | 6 +-
buildroot/local/apf27_test/apf27_test.config | 6 +-
buildroot/local/apf9328_test/apf9328_test.config | 6 +-
.../target/device/armadeus/apf27/apf27_defconfig | 5 +-
.../device/armadeus/apf9328/apf9328_defconfig | 5 +-
...z-003-include_errno_h_from_kernel_headers.patch | 583 ++++++++++++++++++++
7 files changed, 605 insertions(+), 12 deletions(-)
create mode 100644 buildroot/toolchain/uClibc/uClibc-0.9.29-z-003-include_errno_h_from_kernel_headers.patch
diff --git a/buildroot/configs/apf27_defconfig b/buildroot/configs/apf27_defconfig
index 1edd944..2d12fe9 100644
--- a/buildroot/configs/apf27_defconfig
+++ b/buildroot/configs/apf27_defconfig
@@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
-# Fri Apr 30 09:57:54 2010
+# Tue Jun 1 17:51:37 2010
#
BR2_HAVE_DOT_CONFIG=y
BR2_VERSION="2010.02-rc1"
@@ -304,9 +304,11 @@ BR2_HOST_FAKEROOT=y
# Armadeus specific packages
#
# BR2_PACKAGE_UUCP is not set
+# BR2_PACKAGE_LIBDNET is not set
+# BR2_PACKAGE_BLUEZ_LIBS is not set
#
-# bluez not available (need dbus)
+# bluez-utils not available (need dbus)
#
# BR2_PACKAGE_MESALIB is not set
# BR2_PACKAGE_FBTEST is not set
diff --git a/buildroot/configs/apf9328_defconfig b/buildroot/configs/apf9328_defconfig
index 3aee04a..4c63edd 100644
--- a/buildroot/configs/apf9328_defconfig
+++ b/buildroot/configs/apf9328_defconfig
@@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
-# Fri Apr 30 09:57:54 2010
+# Tue Jun 1 17:51:37 2010
#
BR2_HAVE_DOT_CONFIG=y
BR2_VERSION="2010.02"
@@ -301,9 +301,11 @@ BR2_HOST_FAKEROOT=y
# Armadeus specific packages
#
# BR2_PACKAGE_UUCP is not set
+# BR2_PACKAGE_LIBDNET is not set
+# BR2_PACKAGE_BLUEZ_LIBS is not set
#
-# bluez not available (need dbus)
+# bluez-utils not available (need dbus)
#
# BR2_PACKAGE_MESALIB is not set
# BR2_PACKAGE_FBTEST is not set
diff --git a/buildroot/local/apf27_test/apf27_test.config b/buildroot/local/apf27_test/apf27_test.config
index dfb67f0..0db703c 100644
--- a/buildroot/local/apf27_test/apf27_test.config
+++ b/buildroot/local/apf27_test/apf27_test.config
@@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
-# Fri Apr 23 16:15:36 2010
+# Tue Jun 1 17:51:37 2010
#
BR2_HAVE_DOT_CONFIG=y
BR2_VERSION="0.10.0-svn"
@@ -329,10 +329,12 @@ BR2_READLINE=y
#
# Armadeus specific packages
#
+# BR2_PACKAGE_UUCP is not set
# BR2_PACKAGE_LIBDNET is not set
+# BR2_PACKAGE_BLUEZ_LIBS is not set
#
-# bluez not available (need dbus)
+# bluez-utils not available (need dbus)
#
# BR2_PACKAGE_MESALIB is not set
BR2_PACKAGE_FBTEST=y
diff --git a/buildroot/local/apf9328_test/apf9328_test.config b/buildroot/local/apf9328_test/apf9328_test.config
index 4cd8c46..b088e8e 100644
--- a/buildroot/local/apf9328_test/apf9328_test.config
+++ b/buildroot/local/apf9328_test/apf9328_test.config
@@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
-# Fri Apr 23 16:43:36 2010
+# Tue Jun 1 17:51:37 2010
#
BR2_HAVE_DOT_CONFIG=y
BR2_VERSION="0.10.0-svn"
@@ -327,10 +327,12 @@ BR2_READLINE=y
#
# Armadeus specific packages
#
+# BR2_PACKAGE_UUCP is not set
# BR2_PACKAGE_LIBDNET is not set
+# BR2_PACKAGE_BLUEZ_LIBS is not set
#
-# bluez not available (need dbus)
+# bluez-utils not available (need dbus)
#
# BR2_PACKAGE_MESALIB is not set
BR2_PACKAGE_FBTEST=y
diff --git a/buildroot/target/device/armadeus/apf27/apf27_defconfig b/buildroot/target/device/armadeus/apf27/apf27_defconfig
index 4078a18..efa07aa 100644
--- a/buildroot/target/device/armadeus/apf27/apf27_defconfig
+++ b/buildroot/target/device/armadeus/apf27/apf27_defconfig
@@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
-# Mon May 3 15:55:29 2010
+# Tue Jun 1 17:51:37 2010
#
BR2_HAVE_DOT_CONFIG=y
BR2_VERSION="0.10.0-svn"
@@ -331,9 +331,10 @@ BR2_PACKAGE_PKGCONFIG=y
#
# BR2_PACKAGE_UUCP is not set
# BR2_PACKAGE_LIBDNET is not set
+# BR2_PACKAGE_BLUEZ_LIBS is not set
#
-# bluez not available (need dbus)
+# bluez-utils not available (need dbus)
#
# BR2_PACKAGE_MESALIB is not set
diff --git a/buildroot/target/device/armadeus/apf9328/apf9328_defconfig b/buildroot/target/device/armadeus/apf9328/apf9328_defconfig
index 1d75fb7..e7b79aa 100644
--- a/buildroot/target/device/armadeus/apf9328/apf9328_defconfig
+++ b/buildroot/target/device/armadeus/apf9328/apf9328_defconfig
@@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
-# Fri Apr 30 09:57:54 2010
+# Tue Jun 1 17:51:37 2010
#
BR2_HAVE_DOT_CONFIG=y
BR2_VERSION="0.10.0-svn"
@@ -327,9 +327,10 @@ BR2_PACKAGE_PKGCONFIG=y
#
# BR2_PACKAGE_UUCP is not set
# BR2_PACKAGE_LIBDNET is not set
+# BR2_PACKAGE_BLUEZ_LIBS is not set
#
-# bluez not available (need dbus)
+# bluez-utils not available (need dbus)
#
# BR2_PACKAGE_MESALIB is not set
diff --git a/buildroot/toolchain/uClibc/uClibc-0.9.29-z-003-include_errno_h_from_kernel_headers.patch b/buildroot/toolchain/uClibc/uClibc-0.9.29-z-003-include_errno_h_from_kernel_headers.patch
new file mode 100644
index 0000000..bbd0e85
--- /dev/null
+++ b/buildroot/toolchain/uClibc/uClibc-0.9.29-z-003-include_errno_h_from_kernel_headers.patch
@@ -0,0 +1,583 @@
+From 388e096fa68a1bb6186efb653e9538e12961d442 Mon Sep 17 00:00:00 2001
+From: Carmelo Amoroso <car...@st...>
+Date: Wed, 02 Jul 2008 16:26:23 +0000
+Subject: Include errno.h from kernel headers instead of using internal errno_values.h
+
+otherwie some errno will be missed (i.e. ENOKEY used in libusb)
+
+Signed-off-by: Carmelo Amoroso <car...@st...>
+---
+diff --git a/libc/sysdeps/linux/alpha/bits/errno_values.h b/libc/sysdeps/linux/alpha/bits/errno_values.h
+deleted file mode 100644
+index e8bad17..0000000
+--- a/libc/sysdeps/linux/alpha/bits/errno_values.h
++++ b/dev/null
+@@ -1,129 +0,0 @@
+-#ifndef _BITS_ERRNO_VALUES_H
+-#define _BITS_ERRNO_VALUES_H
+-
+-#define EPERM 1 /* Operation not permitted */
+-#define ENOENT 2 /* No such file or directory */
+-#define ESRCH 3 /* No such process */
+-#define EINTR 4 /* Interrupted system call */
+-#define EIO 5 /* I/O error */
+-#define ENXIO 6 /* No such device or address */
+-#define E2BIG 7 /* Arg list too long */
+-#define ENOEXEC 8 /* Exec format error */
+-#define EBADF 9 /* Bad file number */
+-#define ECHILD 10 /* No child processes */
+-#define EDEADLK 11 /* Resource deadlock would occur */
+-#define ENOMEM 12 /* Out of memory */
+-#define EACCES 13 /* Permission denied */
+-#define EFAULT 14 /* Bad address */
+-#define ENOTBLK 15 /* Block device required */
+-#define EBUSY 16 /* Device or resource busy */
+-#define EEXIST 17 /* File exists */
+-#define EXDEV 18 /* Cross-device link */
+-#define ENODEV 19 /* No such device */
+-#define ENOTDIR 20 /* Not a directory */
+-#define EISDIR 21 /* Is a directory */
+-#define EINVAL 22 /* Invalid argument */
+-#define ENFILE 23 /* File table overflow */
+-#define EMFILE 24 /* Too many open files */
+-#define ENOTTY 25 /* Not a typewriter */
+-#define ETXTBSY 26 /* Text file busy */
+-#define EFBIG 27 /* File too large */
+-#define ENOSPC 28 /* No space left on device */
+-#define ESPIPE 29 /* Illegal seek */
+-#define EROFS 30 /* Read-only file system */
+-#define EMLINK 31 /* Too many links */
+-#define EPIPE 32 /* Broken pipe */
+-#define EDOM 33 /* Math argument out of domain of func */
+-#define ERANGE 34 /* Math result not representable */
+-#define EAGAIN 35 /* Try again */
+-#define EWOULDBLOCK EAGAIN /* Operation would block */
+-#define EINPROGRESS 36 /* Operation now in progress */
+-#define EALREADY 37 /* Operation already in progress */
+-#define ENOTSOCK 38 /* Socket operation on non-socket */
+-#define EDESTADDRREQ 39 /* Destination address required */
+-#define EMSGSIZE 40 /* Message too long */
+-#define EPROTOTYPE 41 /* Protocol wrong type for socket */
+-#define ENOPROTOOPT 42 /* Protocol not available */
+-#define EPROTONOSUPPORT 43 /* Protocol not supported */
+-#define ESOCKTNOSUPPORT 44 /* Socket type not supported */
+-#define EOPNOTSUPP 45 /* Operation not supported on transport endpoint */
+-#define EPFNOSUPPORT 46 /* Protocol family not supported */
+-#define EAFNOSUPPORT 47 /* Address family not supported by protocol */
+-#define EADDRINUSE 48 /* Address already in use */
+-#define EADDRNOTAVAIL 49 /* Cannot assign requested address */
+-#define ENETDOWN 50 /* Network is down */
+-#define ENETUNREACH 51 /* Network is unreachable */
+-#define ENETRESET 52 /* Network dropped connection because of reset */
+-#define ECONNABORTED 53 /* Software caused connection abort */
+-#define ECONNRESET 54 /* Connection reset by peer */
+-#define ENOBUFS 55 /* No buffer space available */
+-#define EISCONN 56 /* Transport endpoint is already connected */
+-#define ENOTCONN 57 /* Transport endpoint is not connected */
+-#define ESHUTDOWN 58 /* Cannot send after transport endpoint shutdown */
+-#define ETOOMANYREFS 59 /* Too many references: cannot splice */
+-#define ETIMEDOUT 60 /* Connection timed out */
+-#define ECONNREFUSED 61 /* Connection refused */
+-#define ELOOP 62 /* Too many symbolic links encountered */
+-#define ENAMETOOLONG 63 /* File name too long */
+-#define EHOSTDOWN 64 /* Host is down */
+-#define EHOSTUNREACH 65 /* No route to host */
+-#define ENOTEMPTY 66 /* Directory not empty */
+-#define EUSERS 68 /* Too many users */
+-#define EDQUOT 69 /* Quota exceeded */
+-#define ESTALE 70 /* Stale NFS file handle */
+-#define EREMOTE 71 /* Object is remote */
+-#define ENOLCK 77 /* No record locks available */
+-#define ENOSYS 78 /* Function not implemented */
+-#define ENOMSG 80 /* No message of desired type */
+-#define EIDRM 81 /* Identifier removed */
+-#define ENOSR 82 /* Out of streams resources */
+-#define ETIME 83 /* Timer expired */
+-#define EBADMSG 84 /* Not a data message */
+-#define EPROTO 85 /* Protocol error */
+-#define ENODATA 86 /* No data available */
+-#define ENOSTR 87 /* Device not a stream */
+-#define ENOPKG 92 /* Package not installed */
+-#define EILSEQ 116 /* Illegal byte sequence */
+-#define ECHRNG 88 /* Channel number out of range */
+-#define EL2NSYNC 89 /* Level 2 not synchronized */
+-#define EL3HLT 90 /* Level 3 halted */
+-#define EL3RST 91 /* Level 3 reset */
+-#define ELNRNG 93 /* Link number out of range */
+-#define EUNATCH 94 /* Protocol driver not attached */
+-#define ENOCSI 95 /* No CSI structure available */
+-#define EL2HLT 96 /* Level 2 halted */
+-#define EBADE 97 /* Invalid exchange */
+-#define EBADR 98 /* Invalid request descriptor */
+-#define EXFULL 99 /* Exchange full */
+-#define ENOANO 100 /* No anode */
+-#define EBADRQC 101 /* Invalid request code */
+-#define EBADSLT 102 /* Invalid slot */
+-#define EDEADLOCK EDEADLK
+-#define EBFONT 104 /* Bad font file format */
+-#define ENONET 105 /* Machine is not on the network */
+-#define ENOLINK 106 /* Link has been severed */
+-#define EADV 107 /* Advertise error */
+-#define ESRMNT 108 /* Srmount error */
+-#define ECOMM 109 /* Communication error on send */
+-#define EMULTIHOP 110 /* Multihop attempted */
+-#define EDOTDOT 111 /* RFS specific error */
+-#define EOVERFLOW 112 /* Value too large for defined data type */
+-#define ENOTUNIQ 113 /* Name not unique on network */
+-#define EBADFD 114 /* File descriptor in bad state */
+-#define EREMCHG 115 /* Remote address changed */
+-#define EUCLEAN 117 /* Structure needs cleaning */
+-#define ENOTNAM 118 /* Not a XENIX named type file */
+-#define ENAVAIL 119 /* No XENIX semaphores available */
+-#define EISNAM 120 /* Is a named type file */
+-#define EREMOTEIO 121 /* Remote I/O error */
+-#define ELIBACC 122 /* Can not access a needed shared library */
+-#define ELIBBAD 123 /* Accessing a corrupted shared library */
+-#define ELIBSCN 124 /* .lib section in a.out corrupted */
+-#define ELIBMAX 125 /* Attempting to link in too many shared libraries */
+-#define ELIBEXEC 126 /* Cannot exec a shared library directly */
+-#define ERESTART 127 /* Interrupted system call should be restarted */
+-#define ESTRPIPE 128 /* Streams pipe error */
+-#define ENOMEDIUM 129 /* No medium found */
+-#define EMEDIUMTYPE 130 /* Wrong medium type */
+-
+-#endif /* _BITS_ERRNO_VALUES_H */
+diff --git a/libc/sysdeps/linux/common/bits/errno.h b/libc/sysdeps/linux/common/bits/errno.h
+index 78e8c69..a5ac1a4 100644
+--- a/libc/sysdeps/linux/common/bits/errno.h
++++ b/libc/sysdeps/linux/common/bits/errno.h
+@@ -22,7 +22,7 @@
+ # undef EDOM
+ # undef EILSEQ
+ # undef ERANGE
+-# include <bits/errno_values.h>
++# include <linux/errno.h>
+
+ /* Linux has no ENOTSUP error code. */
+ # define ENOTSUP EOPNOTSUPP
+diff --git a/libc/sysdeps/linux/common/bits/errno_values.h b/libc/sysdeps/linux/common/bits/errno_values.h
+deleted file mode 100644
+index 18e829d..0000000
+--- a/libc/sysdeps/linux/common/bits/errno_values.h
++++ b/dev/null
+@@ -1,137 +0,0 @@
+-#ifndef _BITS_ERRNO_VALUES_H
+-#define _BITS_ERRNO_VALUES_H
+-
+-/* Most architectures use these errno values (i.e. arm cris
+- * i386 ia64 m68k parisc ppc ppc64 s390 s390x sh x86_64, etc)
+- *
+- * A few arches do their own wierd thing, specifically alpha,
+- * mips, and sparc.
+- *
+- */
+-
+-#define EPERM 1 /* Operation not permitted */
+-#define ENOENT 2 /* No such file or directory */
+-#define ESRCH 3 /* No such process */
+-#define EINTR 4 /* Interrupted system call */
+-#define EIO 5 /* I/O error */
+-#define ENXIO 6 /* No such device or address */
+-#define E2BIG 7 /* Argument list too long */
+-#define ENOEXEC 8 /* Exec format error */
+-#define EBADF 9 /* Bad file number */
+-#define ECHILD 10 /* No child processes */
+-#define EAGAIN 11 /* Try again */
+-#define ENOMEM 12 /* Out of memory */
+-#define EACCES 13 /* Permission denied */
+-#define EFAULT 14 /* Bad address */
+-#define ENOTBLK 15 /* Block device required */
+-#define EBUSY 16 /* Device or resource busy */
+-#define EEXIST 17 /* File exists */
+-#define EXDEV 18 /* Cross-device link */
+-#define ENODEV 19 /* No such device */
+-#define ENOTDIR 20 /* Not a directory */
+-#define EISDIR 21 /* Is a directory */
+-#define EINVAL 22 /* Invalid argument */
+-#define ENFILE 23 /* File table overflow */
+-#define EMFILE 24 /* Too many open files */
+-#define ENOTTY 25 /* Not a typewriter */
+-#define ETXTBSY 26 /* Text file busy */
+-#define EFBIG 27 /* File too large */
+-#define ENOSPC 28 /* No space left on device */
+-#define ESPIPE 29 /* Illegal seek */
+-#define EROFS 30 /* Read-only file system */
+-#define EMLINK 31 /* Too many links */
+-#define EPIPE 32 /* Broken pipe */
+-#define EDOM 33 /* Math argument out of domain of func */
+-#define ERANGE 34 /* Math result not representable */
+-#define EDEADLK 35 /* Resource deadlock would occur */
+-#define ENAMETOOLONG 36 /* File name too long */
+-#define ENOLCK 37 /* No record locks available */
+-#define ENOSYS 38 /* Function not implemented */
+-#define ENOTEMPTY 39 /* Directory not empty */
+-#define ELOOP 40 /* Too many symbolic links encountered */
+-#define EWOULDBLOCK EAGAIN /* Operation would block */
+-#define ENOMSG 42 /* No message of desired type */
+-#define EIDRM 43 /* Identifier removed */
+-#define ECHRNG 44 /* Channel number out of range */
+-#define EL2NSYNC 45 /* Level 2 not synchronized */
+-#define EL3HLT 46 /* Level 3 halted */
+-#define EL3RST 47 /* Level 3 reset */
+-#define ELNRNG 48 /* Link number out of range */
+-#define EUNATCH 49 /* Protocol driver not attached */
+-#define ENOCSI 50 /* No CSI structure available */
+-#define EL2HLT 51 /* Level 2 halted */
+-#define EBADE 52 /* Invalid exchange */
+-#define EBADR 53 /* Invalid request descriptor */
+-#define EXFULL 54 /* Exchange full */
+-#define ENOANO 55 /* No anode */
+-#define EBADRQC 56 /* Invalid request code */
+-#define EBADSLT 57 /* Invalid slot */
+-#define EDEADLOCK EDEADLK
+-#define EBFONT 59 /* Bad font file format */
+-#define ENOSTR 60 /* Device not a stream */
+-#define ENODATA 61 /* No data available */
+-#define ETIME 62 /* Timer expired */
+-#define ENOSR 63 /* Out of streams resources */
+-#define ENONET 64 /* Machine is not on the network */
+-#define ENOPKG 65 /* Package not installed */
+-#define EREMOTE 66 /* Object is remote */
+-#define ENOLINK 67 /* Link has been severed */
+-#define EADV 68 /* Advertise error */
+-#define ESRMNT 69 /* Srmount error */
+-#define ECOMM 70 /* Communication error on send */
+-#define EPROTO 71 /* Protocol error */
+-#define EMULTIHOP 72 /* Multihop attempted */
+-#define EDOTDOT 73 /* RFS specific error */
+-#define EBADMSG 74 /* Not a data message */
+-#define EOVERFLOW 75 /* Value too large for defined data type */
+-#define ENOTUNIQ 76 /* Name not unique on network */
+-#define EBADFD 77 /* File descriptor in bad state */
+-#define EREMCHG 78 /* Remote address changed */
+-#define ELIBACC 79 /* Can not access a needed shared library */
+-#define ELIBBAD 80 /* Accessing a corrupted shared library */
+-#define ELIBSCN 81 /* .lib section in a.out corrupted */
+-#define ELIBMAX 82 /* Attempting to link in too many shared libraries */
+-#define ELIBEXEC 83 /* Cannot exec a shared library directly */
+-#define EILSEQ 84 /* Illegal byte sequence */
+-#define ERESTART 85 /* Interrupted system call should be restarted */
+-#define ESTRPIPE 86 /* Streams pipe error */
+-#define EUSERS 87 /* Too many users */
+-#define ENOTSOCK 88 /* Socket operation on non-socket */
+-#define EDESTADDRREQ 89 /* Destination address required */
+-#define EMSGSIZE 90 /* Message too long */
+-#define EPROTOTYPE 91 /* Protocol wrong type for socket */
+-#define ENOPROTOOPT 92 /* Protocol not available */
+-#define EPROTONOSUPPORT 93 /* Protocol not supported */
+-#define ESOCKTNOSUPPORT 94 /* Socket type not supported */
+-#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */
+-#define EPFNOSUPPORT 96 /* Protocol family not supported */
+-#define EAFNOSUPPORT 97 /* Address family not supported by protocol */
+-#define EADDRINUSE 98 /* Address already in use */
+-#define EADDRNOTAVAIL 99 /* Cannot assign requested address */
+-#define ENETDOWN 100 /* Network is down */
+-#define ENETUNREACH 101 /* Network is unreachable */
+-#define ENETRESET 102 /* Network dropped connection because of reset */
+-#define ECONNABORTED 103 /* Software caused connection abort */
+-#define ECONNRESET 104 /* Connection reset by peer */
+-#define ENOBUFS 105 /* No buffer space available */
+-#define EISCONN 106 /* Transport endpoint is already connected */
+-#define ENOTCONN 107 /* Transport endpoint is not connected */
+-#define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */
+-#define ETOOMANYREFS 109 /* Too many references: cannot splice */
+-#define ETIMEDOUT 110 /* Connection timed out */
+-#define ECONNREFUSED 111 /* Connection refused */
+-#define EHOSTDOWN 112 /* Host is down */
+-#define EHOSTUNREACH 113 /* No route to host */
+-#define EALREADY 114 /* Operation already in progress */
+-#define EINPROGRESS 115 /* Operation now in progress */
+-#define ESTALE 116 /* Stale NFS file handle */
+-#define EUCLEAN 117 /* Structure needs cleaning */
+-#define ENOTNAM 118 /* Not a XENIX named type file */
+-#define ENAVAIL 119 /* No XENIX semaphores available */
+-#define EISNAM 120 /* Is a named type file */
+-#define EREMOTEIO 121 /* Remote I/O error */
+-#define EDQUOT 122 /* Quota exceeded */
+-#define ENOMEDIUM 123 /* No medium found */
+-#define EMEDIUMTYPE 124 /* Wrong medium type */
+-
+-#endif /* _BITS_ERRNO_VALUES_H */
+diff --git a/libc/sysdeps/linux/mips/bits/errno_values.h b/libc/sysdeps/linux/mips/bits/errno_values.h
+deleted file mode 100644
+index 4d6efdf..0000000
+--- a/libc/sysdeps/linux/mips/bits/errno_values.h
++++ b/dev/null
+@@ -1,135 +0,0 @@
+-#ifndef _BITS_ERRNO_VALUES_H
+-#define _BITS_ERRNO_VALUES_H
+-
+-/* These error numbers are intended to be MIPS ABI compatible */
+-
+-#define EPERM 1 /* Operation not permitted */
+-#define ENOENT 2 /* No such file or directory */
+-#define ESRCH 3 /* No such process */
+-#define EINTR 4 /* Interrupted system call */
+-#define EIO 5 /* I/O error */
+-#define ENXIO 6 /* No such device or address */
+-#define E2BIG 7 /* Argument list too long */
+-#define ENOEXEC 8 /* Exec format error */
+-#define EBADF 9 /* Bad file number */
+-#define ECHILD 10 /* No child processes */
+-#define EAGAIN 11 /* Try again */
+-#define ENOMEM 12 /* Out of memory */
+-#define EACCES 13 /* Permission denied */
+-#define EFAULT 14 /* Bad address */
+-#define ENOTBLK 15 /* Block device required */
+-#define EBUSY 16 /* Device or resource busy */
+-#define EEXIST 17 /* File exists */
+-#define EXDEV 18 /* Cross-device link */
+-#define ENODEV 19 /* No such device */
+-#define ENOTDIR 20 /* Not a directory */
+-#define EISDIR 21 /* Is a directory */
+-#define EINVAL 22 /* Invalid argument */
+-#define ENFILE 23 /* File table overflow */
+-#define EMFILE 24 /* Too many open files */
+-#define ENOTTY 25 /* Not a typewriter */
+-#define ETXTBSY 26 /* Text file busy */
+-#define EFBIG 27 /* File too large */
+-#define ENOSPC 28 /* No space left on device */
+-#define ESPIPE 29 /* Illegal seek */
+-#define EROFS 30 /* Read-only file system */
+-#define EMLINK 31 /* Too many links */
+-#define EPIPE 32 /* Broken pipe */
+-#define EDOM 33 /* Math argument out of domain of func */
+-#define ERANGE 34 /* Math result not representable */
+-#define ENOMSG 35 /* No message of desired type */
+-#define EIDRM 36 /* Identifier removed */
+-#define ECHRNG 37 /* Channel number out of range */
+-#define EL2NSYNC 38 /* Level 2 not synchronized */
+-#define EL3HLT 39 /* Level 3 halted */
+-#define EL3RST 40 /* Level 3 reset */
+-#define ELNRNG 41 /* Link number out of range */
+-#define EUNATCH 42 /* Protocol driver not attached */
+-#define ENOCSI 43 /* No CSI structure available */
+-#define EL2HLT 44 /* Level 2 halted */
+-#define EDEADLK 45 /* Resource deadlock would occur */
+-#define ENOLCK 46 /* No record locks available */
+-#define EBADE 50 /* Invalid exchange */
+-#define EBADR 51 /* Invalid request descriptor */
+-#define EXFULL 52 /* Exchange full */
+-#define ENOANO 53 /* No anode */
+-#define EBADRQC 54 /* Invalid request code */
+-#define EBADSLT 55 /* Invalid slot */
+-#define EDEADLOCK 56 /* File locking deadlock error */
+-#define EBFONT 59 /* Bad font file format */
+-#define ENOSTR 60 /* Device not a stream */
+-#define ENODATA 61 /* No data available */
+-#define ETIME 62 /* Timer expired */
+-#define ENOSR 63 /* Out of streams resources */
+-#define ENONET 64 /* Machine is not on the network */
+-#define ENOPKG 65 /* Package not installed */
+-#define EREMOTE 66 /* Object is remote */
+-#define ENOLINK 67 /* Link has been severed */
+-#define EADV 68 /* Advertise error */
+-#define ESRMNT 69 /* Srmount error */
+-#define ECOMM 70 /* Communication error on send */
+-#define EPROTO 71 /* Protocol error */
+-#define EDOTDOT 73 /* RFS specific error */
+-#define EMULTIHOP 74 /* Multihop attempted */
+-#define EBADMSG 77 /* Not a data message */
+-#define ENAMETOOLONG 78 /* File name too long */
+-#define EOVERFLOW 79 /* Value too large for defined data type */
+-#define ENOTUNIQ 80 /* Name not unique on network */
+-#define EBADFD 81 /* File descriptor in bad state */
+-#define EREMCHG 82 /* Remote address changed */
+-#define ELIBACC 83 /* Can not access a needed shared library */
+-#define ELIBBAD 84 /* Accessing a corrupted shared library */
+-#define ELIBSCN 85 /* .lib section in a.out corrupted */
+-#define ELIBMAX 86 /* Attempting to link in too many shared libraries */
+-#define ELIBEXEC 87 /* Cannot exec a shared library directly */
+-#define EILSEQ 88 /* Illegal byte sequence */
+-#define ENOSYS 89 /* Function not implemented */
+-#define ELOOP 90 /* Too many symbolic links encountered */
+-#define ERESTART 91 /* Interrupted system call should be restarted */
+-#define ESTRPIPE 92 /* Streams pipe error */
+-#define ENOTEMPTY 93 /* Directory not empty */
+-#define EUSERS 94 /* Too many users */
+-#define ENOTSOCK 95 /* Socket operation on non-socket */
+-#define EDESTADDRREQ 96 /* Destination address required */
+-#define EMSGSIZE 97 /* Message too long */
+-#define EPROTOTYPE 98 /* Protocol wrong type for socket */
+-#define ENOPROTOOPT 99 /* Protocol not available */
+-#define EPROTONOSUPPORT 120 /* Protocol not supported */
+-#define ESOCKTNOSUPPORT 121 /* Socket type not supported */
+-#define EOPNOTSUPP 122 /* Operation not supported on transport endpoint */
+-#define EPFNOSUPPORT 123 /* Protocol family not supported */
+-#define EAFNOSUPPORT 124 /* Address family not supported by protocol */
+-#define EADDRINUSE 125 /* Address already in use */
+-#define EADDRNOTAVAIL 126 /* Cannot assign requested address */
+-#define ENETDOWN 127 /* Network is down */
+-#define ENETUNREACH 128 /* Network is unreachable */
+-#define ENETRESET 129 /* Network dropped connection because of reset */
+-#define ECONNABORTED 130 /* Software caused connection abort */
+-#define ECONNRESET 131 /* Connection reset by peer */
+-#define ENOBUFS 132 /* No buffer space available */
+-#define EISCONN 133 /* Transport endpoint is already connected */
+-#define ENOTCONN 134 /* Transport endpoint is not connected */
+-#define EUCLEAN 135 /* Structure needs cleaning */
+-#define ENOTNAM 137 /* Not a XENIX named type file */
+-#define ENAVAIL 138 /* No XENIX semaphores available */
+-#define EISNAM 139 /* Is a named type file */
+-#define EREMOTEIO 140 /* Remote I/O error */
+-#define EINIT 141 /* Reserved */
+-#define EREMDEV 142 /* Error 142 */
+-#define ESHUTDOWN 143 /* Cannot send after transport endpoint shutdown */
+-#define ETOOMANYREFS 144 /* Too many references: cannot splice */
+-#define ETIMEDOUT 145 /* Connection timed out */
+-#define ECONNREFUSED 146 /* Connection refused */
+-#define EHOSTDOWN 147 /* Host is down */
+-#define EHOSTUNREACH 148 /* No route to host */
+-#define EWOULDBLOCK EAGAIN /* Operation would block */
+-#define EALREADY 149 /* Operation already in progress */
+-#define EINPROGRESS 150 /* Operation now in progress */
+-#define ESTALE 151 /* Stale NFS file handle */
+-#define ECANCELED 158 /* AIO operation canceled */
+-/* These errors are Linux extensions. */
+-#define ENOMEDIUM 159 /* No medium found */
+-#define EMEDIUMTYPE 160 /* Wrong medium type */
+-#define EDQUOT 1133 /* Quota exceeded */
+-
+-#endif /* _BITS_ERRNO_VALUES_H */
+diff --git a/libc/sysdeps/linux/sparc/bits/errno_values.h b/libc/sysdeps/linux/sparc/bits/errno_values.h
+deleted file mode 100644
+index 35d71d1..0000000
+--- a/libc/sysdeps/linux/sparc/bits/errno_values.h
++++ b/dev/null
+@@ -1,134 +0,0 @@
+-#ifndef _BITS_ERRNO_VALUES_H
+-#define _BITS_ERRNO_VALUES_H
+-
+-/* These match the SunOS error numbering scheme. */
+-
+-#define EPERM 1 /* Operation not permitted */
+-#define ENOENT 2 /* No such file or directory */
+-#define ESRCH 3 /* No such process */
+-#define EINTR 4 /* Interrupted system call */
+-#define EIO 5 /* I/O error */
+-#define ENXIO 6 /* No such device or address */
+-#define E2BIG 7 /* Arg list too long */
+-#define ENOEXEC 8 /* Exec format error */
+-#define EBADF 9 /* Bad file number */
+-#define ECHILD 10 /* No child processes */
+-#define EAGAIN 11 /* Try again */
+-#define ENOMEM 12 /* Out of memory */
+-#define EACCES 13 /* Permission denied */
+-#define EFAULT 14 /* Bad address */
+-#define ENOTBLK 15 /* Block device required */
+-#define EBUSY 16 /* Device or resource busy */
+-#define EEXIST 17 /* File exists */
+-#define EXDEV 18 /* Cross-device link */
+-#define ENODEV 19 /* No such device */
+-#define ENOTDIR 20 /* Not a directory */
+-#define EISDIR 21 /* Is a directory */
+-#define EINVAL 22 /* Invalid argument */
+-#define ENFILE 23 /* File table overflow */
+-#define EMFILE 24 /* Too many open files */
+-#define ENOTTY 25 /* Not a typewriter */
+-#define ETXTBSY 26 /* Text file busy */
+-#define EFBIG 27 /* File too large */
+-#define ENOSPC 28 /* No space left on device */
+-#define ESPIPE 29 /* Illegal seek */
+-#define EROFS 30 /* Read-only file system */
+-#define EMLINK 31 /* Too many links */
+-#define EPIPE 32 /* Broken pipe */
+-#define EDOM 33 /* Math argument out of domain of func */
+-#define ERANGE 34 /* Math result not representable */
+-#define EWOULDBLOCK EAGAIN /* Operation would block */
+-#define EINPROGRESS 36 /* Operation now in progress */
+-#define EALREADY 37 /* Operation already in progress */
+-#define ENOTSOCK 38 /* Socket operation on non-socket */
+-#define EDESTADDRREQ 39 /* Destination address required */
+-#define EMSGSIZE 40 /* Message too long */
+-#define EPROTOTYPE 41 /* Protocol wrong type for socket */
+-#define ENOPROTOOPT 42 /* Protocol not available */
+-#define EPROTONOSUPPORT 43 /* Protocol not supported */
+-#define ESOCKTNOSUPPORT 44 /* Socket type not supported */
+-#define EOPNOTSUPP 45 /* Op not supported on transport endpoint */
+-#define EPFNOSUPPORT 46 /* Protocol family not supported */
+-#define EAFNOSUPPORT 47 /* Address family not supported by protocol */
+-#define EADDRINUSE 48 /* Address already in use */
+-#define EADDRNOTAVAIL 49 /* Cannot assign requested address */
+-#define ENETDOWN 50 /* Network is down */
+-#define ENETUNREACH 51 /* Network is unreachable */
+-#define ENETRESET 52 /* Net dropped connection because of reset */
+-#define ECONNABORTED 53 /* Software caused connection abort */
+-#define ECONNRESET 54 /* Connection reset by peer */
+-#define ENOBUFS 55 /* No buffer space available */
+-#define EISCONN 56 /* Transport endpoint is already connected */
+-#define ENOTCONN 57 /* Transport endpoint is not connected */
+-#define ESHUTDOWN 58 /* No send after transport endpoint shutdown */
+-#define ETOOMANYREFS 59 /* Too many references: cannot splice */
+-#define ETIMEDOUT 60 /* Connection timed out */
+-#define ECONNREFUSED 61 /* Connection refused */
+-#define ELOOP 62 /* Too many symbolic links encountered */
+-#define ENAMETOOLONG 63 /* File name too long */
+-#define EHOSTDOWN 64 /* Host is down */
+-#define EHOSTUNREACH 65 /* No route to host */
+-#define ENOTEMPTY 66 /* Directory not empty */
+-#define EPROCLIM 67 /* SUNOS: Too many processes */
+-#define EUSERS 68 /* Too many users */
+-#define EDQUOT 69 /* Quota exceeded */
+-#define ESTALE 70 /* Stale NFS file handle */
+-#define EREMOTE 71 /* Object is remote */
+-#define ENOSTR 72 /* Device not a stream */
+-#define ETIME 73 /* Timer expired */
+-#define ENOSR 74 /* Out of streams resources */
+-#define ENOMSG 75 /* No message of desired type */
+-#define EBADMSG 76 /* Not a data message */
+-#define EIDRM 77 /* Identifier removed */
+-#define EDEADLK 78 /* Resource deadlock would occur */
+-#define ENOLCK 79 /* No record locks available */
+-#define ENONET 80 /* Machine is not on the network */
+-#define ERREMOTE 81 /* SunOS: Too many lvls of remote in path */
+-#define ENOLINK 82 /* Link has been severed */
+-#define EADV 83 /* Advertise error */
+-#define ESRMNT 84 /* Srmount error */
+-#define ECOMM 85 /* Communication error on send */
+-#define EPROTO 86 /* Protocol error */
+-#define EMULTIHOP 87 /* Multihop attempted */
+-#define EDOTDOT 88 /* RFS specific error */
+-#define EREMCHG 89 /* Remote address changed */
+-#define ENOSYS 90 /* Function not implemented */
+-/* The rest have no SunOS equivalent. */
+-#define ESTRPIPE 91 /* Streams pipe error */
+-#define EOVERFLOW 92 /* Value too large for defined data type */
+-#define EBADFD 93 /* File descriptor in bad state */
+-#define ECHRNG 94 /* Channel number out of range */
+-#define EL2NSYNC 95 /* Level 2 not synchronized */
+-#define EL3HLT 96 /* Level 3 halted */
+-#define EL3RST 97 /* Level 3 reset */
+-#define ELNRNG 98 /* Link number out of range */
+-#define EUNATCH 99 /* Protocol driver not attached */
+-#define ENOCSI 100 /* No CSI structure available */
+-#define EL2HLT 101 /* Level 2 halted */
+-#define EBADE 102 /* Invalid exchange */
+-#define EBADR 103 /* Invalid request descriptor */
+-#define EXFULL 104 /* Exchange full */
+-#define ENOANO 105 /* No anode */
+-#define EBADRQC 106 /* Invalid request code */
+-#define EBADSLT 107 /* Invalid slot */
+-#define EDEADLOCK 108 /* File locking deadlock error */
+-#define EBFONT 109 /* Bad font file format */
+-#define ELIBEXEC 110 /* Cannot exec a shared library directly */
+-#define ENODATA 111 /* No data available */
+-#define ELIBBAD 112 /* Accessing a corrupted shared library */
+-#define ENOPKG 113 /* Package not installed */
+-#define ELIBACC 114 /* Can not access a needed shared library */
+-#define ENOTUNIQ 115 /* Name not unique on network */
+-#define ERESTART 116 /* Interrupted syscall should be restarted */
+-#define EUCLEAN 117 /* Structure needs cleaning */
+-#define ENOTNAM 118 /* Not a XENIX named type file */
+-#define ENAVAIL 119 /* No XENIX semaphores available */
+-#define EISNAM 120 /* Is a named type file */
+-#define EREMOTEIO 121 /* Remote I/O error */
+-#define EILSEQ 122 /* Illegal byte sequence */
+-#define ELIBMAX 123 /* Atmpt to link in too many shared libs */
+-#define ELIBSCN 124 /* .lib section in a.out corrupted */
+-#define ENOMEDIUM 125 /* No medium found */
+-#define EMEDIUMTYPE 126 /* Wrong medium type */
+-
+-#endif /* _BITS_ERRNO_VALUES_H */
+--
+cgit v0.8.2.1
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2010-06-02 12:33:18
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 01cdde8afaf246b8e9f6cce2eb37ad450730dad4 (commit)
via 6a53dbcc8ea13dff92631972aeca189e10766cf3 (commit)
from 5557d509449cb09242ee5248db5a7479334df9d1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 01cdde8afaf246b8e9f6cce2eb37ad450730dad4
Author: Fabien Marteau <fab...@ar...>
Date: Wed Jun 2 14:32:44 2010 +0200
[as_devices] as_spi: code done, test to be done
commit 6a53dbcc8ea13dff92631972aeca189e10766cf3
Author: Fabien Marteau <fab...@ar...>
Date: Wed Jun 2 13:51:02 2010 +0200
[as_devices] no longer in as_devices
-----------------------------------------------------------------------
Summary of changes:
target/packages/as_devices/c/as_ad5258.c | 26 ---------
target/packages/as_devices/c/as_ad5258.h | 45 ---------------
target/packages/as_devices/c/as_spi.c | 89 ++++++++++++++++++++----------
target/packages/as_devices/c/as_spi.h | 51 ++++++++++++-----
4 files changed, 95 insertions(+), 116 deletions(-)
delete mode 100644 target/packages/as_devices/c/as_ad5258.c
delete mode 100644 target/packages/as_devices/c/as_ad5258.h
diff --git a/target/packages/as_devices/c/as_ad5258.c b/target/packages/as_devices/c/as_ad5258.c
deleted file mode 100644
index be36664..0000000
--- a/target/packages/as_devices/c/as_ad5258.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-** THE ARMadeus Systems
-**
-** Copyright (C) 2009 The armadeus systems team
-** Fabien Marteau <fab...@ar...>
-**
-** 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "as_ad5258.h"
-#include "as_i2c.h"
-
-/* TODO */
-
diff --git a/target/packages/as_devices/c/as_ad5258.h b/target/packages/as_devices/c/as_ad5258.h
deleted file mode 100644
index 139ac63..0000000
--- a/target/packages/as_devices/c/as_ad5258.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-** THE ARMadeus Systems
-**
-** Copyright (C) 2009 The armadeus systems team
-** Fabien Marteau <fab...@ar...>
-**
-** 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#ifndef __ASAD5258_H__
-#define __ASAD5258_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif // __cplusplus
-
-/* number of AD5258 under system */
-#define NUMBER_OF_AD5258 1
-
-int as_ad5258_init(int aAdNumber);
-
-int as_ad5258_set_rdac(int aAdNumber, int aValue);
-int as_ad5258_get_rdac(int aAdNumber);
-int as_ad5258_set_eeprom(int aAdNumber, int aValue);
-int as_ad5258_get_eeprom(int aAdNumber);
-int as_ad5258_store(int aAdNumber);
-int as_ad5258_restore(int aAdNumber);
-
-#ifdef __cplusplus
-}
-#endif // __cplusplus
-
-#endif // __ASAD5258_H__
diff --git a/target/packages/as_devices/c/as_spi.c b/target/packages/as_devices/c/as_spi.c
index 8537a1c..b5af328 100644
--- a/target/packages/as_devices/c/as_spi.c
+++ b/target/packages/as_devices/c/as_spi.c
@@ -40,6 +40,8 @@
# define ERROR(fmt, ...) /*fmt, ##__VA_ARGS__*/
#endif
+/*--------------------------------------------------------------*/
+
int as_spi_open(const unsigned char *aSpidev_name)
{
int fd;
@@ -53,34 +55,44 @@ int as_spi_open(const unsigned char *aSpidev_name)
return fd;
}
-int as_spi_set_mode(int aFd, uint8_t aMode)
-{
- /* TODO */
- printf("TODO\n");
- return -1;
-}
+/*--------------------------------------------------------------*/
int as_spi_set_lsb(int aFd, uint8_t aLsb)
{
- /* TODO */
- printf("TODO\n");
- return -1;
+ if (ioctl(aFd, SPI_IOC_WR_LSB_FIRST, &aLsb) < 0) {
+ ERROR("SPI set lsb");
+ return -1;
+ }
+ return 0;
}
-int as_spi_set_bits_per_word(int aFd, uint8_t aBits)
+/*--------------------------------------------------------------*/
+
+int as_spi_get_lsb(int aFd)
{
- /* TODO */
- printf("TODO\n");
- return -1;
+ uint8_t lsb;
+
+ if (ioctl(aFd, SPI_IOC_RD_LSB_FIRST, &lsb) < 0) {
+ ERROR("SPI get lsb");
+ return -1;
+ }
+
+ return lsb;
}
-int as_spi_set_speed(int aFd)
+/*--------------------------------------------------------------*/
+
+int as_spi_set_mode(int aFd, uint8_t aMode)
{
- /* TODO */
- printf("TODO\n");
- return -1;
+ if (ioctl(aFd, SPI_IOC_WR_MODE, &aMode) < 0) {
+ ERROR("SPI wr_mode");
+ return -1;
+ }
+ return 0;
}
+/*--------------------------------------------------------------*/
+
int as_spi_get_mode(int aFd)
{
uint8_t mode;
@@ -93,18 +105,34 @@ int as_spi_get_mode(int aFd)
return mode;
}
-int as_spi_get_lsb(int aFd)
+/*--------------------------------------------------------------*/
+
+int as_spi_set_speed(int aFd, uint32_t aSpeed)
{
- uint8_t lsb;
+ if (ioctl(aFd, SPI_IOC_WR_MAX_SPEED_HZ, &aSpeed) < 0) {
+ ERROR("SPI set speed");
+ return -1;
+ }
- if (ioctl(aFd, SPI_IOC_RD_LSB_FIRST, &lsb) < 0) {
- ERROR("SPI rd_lsb_fist");
+ return 0;
+}
+
+/*--------------------------------------------------------------*/
+
+uint32_t as_spi_get_speed(int aFd)
+{
+ uint8_t speed;
+
+ if (ioctl(aFd, SPI_IOC_RD_MAX_SPEED_HZ, &speed) < 0) {
+ ERROR("SPI max_speed_hz");
return -1;
}
- return lsb;
+ return speed;
}
+/*--------------------------------------------------------------*/
+
int as_spi_get_bits_per_word(int aFd)
{
uint8_t bits;
@@ -117,18 +145,19 @@ int as_spi_get_bits_per_word(int aFd)
return bits;
}
-int as_spi_get_speed(int aFd)
-{
- uint8_t speed;
+/*--------------------------------------------------------------*/
- if (ioctl(aFd, SPI_IOC_RD_MAX_SPEED_HZ, &speed) < 0) {
- ERROR("SPI max_speed_hz");
+int as_spi_set_bits_per_word(int aFd, uint8_t aBits)
+{
+ if (ioctl(aFd, SPI_IOC_WR_BITS_PER_WORD, &aBits) < 0) {
+ ERROR("SPI set bits_per_word");
return -1;
}
-
- return speed;
+ return 0;
}
+/*--------------------------------------------------------------*/
+
uint32_t as_spi_msg(int aFd,
uint32_t aMsg,
size_t aLen,
@@ -182,6 +211,8 @@ uint32_t as_spi_msg(int aFd,
return msg;
}
+/*--------------------------------------------------------------*/
+
void as_spi_close(int aFd)
{
close(aFd);
diff --git a/target/packages/as_devices/c/as_spi.h b/target/packages/as_devices/c/as_spi.h
index e0005e1..8253723 100644
--- a/target/packages/as_devices/c/as_spi.h
+++ b/target/packages/as_devices/c/as_spi.h
@@ -42,42 +42,41 @@ extern "C" {
*/
int as_spi_open(const unsigned char *aSpidev_name);
-/** @brief Set spi bus mode
+/** @brief Set bits order
*
* @param aFd spidev file handler
- * @param aMode
+ * @param aLsb if 1 lsb first, else msb first
*
- * @return mode if positive value, negative value on error
- * TODO
+ * @return lsb first if positive, msb first if 0, negative value on error
+ * TODO : test it
*/
-int as_spi_set_mode(int aFd, uint8_t aMode);
+int as_spi_set_lsb(int aFd, uint8_t aLsb);
/** @brief Set bits order
*
* @param aFd spidev file handler
- * @param aLsb if 1 lsb first, else msb first
*
* @return lsb first if positive, msb first if 0, negative value on error
- * TODO
+ * TODO : test it
*/
-int as_spi_set_lsb(int aFd, uint8_t aLsb);
+int as_spi_get_lsb(int aFd);
-/** @brief Set bits per word
+/** @brief Set spi bus mode
*
* @param aFd spidev file handler
- * @param aBits number of bits per word
+ * @param aMode
*
- * @return bit per word if positive value, negative value on error
- * TODO
+ * @return mode if positive value, negative value on error
+ * TODO: test it
*/
-int as_spi_set_bits_per_word(int aFd, uint8_t aBits);
+int as_spi_set_mode(int aFd, uint8_t aMode);
/** @brief Get spi bus mode
*
* @param aFd spidev file handler
*
* @return mode if positive value, negative value on error
- * TODO
+ * TODO: test it
*/
int as_spi_get_mode(int aFd);
@@ -90,14 +89,24 @@ int as_spi_get_mode(int aFd);
*/
int as_spi_get_lsb(int aFd);
-/** @brief Get clock bus speed
+/** @brief Set clock bus speed
*
* @param aFd spidev file handler
+ * @param aSpeed clock speed
*
* @return speed in Hz, negative value on error
+ * TODO: test it
*/
-int as_spi_get_speed(int aFd);
+int as_spi_set_speed(int aFd, uint32_t aSpeed);
+/** @brief Get clock bus speed
+ *
+ * @param aFd spidev file handler
+ *
+ * @return speed in Hz
+ * TODO: test it
+ */
+uint32_t as_spi_get_speed(int aFd);
/** @brief Get bits per word
*
@@ -107,6 +116,16 @@ int as_spi_get_speed(int aFd);
*/
int as_spi_get_bits_per_word(int aFd);
+/** @brief Set bits per word
+ *
+ * @param aFd spidev file handler
+ * @param aBits number of bits per word
+ *
+ * @return bit per word if positive value, negative value on error
+ * TODO : test it
+ */
+int as_spi_set_bits_per_word(int aFd, uint8_t aBits);
+
/** @brief Forge arbitrary length message (31bits max) and send it
*
* @param aFd spidev file handler
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2010-06-02 10:16:11
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 5557d509449cb09242ee5248db5a7479334df9d1 (commit)
from 68afc4c51799d8c62fa5831923770a7021298149 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 5557d509449cb09242ee5248db5a7479334df9d1
Author: Fabien Marteau <fab...@ar...>
Date: Wed Jun 2 12:15:36 2010 +0200
[as_devices] some cosmetic modifications and errors messages
-----------------------------------------------------------------------
Summary of changes:
target/packages/as_devices/c/as_93lcxx.c | 125 ++++++++++++++++++++++-------
target/packages/as_devices/c/as_gpio.c | 61 +++++++++++++-
target/packages/as_devices/c/as_max1027.c | 113 ++++++++------------------
target/packages/as_devices/c/as_spi.c | 27 ++++---
4 files changed, 204 insertions(+), 122 deletions(-)
diff --git a/target/packages/as_devices/c/as_93lcxx.c b/target/packages/as_devices/c/as_93lcxx.c
index 86926dc..3f463ce 100644
--- a/target/packages/as_devices/c/as_93lcxx.c
+++ b/target/packages/as_devices/c/as_93lcxx.c
@@ -45,6 +45,13 @@
#define TEC (6*MS)
#define TWL (15*MS)
+//#define DEBUG
+#ifdef DEBUG
+# define ERROR(fmt, ...) printf(fmt, ##__VA_ARGS__)
+#else
+# define ERROR(fmt, ...) /*fmt, ##__VA_ARGS__*/
+#endif
+
/** @brief Private functions to ease making spi instructions
*
*/
@@ -68,6 +75,7 @@ static uint8_t address_len(uint8_t aType, uint8_t aWord_size)
}
}
+/*------------------------------------------------------------------------------*/
struct as_93lcxx_device * as_93lcxx_open(unsigned char *aSpidev_filename,
uint8_t aType,
@@ -80,7 +88,7 @@ struct as_93lcxx_device * as_93lcxx_open(unsigned char *aSpidev_filename,
/* open spidev bus */
fd = as_spi_open(aSpidev_filename);
if (fd < 0) {
- perror("Can't open spi device");
+ ERROR("Can't open spi device");
return NULL;
}
@@ -92,7 +100,10 @@ struct as_93lcxx_device * as_93lcxx_open(unsigned char *aSpidev_filename,
dev = (struct as_93lcxx_device *)malloc(sizeof(struct as_93lcxx_device));
if (dev == NULL)
+ {
+ ERROR("Can't allocate memory for eeprom structure device\n");
return NULL;
+ }
/* fill in spidev structure */
dev->spidev_filename = aSpidev_filename;
@@ -104,11 +115,7 @@ struct as_93lcxx_device * as_93lcxx_open(unsigned char *aSpidev_filename,
return dev;
}
-void as_93lcxx_close(struct as_93lcxx_device *aDev)
-{
- as_spi_close(aDev->fd);
- free(aDev);
-}
+/*------------------------------------------------------------------------------*/
int32_t as_93lcxx_read(struct as_93lcxx_device *aDev, uint16_t aAddress)
{
@@ -124,6 +131,11 @@ int32_t as_93lcxx_read(struct as_93lcxx_device *aDev, uint16_t aAddress)
data_out = as_spi_msg(aDev->fd, msg,
3 + add_length + aDev->word_size,
aDev->speed);
+ if (data_out < 0)
+ {
+ ERROR("Error on forging spi message\n");
+ return -1;
+ }
if (aDev->word_size == 8)
return data_out & 0xff;
@@ -131,28 +143,37 @@ int32_t as_93lcxx_read(struct as_93lcxx_device *aDev, uint16_t aAddress)
return data_out & 0xffff;
}
+/*------------------------------------------------------------------------------*/
+
int32_t as_93lcxx_ewen(struct as_93lcxx_device *aDev)
{
uint32_t msg=0;
int add_length;
+ int ret;
add_length = address_len(aDev->type, aDev->word_size);
/* forge message */
- msg = ((EWEN << add_length)
- |(EWEN_ADDR << (add_length-2))
- );
+ msg = ((EWEN << add_length) |(EWEN_ADDR << (add_length-2)));
+
+ ret = as_spi_msg(aDev->fd, msg,
+ 3 + add_length,
+ aDev->speed);
+ {
+ ERROR("Error on forging spi message\n");
+ return -1;
+ }
- as_spi_msg(aDev->fd, msg,
- 3 + add_length,
- aDev->speed);
return 0;
}
+/*------------------------------------------------------------------------------*/
+
int32_t as_93lcxx_erase(struct as_93lcxx_device *aDev, uint16_t aAddress)
{
uint32_t msg=0;
int add_length;
+ int ret;
add_length = address_len(aDev->type, aDev->word_size);
@@ -160,19 +181,27 @@ int32_t as_93lcxx_erase(struct as_93lcxx_device *aDev, uint16_t aAddress)
msg = ((ERASE << (add_length + aDev->word_size))
| (aAddress << (aDev->word_size)));
- as_spi_msg(aDev->fd, msg,
- 3 + add_length + aDev->word_size,
- aDev->speed);
+ ret = as_spi_msg(aDev->fd, msg,
+ 3 + add_length + aDev->word_size,
+ aDev->speed);
+ if (ret < 0)
+ {
+ ERROR("Error on forging spi message\n");
+ return -1;
+ }
usleep(TWC);
return 0;
}
+/*------------------------------------------------------------------------------*/
+
int32_t as_93lcxx_erase_all(struct as_93lcxx_device *aDev)
{
uint32_t msg=0;
int add_length;
+ int ret;
add_length = address_len(aDev->type, aDev->word_size);
@@ -181,9 +210,14 @@ int32_t as_93lcxx_erase_all(struct as_93lcxx_device *aDev)
|(ERAL_ADDR << (add_length-2))
);
- as_spi_msg(aDev->fd, msg,
- 3 + add_length,
- aDev->speed);
+ ret = as_spi_msg(aDev->fd, msg,
+ 3 + add_length,
+ aDev->speed);
+ if (ret < 0)
+ {
+ ERROR("Error on forging spi message\n");
+ return -1;
+ }
/* wait for end of erase all */
usleep(TEC);
@@ -191,12 +225,15 @@ int32_t as_93lcxx_erase_all(struct as_93lcxx_device *aDev)
return 0;
}
+/*------------------------------------------------------------------------------*/
+
int32_t as_93lcxx_write(struct as_93lcxx_device *aDev,
uint16_t aAddress,
uint16_t aValue)
{
uint32_t msg=0;
int add_length;
+ int ret;
add_length = address_len(aDev->type, aDev->word_size);
@@ -206,9 +243,14 @@ int32_t as_93lcxx_write(struct as_93lcxx_device *aDev,
| aValue
);
- as_spi_msg(aDev->fd, msg,
- 3 + add_length + aDev->word_size,
- aDev->speed);
+ ret = as_spi_msg(aDev->fd, msg,
+ 3 + add_length + aDev->word_size,
+ aDev->speed);
+ if (ret < 0)
+ {
+ ERROR("Error on forging spi message\n");
+ return -1;
+ }
/* Wait for end of writing */
usleep(TWC);
@@ -216,11 +258,14 @@ int32_t as_93lcxx_write(struct as_93lcxx_device *aDev,
return 0;
}
+/*------------------------------------------------------------------------------*/
+
int32_t as_93lcxx_write_all(struct as_93lcxx_device *aDev,
uint16_t aValue)
{
uint32_t msg=0;
int add_length;
+ int ret;
add_length = address_len(aDev->type, aDev->word_size);
@@ -230,9 +275,14 @@ int32_t as_93lcxx_write_all(struct as_93lcxx_device *aDev,
|aValue
);
- as_spi_msg(aDev->fd, msg,
- 3 + add_length + aDev->word_size,
- aDev->speed);
+ ret = as_spi_msg(aDev->fd, msg,
+ 3 + add_length + aDev->word_size,
+ aDev->speed);
+ if (ret < 0)
+ {
+ ERROR("Error on forging spi message\n");
+ return -1;
+ }
/* Wait for end of write all */
usleep(TWL);
@@ -240,22 +290,37 @@ int32_t as_93lcxx_write_all(struct as_93lcxx_device *aDev,
return 0;
}
+/*------------------------------------------------------------------------------*/
+
int32_t as_93lcxx_ewds(struct as_93lcxx_device *aDev)
{
uint32_t msg=0;
int add_length;
+ int ret;
add_length = address_len(aDev->type, aDev->word_size);
/* forge message */
- msg = ((EWDS << add_length)
- |(EWDS_ADDR << (add_length-2))
- );
+ msg = ((EWDS << add_length) |(EWDS_ADDR << (add_length-2)));
- as_spi_msg(aDev->fd, msg,
- 3 + add_length,
- aDev->speed);
+ ret = as_spi_msg(aDev->fd, msg,
+ 3 + add_length,
+ aDev->speed);
+ if (ret < 0)
+ {
+ ERROR("Error on forging spi message\n");
+ return -1;
+ }
return 0;
}
+/*------------------------------------------------------------------------------*/
+
+void as_93lcxx_close(struct as_93lcxx_device *aDev)
+{
+ as_spi_close(aDev->fd);
+ free(aDev);
+}
+
+
diff --git a/target/packages/as_devices/c/as_gpio.c b/target/packages/as_devices/c/as_gpio.c
index 4a4ef3d..737af96 100644
--- a/target/packages/as_devices/c/as_gpio.c
+++ b/target/packages/as_devices/c/as_gpio.c
@@ -58,6 +58,13 @@
#error Error no platform defined
#endif
+//#define DEBUG
+#ifdef DEBUG
+# define ERROR(fmt, ...) printf(fmt, ##__VA_ARGS__)
+#else
+# define ERROR(fmt, ...) /*fmt, ##__VA_ARGS__*/
+#endif
+
/*------------------------------------------------------------------------------*/
struct as_gpio_device *
@@ -70,6 +77,7 @@ as_gpio_open(char aPortChar)
if (((aPortChar-'A') > (NUMBER_OF_PORTS-1)) || ((aPortChar-'A') < 0))
{
+ ERROR("No port named %c\n",aPortChar);
return NULL;
}
@@ -77,18 +85,23 @@ as_gpio_open(char aPortChar)
ret = snprintf(gpio_file_path,50, "%s%c",
GPIO_BASE_PORT, aPortChar);
if (ret < 0) {
+ ERROR("Can't forge gpio port path\n");
return NULL;
}
/* opening gpio port */
ret = open(gpio_file_path, O_RDWR);
if (ret < 0) {
+ ERROR("Can't open file port\n");
return NULL;
}
dev = (struct as_gpio_device *)malloc(sizeof(struct as_gpio_device));
if (dev == NULL)
+ {
+ ERROR("Can't allocate memory for gpio device structure\n");
return NULL;
+ }
dev->port_letter = aPortChar;
dev->fdev = ret;
@@ -111,9 +124,10 @@ as_gpio_set_pin_direction(struct as_gpio_device *aDev,
int ret=0;
int portval;
- /* Set LED PIN as GPIO; read/modify/write */
+ /* Set PIN as GPIO; read/modify/write */
ret = ioctl(aDev->fdev, GPIORDMODE, &portval);
if (ret < 0) {
+ ERROR("Can't set gpio read mode\n");
return ret;
}
@@ -121,12 +135,14 @@ as_gpio_set_pin_direction(struct as_gpio_device *aDev,
ret = ioctl(aDev->fdev, GPIOWRMODE, &portval);
if (ret < 0) {
+ ERROR("Can't set gpio write mode\n");
return ret;
}
/* set direction */
ret = ioctl(aDev->fdev, GPIORDDIRECTION, &portval);
if (ret < 0) {
+ ERROR("Can't get gpio direction\n");
return ret;
}
@@ -138,6 +154,7 @@ as_gpio_set_pin_direction(struct as_gpio_device *aDev,
ret = ioctl(aDev->fdev, GPIOWRDIRECTION, &portval);
if (ret < 0) {
+ ERROR("Can't get gpio direction\n");
return ret;
}
return 0;
@@ -155,6 +172,7 @@ as_gpio_set_pin_value(struct as_gpio_device *aDev,
ret = ioctl(aDev->fdev, GPIORDDATA, &portval);
if (ret < 0) {
+ ERROR("Can't read gpio data\n");
return ret;
}
@@ -165,6 +183,7 @@ as_gpio_set_pin_value(struct as_gpio_device *aDev,
}
ret = ioctl(aDev->fdev, GPIOWRDATA, &portval);
if (ret < 0) {
+ ERROR("Can't write gpio data\n");
return ret;
}
@@ -181,6 +200,7 @@ int32_t as_gpio_get_pin_value(struct as_gpio_device *aDev,
ret = ioctl(aDev->fdev, GPIORDDATA, &portval);
if (ret < 0) {
+ ERROR("Can't read gpio data\n");
return ret;
}
@@ -200,16 +220,28 @@ int32_t as_gpio_blocking_get_pin_value(struct as_gpio_device *aDev,
char value;
if (aPinNum >= PORT_SIZE )
+ {
+ ERROR("Pin num %d upper than port size (%d)\n", aPinNum, PORT_SIZE);
return -1; /* aPinNum wrong */
+ }
if (aPinNum < 0 )
+ {
+ ERROR("Wrong pin number %d\n",aPinNum);
return -1;
+ }
if (aDev->fpin[aPinNum] == -1)
- return -1; /* irq must be configured before */
+ {
+ ERROR("irq must be configured before\n");
+ return -1;
+ }
ret = read(aDev->fpin[aPinNum], &value, 1);
if (ret < 0)
+ {
+ ERROR("can't read pin %d value \n",aPinNum);
return ret;
+ }
if (value != 0)
return 1;
@@ -227,6 +259,7 @@ int32_t as_gpio_get_pullup_value(struct as_gpio_device *aDev,
ret = ioctl(aDev->fdev, GPIORDPULLUP, &portval);
if (ret < 0) {
+ ERROR("can't get pullup value\n");
return ret;
}
@@ -249,6 +282,7 @@ int32_t as_gpio_set_pullup_value(struct as_gpio_device *aDev,
ret = ioctl(aDev->fdev, GPIORDPULLUP, &portval);
if (ret < 0) {
+ ERROR("Can't get pullup value\n");
return ret;
}
@@ -259,6 +293,7 @@ int32_t as_gpio_set_pullup_value(struct as_gpio_device *aDev,
}
ret = ioctl(aDev->fdev, GPIOWRPULLUP, &portval);
if (ret < 0) {
+ ERROR("Can't set pullup value\n");
return ret;
}
@@ -275,13 +310,17 @@ int32_t as_gpio_get_irq_mode(struct as_gpio_device *aDev,
/* check pin num */
if (aPinNum >= PORT_SIZE)
+ {
+ ERROR("Pin num %d upper than port size (%d)\n", aPinNum, PORT_SIZE);
return -1;
+ }
if (aPinNum < PORT_SIZE/2)
{
ret = ioctl(aDev->fdev, GPIORDIRQMODE_L, &portval);
if (ret < 0) {
+ ERROR("Can't read irq mode L\n");
return ret;
}
@@ -292,6 +331,7 @@ int32_t as_gpio_get_irq_mode(struct as_gpio_device *aDev,
ret = ioctl(aDev->fdev, GPIORDIRQMODE_H, &portval);
if (ret < 0) {
+ ERROR("Can't read irq mode H\n");
return ret;
}
@@ -312,11 +352,17 @@ int32_t as_gpio_set_irq_mode(struct as_gpio_device *aDev,
/* check mode value */
if (aMode > 3)
+ {
+ ERROR("Wrong mode value %d\n",aMode);
return -1;
+ }
/* check pin num */
if (aPinNum >= PORT_SIZE)
+ {
+ ERROR("Pin num %d upper than port size (%d)\n", aPinNum, PORT_SIZE);
return -1;
+ }
/* close fpin file */
if (aDev->fpin[aPinNum] != -1)
@@ -329,6 +375,7 @@ int32_t as_gpio_set_irq_mode(struct as_gpio_device *aDev,
{
ret = ioctl(aDev->fdev, GPIORDIRQMODE_L, &portval);
if (ret < 0) {
+ ERROR("Can't read irq mode L\n");
return ret;
}
@@ -337,6 +384,7 @@ int32_t as_gpio_set_irq_mode(struct as_gpio_device *aDev,
ret = ioctl(aDev->fdev, GPIOWRIRQMODE_L, &portval);
if (ret < 0) {
+ ERROR("Can't write irq mode L\n");
return ret;
}
@@ -344,6 +392,7 @@ int32_t as_gpio_set_irq_mode(struct as_gpio_device *aDev,
ret = ioctl(aDev->fdev, GPIORDIRQMODE_H, &portval);
if (ret < 0) {
+ ERROR("Can't read irq mode H\n");
return ret;
}
@@ -352,6 +401,7 @@ int32_t as_gpio_set_irq_mode(struct as_gpio_device *aDev,
ret = ioctl(aDev->fdev, GPIOWRIRQMODE_H, &portval);
if (ret < 0) {
+ ERROR("Can't write irq mode H\n");
return ret;
}
}
@@ -362,16 +412,21 @@ int32_t as_gpio_set_irq_mode(struct as_gpio_device *aDev,
ret = snprintf(buffer, BUFF_SIZE, "%s%c%d",
GPIO_BASE_PIN, aDev->port_letter, aPinNum);
if (ret < 0)
+ {
+ ERROR("Can't forge fpin path\n");
return ret;
+ }
ret = open(buffer, O_RDONLY);
if (ret < 0)
+ {
+ ERROR("Can't open %s\n",buffer);
return ret;
+ }
aDev->fpin[aPinNum] = ret;
}
aDev->irq_mode[aPinNum] = aMode;
-
return 0;
}
diff --git a/target/packages/as_devices/c/as_max1027.c b/target/packages/as_devices/c/as_max1027.c
index 57d8200..c6e3aa9 100644
--- a/target/packages/as_devices/c/as_max1027.c
+++ b/target/packages/as_devices/c/as_max1027.c
@@ -43,6 +43,13 @@ typedef unsigned char u8;
#define SLOW_INPUT_NAME "in%d_input"
#define FAST_INPUT_PATH "/dev/max1027/AIN%d"
+//#define DEBUG
+#ifdef DEBUG
+# define ERROR(fmt, ...) printf(fmt, ##__VA_ARGS__)
+#else
+# define ERROR(fmt, ...) /*fmt, ##__VA_ARGS__*/
+#endif
+
/** @brief Function used to write in /sys file
*
* @param aFile_handler /sys file handler
@@ -63,13 +70,13 @@ int32_t as_max1027_write_buffer(int aFile_handler, int aValue)
ret = write(aFile_handler, buffer, buffer_len);
if (ret < 0)
{
- perror("Can't write file ");
+ ERROR("Can't write file ");
return -1;
}
ret = lseek(aFile_handler, 0, SEEK_SET);
if (ret < 0)
{
- perror("lseek error ");
+ ERROR("lseek error ");
return -1;
}
@@ -93,9 +100,7 @@ int32_t as_max1027_read_buffer(int aFile_handler, int *aValueRead)
ret = read(aFile_handler, valueRead, SIZEOFBUFF);
if (ret < 0)
{
-#ifdef ERROR_MSG
- printf("Error, reading buffer file\n");
-#endif
+ ERROR("Error, reading buffer file\n");
return -1;
}
valueRead[ret-1] = '\0';
@@ -125,18 +130,14 @@ struct as_max1027_device *as_max1027_open(int aSpiNum,
/** XXX */
if (aMode == AS_MAX1027_FAST)
{
-#ifdef ERROR_MSG
printf("Error, fast mode not supported yet\n");
-#endif
return NULL;
}
ret = snprintf(path, PATH_SIZE, SYS_PATH, aSpiNum);
if (ret<0)
{
-#ifdef ERROR_MSG
- printf("Error in path writing\n");
-#endif
+ ERROR("Error in path writing\n");
return NULL;
}
@@ -145,34 +146,26 @@ struct as_max1027_device *as_max1027_open(int aSpiNum,
ret = snprintf(buffer, BUFFER_SIZE, "%s%s", path, "conversion");
if (ret<0)
{
-#ifdef ERROR_MSG
- printf("Error in path writing\n");
-#endif
+ ERROR("Error in path writing\n");
return NULL;
}
fConversion = open(buffer, O_RDWR);
if (fConversion < 0)
{
-#ifdef ERROR_MSG
- printf("Error, can't open conversion file. Is max1027 modprobed ?\n");
-#endif
+ ERROR("Error, can't open conversion file. Is max1027 modprobed ?\n");
return NULL;
}
/* setup */
ret = snprintf(buffer, BUFFER_SIZE, "%s%s", path, "setup");
if (ret<0)
{
-#ifdef ERROR_MSG
- printf("Error in path writing\n");
-#endif
+ ERROR("Error in path writing\n");
return NULL;
}
fSetup = open(buffer, O_RDWR);
if (fSetup < 0)
{
-#ifdef ERROR_MSG
- printf("Error, can't open setup file.\n");
-#endif
+ ERROR("Error, can't open setup file.\n");
return NULL;
}
ret = as_max1027_write_buffer(fSetup,
@@ -182,26 +175,20 @@ struct as_max1027_device *as_max1027_open(int aSpiNum,
MAX1027_SETUP_DIFFSEL(0));
if (ret < 0)
{
-#ifdef ERROR_MSG
- printf("Error, can't set default setup parameters\n");
-#endif
+ ERROR("Error, can't set default setup parameters\n");
return NULL;
}
/* averaging */
ret = snprintf(buffer, BUFFER_SIZE, "%s%s", path, "averaging");
if (ret<0) {
-#ifdef ERROR_MSG
- printf("Error in path writing\n");
-#endif
+ ERROR("Error in path writing\n");
return NULL;
}
fAveraging = open(buffer, O_RDWR);
if (fAveraging < 0)
{
-#ifdef ERROR_MSG
- printf("Error, can't open averaging file.\n");
-#endif
+ ERROR("Error, can't open averaging file.\n");
return NULL;
}
@@ -211,17 +198,13 @@ struct as_max1027_device *as_max1027_open(int aSpiNum,
ret = snprintf(buffer, BUFFER_SIZE, "%s%s", path, "temp1_input");
if (ret<0)
{
-#ifdef ERROR_MSG
- printf("Error in path writing\n");
-#endif
+ ERROR("Error in path writing\n");
return NULL;
}
fTemperature = open(buffer, O_RDONLY);
if (fTemperature < 0)
{
-#ifdef ERROR_MSG
- printf("Error, can't open temperature file.\n");
-#endif
+ ERROR("Error, can't open temperature file.\n");
return NULL;
}
} else {
@@ -237,27 +220,21 @@ struct as_max1027_device *as_max1027_open(int aSpiNum,
ret = snprintf(slow_input_name, 20, SLOW_INPUT_NAME, i);
if (ret < 0)
{
-#ifdef ERROR_MSG
- printf("Error in path writing\n");
-#endif
+ ERROR("Error in path writing\n");
return NULL;
}
ret = snprintf(buffer, BUFFER_SIZE, "%s%s", path, slow_input_name);
if (ret < 0)
{
-#ifdef ERROR_MSG
- printf("Error in path writing\n");
-#endif
+ ERROR("Error in path writing\n");
return NULL;
}
fLowSpeed[i] = open(buffer, O_RDONLY);
if (fLowSpeed[i] < 0)
{
-#ifdef ERROR_MSG
- printf("Error, can't open %s\n", buffer);
-#endif
+ ERROR("Error, can't open %s\n", buffer);
return NULL;
}
}
@@ -266,18 +243,14 @@ struct as_max1027_device *as_max1027_open(int aSpiNum,
ret = snprintf(buffer, BUFFER_SIZE, FAST_INPUT_PATH, i);
if (ret < 0)
{
-#ifdef ERROR_MSG
- printf("Error in path writing\n");
-#endif
+ ERROR("Error in path writing\n");
return NULL;
}
fHighSpeed[i] = open(buffer, O_RDONLY);
if (fHighSpeed[i] < 0)
{
-#ifdef ERROR_MSG
- printf("Error, can't open %s\nIs loadmax.sh launched ?\n", buffer);
-#endif
+ ERROR("Error, can't open %s\nIs loadmax.sh launched ?\n", buffer);
return NULL;
}
@@ -318,9 +291,7 @@ int32_t as_max1027_read_temperature_mC(struct as_max1027_device *aDev,
MAX1027_CONV_TEMP);
if (ret < 0)
{
-#ifdef ERROR_MSG
- printf("Error launching conversion\n");
-#endif
+ ERROR("Error launching conversion\n");
return -1;
}
@@ -328,9 +299,7 @@ int32_t as_max1027_read_temperature_mC(struct as_max1027_device *aDev,
ret = as_max1027_read_buffer(aDev->fTemperature, aTemperature);
if (ret < 0)
{
-#ifdef ERROR_MSG
- printf("Error, reading fTemperature\n");
-#endif
+ ERROR("Error, reading fTemperature\n");
return -1;
}
@@ -359,9 +328,7 @@ int32_t as_max1027_set_averaging(struct as_max1027_device *aDev, uint8_t aNbConv
aDev->scan_mode = SCAN_MODE_10; /* scan */
break;
default:
-#ifdef ERROR_MSG
- printf("%s: unsupported setting\n", __func__);
-#endif
+ ERROR("%s: unsupported setting\n", __func__);
return -1;
}
@@ -370,9 +337,7 @@ int32_t as_max1027_set_averaging(struct as_max1027_device *aDev, uint8_t aNbConv
ret = as_max1027_write_buffer(aDev->fAveraging, avg_register);
if (ret < 0)
{
-#ifdef ERROR_MSG
- printf("Error, setting averaging\n");
-#endif
+ ERROR("Error, setting averaging\n");
return -1;
}
@@ -386,9 +351,7 @@ int32_t as_max1027_get_value_milliVolt(struct as_max1027_device *aDev,
if ((aChannelNum >= NUMBER_OF_CHANNELS) || (aChannelNum < 0))
{
-#ifdef ERROR_MSG
- printf("Wrong num channel\n");
-#endif
+ ERROR("Wrong num channel\n");
return -1;
}
@@ -401,9 +364,7 @@ int32_t as_max1027_get_value_milliVolt(struct as_max1027_device *aDev,
MAX1027_CONV_SCAN(aDev->scan_mode));
if (ret < 0)
{
-#ifdef ERROR_MSG
- printf("Error launching conversion\n");
-#endif
+ ERROR("Error launching conversion\n");
return -1;
}
@@ -411,24 +372,18 @@ int32_t as_max1027_get_value_milliVolt(struct as_max1027_device *aDev,
ret = as_max1027_read_buffer(aDev->fLowSpeed[aChannelNum], aValue);
if (ret < 0)
{
-#ifdef ERROR_MSG
- printf("Error, reading fLowSpeed[%d]\n", aChannelNum);
-#endif
+ ERROR("Error, reading fLowSpeed[%d]\n", aChannelNum);
return -1;
}
}
else if (aDev->mode == AS_MAX1027_FAST)
{
-#ifdef ERROR_MSG
- printf("TODO: fast mode channel reading\n");
-#endif
+ ERROR("TODO: fast mode channel reading\n");
return -1;
}
else
{
-#ifdef ERROR_MSG
- printf("Unknown mode\n");
-#endif
+ ERROR("Unknown mode\n");
return -1;
}
diff --git a/target/packages/as_devices/c/as_spi.c b/target/packages/as_devices/c/as_spi.c
index 9f4ae30..8537a1c 100644
--- a/target/packages/as_devices/c/as_spi.c
+++ b/target/packages/as_devices/c/as_spi.c
@@ -14,7 +14,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*
- * Copyright (C) 2009 Fabien Marteau <fab...@ar...>
+ * Copyright (C) 2009-2010 Fabien Marteau <fab...@ar...>
*
*/
@@ -33,6 +33,12 @@
#include "as_spi.h"
+//#define DEBUG
+#ifdef DEBUG
+# define ERROR(fmt, ...) printf(fmt, ##__VA_ARGS__)
+#else
+# define ERROR(fmt, ...) /*fmt, ##__VA_ARGS__*/
+#endif
int as_spi_open(const unsigned char *aSpidev_name)
{
@@ -40,7 +46,7 @@ int as_spi_open(const unsigned char *aSpidev_name)
fd = open((char *)aSpidev_name, O_RDWR);
if (fd < 0) {
- perror("open");
+ ERROR("spi open.");
return -1;
}
@@ -50,24 +56,28 @@ int as_spi_open(const unsigned char *aSpidev_name)
int as_spi_set_mode(int aFd, uint8_t aMode)
{
/* TODO */
+ printf("TODO\n");
return -1;
}
int as_spi_set_lsb(int aFd, uint8_t aLsb)
{
/* TODO */
+ printf("TODO\n");
return -1;
}
int as_spi_set_bits_per_word(int aFd, uint8_t aBits)
{
/* TODO */
+ printf("TODO\n");
return -1;
}
int as_spi_set_speed(int aFd)
{
/* TODO */
+ printf("TODO\n");
return -1;
}
@@ -76,7 +86,7 @@ int as_spi_get_mode(int aFd)
uint8_t mode;
if (ioctl(aFd, SPI_IOC_RD_MODE, &mode) < 0) {
- perror("SPI rd_mode");
+ ERROR("SPI rd_mode");
return -1;
}
@@ -88,7 +98,7 @@ int as_spi_get_lsb(int aFd)
uint8_t lsb;
if (ioctl(aFd, SPI_IOC_RD_LSB_FIRST, &lsb) < 0) {
- perror("SPI rd_lsb_fist");
+ ERROR("SPI rd_lsb_fist");
return -1;
}
@@ -100,7 +110,7 @@ int as_spi_get_bits_per_word(int aFd)
uint8_t bits;
if (ioctl(aFd, SPI_IOC_RD_BITS_PER_WORD, &bits) < 0) {
- perror("SPI bits_per_word");
+ ERROR("SPI bits_per_word");
return -1;
}
@@ -112,7 +122,7 @@ int as_spi_get_speed(int aFd)
uint8_t speed;
if (ioctl(aFd, SPI_IOC_RD_MAX_SPEED_HZ, &speed) < 0) {
- perror("SPI max_speed_hz");
+ ERROR("SPI max_speed_hz");
return -1;
}
@@ -137,9 +147,6 @@ uint32_t as_spi_msg(int aFd,
msg = aMsg;
len = aLen;
- //msg = msg << 1;/* XXX Last bit is always read at 0 */
- //len = len + 1; /* XXX */
-
memset(xfer, 0, sizeof(xfer));
memset(buf, 0, sizeof(buf));
memset(buf_read, 0, sizeof(buf_read));
@@ -162,7 +169,7 @@ uint32_t as_spi_msg(int aFd,
status = ioctl(aFd, SPI_IOC_MESSAGE(1), xfer);
if (status < 0) {
- perror("SPI_IOC_MESSAGE");
+ ERROR("SPI_IOC_MESSAGE");
return 0;
}
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2010-06-02 09:31:19
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 68afc4c51799d8c62fa5831923770a7021298149 (commit)
via 2170a775ed619c14ad83af407aa6f86b5ae6d9b0 (commit)
from 0d09b77c52240b28b6a22a235430b609e89db8b6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 68afc4c51799d8c62fa5831923770a7021298149
Author: Fabien Marteau <fab...@ar...>
Date: Wed Jun 2 11:30:37 2010 +0200
[as_devices] as_pwm done and tested
commit 2170a775ed619c14ad83af407aa6f86b5ae6d9b0
Author: Fabien Marteau <fab...@ar...>
Date: Wed Jun 2 10:09:21 2010 +0200
[as_devices] as_max5821 tested, little bug fixed
-----------------------------------------------------------------------
Summary of changes:
target/packages/as_devices/c/as_max5821.c | 21 ++-
target/packages/as_devices/c/as_pwm.c | 323 ++++++++++++++++-------------
target/packages/as_devices/c/as_pwm.h | 105 ++++++++--
target/packages/as_devices/test_c.h | 26 ++-
4 files changed, 291 insertions(+), 184 deletions(-)
diff --git a/target/packages/as_devices/c/as_max5821.c b/target/packages/as_devices/c/as_max5821.c
index ce11c06..168fbd6 100644
--- a/target/packages/as_devices/c/as_max5821.c
+++ b/target/packages/as_devices/c/as_max5821.c
@@ -34,8 +34,13 @@
#define MAX5821M_MAX_DATA_VALUE (1023)
-//#define ERROR(fmt, ...) /*fmt, ##__VA_ARGS__*/
-#define ERROR(fmt, ...) printf(fmt, ##__VA_ARGS__)
+//#define DEBUG
+
+#ifdef DEBUG
+# define ERROR(fmt, ...) printf(fmt, ##__VA_ARGS__)
+#else
+# define ERROR(fmt, ...) /*fmt, ##__VA_ARGS__*/
+#endif
/*-----------------------------------------------------------------------------*/
@@ -108,17 +113,17 @@ int32_t as_max5821_set_one_value(struct as_max5821_device *aDev,
switch(aChannel)
{
case 'a':
- case 'A': buff[0] = (aValue >> 8) & 0x0F;
+ case 'A': buff[0] = (aValue >> 6) & 0x0F;
break;
case 'b':
- case 'B': buff[0] = 0x10 | ((aValue >> 8) & 0x0F);
+ case 'B': buff[0] = 0x10 | ((aValue >> 6) & 0x0F);
break;
default: ERROR("Wrong channel name %c\n", aChannel);
return -1;
}
- buff[1] =(unsigned char)(aValue & 0x00FF);
-
+ buff[1] =(unsigned char)((aValue << 2) & 0x00FC);
+
ret = as_i2c_write(aDev->i2c_bus, aDev->i2c_address, buff, 2);
if (ret < 0) {
ERROR("can't write on i2c bus\n");
@@ -136,8 +141,8 @@ int32_t as_max5821_set_both_value(struct as_max5821_device *aDev,
int ret;
unsigned char buff[2];
- buff[0] = 0xC0 | ((unsigned char)((aValue >> 8)) & 0x0F);
- buff[1] = (unsigned char)(aValue & 0x00FF);
+ buff[0] = 0xC0 | ((unsigned char)((aValue >> 6)) & 0x0F);
+ buff[1] = (unsigned char)((aValue << 2) & 0x00FC);
ret = as_i2c_write(aDev->i2c_bus, aDev->i2c_address, buff, 2);
if (ret < 0) {
diff --git a/target/packages/as_devices/c/as_pwm.c b/target/packages/as_devices/c/as_pwm.c
index 1fa4e2d..56ac4c5 100644
--- a/target/packages/as_devices/c/as_pwm.c
+++ b/target/packages/as_devices/c/as_pwm.c
@@ -1,19 +1,19 @@
/*
** THE ARMadeus Systems
-**
-** Copyright (C) 2009 The armadeus systems team
+**
+** Copyright (C) 2009-2010 The armadeus systems team
** Fabien Marteau <fab...@ar...>
-**
+**
** 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@@ -22,225 +22,206 @@
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h> /* for open() */
-#include <errno.h> /* for perror() */
#include <unistd.h> /* for write() */
#include "as_pwm.h"
+//#define DEBUG
+#ifdef DEBUG
+# define ERROR(fmt, ...) printf(fmt, ##__VA_ARGS__)
+#else
+# define ERROR(fmt, ...) /*fmt, ##__VA_ARGS__*/
+#endif
+
#define PWM_SYS_PATH "/sys/class/pwm/pwm"
#define FREQUENCY_PATH "frequency"
#define PERIOD_PATH "period"
-#define DUTY_PATH "duty"
+#define DUTY_PATH "duty"
#define ACTIVE_PATH "active"
-/* global static variable */
-static int mFHandlerFrequency[NUMBER_OF_PWM];
-static int mFHandlerPeriod[NUMBER_OF_PWM];
-static int mFHandlerDuty[NUMBER_OF_PWM];
-static int mFHandlerActive[NUMBER_OF_PWM];
-static int mFrequency[NUMBER_OF_PWM];
-static int mPeriod[NUMBER_OF_PWM];
-static int mDuty[NUMBER_OF_PWM];
-static int mState[NUMBER_OF_PWM];
+#define SIZE_OF_BUFF 50
/*------------------------------------------------------------------------------*/
-/** Write a string value in file
+/** @brief Write a string value in file
*
* @param aFile_handler: file handler
* @param aValueWrite: string value
- * @return error code or number char wrote
+ *
+ * @return number char wrote, negative value on error
*/
-int
-writeBuffer(int aFile_handler, char *aValueWrite)
+int writeBuffer(int aFile_handler, char *aValueWrite)
{
int ret;
ret = write(aFile_handler, aValueWrite, strlen(aValueWrite));
if (ret < 0)
{
- perror("Can't write file ");
+ ERROR("Can't write file ");
return ret;
}
ret = lseek(aFile_handler,0,SEEK_SET);
if (ret < 0)
{
- perror("lseek error ");
+ ERROR("lseek error ");
return ret;
}
return ret;
}
+
/*------------------------------------------------------------------------------*/
-/** Initialize pwm
- * @param aPwmNumber number of pwm used
- * @return error code
+/** @brief read a string value in file
+ *
+ * @param aFile_handler: file handler
+ * @param aValueRead[SIZE_OF_BUFF]: char pointer to read buffer
+ *
+ * @return number char read, negative value on error
*/
-int
-as_pwm_init(int aPwmNumber)
+int readBuffer(int aFile_handler, char *aValueRead)
{
- char buffer[50];
-
- mState[aPwmNumber] = 0;
-
- /* open pwm files management */
- snprintf(buffer,50,"%s%d/%s",PWM_SYS_PATH,aPwmNumber,FREQUENCY_PATH);
- if((mFHandlerFrequency[aPwmNumber] = open(buffer,O_RDWR)) < 0)
- {
- perror("Can't open frequency files : ");
- return -1;
- }
- snprintf(buffer,50,"%s%d/%s",PWM_SYS_PATH,aPwmNumber,PERIOD_PATH);
- if((mFHandlerPeriod[aPwmNumber] = open(buffer,O_RDWR)) < 0)
- {
- perror("Can't open period files : ");
- return -1;
- }
- snprintf(buffer,50,"%s%d/%s",PWM_SYS_PATH,aPwmNumber,DUTY_PATH);
- if((mFHandlerDuty[aPwmNumber] = open(buffer,O_RDWR)) < 0)
+ int ret;
+ ret = read(aFile_handler, aValueRead, SIZE_OF_BUFF);
+ if (ret < 0)
{
- perror("Can't open duty files : ");
- return -1;
+ ERROR("Can't read file ");
+ return ret;
}
- snprintf(buffer,50,"%s%d/%s",PWM_SYS_PATH,aPwmNumber,ACTIVE_PATH);
- if((mFHandlerActive[aPwmNumber] = open(buffer,O_RDWR)) < 0)
+ ret = lseek(aFile_handler,0,SEEK_SET);
+ if (ret < 0)
{
- perror("Can't open active files : ");
- return -1;
+ ERROR("lseek error ");
+ return ret;
}
-
- return 0;
+ return ret;
}
/*------------------------------------------------------------------------------*/
-/** Set pwm frequency
- * @param aPwmNumber number of pwm to close
- * @return no error if positive value
- */
-int
-as_pwm_close(int aPwmNumber)
+struct as_pwm_device *as_pwm_open(int aPwmNumber)
{
- int ret = 0;
+ char buffer[SIZE_OF_BUFF];
+ struct as_pwm_device *dev;
- mState[aPwmNumber] = 0;
+ dev = (struct as_pwm_device *)malloc(sizeof(struct as_pwm_device));
+ if (dev == NULL)
+ {
+ ERROR("Can't allocate memory for pwm device structure\n");
+ return NULL;
+ }
/* open pwm files management */
- ret = close(mFHandlerFrequency[aPwmNumber]);
- if(ret < 0)
+ snprintf(buffer,SIZE_OF_BUFF,"%s%d/%s",PWM_SYS_PATH,aPwmNumber,FREQUENCY_PATH);
+ if ((dev->fileFrequency = open(buffer,O_RDWR)) < 0)
{
- perror("Can't close frequency files : ");
- return ret;
+ ERROR("Can't open frequency files");
+ return NULL;
}
- ret = close(mFHandlerPeriod[aPwmNumber]);
- if(ret < 0)
+ snprintf(buffer,SIZE_OF_BUFF,"%s%d/%s",PWM_SYS_PATH,aPwmNumber,PERIOD_PATH);
+ if ((dev->filePeriod = open(buffer,O_RDWR)) < 0)
{
- perror("Can't close period files : ");
- return ret;
+ ERROR("Can't open period files");
+ return NULL;
}
- ret = close(mFHandlerDuty[aPwmNumber]);
- if(ret < 0)
+ snprintf(buffer,SIZE_OF_BUFF,"%s%d/%s",PWM_SYS_PATH,aPwmNumber,DUTY_PATH);
+ if((dev->fileDuty = open(buffer,O_RDWR)) < 0)
{
- perror("Can't close duty files : ");
- return ret;
+ ERROR("Can't open duty files");
+ return NULL;
}
- ret = close(mFHandlerActive[aPwmNumber]);
- if(ret < 0)
+ snprintf(buffer,SIZE_OF_BUFF,"%s%d/%s",PWM_SYS_PATH,aPwmNumber,ACTIVE_PATH);
+ if((dev->fileActive = open(buffer,O_RDWR)) < 0)
{
- perror("Can't close active files : ");
- return ret;
+ ERROR("Can't open active files");
+ return NULL;
}
- return ret;
-
+ return dev;
}
+
/*------------------------------------------------------------------------------*/
-/** Set pwm frequency
- * @param aPwmNumber number of pwm used
- * @param aFrequency frequency in Hz
- * @return no error if positive value
- */
-int
-as_pwm_setFrequency(int aPwmNumber, int aFrequency)
+int32_t as_pwm_set_frequency(struct as_pwm_device *aDev, int aFrequency)
{
- char buffer[50];
+ char buffer[SIZE_OF_BUFF];
- mFrequency[aPwmNumber] = aFrequency;
- snprintf(buffer,50,"%d",mFrequency[aPwmNumber]);
- return writeBuffer(mFHandlerFrequency[aPwmNumber],buffer);
+ snprintf(buffer,SIZE_OF_BUFF,"%d",aFrequency);
+ return writeBuffer(aDev->fileFrequency,buffer);
}
/*------------------------------------------------------------------------------*/
-/** get Frequency value
- * @param aPwmNumber number of pwm used
- * @return int frequency in Hz
- */
-int
-as_pwm_getFrequency(int aPwmNumber)
+
+int32_t as_pwm_get_frequency(struct as_pwm_device *aDev)
{
- return mFrequency[aPwmNumber];
+ char buffer[SIZE_OF_BUFF];
+ int ret;
+
+ ret = readBuffer(aDev->fileFrequency, buffer);
+ if (ret < 0)
+ {
+ ERROR("Can't read frequency\n");
+ return ret;
+ }
+
+ return atoi(buffer);
}
/*------------------------------------------------------------------------------*/
-/** set period
- *
- * @param pwm number used
- * @param aPeriod period in us
- * @return positive value if no error
- */
-int
-as_pwm_setPeriod(int aPwmNumber, int aPeriod)
+
+int32_t as_pwm_set_period(struct as_pwm_device *aDev, int aPeriod)
{
- char buffer[50];
- mPeriod[aPwmNumber] = aPeriod;
- snprintf(buffer,50,"%d",mPeriod[aPwmNumber]);
- return writeBuffer(mFHandlerPeriod[aPwmNumber],buffer);
+ char buffer[SIZE_OF_BUFF];
+
+ snprintf(buffer,SIZE_OF_BUFF,"%d",aPeriod);
+ return writeBuffer(aDev->filePeriod, buffer);
}
/*------------------------------------------------------------------------------*/
-/** get Period
- * @param aPwmNumber pwm number used
- * @return period int in us
- */
-int
-as_pwm_getPeriod(int aPwmNumber)
+
+int32_t as_pwm_get_period(struct as_pwm_device *aDev)
{
- return mPeriod[aPwmNumber];
+ char buffer[SIZE_OF_BUFF];
+ int ret;
+
+ ret = readBuffer(aDev->filePeriod, buffer);
+ if (ret < 0)
+ {
+ ERROR("Can't read period\n");
+ return ret;
+ }
+
+ return atoi(buffer);
}
/*------------------------------------------------------------------------------*/
-/** set duty
- * @param aPwmNumber pwm number used
- * @param aDuty duty in 1/1000
- * @return positive value if no error
- */
-int
-as_pwm_setDuty(int aPwmNumber, int aDuty)
+
+int32_t as_pwm_set_duty(struct as_pwm_device *aDev, int aDuty)
{
- char buffer[50];
- mDuty[aPwmNumber] = aDuty;
- snprintf(buffer, 50, "%d", aDuty);
- return writeBuffer(mFHandlerDuty[aPwmNumber], buffer);
+ char buffer[SIZE_OF_BUFF];
+
+ snprintf(buffer, SIZE_OF_BUFF, "%d", aDuty);
+ return writeBuffer( aDev->fileDuty, buffer);
}
/*------------------------------------------------------------------------------*/
-/** get duty
- *
- * @param aPwmNumber pwm number used
- * @return duty
- */
-int
-as_pwm_getDuty(int aPwmNumber)
+
+int32_t as_pwm_get_duty(struct as_pwm_device *aDev)
{
- return mDuty[aPwmNumber];
+ char buffer[SIZE_OF_BUFF];
+ int ret;
+
+ ret = readBuffer(aDev->fileDuty, buffer);
+ if (ret < 0)
+ {
+ ERROR("Can't read duty\n");
+ return ret;
+ }
+
+ return atoi(buffer);
}
/*------------------------------------------------------------------------------*/
-/** activate pwm
- * @param aPwmNumber pwm number used
- * @param aEnable
- */
-int as_pwm_activate(int aPwmNumber, int aEnable)
+
+int32_t as_pwm_set_state(struct as_pwm_device *aDev, int aEnable)
{
char one[] = "1";
char zero[] = "0";
@@ -248,23 +229,67 @@ int as_pwm_activate(int aPwmNumber, int aEnable)
if(aEnable)
{
- ret = writeBuffer(mFHandlerActive[aPwmNumber],one);
+ ret = writeBuffer(aDev->fileActive,one);
}else{
- ret = writeBuffer(mFHandlerActive[aPwmNumber],zero);
+ ret = writeBuffer(aDev->fileActive,zero);
}
if (ret < 0)
{
+ ERROR("Can't write file Active\n");
return ret;
}
- mState[aPwmNumber] = aEnable;
- return mState[aPwmNumber];
-
+ return ret;
}
-int as_pwm_getState(int aPwmNumber)
+/*------------------------------------------------------------------------------*/
+
+int32_t as_pwm_get_state(struct as_pwm_device *aDev)
{
- //XXX: get real state in pwm driver instead global variable
- return mState[aPwmNumber];
+ char buffer[SIZE_OF_BUFF];
+ int ret;
+
+ ret = readBuffer(aDev->fileActive, buffer);
+ if (ret < 0)
+ {
+ ERROR("Can't read state\n");
+ return ret;
+ }
+
+ return atoi(buffer);
}
+/*------------------------------------------------------------------------------*/
+int32_t as_pwm_close(struct as_pwm_device *aDev)
+{
+ int ret = 0;
+
+ /* open pwm files management */
+ ret = close(aDev->fileFrequency);
+ if(ret < 0)
+ {
+ ERROR("Can't close frequency files");
+ return ret;
+ }
+ ret = close(aDev->filePeriod);
+ if(ret < 0)
+ {
+ ERROR("Can't close period files");
+ return ret;
+ }
+ ret = close(aDev->fileDuty);
+ if(ret < 0)
+ {
+ ERROR("Can't close duty files");
+ return ret;
+ }
+ ret = close(aDev->fileActive);
+ if(ret < 0)
+ {
+ ERROR("Can't close active files");
+ return ret;
+ }
+
+ return ret;
+
+}
diff --git a/target/packages/as_devices/c/as_pwm.h b/target/packages/as_devices/c/as_pwm.h
index 769fa2b..9304ac9 100644
--- a/target/packages/as_devices/c/as_pwm.h
+++ b/target/packages/as_devices/c/as_pwm.h
@@ -1,19 +1,19 @@
/*
** THE ARMadeus Systems
-**
-** Copyright (C) 2009 The armadeus systems team
+**
+** Copyright (C) 2009 The armadeus systems team
** Fabien Marteau <fab...@ar...>
-**
+**
** 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@@ -29,21 +29,96 @@ extern "C" {
/* number of pwm under system */
#define NUMBER_OF_PWM 2
-int as_pwm_init(int aPwmNumber);
+struct as_pwm_device {
+ int fileFrequency;
+ int filePeriod;
+ int fileDuty;
+ int fileActive;
+};
-int as_pwm_setFrequency(int aPwmNumber, int aFrequency);
-int as_pwm_getFrequency(int aPwmNumber);
+/** @brief Open pwm
+ *
+ * @param aPwmNumber the pwm number
+ *
+ * @return pointer to device structure, NULL if error
+ */
+struct as_pwm_device *as_pwm_open(int aPwmNumber);
-int as_pwm_setPeriod(int aPwmNumber, int aPeriod);
-int as_pwm_getPeriod(int aPwmNumber);
+/** @brief set frequency
+ *
+ * @param aDev pointer to device structure
+ * @param aFrequency frequency in Hz
+ *
+ * @return negative value on error
+ */
+int32_t as_pwm_set_frequency(struct as_pwm_device *aDev, int aFrequency);
-int as_pwm_setDuty(int aPwmNumber, int aDuty);
-int as_pwm_getDuty(int aPwmNumber);
+/** @brief get frequency
+ *
+ * @param aDev pointer to device structure
+ *
+ * @return frequency value in Hz, negative value on error
+ */
+int32_t as_pwm_get_frequency(struct as_pwm_device *aDev);
-int as_pwm_activate(int aPwmNumber, int aEnable);
-int as_pwm_getState(int aPwmNumber);
+/** @bief set period
+ *
+ * @param aDev pointer to device structure
+ * @param aPeriod period in uS
+ *
+ * @return negative value on error
+ */
+int32_t as_pwm_set_period(struct as_pwm_device *aDev, int aPeriod);
-int as_pwm_close(int aPwmNumber);
+/** @brief get period value
+ *
+ * @param aDev pointer to device structure
+ *
+ * @return period value in uS, negative value on error.
+ */
+int32_t as_pwm_get_period(struct as_pwm_device *aDev);
+
+/** @brief set duty
+ *
+ * @param aDev pointer to device structure
+ * @param aDuty duty in 0.1%
+ *
+ * @return negative value on error
+ */
+int32_t as_pwm_set_duty(struct as_pwm_device *aDev, int aDuty);
+
+/** @brief get duty
+ *
+ * @param aDev pointer to device structure
+ *
+ * @return duty value in 0.1%, negative value on error
+ */
+int32_t as_pwm_get_duty(struct as_pwm_device *aDev);
+
+/** @brief set state of pwm
+ *
+ * @param aDev pointer to device structure
+ * @param aEnable 0:disable, 1:enable
+ *
+ * @return negative value on error
+ */
+int32_t as_pwm_set_state(struct as_pwm_device *aDev, int aEnable);
+
+/** @brief get state of pwm
+ *
+ * @param aDev pointer to device structure
+ *
+ * @return 0:disabled, 1:enabled, negative value on error
+ */
+int32_t as_pwm_get_state(struct as_pwm_device *aDev);
+
+/** @brief close pwm
+ *
+ * @param aDev pointer structure to device
+ *
+ * @return negative value on error
+ */
+int32_t as_pwm_close(struct as_pwm_device *aDev);
#ifdef __cplusplus
}
diff --git a/target/packages/as_devices/test_c.h b/target/packages/as_devices/test_c.h
index 049ad08..b763ed6 100644
--- a/target/packages/as_devices/test_c.h
+++ b/target/packages/as_devices/test_c.h
@@ -46,10 +46,12 @@ void test_pwm(void)
char buffer[20];
char buffer2[20];
int value;
+ struct as_pwm_device *pwm_dev;
- ret = as_pwm_init(PWM_NUM);
- if(ret < 0){
+ pwm_dev = as_pwm_open(PWM_NUM);
+ if(pwm_dev == NULL){
printf("can't init pwm0\n");
+ pressEnterToContinue();
return;
}
while(buffer[0] != 'q')
@@ -74,41 +76,41 @@ void test_pwm(void)
{
case '1' : printf("Give frequency :");
scanf("%d",&value);
- as_pwm_setFrequency(PWM_NUM,value);
+ as_pwm_set_frequency(pwm_dev,value);
pressEnterToContinue();
break;
case '2' : printf("Current pwm frequency is %d\n",
- as_pwm_getFrequency(PWM_NUM));
+ as_pwm_get_frequency(pwm_dev));
pressEnterToContinue();
break;
case '3' : printf("Give period :");
scanf("%d",&value);
- as_pwm_setPeriod(PWM_NUM,value);
+ as_pwm_set_period(pwm_dev,value);
pressEnterToContinue();
break;
case '4' : printf("Current period is %d\n",
- as_pwm_getPeriod(PWM_NUM));
+ as_pwm_get_period(pwm_dev));
pressEnterToContinue();
break;
case '5' : printf("Give Duty :");
scanf("%d",&value);
- as_pwm_setDuty(PWM_NUM,value);
+ as_pwm_set_duty(pwm_dev,value);
pressEnterToContinue();
break;
case '6' : printf("Current Duty is %d\n",
- as_pwm_getDuty(PWM_NUM));
+ as_pwm_get_duty(pwm_dev));
pressEnterToContinue();
break;
case '7' : printf("Activate 'a' or Desactivate 'd' ?");
scanf("%s",buffer2);
if(buffer2[0] == 'a')
{
- as_pwm_activate(PWM_NUM,1);
+ as_pwm_set_state(pwm_dev,1);
printf("Pwm activated\n");
pressEnterToContinue();
}else if(buffer2[0] == 'd')
{
- as_pwm_activate(PWM_NUM,0);
+ as_pwm_set_state(pwm_dev,0);
printf("Pwm desactivated\n");
pressEnterToContinue();
}else{
@@ -116,7 +118,7 @@ void test_pwm(void)
pressEnterToContinue();
}
break;
- case '8' : if(as_pwm_getState(PWM_NUM))
+ case '8' : if(as_pwm_get_state(pwm_dev))
{
printf("pwm is active\n");
pressEnterToContinue();
@@ -128,7 +130,7 @@ void test_pwm(void)
default : break;
}
}
- ret = as_pwm_close(PWM_NUM);
+ ret = as_pwm_close(pwm_dev);
if(ret < 0){
printf("can't close pwm0\n");
return;
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2010-06-01 16:24:59
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 0d09b77c52240b28b6a22a235430b609e89db8b6 (commit)
via 2cd0ecad691781639553cf29e703fb9a7f07ae1c (commit)
from 95f34287181f89e0db2890b5bb92a16422c7ca1a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0d09b77c52240b28b6a22a235430b609e89db8b6
Merge: 2cd0ecad691781639553cf29e703fb9a7f07ae1c 95f34287181f89e0db2890b5bb92a16422c7ca1a
Author: Fabien Marteau <fab...@ar...>
Date: Tue Jun 1 18:24:01 2010 +0200
Merge branch 'master' of git://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 2cd0ecad691781639553cf29e703fb9a7f07ae1c
Author: Fabien Marteau <fab...@ar...>
Date: Tue Jun 1 18:23:52 2010 +0200
[as_devices] adding Digital to Analog Chip as_max5821, not fully tested
-----------------------------------------------------------------------
Summary of changes:
target/packages/as_devices/c/Makefile | 1 +
target/packages/as_devices/c/as_i2c.h | 10 +--
target/packages/as_devices/c/as_max5821.c | 159 +++++++++++++++++++++++++++++
target/packages/as_devices/c/as_max5821.h | 100 ++++++++++++++++++
target/packages/as_devices/main.c | 2 +
target/packages/as_devices/test_c.h | 107 +++++++++++++++++++
6 files changed, 372 insertions(+), 7 deletions(-)
create mode 100644 target/packages/as_devices/c/as_max5821.c
create mode 100644 target/packages/as_devices/c/as_max5821.h
diff --git a/target/packages/as_devices/c/Makefile b/target/packages/as_devices/c/Makefile
index bf59fa8..e8c5e9d 100644
--- a/target/packages/as_devices/c/Makefile
+++ b/target/packages/as_devices/c/Makefile
@@ -26,6 +26,7 @@ OBJ+= as_gpio.o
OBJ+= as_93lcxx.o
OBJ+= as_spi.o
OBJ+= as_max1027.o
+OBJ+= as_max5821.o
LIBRARY=as_devices
LIB_VERS=1
diff --git a/target/packages/as_devices/c/as_i2c.h b/target/packages/as_devices/c/as_i2c.h
index e6ea0cb..8f967b4 100644
--- a/target/packages/as_devices/c/as_i2c.h
+++ b/target/packages/as_devices/c/as_i2c.h
@@ -3,12 +3,12 @@
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@@ -46,7 +46,7 @@ extern "C" {
/** @brief Open an I2C bus.
*
- * \e i2c_id is the ID of the I2C bus to open, it should strictly lower than
+ * \e i2c_id is the ID of the I2C bus to open, it should be strictly lower than
* \e AS_I2C_DEV_COUNT.
*
* @return the file descriptor of the opened device, -1 on error.
@@ -67,7 +67,6 @@ int as_i2c_close(int fd);
*/
int as_i2c_set_slave(int fd, uint8_t addr);
-
/** @brief Read several bytes.
*
* @return 0 on success, -1 on error.
@@ -80,7 +79,6 @@ int as_i2c_read(int fd, uint8_t addr, uint8_t *data, size_t n);
*/
int as_i2c_write(int fd, uint8_t addr, const uint8_t *data, size_t n);
-
/** @brief Read at a given register address.
*
* Send the \e reg byte, then read bytes.
@@ -97,7 +95,6 @@ int as_i2c_read_reg(int fd, uint8_t addr, uint8_t reg, uint8_t *data, size_t n);
*/
int as_i2c_write_reg(int fd, uint8_t addr, uint8_t reg, const uint8_t *data, size_t n);
-
/** @brief Read a given register byte.
*
* Send the \e reg byte, then read and return a single byte.
@@ -119,7 +116,6 @@ int as_i2c_read_reg_byte(int fd, uint8_t addr, uint8_t reg);
*/
int as_i2c_write_reg_byte(int fd, uint8_t addr, uint8_t reg, uint8_t val);
-
#ifdef __cplusplus
}
#endif // __cplusplus
diff --git a/target/packages/as_devices/c/as_max5821.c b/target/packages/as_devices/c/as_max5821.c
new file mode 100644
index 0000000..ce11c06
--- /dev/null
+++ b/target/packages/as_devices/c/as_max5821.c
@@ -0,0 +1,159 @@
+/*
+ * This software 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ *
+ * Copyright (C) 2010 Fabien Marteau <fab...@ar...>
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "as_max5821.h"
+#include "as_i2c.h"
+
+
+/* command bytes */
+#define MAX5821_UPDATE_ALL_DAC_COMMAND (0xE0)
+#define MAX5821_EXTENDED_COMMAND_MODE (0xF0)
+
+#define MAX5821_POWER_CTRL_SELECTED (0x1)
+#define MAX5821_POWER_CTRL_UNSELECTED (0x0)
+
+#define MAX5821M_MAX_DATA_VALUE (1023)
+
+//#define ERROR(fmt, ...) /*fmt, ##__VA_ARGS__*/
+#define ERROR(fmt, ...) printf(fmt, ##__VA_ARGS__)
+
+/*-----------------------------------------------------------------------------*/
+
+struct as_max5821_device *as_max5821_open(int aI2cBus, int aI2cAddress)
+{
+ struct as_max5821_device *dev;
+
+ dev = (struct as_max5821_device *)malloc(sizeof(struct as_max5821_device));
+ if (dev == NULL)
+ {
+ ERROR("can't allocate memory for device structure\n");
+ return NULL;
+ }
+
+ dev->i2c_bus = as_i2c_open(aI2cBus);
+ if (dev->i2c_bus < 0)
+ {
+ ERROR("Can't open i2c bus number %d\n",aI2cBus);
+ free(dev);
+ return NULL;
+ }
+
+ dev->i2c_address = aI2cAddress;
+
+ return dev;
+}
+
+/*-----------------------------------------------------------------------------*/
+
+int32_t as_max5821_power(struct as_max5821_device *aDev,
+ char aChannel,
+ AS_max5821_power_mode aMode)
+{
+ int ret;
+ unsigned char buff[2];
+
+ switch(aChannel)
+ {
+ case 'a':
+ case 'A': buff[1] = (1<<2) | aMode;
+ break;
+ case 'b':
+ case 'B': buff[1] = (1<<3) | aMode;
+ break;
+ default: ERROR("Wrong channel name %c\n", aChannel);
+ return -1;
+ }
+
+ buff[0] = MAX5821_EXTENDED_COMMAND_MODE;
+
+ ret = as_i2c_write(aDev->i2c_bus, aDev->i2c_address, buff, 2);
+ if (ret < 0) {
+ ERROR("can't write on i2c bus %d, address %d, value %x %x\n",
+ aDev->i2c_bus,aDev->i2c_address,buff[0], buff[1]);
+ return -1;
+ }
+
+ return 0;
+}
+
+/*-----------------------------------------------------------------------------*/
+
+int32_t as_max5821_set_one_value(struct as_max5821_device *aDev,
+ char aChannel,
+ int aValue)
+{
+ int ret;
+ unsigned char buff[2];
+
+ switch(aChannel)
+ {
+ case 'a':
+ case 'A': buff[0] = (aValue >> 8) & 0x0F;
+ break;
+ case 'b':
+ case 'B': buff[0] = 0x10 | ((aValue >> 8) & 0x0F);
+ break;
+ default: ERROR("Wrong channel name %c\n", aChannel);
+ return -1;
+ }
+
+ buff[1] =(unsigned char)(aValue & 0x00FF);
+
+ ret = as_i2c_write(aDev->i2c_bus, aDev->i2c_address, buff, 2);
+ if (ret < 0) {
+ ERROR("can't write on i2c bus\n");
+ return -1;
+ }
+
+ return 0;
+}
+
+/*-----------------------------------------------------------------------------*/
+
+int32_t as_max5821_set_both_value(struct as_max5821_device *aDev,
+ int aValue)
+{
+ int ret;
+ unsigned char buff[2];
+
+ buff[0] = 0xC0 | ((unsigned char)((aValue >> 8)) & 0x0F);
+ buff[1] = (unsigned char)(aValue & 0x00FF);
+
+ ret = as_i2c_write(aDev->i2c_bus, aDev->i2c_address, buff, 2);
+ if (ret < 0) {
+ ERROR("can't write on i2c bus\n");
+ return -1;
+ }
+
+ return 0;
+}
+
+/*-----------------------------------------------------------------------------*/
+
+int32_t as_max5821_close(struct as_max5821_device *aDev)
+{
+ as_i2c_close(aDev->i2c_bus);
+ free(aDev);
+ return 0;
+}
+
diff --git a/target/packages/as_devices/c/as_max5821.h b/target/packages/as_devices/c/as_max5821.h
new file mode 100644
index 0000000..580d1bc
--- /dev/null
+++ b/target/packages/as_devices/c/as_max5821.h
@@ -0,0 +1,100 @@
+/*
+ * This software 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ *
+ * Copyright (C) 2010 Fabien Marteau <fab...@ar...>
+ *
+ */
+
+#ifndef AS_MAX5821_H_
+#define AS_MAX5821_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "as_i2c.h"
+
+/**
+ * Store max5821 parameters
+ */
+struct as_max5821_device {
+ int i2c_bus;
+ int i2c_address;
+};
+
+typedef enum {
+ MAX5821_POWER_UP = 0,
+ MAX5821_POWER_DOWN_MODE0,
+ MAX5821_POWER_DOWN_MODE1,
+ MAX5821_POWER_DOWN_MODE2
+} AS_max5821_power_mode;
+
+/** @brief Open max5821
+ *
+ * @param aI2cBus i2c bus number
+ * @param aI2cAddress i2c chip address
+ *
+ * @return as_max5821_device structure on success, NULL on error
+ */
+struct as_max5821_device *as_max5821_open(int aI2cBus, int aI2cAddress);
+
+/** @brief Power a channel
+ *
+ * @param aDev pointer to device structure
+ * @param aChannel caracter to channel
+ * @param aPowerCmd power command
+ *
+ * @return negative value on header.
+ */
+int32_t as_max5821_power(struct as_max5821_device *aDev,
+ char aChannel,
+ AS_max5821_power_mode aMode);
+
+/** @brief set output value
+ *
+ * @param aDev pointer to device structure
+ * @param aChannel caracter to channel
+ * @param aValue value between 0 and 1023
+ *
+ * @return negative value on error.
+ */
+int32_t as_max5821_set_one_value(struct as_max5821_device *aDev,
+ char aChannel,
+ int aValue);
+
+/** @brief set both output value
+ *
+ * @param aDev pointer to device structure
+ * @param aValue value between 0 and 1023
+ *
+ * @return negative value on error
+ */
+int32_t as_max5821_set_both_value(struct as_max5821_device *aDev,
+ int aValue);
+
+/** @brief Close max5821
+ *
+ * @param aDev structure device pointer
+ *
+ * @return negative value on error
+ */
+int32_t as_max5821_close(struct as_max5821_device *aDev);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* AS_MAX5821_H_ */
diff --git a/target/packages/as_devices/main.c b/target/packages/as_devices/main.c
index f261c14..b0e4fd5 100644
--- a/target/packages/as_devices/main.c
+++ b/target/packages/as_devices/main.c
@@ -43,6 +43,7 @@ int main(int argc, char ** argv)
printf(" 4) Testing 93LCxx eprom\n");
printf(" 5) Testing gpio\n");
printf(" 6) Testing max1027\n");
+ printf(" 7) Testing max5821\n");
printf("> ");
scanf("%s",buffer);
@@ -60,6 +61,7 @@ int main(int argc, char ** argv)
break;
case '6' : test_max1027();
break;
+ case '7' : test_max5821();
default : break;
}
diff --git a/target/packages/as_devices/test_c.h b/target/packages/as_devices/test_c.h
index d864b5f..049ad08 100644
--- a/target/packages/as_devices/test_c.h
+++ b/target/packages/as_devices/test_c.h
@@ -28,6 +28,7 @@
#include "as_i2c.h"
#include "as_gpio.h"
#include "as_max1027.h"
+#include "as_max5821.h"
#define PWM_NUM 0
@@ -766,4 +767,110 @@ void test_max1027()
}
}
+void test_max5821()
+{
+ char buffer[50];
+ int ret;
+ int value;
+ struct as_max5821_device *max5821_dev;
+ int channelA=0;
+ int channelB=0;
+
+
+ max5821_dev = as_max5821_open(0, 0x38);
+ if (max5821_dev == NULL)
+ {
+ printf("Error, can't open max5821.\n");
+ pressEnterToContinue();
+ return ;
+ }
+ pressEnterToContinue();
+
+ while(buffer[0] != 'q')
+ {
+ system("clear");
+ printf("**************************\n");
+ printf(" Testing max5821 *\n");
+ printf("**************************\n");
+ printf("Choose ('q' to quit):\n");
+ printf(" 1) select power mode for channel A\n");
+ printf(" 2) select power mode for channel B\n");
+ printf(" 3) select channel A value %d\n", channelA);
+ printf(" 4) select channel B value %d\n", channelB);
+ printf(" 5) select both channel values\n");
+
+ printf("> ");
+ scanf("%s",buffer);
+
+ switch(buffer[0])
+ {
+ case '1' : printf("Choose your mode:\n");
+ printf(" 0) MAX5821_POWER_UP \n");
+ printf(" 1) MAX5821_POWER_DOWN_MODE0\n");
+ printf(" 2) MAX5821_POWER_DOWN_MODE1\n");
+ printf(" 3) MAX5821_POWER_DOWN_MODE2\n");
+ printf("> ");
+ scanf("%d", &value);
+ ret = as_max5821_power(max5821_dev, 'a', value);
+ if (ret < 0)
+ {
+ printf("Error, can't select power mode\n");
+ }
+ pressEnterToContinue();
+ break;
+ case '2' : printf("Choose your mode:\n");
+ printf(" 0) MAX5821_POWER_UP \n");
+ printf(" 1) MAX5821_POWER_DOWN_MODE0\n");
+ printf(" 2) MAX5821_POWER_DOWN_MODE1\n");
+ printf(" 3) MAX5821_POWER_DOWN_MODE2\n");
+ printf("> ");
+ scanf("%d", &value);
+ ret = as_max5821_power(max5821_dev, 'b', value);
+ if (ret < 0)
+ {
+ printf("Error, can't select power mode\n");
+ }
+ pressEnterToContinue();
+ break;
+ case '3' : printf("Give value between 0-1023\n");
+ printf("> ");
+ scanf("%d", &value);
+ ret = as_max5821_set_one_value(max5821_dev, 'a', value);
+ if (ret < 0)
+ {
+ printf("Error, can't select value\n");
+ }
+ pressEnterToContinue();
+ break;
+ case '4' : printf("Give value between 0-1023\n");
+ printf("> ");
+ scanf("%d", &value);
+ ret = as_max5821_set_one_value(max5821_dev, 'b', value);
+ if (ret < 0)
+ {
+ printf("Error, can't select value\n");
+ }
+ pressEnterToContinue();
+ break;
+ case '5' : printf("Give value between 0-1023\n");
+ printf("> ");
+ scanf("%d", &value);
+ ret = as_max5821_set_both_value(max5821_dev, value);
+ if (ret < 0)
+ {
+ printf("Error, can't select value\n");
+ }
+ pressEnterToContinue();
+ break;
+ default : break;
+ }
+ }
+
+ ret = as_max5821_close(max5821_dev);
+ if (ret < 0) {
+ printf("Error on closing max5821_dev\n");
+ pressEnterToContinue();
+ }
+}
+
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2010-06-01 15:31:41
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 95f34287181f89e0db2890b5bb92a16422c7ca1a (commit)
via 5865a273bc016e799722476cc88fdaf0f6c12615 (commit)
via f44a861dcf7c4114f54d345e57cae2d92aee4718 (commit)
from a55ad4cda7562637e322c5b5ab7405d5aa0e7239 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 95f34287181f89e0db2890b5bb92a16422c7ca1a
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jun 1 17:29:49 2010 +0200
[BUILDROOT] Upgrade bluez to 3.36 and do a little cleanup while we are at it.
commit 5865a273bc016e799722476cc88fdaf0f6c12615
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jun 1 17:22:31 2010 +0200
[TESTS] test_gpio.sh: use gpio_mode instead of setbit and test driver is correctly unloading
commit f44a861dcf7c4114f54d345e57cae2d92aee4718
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jun 1 17:20:49 2010 +0200
updates package/.gitignore
-----------------------------------------------------------------------
Summary of changes:
buildroot/package/.gitignore | 1 -
buildroot/package/bluez/Config.in | 14 ++-
buildroot/package/bluez/bluez-libs.mk | 13 +++
buildroot/package/bluez/bluez-utils.mk | 90 ++++++++++++++++
buildroot/package/bluez/bluez.mk | 177 --------------------------------
buildroot/package/bluez/hcid.conf | 2 +-
target/test/test_gpio.sh | 4 +-
7 files changed, 116 insertions(+), 185 deletions(-)
create mode 100644 buildroot/package/bluez/bluez-libs.mk
create mode 100644 buildroot/package/bluez/bluez-utils.mk
delete mode 100644 buildroot/package/bluez/bluez.mk
diff --git a/buildroot/package/.gitignore b/buildroot/package/.gitignore
index 14597d9..922667d 100644
--- a/buildroot/package/.gitignore
+++ b/buildroot/package/.gitignore
@@ -18,7 +18,6 @@
!/lcd4linux/
!/lmbench/
!/mesa/
-!/mplayer/
!/mtd/
!/openssh/
!/pymysql/
diff --git a/buildroot/package/bluez/Config.in b/buildroot/package/bluez/Config.in
index f976bef..72b3c8b 100644
--- a/buildroot/package/bluez/Config.in
+++ b/buildroot/package/bluez/Config.in
@@ -1,10 +1,16 @@
-config BR2_PACKAGE_BLUEZ
+config BR2_PACKAGE_BLUEZ_LIBS
bool "bluez"
+ select BR2_PACKAGE_PKGCONFIG
+ help
+ Install the bluez library
+
+config BR2_PACKAGE_BLUEZ_UTILS
+ bool "bluez-utils"
default n
depends on BR2_PACKAGE_DBUS
- select BR2_PACKAGE_PKGCONFIG
+ select BR2_PACKAGE_BLUEZ_LIBS
help
- Install the bluez package
+ Install the bluez utilities
-comment "bluez not available (need dbus)"
+comment "bluez-utils not available (need dbus)"
depends on !BR2_PACKAGE_DBUS
diff --git a/buildroot/package/bluez/bluez-libs.mk b/buildroot/package/bluez/bluez-libs.mk
new file mode 100644
index 0000000..d903d75
--- /dev/null
+++ b/buildroot/package/bluez/bluez-libs.mk
@@ -0,0 +1,13 @@
+#############################################################
+#
+# bluez-libs
+#
+#############################################################
+BLUEZ_LIBS_VERSION:=3.36
+BLUEZ_LIBS_SITE = http://bluez.sourceforge.net/download
+BLUEZ_LIBS_SOURCE = bluez-libs-$(BLUEZ_LIBS_VERSION).tar.gz
+BLUEZ_LIBS_INSTALL_STAGING = YES
+BLUEZ_LIBS_INSTALL_TARGET = YES
+
+$(eval $(call AUTOTARGETS,package,bluez-libs))
+
diff --git a/buildroot/package/bluez/bluez-utils.mk b/buildroot/package/bluez/bluez-utils.mk
new file mode 100644
index 0000000..02575d0
--- /dev/null
+++ b/buildroot/package/bluez/bluez-utils.mk
@@ -0,0 +1,90 @@
+#############################################################
+#
+# bluez-utils - User space programs for controling Bluetooth
+#
+#############################################################
+BLUEZ_UTILS_VERSION:=3.36
+BLUEZ_UTILS_SITE=http://bluez.sourceforge.net/download
+BLUEZ_UTILS_SOURCE=bluez-utils-$(BLUEZ_UTILS_VERSION).tar.gz
+
+#BLUEZ_HCIDUMP_SOURCE=bluez-hcidump-1.39.tar.gz
+#BLUEZ_HCIDUMP_BUILD_DIR=$(BUILD_DIR)/bluez-hcidump-1.39
+
+
+ifeq ($(strip $(BR2_PACKAGE_ALSA-LIB)),y)
+WITH_ALSA=--with-alsa=$(STAGING_DIR)
+else
+WITH_ALSA=--without-alsa
+endif
+
+ifeq ($(strip $(BR2_PACKAGE_OPENOBEX)),y)
+OBEX_DEP=$(STAGING_DIR)/lib/libopenobex.so
+WITH_OBEX=--with-openobex=$(STAGING_DIR)
+else
+OBEX_DEP=
+WITH_OBEX=--without-obex
+endif
+
+BLUEZ_UTILS_CONF_OPT = \
+ $(WITH_OBEX) \
+ $(WITH_ALSA) \
+ --disable-expat \
+ --enable-network \
+ --enable-serial \
+ --disable-audio \
+ --disable-input \
+ --enable-sync \
+ --enable-hcid \
+ --enable-sdpd \
+ --enable-hidd \
+ --enable-pand \
+ --disable-test \
+ --enable-configfiles \
+ --disable-manpages \
+ --enable-initscripts \
+ --disable-pcmciarules \
+ --disable-bccmd \
+ --enable-avctrl \
+ --enable-hid2hci \
+ --disable-dfutool \
+
+# --disable-audio : otherwise link problem with Host libasound
+
+
+#$(BLUEZ_UTILS_BUILD_DIR)/.configured: $(BLUEZ_UTILS_BUILD_DIR)/.unpacked $(TARGET_DIR)/usr/lib/libbluetooth.so $(OBEX_DEP)
+
+BLUEZ_UTILS_DEPENDENCIES = bluez-libs dbus
+
+$(eval $(call AUTOTARGETS,package,bluez-utils))
+
+
+$(BLUEZ_HCIDUMP_BUILD_DIR)/hcidump: $(BLUEZ_HCIDUMP_BUILD_DIR)/.configured
+ $(MAKE) -C $(BLUEZ_HCIDUMP_BUILD_DIR)
+
+$(STAGING_DIR)/usr/lib/libbluetooth.so $(STAGING_DIR)/usr/lib/libbluetooth.a: $(BLUEZ_LIBS_BUILD_DIR)/src/libbluetooth.la
+ $(MAKE) DESTDIR="$(STAGING_DIR)" -C $(BLUEZ_LIBS_BUILD_DIR) install
+ $(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/lib/libbluetooth.la
+
+$(TARGET_DIR)/usr/sbin/hcidump: $(BLUEZ_HCIDUMP_BUILD_DIR)/hcidump
+ $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(BLUEZ_HCIDUMP_BUILD_DIR) install
+ rm -rf $(TARGET_DIR)/usr/share/man
+
+$(TARGET_DIR)/usr/sbin/hciattach: $(BLUEZ_UTILS_BUILD_DIR)/tools/hciattach
+ (list='hcid dund hidd audio input network pand rfcomm sdpd tools'; for p in $$list; do \
+ $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(BLUEZ_UTILS_BUILD_DIR)/$$p install; \
+ done)
+ mkdir -p $(TARGET_DIR)/etc/bluetooth/pan $(TARGET_DIR)/etc/bluetooth/rfcomm
+ install -D -m 0644 package/bluez/hcid.conf $(TARGET_DIR)/etc/bluetooth/hcid.conf
+ install -D -m 0755 package/bluez/bluez-utils-bluepin.sh $(TARGET_DIR)/etc/bluetooth/bluepin
+ install -D -m 0755 package/bluez/bluez-pand-devup.sh $(TARGET_DIR)/etc/bluetooth/pan/dev-up
+ install -D -m 0755 package/bluez/rfcomm-getty $(TARGET_DIR)/etc/bluetooth/rfcomm/rfcomm-getty
+ echo "1234" > $(TARGET_DIR)/etc/bluetooth/pin
+ chmod 0600 $(TARGET_DIR)/etc/bluetooth/pin
+ install -D -m 0644 package/bluez/rfcomm.conf $(TARGET_DIR)/etc/bluetooth/rfcomm.conf
+ #install -D -m 0755 package/bluez/bluetooth.init $(TARGET_DIR)/etc/init.d/S30bluetooth TBDJB
+ mkdir -p $(TARGET_DIR)/etc/default
+ install -D -m 0644 package/bluez/bluetooth.default $(TARGET_DIR)/etc/default/bluetooth
+ install -D -m 0644 package/bluez/bluetooth.conf $(TARGET_DIR)/etc/dbus-1/system.d/bluetooth.conf
+
+#bluez-hcidump: bluez-libs $(TARGET_DIR)/usr/sbin/hcidump
+
diff --git a/buildroot/package/bluez/bluez.mk b/buildroot/package/bluez/bluez.mk
deleted file mode 100644
index 278d488..0000000
--- a/buildroot/package/bluez/bluez.mk
+++ /dev/null
@@ -1,177 +0,0 @@
-#############################################################
-#
-# bluez-utils - User Space Program For Controling Bluetooth
-#
-#############################################################
-#
-BLUEZ_SOURCE_URL=http://bluez.sourceforge.net/download
-BLUEZ_LIBS_SOURCE=bluez-libs-3.20.tar.gz
-BLUEZ_UTILS_SOURCE=bluez-utils-3.20.tar.gz
-BLUEZ_HCIDUMP_SOURCE=bluez-hcidump-1.39.tar.gz
-BLUEZ_LIBS_BUILD_DIR=$(BUILD_DIR)/bluez-libs-3.20
-BLUEZ_UTILS_BUILD_DIR=$(BUILD_DIR)/bluez-utils-3.20
-BLUEZ_HCIDUMP_BUILD_DIR=$(BUILD_DIR)/bluez-hcidump-1.39
-
-$(DL_DIR)/$(BLUEZ_LIBS_SOURCE):
- $(WGET) -P $(DL_DIR) $(BLUEZ_SOURCE_URL)/$(BLUEZ_LIBS_SOURCE)
-
-$(DL_DIR)/$(BLUEZ_UTILS_SOURCE):
- $(WGET) -P $(DL_DIR) $(BLUEZ_SOURCE_URL)/$(BLUEZ_UTILS_SOURCE)
-
-$(DL_DIR)/$(BLUEZ_HCIDUMP_SOURCE):
- $(WGET) -P $(DL_DIR) $(BLUEZ_SOURCE_URL)/$(BLUEZ_HCIDUMP_SOURCE)
-
-$(BLUEZ_LIBS_BUILD_DIR)/.unpacked: $(DL_DIR)/$(BLUEZ_LIBS_SOURCE)
- zcat $(DL_DIR)/$(BLUEZ_LIBS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(BLUEZ_LIBS_BUILD_DIR) package/bluez bluez-libs*.patch
- touch $(BLUEZ_LIBS_BUILD_DIR)/.unpacked
-
-$(BLUEZ_UTILS_BUILD_DIR)/.unpacked: $(DL_DIR)/$(BLUEZ_UTILS_SOURCE)
- zcat $(DL_DIR)/$(BLUEZ_UTILS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(BLUEZ_UTILS_BUILD_DIR) package/bluez bluez-utils*.patch
- touch $(BLUEZ_UTILS_BUILD_DIR)/.unpacked
-
-$(BLUEZ_HCIDUMP_BUILD_DIR)/.unpacked: $(DL_DIR)/$(BLUEZ_HCIDUMP_SOURCE)
- zcat $(DL_DIR)/$(BLUEZ_HCIDUMP_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- touch $(BLUEZ_HCIDUMP_BUILD_DIR)/.unpacked
-
-$(BLUEZ_LIBS_BUILD_DIR)/.configured: $(BLUEZ_LIBS_BUILD_DIR)/.unpacked
- (cd $(BLUEZ_LIBS_BUILD_DIR); rm -rf config.cache; \
- $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS)" \
- PKG_CONFIG_PATH="$(STAGING_DIR)/lib/pkconfig:$(STAGING_DIR)/usr/lib/pkgconfig" PKG_CONFIG="$(STAGING_DIR)/usr/bin/pkg-config" PKG_CONFIG_SYSROOT=$(STAGING_DIR) \
- ./configure \
- --target=$(GNU_TARGET_NAME) \
- --host=$(GNU_TARGET_NAME) \
- --build=$(GNU_HOST_NAME) \
- --prefix=/usr \
- );
- touch $(BLUEZ_LIBS_BUILD_DIR)/.configured
-
-ifeq ($(strip $(BR2_PACKAGE_ALSA-LIB)),y)
-WITH_ALSA=--with-alsa=$(STAGING_DIR)
-else
-WITH_ALSA=--without-alsa
-endif
-
-ifeq ($(strip $(BR2_PACKAGE_OPENOBEX)),y)
-OBEX_DEP=$(STAGING_DIR)/lib/libopenobex.so
-WITH_OBEX=--with-openobex=$(STAGING_DIR)
-else
-OBEX_DEP=
-WITH_OBEX=--without-obex
-endif
-
-$(BLUEZ_UTILS_BUILD_DIR)/.configured: $(BLUEZ_UTILS_BUILD_DIR)/.unpacked $(TARGET_DIR)/usr/lib/libbluetooth.so $(OBEX_DEP)
- (cd $(BLUEZ_UTILS_BUILD_DIR); rm -rf config.cache; \
- $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS)" \
- PKG_CONFIG_PATH="$(STAGING_DIR)/lib/pkconfig:$(STAGING_DIR)/usr/lib/pkgconfig" PKG_CONFIG="$(STAGING_DIR)/usr/bin/pkg-config" PKG_CONFIG_SYSROOT=$(STAGING_DIR) \
- ./configure \
- $(WITH_OBEX) \
- $(WITH_ALSA) \
- --disable-expat \
- --enable-network \
- --enable-serial \
- --disable-input \
- --enable-audio \
- --enable-sync \
- --enable-hcid \
- --enable-sdpd \
- --enable-hidd \
- --enable-pand \
- --disable-test \
- --enable-configfiles \
- --disable-manpages \
- --enable-initscripts \
- --disable-pcmciarules \
- --disable-bccmd \
- --enable-avctrl \
- --enable-hid2hci \
- --disable-dfutool \
- --target=$(GNU_TARGET_NAME) \
- --host=$(GNU_TARGET_NAME) \
- --build=$(GNU_HOST_NAME) \
- --prefix=/usr \
- );
- touch $(BLUEZ_UTILS_BUILD_DIR)/.configured
-
-
-$(BLUEZ_HCIDUMP_BUILD_DIR)/.configured: $(BLUEZ_HCIDUMP_BUILD_DIR)/.unpacked $(TARGET_DIR)/usr/lib/libbluetooth.so
- (cd $(BLUEZ_HCIDUMP_BUILD_DIR); rm -rf config.cache; \
- $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS)" \
- PKG_CONFIG_PATH="$(STAGING_DIR)/lib/pkconfig:$(STAGING_DIR)/usr/lib/pkgconfig" PKG_CONFIG="$(STAGING_DIR)/usr/bin/pkg-config" PKG_CONFIG_SYSROOT=$(STAGING_DIR) \
- ./configure \
- --target=$(GNU_TARGET_NAME) \
- --host=$(GNU_TARGET_NAME) \
- --build=$(GNU_HOST_NAME) \
- --prefix=/usr \
- );
- touch $(BLUEZ_HCIDUMP_BUILD_DIR)/.configured
-
-$(BLUEZ_LIBS_BUILD_DIR)/src/libbluetooth.la: $(BLUEZ_LIBS_BUILD_DIR)/.configured
- $(MAKE) -C $(BLUEZ_LIBS_BUILD_DIR)
-
-$(BLUEZ_UTILS_BUILD_DIR)/tools/hciattach: $(BLUEZ_UTILS_BUILD_DIR)/.configured
- $(MAKE) -C $(BLUEZ_UTILS_BUILD_DIR)
-
-$(BLUEZ_HCIDUMP_BUILD_DIR)/hcidump: $(BLUEZ_HCIDUMP_BUILD_DIR)/.configured
- $(MAKE) -C $(BLUEZ_HCIDUMP_BUILD_DIR)
-
-$(STAGING_DIR)/usr/lib/libbluetooth.so $(STAGING_DIR)/usr/lib/libbluetooth.a: $(BLUEZ_LIBS_BUILD_DIR)/src/libbluetooth.la
- $(MAKE) DESTDIR="$(STAGING_DIR)" -C $(BLUEZ_LIBS_BUILD_DIR) install
- $(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/lib/libbluetooth.la
-
-$(TARGET_DIR)/usr/lib/libbluetooth.so: $(STAGING_DIR)/usr/lib/libbluetooth.so
- mkdir -p $(TARGET_DIR)/usr/lib
- install -D -m 0755 $(STAGING_DIR)/usr/lib/libbluetooth.so* $(TARGET_DIR)/usr/lib
- $(STRIPCMD) $(TARGET_DIR)/usr/lib/libbluetooth.so
-
-$(TARGET_DIR)/usr/sbin/hcidump: $(BLUEZ_HCIDUMP_BUILD_DIR)/hcidump
- $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(BLUEZ_HCIDUMP_BUILD_DIR) install
- rm -rf $(TARGET_DIR)/usr/share/man
-
-$(TARGET_DIR)/usr/sbin/hciattach: $(BLUEZ_UTILS_BUILD_DIR)/tools/hciattach
- (list='hcid dund hidd audio input network rfcomm sdpd tools'; for p in $$list; do \
- $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(BLUEZ_UTILS_BUILD_DIR)/$$p install; \
- done)
- mkdir -p $(TARGET_DIR)/etc/bluetooth/pan $(TARGET_DIR)/etc/bluetooth/rfcomm
- install -D -m 0644 package/bluez/hcid.conf $(TARGET_DIR)/etc/bluetooth/hcid.conf
- install -D -m 0755 package/bluez/bluez-utils-bluepin.sh $(TARGET_DIR)/etc/bluetooth/bluepin
- install -D -m 0755 package/bluez/bluez-pand-devup.sh $(TARGET_DIR)/etc/bluetooth/pan/dev-up
- install -D -m 0755 package/bluez/rfcomm-getty $(TARGET_DIR)/etc/bluetooth/rfcomm/rfcomm-getty
- echo "1234" > $(TARGET_DIR)/etc/bluetooth/pin
- chmod 0600 $(TARGET_DIR)/etc/bluetooth/pin
- install -D -m 0644 package/bluez/rfcomm.conf $(TARGET_DIR)/etc/bluetooth/rfcomm.conf
- #install -D -m 0755 package/bluez/bluetooth.init $(TARGET_DIR)/etc/init.d/S30bluetooth TBDJB
- mkdir -p $(TARGET_DIR)/etc/default
- install -D -m 0644 package/bluez/bluetooth.default $(TARGET_DIR)/etc/default/bluetooth
- install -D -m 0644 package/bluez/bluetooth.conf $(TARGET_DIR)/etc/dbus-1/system.d/bluetooth.conf
-
-.PHONY: bluez-libs-staging bluez-libs bluez-libs-source bluez-utils
-
-bluez-utils: bluez-libs dbus $(TARGET_DIR)/usr/sbin/hciattach
-
-bluez-utils-dirclean: bluez-libs-dirclean
- rm -rf $(BLUEZ_UTILS_BUILD_DIR)
-
-bluez-hcidump: bluez-libs $(TARGET_DIR)/usr/sbin/hcidump
-
-bluez-libs-staging: $(STAGING_DIR)/usr/lib/libbluetooth.a
-
-bluez-libs: $(TARGET_DIR)/usr/lib/libbluetooth.so
-
-bluez-libs-source: $(DL_DIR)/$(BLUEZ_SOURCE)
-
-bluez-libs-clean:
- -$(MAKE) -C $(BLUEZ_LIBS_BUILD_DIR) clean
-
-bluez-libs-dirclean:
- rm -rf $(BLUEZ_LIBS_BUILD_DIR)
-
-#############################################################
-#
-## Toplevel Makefile options
-#
-##############################################################
-ifeq ($(strip $(BR2_PACKAGE_BLUEZ)),y)
-TARGETS+=bluez-utils
-endif
diff --git a/buildroot/package/bluez/hcid.conf b/buildroot/package/bluez/hcid.conf
index 761e17b..87ee30d 100644
--- a/buildroot/package/bluez/hcid.conf
+++ b/buildroot/package/bluez/hcid.conf
@@ -29,7 +29,7 @@ device {
# Local device name
# %d - device id
# %h - host name
- name "Gumstix (%d)";
+ name "%h (%d)";
# Local device class
class 0x820116;
diff --git a/target/test/test_gpio.sh b/target/test/test_gpio.sh
index 02cef71..e1c7be1 100755
--- a/target/test/test_gpio.sh
+++ b/target/test/test_gpio.sh
@@ -42,8 +42,7 @@ blink_led_apf9328()
check_button_apf27()
{
- setbit /proc/driver/gpio/portFmode 13 1
- setbit /proc/driver/gpio/portFdir 13 0
+ gpio_mode PF13 0 # input
setbit /proc/driver/gpio/portFirq 13 1
echo "Press 2 times on S1 button"
/usr/bin/testsuite/testbutton /dev/gpio/PF13 3
@@ -78,6 +77,7 @@ test_led_gpio()
execute_for_target check_button_apf9328 check_button_apf27
+ rmmod gpio
echo_test_ok
exit 0
}
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2010-06-01 08:33:01
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via a55ad4cda7562637e322c5b5ab7405d5aa0e7239 (commit)
via a5bf3d94b2d12133b16d8eca418d3008058189ff (commit)
from 67c5c361c581e0ae352d31316a17dd5ba72dc079 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a55ad4cda7562637e322c5b5ab7405d5aa0e7239
Merge: a5bf3d94b2d12133b16d8eca418d3008058189ff 67c5c361c581e0ae352d31316a17dd5ba72dc079
Author: Fabien Marteau <fab...@ar...>
Date: Tue Jun 1 10:32:32 2010 +0200
Merge branch 'master' of git://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit a5bf3d94b2d12133b16d8eca418d3008058189ff
Author: Fabien Marteau <fab...@ar...>
Date: Tue Jun 1 10:32:19 2010 +0200
[as_devices] as_max1027 SLOW mode done
-----------------------------------------------------------------------
Summary of changes:
target/packages/as_devices/c/as_max1027.c | 99 ++++++++++++++++++++++-------
target/packages/as_devices/c/as_max1027.h | 24 +++-----
target/packages/as_devices/test_c.h | 30 ++++++---
3 files changed, 104 insertions(+), 49 deletions(-)
diff --git a/target/packages/as_devices/c/as_max1027.c b/target/packages/as_devices/c/as_max1027.c
index 8cda042..57d8200 100644
--- a/target/packages/as_devices/c/as_max1027.c
+++ b/target/packages/as_devices/c/as_max1027.c
@@ -34,6 +34,7 @@ typedef unsigned char u8;
#include <linux/spi/max1027.h>
#include "as_max1027.h"
+//#define ERROR_MSG
#define BUFFER_SIZE (70)
#define PATH_SIZE (50)
@@ -92,7 +93,9 @@ int32_t as_max1027_read_buffer(int aFile_handler, int *aValueRead)
ret = read(aFile_handler, valueRead, SIZEOFBUFF);
if (ret < 0)
{
+#ifdef ERROR_MSG
printf("Error, reading buffer file\n");
+#endif
return -1;
}
valueRead[ret-1] = '\0';
@@ -122,14 +125,18 @@ struct as_max1027_device *as_max1027_open(int aSpiNum,
/** XXX */
if (aMode == AS_MAX1027_FAST)
{
+#ifdef ERROR_MSG
printf("Error, fast mode not supported yet\n");
+#endif
return NULL;
}
ret = snprintf(path, PATH_SIZE, SYS_PATH, aSpiNum);
if (ret<0)
{
+#ifdef ERROR_MSG
printf("Error in path writing\n");
+#endif
return NULL;
}
@@ -138,26 +145,34 @@ struct as_max1027_device *as_max1027_open(int aSpiNum,
ret = snprintf(buffer, BUFFER_SIZE, "%s%s", path, "conversion");
if (ret<0)
{
+#ifdef ERROR_MSG
printf("Error in path writing\n");
+#endif
return NULL;
}
fConversion = open(buffer, O_RDWR);
if (fConversion < 0)
{
+#ifdef ERROR_MSG
printf("Error, can't open conversion file. Is max1027 modprobed ?\n");
+#endif
return NULL;
}
/* setup */
ret = snprintf(buffer, BUFFER_SIZE, "%s%s", path, "setup");
if (ret<0)
{
+#ifdef ERROR_MSG
printf("Error in path writing\n");
+#endif
return NULL;
}
fSetup = open(buffer, O_RDWR);
if (fSetup < 0)
{
+#ifdef ERROR_MSG
printf("Error, can't open setup file.\n");
+#endif
return NULL;
}
ret = as_max1027_write_buffer(fSetup,
@@ -167,20 +182,26 @@ struct as_max1027_device *as_max1027_open(int aSpiNum,
MAX1027_SETUP_DIFFSEL(0));
if (ret < 0)
{
+#ifdef ERROR_MSG
printf("Error, can't set default setup parameters\n");
+#endif
return NULL;
}
/* averaging */
ret = snprintf(buffer, BUFFER_SIZE, "%s%s", path, "averaging");
if (ret<0) {
+#ifdef ERROR_MSG
printf("Error in path writing\n");
+#endif
return NULL;
}
fAveraging = open(buffer, O_RDWR);
if (fAveraging < 0)
{
+#ifdef ERROR_MSG
printf("Error, can't open averaging file.\n");
+#endif
return NULL;
}
@@ -190,13 +211,17 @@ struct as_max1027_device *as_max1027_open(int aSpiNum,
ret = snprintf(buffer, BUFFER_SIZE, "%s%s", path, "temp1_input");
if (ret<0)
{
+#ifdef ERROR_MSG
printf("Error in path writing\n");
+#endif
return NULL;
}
fTemperature = open(buffer, O_RDONLY);
if (fTemperature < 0)
{
+#ifdef ERROR_MSG
printf("Error, can't open temperature file.\n");
+#endif
return NULL;
}
} else {
@@ -212,21 +237,27 @@ struct as_max1027_device *as_max1027_open(int aSpiNum,
ret = snprintf(slow_input_name, 20, SLOW_INPUT_NAME, i);
if (ret < 0)
{
+#ifdef ERROR_MSG
printf("Error in path writing\n");
+#endif
return NULL;
}
ret = snprintf(buffer, BUFFER_SIZE, "%s%s", path, slow_input_name);
if (ret < 0)
{
+#ifdef ERROR_MSG
printf("Error in path writing\n");
+#endif
return NULL;
}
fLowSpeed[i] = open(buffer, O_RDONLY);
if (fLowSpeed[i] < 0)
{
+#ifdef ERROR_MSG
printf("Error, can't open %s\n", buffer);
+#endif
return NULL;
}
}
@@ -235,14 +266,18 @@ struct as_max1027_device *as_max1027_open(int aSpiNum,
ret = snprintf(buffer, BUFFER_SIZE, FAST_INPUT_PATH, i);
if (ret < 0)
{
+#ifdef ERROR_MSG
printf("Error in path writing\n");
+#endif
return NULL;
}
fHighSpeed[i] = open(buffer, O_RDONLY);
if (fHighSpeed[i] < 0)
{
+#ifdef ERROR_MSG
printf("Error, can't open %s\nIs loadmax.sh launched ?\n", buffer);
+#endif
return NULL;
}
@@ -266,27 +301,6 @@ struct as_max1027_device *as_max1027_open(int aSpiNum,
return dev;
}
-int32_t as_max1027_close(struct as_max1027_device *aDev)
-{
- int i;
-
- if (aDev->fConversion > 0) close(aDev->fConversion);
- if (aDev->fSetup > 0) close(aDev->fSetup);
- if (aDev->fAveraging > 0) close(aDev->fAveraging);
-
- if (aDev->fTemperature > 0) close(aDev->fTemperature);
-
- for (i=0 ; i<NUMBER_OF_CHANNELS; i++)
- {
- if (aDev->fLowSpeed[i] > 0) close(aDev->fLowSpeed[i]);
- if (aDev->fHighSpeed[i] > 0) close(aDev->fHighSpeed[i]);
- }
-
- free(aDev);
-
- return 0;
-}
-
int32_t as_max1027_read_temperature_mC(struct as_max1027_device *aDev,
int *aTemperature)
{
@@ -304,7 +318,9 @@ int32_t as_max1027_read_temperature_mC(struct as_max1027_device *aDev,
MAX1027_CONV_TEMP);
if (ret < 0)
{
+#ifdef ERROR_MSG
printf("Error launching conversion\n");
+#endif
return -1;
}
@@ -312,7 +328,9 @@ int32_t as_max1027_read_temperature_mC(struct as_max1027_device *aDev,
ret = as_max1027_read_buffer(aDev->fTemperature, aTemperature);
if (ret < 0)
{
+#ifdef ERROR_MSG
printf("Error, reading fTemperature\n");
+#endif
return -1;
}
@@ -340,7 +358,10 @@ int32_t as_max1027_set_averaging(struct as_max1027_device *aDev, uint8_t aNbConv
case 32: avg_register = MAX1027_AVG_NAVG(3) | MAX1027_AVG_AVGON(1);
aDev->scan_mode = SCAN_MODE_10; /* scan */
break;
- default: printf("%s: unsupported setting\n", __func__);
+ default:
+#ifdef ERROR_MSG
+ printf("%s: unsupported setting\n", __func__);
+#endif
return -1;
}
@@ -349,14 +370,15 @@ int32_t as_max1027_set_averaging(struct as_max1027_device *aDev, uint8_t aNbConv
ret = as_max1027_write_buffer(aDev->fAveraging, avg_register);
if (ret < 0)
{
+#ifdef ERROR_MSG
printf("Error, setting averaging\n");
+#endif
return -1;
}
return aNbConv;
}
-
int32_t as_max1027_get_value_milliVolt(struct as_max1027_device *aDev,
int aChannelNum, int *aValue)
{
@@ -364,7 +386,9 @@ int32_t as_max1027_get_value_milliVolt(struct as_max1027_device *aDev,
if ((aChannelNum >= NUMBER_OF_CHANNELS) || (aChannelNum < 0))
{
+#ifdef ERROR_MSG
printf("Wrong num channel\n");
+#endif
return -1;
}
@@ -377,7 +401,9 @@ int32_t as_max1027_get_value_milliVolt(struct as_max1027_device *aDev,
MAX1027_CONV_SCAN(aDev->scan_mode));
if (ret < 0)
{
+#ifdef ERROR_MSG
printf("Error launching conversion\n");
+#endif
return -1;
}
@@ -385,21 +411,48 @@ int32_t as_max1027_get_value_milliVolt(struct as_max1027_device *aDev,
ret = as_max1027_read_buffer(aDev->fLowSpeed[aChannelNum], aValue);
if (ret < 0)
{
+#ifdef ERROR_MSG
printf("Error, reading fLowSpeed[%d]\n", aChannelNum);
+#endif
return -1;
}
}
else if (aDev->mode == AS_MAX1027_FAST)
{
+#ifdef ERROR_MSG
printf("TODO: fast mode channel reading\n");
+#endif
return -1;
}
else
{
+#ifdef ERROR_MSG
printf("Unknown mode\n");
+#endif
return -1;
}
return 0;
}
+int32_t as_max1027_close(struct as_max1027_device *aDev)
+{
+ int i;
+
+ if (aDev->fConversion > 0) close(aDev->fConversion);
+ if (aDev->fSetup > 0) close(aDev->fSetup);
+ if (aDev->fAveraging > 0) close(aDev->fAveraging);
+
+ if (aDev->fTemperature > 0) close(aDev->fTemperature);
+
+ for (i=0 ; i<NUMBER_OF_CHANNELS; i++)
+ {
+ if (aDev->fLowSpeed[i] > 0) close(aDev->fLowSpeed[i]);
+ if (aDev->fHighSpeed[i] > 0) close(aDev->fHighSpeed[i]);
+ }
+
+ free(aDev);
+
+ return 0;
+}
+
diff --git a/target/packages/as_devices/c/as_max1027.h b/target/packages/as_devices/c/as_max1027.h
index 5832151..c094831 100644
--- a/target/packages/as_devices/c/as_max1027.h
+++ b/target/packages/as_devices/c/as_max1027.h
@@ -21,12 +21,6 @@
#ifndef AS_MAX1027_H_
#define AS_MAX1027_H_
-/** @file
- * @brief Read/Write analog value with max1027 chip
- *
- *
- */
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -63,15 +57,6 @@ struct as_max1027_device {
struct as_max1027_device *as_max1027_open(int aSpiNum,
AS_max1027_mode aMode);
-/** @brief Close max1027
- *
- * @param aDev structure device pointer
- *
- * @return negative value on error
- */
-int32_t as_max1027_close(struct as_max1027_device *aDev);
-
-
/** @brief set averaging measurement
*
* @param as_max1027_device structure pointer.
@@ -105,8 +90,17 @@ int32_t as_max1027_get_value_milliVolt(struct as_max1027_device *aDev,
int aChannelNum,
int *aValue);
+/** @brief Close max1027
+ *
+ * @param aDev structure device pointer
+ *
+ * @return negative value on error
+ */
+int32_t as_max1027_close(struct as_max1027_device *aDev);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* AS_MAX1027_H_ */
+
diff --git a/target/packages/as_devices/test_c.h b/target/packages/as_devices/test_c.h
index de489d3..d864b5f 100644
--- a/target/packages/as_devices/test_c.h
+++ b/target/packages/as_devices/test_c.h
@@ -581,16 +581,16 @@ void test_gpio()
pullup = ret;
pressEnterToContinue();
break;
- case '8' : printf("1) GPIO_IRQ_MODE_NOINT \n");
+ case '8' : printf("1) GPIO_IRQ_MODE_NOINT \n");
printf("2) GPIO_IRQ_MODE_RISING \n");
printf("3) GPIO_IRQ_MODE_FALLING\n");
printf("4) GPIO_IRQ_MODE_BOTH \n");
printf("Give value : ");
scanf("%d", &value);
- if (value == 1)value = GPIO_IRQ_MODE_NOINT ;
- if (value == 2)value = GPIO_IRQ_MODE_RISING ;
- if (value == 3)value = GPIO_IRQ_MODE_FALLING;
- if (value == 4)value = GPIO_IRQ_MODE_BOTH ;
+ if (value == 1)value = GPIO_IRQ_MODE_NOINT ;
+ if (value == 2)value = GPIO_IRQ_MODE_RISING ;
+ if (value == 3)value = GPIO_IRQ_MODE_FALLING;
+ if (value == 4)value = GPIO_IRQ_MODE_BOTH ;
ret = as_gpio_set_irq_mode(gpio_dev,
pin_num,
value);
@@ -611,10 +611,10 @@ void test_gpio()
pressEnterToContinue();
break;
}
- if (ret==GPIO_IRQ_MODE_NOINT )printf("GPIO_IRQ_MODE_NOINT \n");
- if (ret==GPIO_IRQ_MODE_RISING )printf("GPIO_IRQ_MODE_RISING \n");
- if (ret==GPIO_IRQ_MODE_FALLING)printf("GPIO_IRQ_MODE_FALLING\n");
- if (ret==GPIO_IRQ_MODE_BOTH )printf("GPIO_IRQ_MODE_BOTH \n");
+ if (ret==GPIO_IRQ_MODE_NOINT )printf("GPIO_IRQ_MODE_NOINT \n");
+ if (ret==GPIO_IRQ_MODE_RISING )printf("GPIO_IRQ_MODE_RISING \n");
+ if (ret==GPIO_IRQ_MODE_FALLING)printf("GPIO_IRQ_MODE_FALLING\n");
+ if (ret==GPIO_IRQ_MODE_BOTH )printf("GPIO_IRQ_MODE_BOTH \n");
pressEnterToContinue();
break;
case 'a' : printf("Blocking read \n");
@@ -715,7 +715,7 @@ void test_max1027()
}
pressEnterToContinue();
break;
- case '2' : printf("Give channel you want to read (0-8): ");
+ case '2' : printf("Give channel you want to read (0-6): ");
scanf("%d",&value);
if ((value >= NUM_OF_CHANNEL) || (value < 0)){
printf("Channel num wrong\n");
@@ -735,7 +735,15 @@ void test_max1027()
averaging = value;
pressEnterToContinue();
break;
- case '4' : printf("TODO");
+ case '4' : ret = as_max1027_get_value_milliVolt(max1027_dev,
+ channel,&value);
+ if (ret < 0) {
+ printf("Error reading temperature\n");
+ pressEnterToContinue();
+ break;
+ }
+ printf("Channel %d value read : %d\n", channel, value);
+ pressEnterToContinue();
break;
case '5' : ret = as_max1027_read_temperature_mC(max1027_dev, &temp_read);
if (ret < 0) {
hooks/post-receive
--
armadeus
|
|
From: jscheer <js...@us...> - 2010-06-01 07:57:53
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 67c5c361c581e0ae352d31316a17dd5ba72dc079 (commit)
via c0245c0855abdcbc5bc748329702c7fc107d97de (commit)
from 220dec84252f25afea76c3117cde5ca598be4d61 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 67c5c361c581e0ae352d31316a17dd5ba72dc079
Merge: c0245c0855abdcbc5bc748329702c7fc107d97de 220dec84252f25afea76c3117cde5ca598be4d61
Author: Jeremie SCHEER <jer...@ar...>
Date: Tue Jun 1 09:53:05 2010 +0200
Merge branch 'master' of ssh://jscheer@armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit c0245c0855abdcbc5bc748329702c7fc107d97de
Author: Jeremie SCHEER <jer...@ar...>
Date: Tue Jun 1 09:51:02 2010 +0200
Patch for uClibc : add the function trunc to avoid problems during Qt cross-compiling.
-----------------------------------------------------------------------
Summary of changes:
.../uClibc-0.9.29-z-002-add_trunc_function.patch | 99 ++++++++++++++++++++
1 files changed, 99 insertions(+), 0 deletions(-)
create mode 100644 buildroot/toolchain/uClibc/uClibc-0.9.29-z-002-add_trunc_function.patch
diff --git a/buildroot/toolchain/uClibc/uClibc-0.9.29-z-002-add_trunc_function.patch b/buildroot/toolchain/uClibc/uClibc-0.9.29-z-002-add_trunc_function.patch
new file mode 100644
index 0000000..145bad1
--- /dev/null
+++ b/buildroot/toolchain/uClibc/uClibc-0.9.29-z-002-add_trunc_function.patch
@@ -0,0 +1,99 @@
+>From 54d204073484a66315c6143cfbc9e67c3579fa7a Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <va...@ge...>
+Date: Sat, 08 Dec 2007 00:59:10 +0000
+Subject: import trunc()/truncf() for ISO C requirements, otherwise fortran can hit infinite loops when it generates builtins+trunc() substitutes
+
+---
+diff --git a/libm/Makefile.in b/libm/Makefile.in
+index 10869a8..eb905e0 100644
+--- a/libm/Makefile.in
++++ b/libm/Makefile.in
+@@ -68,8 +68,8 @@ libm_CSRC := \
+ s_ilogb.c s_ldexp.c s_lib_version.c s_lrint.c s_lround.c s_llround.c \
+ s_log1p.c s_logb.c s_matherr.c s_modf.c s_nextafter.c s_round.c \
+ s_rint.c s_scalbn.c s_signgam.c s_significand.c s_sin.c s_tan.c \
+- s_tanh.c w_acos.c w_acosh.c w_asin.c w_atan2.c w_atanh.c w_cabs.c \
+- w_cosh.c w_drem.c w_exp.c w_fmod.c w_gamma.c w_gamma_r.c \
++ s_tanh.c s_trunc.c w_acos.c w_acosh.c w_asin.c w_atan2.c w_atanh.c \
++ w_cabs.c w_cosh.c w_drem.c w_exp.c w_fmod.c w_gamma.c w_gamma_r.c \
+ w_hypot.c w_j0.c w_j1.c w_jn.c w_lgamma.c w_lgamma_r.c \
+ w_log.c w_log10.c w_pow.c w_remainder.c w_scalb.c w_sinh.c \
+ w_sqrt.c fpmacros.c nan.c carg.c s_llrint.c
+diff --git a/libm/float_wrappers.c b/libm/float_wrappers.c
+index cd841e6..cd0ae18 100644
+--- a/libm/float_wrappers.c
++++ b/libm/float_wrappers.c
+@@ -26,7 +26,6 @@
+ #undef L_remquof /*float remquof(float, float, int *);*/
+ #undef L_scalblnf /*float scalblnf(float, long);*/
+ #undef L_tgammaf /*float tgammaf(float);*/
+-#undef L_truncf /*float truncf(float);*/
+
+ /* Implement the following, as defined by SuSv3 */
+ #if 0
+diff --git a/libm/s_trunc.c b/libm/s_trunc.c
+new file mode 100644
+index 0000000..8a4f5ae
+--- a/dev/null
++++ b/libm/s_trunc.c
+@@ -0,0 +1,58 @@
++/* Truncate argument to nearest integral value not larger than the argument.
++ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by Ulrich Drepper <dr...@cy...>, 1997.
++
++ The GNU C 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.
++
++ The GNU C 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 the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <math.h>
++
++#include "math_private.h"
++
++
++libm_hidden_proto(trunc)
++double
++trunc (double x)
++{
++ int32_t i0, j0;
++ u_int32_t i1;
++ int sx;
++
++ EXTRACT_WORDS (i0, i1, x);
++ sx = i0 & 0x80000000;
++ j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
++ if (j0 < 20)
++ {
++ if (j0 < 0)
++ /* The magnitude of the number is < 1 so the result is +-0. */
++ INSERT_WORDS (x, sx, 0);
++ else
++ INSERT_WORDS (x, sx | (i0 & ~(0x000fffff >> j0)), 0);
++ }
++ else if (j0 > 51)
++ {
++ if (j0 == 0x400)
++ /* x is inf or NaN. */
++ return x + x;
++ }
++ else
++ {
++ INSERT_WORDS (x, i0, i1 & ~(0xffffffffu >> (j0 - 20)));
++ }
++
++ return x;
++}
++libm_hidden_def(trunc)
+--
+cgit v0.8.2.1
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2010-05-31 17:41:56
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 220dec84252f25afea76c3117cde5ca598be4d61 (commit)
via 644b74e2e4a1070730b003d96d0f68b0f62289b8 (commit)
via 8ff5842bb777ab08d30cd1ee12ec3cc060bdf830 (commit)
from 9af999f6d5181755b933f91ebe4a147c47e7fefe (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 220dec84252f25afea76c3117cde5ca598be4d61
Merge: 644b74e2e4a1070730b003d96d0f68b0f62289b8 9af999f6d5181755b933f91ebe4a147c47e7fefe
Author: Julien Boibessot <jul...@ar...>
Date: Mon May 31 19:41:29 2010 +0200
Merge branch 'master' of ssh://artemys@armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 644b74e2e4a1070730b003d96d0f68b0f62289b8
Author: Julien Boibessot <jul...@ar...>
Date: Mon May 31 16:42:24 2010 +0200
add .gitignore for target/demos/gps/
commit 8ff5842bb777ab08d30cd1ee12ec3cc060bdf830
Author: Julien Boibessot <jul...@ar...>
Date: Mon May 31 16:38:47 2010 +0200
Indentation
-----------------------------------------------------------------------
Summary of changes:
target/demos/gps/.gitignore | 1 +
target/demos/gps/nmea_decoder.c | 115 ++++++++++++++++++++-------------------
2 files changed, 60 insertions(+), 56 deletions(-)
create mode 100644 target/demos/gps/.gitignore
diff --git a/target/demos/gps/.gitignore b/target/demos/gps/.gitignore
new file mode 100644
index 0000000..d04cbfc
--- /dev/null
+++ b/target/demos/gps/.gitignore
@@ -0,0 +1 @@
+nmea_decode
diff --git a/target/demos/gps/nmea_decoder.c b/target/demos/gps/nmea_decoder.c
index 6d452cd..6de61c5 100644
--- a/target/demos/gps/nmea_decoder.c
+++ b/target/demos/gps/nmea_decoder.c
@@ -9,12 +9,12 @@
#include <termios.h>
#include <unistd.h>
#include <sys/stat.h>
-#include <fcntl.h> // O_RDWR
+#include <fcntl.h> /* O_RDWR */
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
-#include <signal.h> // sigaction
-#include <ctype.h> // isprint
+#include <signal.h> /* sigaction */
+#include <ctype.h> /* isprint */
struct termios oldtio, newtio;
@@ -33,18 +33,18 @@ struct GPSData
#define HEADER_SIZE 6
int serialfd;
-int openSerialPort( char* aDeviceName, int aSpeed )
+int openSerialPort(char* aDeviceName, int aSpeed)
{
int fd;
- fd = open( aDeviceName, O_RDWR | O_NOCTTY );
+ fd = open(aDeviceName, O_RDWR | O_NOCTTY);
if (fd <0) {
perror(aDeviceName);
- return(-1);
+ return -1;
}
- tcgetattr( fd, &oldtio ); /* save current serial port settings */
- memset( &newtio, sizeof(newtio), 0 ); /* clear struct for new port settings */
+ tcgetattr(fd, &oldtio); /* save current serial port settings */
+ memset(&newtio, sizeof(newtio), 0); /* clear struct for new port settings */
// newtio.c_cflag = BAUDRATE | CRTSCTS | CS8 | CLOCAL | CREAD;
newtio.c_cflag = aSpeed | CS8 | CLOCAL | CREAD; /* _no_ CRTSCTS */
newtio.c_iflag = IGNPAR; // | ICRNL |IXON;
@@ -68,17 +68,18 @@ int openSerialPort( char* aDeviceName, int aSpeed )
// newtio.c_cc[VLNEXT] = 0; /* Ctrl-v */
// newtio.c_cc[VEOL2] = 0; /* '\0' */
tcflush(fd, TCIFLUSH);
- tcsetattr( fd, TCSANOW, &newtio );
+ tcsetattr(fd, TCSANOW, &newtio);
printf("RS232 Initialization done\n");
- return(fd);
+
+ return fd;
}
void closeSerialPort(int fd)
{
- if (fd ) {
+ if (fd) {
printf("Restoring old Termio config\n");
- tcsetattr( fd, TCSANOW, &oldtio ); /* restore the old port settings */
+ tcsetattr(fd, TCSANOW, &oldtio); /* restore the old port settings */
close(fd);
}
}
@@ -89,30 +90,31 @@ int waitForData(int fd)
struct timeval tv;
int retval;
- FD_ZERO( &fds );
- FD_SET( fd, &fds );
- // Set timeout to 2 secs
+ FD_ZERO(&fds);
+ FD_SET(fd, &fds);
+ /* Set timeout to 2 secs */
tv.tv_sec = 2;
tv.tv_usec = 0;
- retval = select( fd+1, &fds, NULL, NULL, &tv );
+ retval = select(fd+1, &fds, NULL, NULL, &tv);
// retval = FD_ISSET(fd,&rfds);
- return(retval);
+ return retval;
}
-unsigned int getParameterFromIndex( unsigned int index, char* aFrame, char* aBuffer, unsigned int buffersize)
+unsigned int getParameterFromIndex(unsigned int index, char* aFrame, char* aBuffer, unsigned int buffersize)
{
char c = 'P';
int i = 0;
- while( (c != ',') && ( i < buffersize) ) {
+ while ((c != ',') && (i < buffersize)) {
c = aFrame[index++];
aBuffer[i++] = c;
}
aBuffer[i-1] = '\0';
- return(index);
+
+ return index;
}
struct GPSData gpsdata;
@@ -124,47 +126,47 @@ int readAndParseFrame(int fd)
char frame[128];
char c;
- // Find start of Frame
- while( c != '$' ) {
+ /* Find start of Frame */
+ while (c != '$') {
ret = read(fd, &c, 1);
if (ret < 0) {
perror("header");
- return(ret);
+ return ret;
}
}
- // read Header
- while( count < HEADER_SIZE ) {
- ret = read( fd, buf+count, HEADER_SIZE-count);
+ /* read Header */
+ while (count < HEADER_SIZE) {
+ ret = read(fd, buf+count, HEADER_SIZE-count);
if (ret < 0) {
perror("header");
- return(ret);
+ return ret;
}
else
count += ret;
}
count = 0;
- while( c != 0x0a ) {
+ while (c != 0x0a) {
ret = read(fd, &c, 1);
if (ret < 0) {
perror("header");
- return(ret);
+ return ret;
}
frame[count++] = c;
}
- ret = read(fd, &c, 1); // read last trailing 0x0a
+ ret = read(fd, &c, 1); /* read last trailing 0x0a */
printf( " [%s]", buf );
- if( (ret=strncmp(buf, "GPGGA,", HEADER_SIZE)) == 0) {
- memcpy( date, frame, DATE_SIZE );
- next_index = getParameterFromIndex( 0, frame, gpsdata.time, sizeof(gpsdata.time) );
- next_index = getParameterFromIndex( next_index, frame, gpsdata.latitude, sizeof(gpsdata.latitude) );
+ if ((ret=strncmp(buf, "GPGGA,", HEADER_SIZE)) == 0) {
+ memcpy(date, frame, DATE_SIZE);
+ next_index = getParameterFromIndex(0, frame, gpsdata.time, sizeof(gpsdata.time));
+ next_index = getParameterFromIndex(next_index, frame, gpsdata.latitude, sizeof(gpsdata.latitude));
} else {
- ; // don't care
+ ; /* don't care */
}
- return(0);
+ return 0;
}
void showValues( void )
@@ -180,19 +182,20 @@ void showUsage(void)
printf(" default device: /dev/ttySMX1\n");
printf(" default speed: 4800\n");
printf("\n");
+
exit(1);
}
void signal_handler(int param)
{
printf("Signal caught %i\n", param);
+
exit(0);
}
void cleanup(void)
{
- //printf("Cleaning up...\n");
- closeSerialPort( serialfd );
+ closeSerialPort(serialfd);
}
@@ -209,7 +212,7 @@ int main(int argc, char **argv)
atexit(cleanup);
opterr = 0;
- while ((c = getopt (argc, argv, "hd:s:")) != -1)
+ while ((c = getopt(argc, argv, "hd:s:")) != -1)
{
switch (c)
{
@@ -227,11 +230,11 @@ int main(int argc, char **argv)
case '?':
if( (optopt == 's') || (optopt == 'd') )
- fprintf (stderr, "Option -%c requires an argument.\n", optopt);
- else if (isprint (optopt))
- fprintf (stderr, "Unknown option `-%c'.\n", optopt);
+ fprintf(stderr, "Option -%c requires an argument.\n", optopt);
+ else if (isprint(optopt))
+ fprintf(stderr, "Unknown option `-%c'.\n", optopt);
else
- fprintf (stderr, "Unknown option character `\\x%x'.\n", optopt);
+ fprintf(stderr, "Unknown option character `\\x%x'.\n", optopt);
showUsage();
//exit(1);
@@ -245,7 +248,7 @@ int main(int argc, char **argv)
for (index = optind; index < argc; index++)
printf ("Non-option argument %s\n", argv[index]);
- if( str_speed && strcmp( str_speed, "9600") == 0 ) {
+ if (str_speed && strcmp(str_speed, "9600") == 0) {
speed = B9600;
}
else {
@@ -253,29 +256,29 @@ int main(int argc, char **argv)
printf("Using default speed: 4800 bauds\n");
}
- // Install signal handler (CTRL+C)
+ /* Install signal handler (CTRL+C) */
action.sa_handler = signal_handler;
- sigemptyset( &action.sa_mask );
- sigaddset( &action.sa_mask, SIGTERM );
+ sigemptyset(&action.sa_mask);
+ sigaddset(&action.sa_mask, SIGTERM);
action.sa_flags = 0;
action.sa_restorer = NULL;
- sigaction( SIGINT, &action, /*struct sigaction *oact*/ 0 );
+ sigaction(SIGINT, &action, /*struct sigaction *oact*/ 0);
- // Open serial device
- if( device )
+ /* Open serial device */
+ if (device) {
serialfd = openSerialPort(device, B4800);
- else {
+ } else {
device = "/dev/ttySMX1";
printf("Using default device: %s\n", device);
serialfd = openSerialPort(device, B4800);
}
- if ( serialfd < 0 )
+ if (serialfd < 0)
exit(1);
- // Main loop
- while(1) {
- if( waitForData( serialfd ) ) {
- readAndParseFrame( serialfd );
+ /* Main loop */
+ while (1) {
+ if (waitForData(serialfd)) {
+ readAndParseFrame(serialfd);
showValues();
} else {
printf("No data\n");
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2010-05-31 15:41:44
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 9af999f6d5181755b933f91ebe4a147c47e7fefe (commit)
via 81f68c48763a7e9a60454dc2b7110395775b6e72 (commit)
from a42affdc88b3abc4c5cf4d2ca524b590e9a8dd31 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 9af999f6d5181755b933f91ebe4a147c47e7fefe
Merge: 81f68c48763a7e9a60454dc2b7110395775b6e72 a42affdc88b3abc4c5cf4d2ca524b590e9a8dd31
Author: Fabien Marteau <fab...@ar...>
Date: Mon May 31 17:41:28 2010 +0200
Merge branch 'master' of git://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 81f68c48763a7e9a60454dc2b7110395775b6e72
Author: Fabien Marteau <fab...@ar...>
Date: Mon May 31 17:38:46 2010 +0200
[as_devices] GPIO IRQ tested
-----------------------------------------------------------------------
Summary of changes:
target/packages/as_devices/c/as_gpio.c | 24 +++----
target/packages/as_devices/test_c.h | 110 ++++++++++++++++++++++++++++----
2 files changed, 106 insertions(+), 28 deletions(-)
diff --git a/target/packages/as_devices/c/as_gpio.c b/target/packages/as_devices/c/as_gpio.c
index 938529e..4a4ef3d 100644
--- a/target/packages/as_devices/c/as_gpio.c
+++ b/target/packages/as_devices/c/as_gpio.c
@@ -196,7 +196,6 @@ int32_t as_gpio_get_pin_value(struct as_gpio_device *aDev,
int32_t as_gpio_blocking_get_pin_value(struct as_gpio_device *aDev,
int aPinNum)
{
- /* TODO */
int ret;
char value;
@@ -308,7 +307,6 @@ int32_t as_gpio_set_irq_mode(struct as_gpio_device *aDev,
int aMode)
{
int ret=0;
- int i;
int portval;
char buffer[BUFF_SIZE];
@@ -320,9 +318,15 @@ int32_t as_gpio_set_irq_mode(struct as_gpio_device *aDev,
if (aPinNum >= PORT_SIZE)
return -1;
- if (aPinNum < PORT_SIZE/2)
+ /* close fpin file */
+ if (aDev->fpin[aPinNum] != -1)
{
+ close(aDev->fpin[aPinNum]);
+ aDev->fpin[aPinNum] = -1;
+ }
+ if (aPinNum < PORT_SIZE/2)
+ {
ret = ioctl(aDev->fdev, GPIORDIRQMODE_L, &portval);
if (ret < 0) {
return ret;
@@ -336,7 +340,7 @@ int32_t as_gpio_set_irq_mode(struct as_gpio_device *aDev,
return ret;
}
- } else {
+} else {
ret = ioctl(aDev->fdev, GPIORDIRQMODE_H, &portval);
if (ret < 0) {
@@ -352,15 +356,6 @@ int32_t as_gpio_set_irq_mode(struct as_gpio_device *aDev,
}
}
-
-
- /* close fpin file */
- if ((aMode == GPIO_IRQ_MODE_NOINT) && (aDev->fpin[aPinNum] != -1))
- {
- close(aDev->fpin[aPinNum]);
- aDev->fpin[aPinNum] = -1;
- }
-
/* open fpin file */
if ((aMode != GPIO_IRQ_MODE_NOINT) && (aDev->fpin[aPinNum] == -1))
{
@@ -372,11 +367,10 @@ int32_t as_gpio_set_irq_mode(struct as_gpio_device *aDev,
ret = open(buffer, O_RDONLY);
if (ret < 0)
return ret;
-
aDev->fpin[aPinNum] = ret;
}
- aDev->irq_mode[i] = aMode;
+ aDev->irq_mode[aPinNum] = aMode;
return 0;
}
diff --git a/target/packages/as_devices/test_c.h b/target/packages/as_devices/test_c.h
index fe9c040..de489d3 100644
--- a/target/packages/as_devices/test_c.h
+++ b/target/packages/as_devices/test_c.h
@@ -434,9 +434,10 @@ void test_gpio()
char c_value;
int32_t value;
char port_letter = 'F';
- int port_num = 14;
+ int pin_num = 14;
int port_direction = 0;
int port_value = 1;
+ int pullup=1;
gpio_dev = as_gpio_open(port_letter);
if (gpio_dev == NULL)
@@ -446,7 +447,7 @@ void test_gpio()
return ;
}
ret = as_gpio_get_pin_value(gpio_dev,
- port_num);
+ pin_num);
if (ret < 0)
{
printf("Error, can't get pin value\n");
@@ -459,14 +460,19 @@ void test_gpio()
{
system("clear");
printf("**************************\n");
- printf(" Testing GPIO P%c%d \n", port_letter, port_num);
+ printf(" Testing GPIO P%c%d \n", port_letter, pin_num);
printf("**************************\n");
printf("Choose ('q' to quit):\n");
printf(" 1) Change port letter (%c)\n", port_letter);
- printf(" 2) Change port num (%d)\n", port_num);
+ printf(" 2) Change port num (%d)\n", pin_num);
printf(" 3) Change direction (%d)\n", port_direction);
printf(" 4) Change value (%d)\n", port_value);
printf(" 5) Read pin value\n");
+ printf(" 6) Change Pull-Up (%d)\n", pullup);
+ printf(" 7) Read Pull-Up\n");
+ printf(" 8) Set irq mode\n");
+ printf(" 9) get irq mode\n");
+ printf(" a) blocking read\n");
printf("> ");
scanf("%s",buffer);
@@ -482,7 +488,7 @@ void test_gpio()
{
printf("Error, can't close Port%c\n", port_letter);
pressEnterToContinue();
- return ;
+ break;
}
}
gpio_dev = as_gpio_open(buffer[0]);
@@ -490,7 +496,7 @@ void test_gpio()
{
printf("Error, can't open Port%c\n", c_value);
pressEnterToContinue();
- return;
+ break;
}
port_letter = buffer[0];
printf("Ok Port %c is set\n", port_letter);
@@ -501,19 +507,19 @@ void test_gpio()
if ((value < 0) || (value > 31))
printf("Error, wrong value\n");
else
- port_num = value;
+ pin_num = value;
pressEnterToContinue();
break;
case '3' : printf("Give direction (0:in, 1:out) : ");
scanf("%d", &value);
ret = as_gpio_set_pin_direction(gpio_dev,
- port_num,
+ pin_num,
value);
if(ret < 0)
{
printf("Error, can't change direction\n");
pressEnterToContinue();
- return ;
+ break;
}
port_direction = value;
printf("Ok direction changed\n");
@@ -522,13 +528,13 @@ void test_gpio()
case '4' : printf("Give value : ");
scanf("%d", &value);
ret = as_gpio_set_pin_value(gpio_dev,
- port_num,
+ pin_num,
value);
if(ret < 0)
{
printf("Error, can't change pin value\n");
pressEnterToContinue();
- return;
+ break;
}
port_value = value;
printf("Ok value changed\n");
@@ -536,17 +542,95 @@ void test_gpio()
break;
case '5' : printf("Get value \n");
ret = as_gpio_get_pin_value(gpio_dev,
- port_num);
+ pin_num);
if (ret < 0)
{
printf("Error, can't get pin value\n");
pressEnterToContinue();
- return;
+ break;
}
printf("Value is %d\n",ret);
port_value = ret;
pressEnterToContinue();
break;
+ case '6' : printf("Give value : ");
+ scanf("%d", &value);
+ ret = as_gpio_set_pullup_value(gpio_dev,
+ pin_num,
+ value);
+ if(ret < 0)
+ {
+ printf("Error, can't change pull up value\n");
+ pressEnterToContinue();
+ break;
+ }
+ pullup = value;
+ printf("Ok value changed\n");
+ pressEnterToContinue();
+ break;
+ case '7' : printf("Get value \n");
+ ret = as_gpio_get_pullup_value(gpio_dev,
+ pin_num);
+ if (ret < 0)
+ {
+ printf("Error, can't get pull up value\n");
+ pressEnterToContinue();
+ break;
+ }
+ printf("Value is %d\n",ret);
+ pullup = ret;
+ pressEnterToContinue();
+ break;
+ case '8' : printf("1) GPIO_IRQ_MODE_NOINT \n");
+ printf("2) GPIO_IRQ_MODE_RISING \n");
+ printf("3) GPIO_IRQ_MODE_FALLING\n");
+ printf("4) GPIO_IRQ_MODE_BOTH \n");
+ printf("Give value : ");
+ scanf("%d", &value);
+ if (value == 1)value = GPIO_IRQ_MODE_NOINT ;
+ if (value == 2)value = GPIO_IRQ_MODE_RISING ;
+ if (value == 3)value = GPIO_IRQ_MODE_FALLING;
+ if (value == 4)value = GPIO_IRQ_MODE_BOTH ;
+ ret = as_gpio_set_irq_mode(gpio_dev,
+ pin_num,
+ value);
+ if(ret < 0)
+ {
+ printf("Error, can't change irq value\n");
+ pressEnterToContinue();
+ break;
+ }
+ printf("Ok value changed\n");
+ pressEnterToContinue();
+ break;
+ case '9' : printf("Get value \n");
+ ret = as_gpio_get_irq_mode(gpio_dev, pin_num);
+ if (ret < 0)
+ {
+ printf("Error, can't get pull up value\n");
+ pressEnterToContinue();
+ break;
+ }
+ if (ret==GPIO_IRQ_MODE_NOINT )printf("GPIO_IRQ_MODE_NOINT \n");
+ if (ret==GPIO_IRQ_MODE_RISING )printf("GPIO_IRQ_MODE_RISING \n");
+ if (ret==GPIO_IRQ_MODE_FALLING)printf("GPIO_IRQ_MODE_FALLING\n");
+ if (ret==GPIO_IRQ_MODE_BOTH )printf("GPIO_IRQ_MODE_BOTH \n");
+ pressEnterToContinue();
+ break;
+ case 'a' : printf("Blocking read \n");
+ ret = as_gpio_blocking_get_pin_value(gpio_dev, pin_num);
+ if (ret < 0)
+ {
+ printf("Error, can't read value\n");
+ pressEnterToContinue();
+ break;
+ }
+ printf("Value read %d\n",ret);
+ pressEnterToContinue();
+ break;
+
+
+
default : break;
}
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2010-05-31 12:30:41
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via a42affdc88b3abc4c5cf4d2ca524b590e9a8dd31 (commit)
via 8f6941ec584d6368dfdc7ebc18914a3fb8cbc011 (commit)
via 0e68dc80ae56e701bb39323ba54d53a4055cb3ee (commit)
via 6e93d12c3b95971789a723d2a9e0eade8f7185cd (commit)
from 6ff1c397a651fc663e2ccbe4d63d1679ba98ee75 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a42affdc88b3abc4c5cf4d2ca524b590e9a8dd31
Author: Julien Boibessot <jul...@ar...>
Date: Mon May 31 14:29:43 2010 +0200
[LINUX] ov7670: remove compilation warnings
commit 8f6941ec584d6368dfdc7ebc18914a3fb8cbc011
Author: Nicolas Colombain <nic...@ar...>
Date: Mon May 31 14:13:10 2010 +0200
[LINUX] tsc210x: improve suspend/resume
commit 0e68dc80ae56e701bb39323ba54d53a4055cb3ee
Author: Julien Boibessot <jul...@ar...>
Date: Mon May 31 11:00:09 2010 +0200
[LINUX] ov7670: improve suspend/resume.
commit 6e93d12c3b95971789a723d2a9e0eade8f7185cd
Author: Julien Boibessot <jul...@ar...>
Date: Fri May 28 16:03:55 2010 +0200
[BUILDROOT] Cleanup default /etc/profile
-----------------------------------------------------------------------
Summary of changes:
.../2.6.29/073-armadeus-tsc2102.patch | 99 ++++++++++++++++----
...adeus-soc_camera-add_ov7670_sensor_driver.patch | 99 +++++++++++++++++---
.../armadeus/rootfs/target_skeleton/etc/profile | 16 +--
3 files changed, 172 insertions(+), 42 deletions(-)
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/073-armadeus-tsc2102.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/073-armadeus-tsc2102.patch
index 17b2e6c..744af66 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/073-armadeus-tsc2102.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/073-armadeus-tsc2102.patch
@@ -4,7 +4,7 @@ DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
Index: linux-2.6.29.6/include/linux/spi/tsc2102.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/include/linux/spi/tsc2102.h 2010-03-30 15:55:09.000000000 +0200
++++ linux-2.6.29.6/include/linux/spi/tsc2102.h 2010-05-31 11:02:34.000000000 +0200
@@ -0,0 +1,306 @@
+/*
+ * include/linux/spi/tsc2102.h
@@ -315,8 +315,8 @@ Index: linux-2.6.29.6/include/linux/spi/tsc2102.h
Index: linux-2.6.29.6/drivers/spi/tsc2102.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/drivers/spi/tsc2102.c 2010-03-30 15:58:55.000000000 +0200
-@@ -0,0 +1,1250 @@
++++ linux-2.6.29.6/drivers/spi/tsc2102.c 2010-05-31 13:50:30.000000000 +0200
+@@ -0,0 +1,1311 @@
+/*
+ * drivers/spi/tsc2102.c
+ *
@@ -383,6 +383,7 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+#define TSC2102_RESET 0xbb00
+#define TSC2102_ADC_PSTCM (1 << 15)
+#define TSC2102_ADC_ADST (1 << 14)
++#define TSC2102_PWRDN (1 << 13)
+#define TSC2102_TS_DAV 0x0780
+#define TSC2102_PS_DAV 0x0078
+#define TSC2102_T1_DAV 0x0004
@@ -399,6 +400,7 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+
+#define SM_BAT_AUX 0
+#define SM_TEMP1 1
++#define SM_SUSPENDED 2
+
+struct tsc210x_spi_req {
+ struct spi_device *dev;
@@ -434,11 +436,11 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+ struct spi_device *spi;
+
+ int bat[2], aux[2], temp;
++
+ struct device *hwmondev;
+ struct work_struct work;
+ unsigned long todo;
+#define WORK_CHANGE_MODE 0 /* change mode */
-+
+};
+
+static struct tsc210x_dev tsc;
@@ -547,7 +549,6 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+#define Z2STAT (1<<7)
+#define AXSTAT (3<<3)
+#define T1STAT (1<<2)
-+
+ int status;
+
+ mutex_lock(&tsc.lock_sync);
@@ -679,11 +680,11 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+{
+ struct tsc210x_dev *dev = (struct tsc210x_dev *) data;
+
-+// if(!test_bit( PENDOWN,&dev->todo)){
++ if (dev->state != SM_SUSPENDED) {
+ /* request change of SM state */
+ set_bit(WORK_CHANGE_MODE, &dev->todo);
+ schedule_work(&dev->work);
-+// }
++ }
+}
+
+/* TSC has new data for us available. */
@@ -691,11 +692,13 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+{
+ struct tsc210x_dev *dev = (struct tsc210x_dev *) dev_id;
+
-+ /* restart pen up timer */
-+ mod_timer(&tsc.ts_timer, jiffies +
-+ msecs_to_jiffies(tsc.ts_msecs));
++ if (dev->state != SM_SUSPENDED) {
++ /* restart pen up timer */
++ mod_timer(&tsc.ts_timer, jiffies +
++ msecs_to_jiffies(tsc.ts_msecs));
+
-+ schedule_work(&dev->work);
++ schedule_work(&dev->work);
++ }
+
+ return IRQ_HANDLED;
+}
@@ -704,8 +707,6 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+{
+ struct tsc210x_dev *dev = (struct tsc210x_dev *) data;
+
-+ //printk("pen up\n");
-+ //clear_bit(PENDOWN, &dev->todo);
+ if (dev->touch_cb)
+ dev->touch_cb(0);
+}
@@ -1265,24 +1266,75 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+static int
+tsc210x_suspend(struct spi_device *spi, pm_message_t state)
+{
++ int reg;
++ unsigned long timeout;
+ struct tsc210x_dev *dev = dev_get_drvdata(&spi->dev);
-+
+ if (!dev)
+ return 0;
+
+ mutex_lock(&dev->lock_sync);
+
++ dev->state = SM_SUSPENDED;
+ del_timer(&dev->mode_timer);
+ del_timer(&dev->ts_timer);
+ flush_scheduled_work();
+
++ tsc210x_write_sync(TSC2102_TS_STATUS_CTRL, TSC2102_ADC_PINTDAV);
++
+ if (dev->touch_cb)
+ dev->touch_cb(0);
+
-+ /* Abort current conversion and power down the ADC */
-+ tsc210x_write_sync(TSC2102_TS_ADC_CTRL, TSC2102_ADC_ADST);
++ /* shut down audio parts (start with DACs) */
++ /* mute DACs */
++ reg = tsc210x_read_sync(TSC210X_DAC_GAIN_CTRL);
++ tsc210x_write_sync(TSC210X_DAC_GAIN_CTRL, reg | DGC_DALMU | DGC_DARMU);
++ /* speaker power down */
++ reg = tsc210x_read_sync(TSC210X_CODEC_POWER_CTRL);
++ tsc210x_write_sync(TSC210X_CODEC_POWER_CTRL, reg | CPC_SP1PWDN | CPC_SP2PWDN);
++ /* wait until soft stepping is complete */
++ timeout = jiffies + HZ;
++ while ((tsc210x_read_sync(TSC210X_CODEC_POWER_CTRL) & (CPC_RDAPWDF | CPC_LDAPWDF)) !=
++ (CPC_RDAPWDF | CPC_LDAPWDF)) {
++ if (time_after(jiffies, timeout)) {
++ dev_err(&spi->dev, "unable to shut down speaker's DACs\n");
++ break;
++ }
++ }
++ /* finally power down DAC */
++ reg = tsc210x_read_sync(TSC210X_CODEC_POWER_CTRL);
++ tsc210x_write_sync(TSC210X_CODEC_POWER_CTRL, reg | CPC_DAPWDN);
++
++ /* ADC*/
++ if (tsc.kind == tsc2101) {
++ /* Headset mute */
++ reg = tsc210x_read_sync(TSC2101_HEADSET_AUX_PGA_CTRL);
++ tsc210x_write_sync(TSC2101_HEADSET_AUX_PGA_CTRL, reg | ADMUT_HED);
++ /* Handdset mute */
++ reg = tsc210x_read_sync(TSC2101_HANDSET_PGA_CTRL);
++ tsc210x_write_sync(TSC2101_HANDSET_PGA_CTRL, reg | ADMUT_HND);
++ /* cell mute */
++ reg = tsc210x_read_sync(TSC2101_CELL_BUZZER_PGA_CTRL);
++ tsc210x_write_sync(TSC2101_CELL_BUZZER_PGA_CTRL, reg | CPBGC_MUT_CP |
++ CPBGC_MUT_BU);
++ /* shut down mic bias, sidetone and vgnd */
++ reg = tsc210x_read_sync(TSC210X_CODEC_POWER_CTRL);
++ tsc210x_write_sync(TSC210X_CODEC_POWER_CTRL, reg |
++ CPC_MBIAS_HND | CPC_MBIAS_HED |
++ CPC_ASTPWD | CPC_VGPWDN |
++ CPC_ADPWDN);
++ /* wait until power down is complete */
++ timeout = jiffies + HZ;
++ while ((tsc210x_read_sync(TSC210X_CODEC_POWER_CTRL) & (CPC_ASTPWF|CPC_ADPWDF)) !=
++ (CPC_ASTPWF | CPC_ADPWDF)) {
++ if (time_after(jiffies, timeout)) {
++ dev_err(&spi->dev, "unable to shut down ADC %x\n", tsc210x_read_sync(TSC210X_CODEC_POWER_CTRL));
++ break;
++ }
++ }
++ }
+
+ dev->spi->dev.power.power_state = state;
++
+ mutex_unlock(&dev->lock_sync);
+
+ return 0;
@@ -1294,17 +1346,24 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+static int tsc210x_resume(struct spi_device *spi)
+{
+ struct tsc210x_dev *dev = dev_get_drvdata(&spi->dev);
-+ int err;
+
+ if (!dev)
+ return 0;
+
+ mutex_lock(&dev->lock_sync);
++
+ dev->spi->dev.power.power_state = PMSG_ON;
-+ err = tsc2102_configure(dev);
++ /* Init mode state machine */
++ dev->state = SM_BAT_AUX;
++ tsc210x_write_sync(TSC2102_TS_STATUS_CTRL, TSC2102_ADC_DAV);
++
+ mutex_unlock(&dev->lock_sync);
+
-+ return err;
++ /* Start mode timer */
++ mod_timer(&dev->mode_timer, jiffies +
++ msecs_to_jiffies(dev->mode_msecs));
++
++ return 0;
+}
+#else
+#define tsc210x_suspend NULL
@@ -1481,6 +1540,7 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+ del_timer(&tsc.mode_timer);
+ flush_scheduled_work();
+ dev_set_drvdata(&spi->dev, NULL);
++ free_irq(spi->irq, &tsc);
+err_clk:
+/* clk_disable(tsc.bclk_ck); TODO add clock mechanism to i.MX ???
+ clk_put(tsc.bclk_ck);*/
@@ -1521,6 +1581,7 @@ Index: linux-2.6.29.6/drivers/spi/tsc2102.c
+#ifdef CONFIG_APM
+ apm_get_power_status = 0;
+#endif
++ free_irq(spi->irq, &tsc);
+
+ mutex_unlock(&dev->lock_sync);
+
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/356-armadeus-soc_camera-add_ov7670_sensor_driver.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/356-armadeus-soc_camera-add_ov7670_sensor_driver.patch
index 7ce8588..bc1e9be 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/356-armadeus-soc_camera-add_ov7670_sensor_driver.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/356-armadeus-soc_camera-add_ov7670_sensor_driver.patch
@@ -6,8 +6,8 @@ Signed-off-by: Julien Boibessot <jul...@ar...>
Index: linux-2.6.29.6/drivers/media/video/ov7670_soc.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/drivers/media/video/ov7670_soc.c 2010-05-19 17:54:35.000000000 +0200
-@@ -0,0 +1,1607 @@
++++ linux-2.6.29.6/drivers/media/video/ov7670_soc.c 2010-05-31 14:23:25.000000000 +0200
+@@ -0,0 +1,1682 @@
+/*
+ * A V4L2 driver for OmniVision OV7670 cameras.
+ *
@@ -524,17 +524,41 @@ Index: linux-2.6.29.6/drivers/media/video/ov7670_soc.c
+
+static int ov7670_init(struct soc_camera_device *icd)
+{
-+/* struct ov7670 *ov7670 = container_of(icd, struct ov7670, icd);
-+ struct i2c_client *client = ov7670->i2c_client; */
++ struct ov7670 *ov7670 = container_of(icd, struct ov7670, icd);
++/* struct i2c_client *client = ov7670->i2c_client; */
++ struct soc_camera_link *icl = ov7670->i2c_client->dev.platform_data;
++ int ret;
++
++ printk(KERN_DEBUG "- %s\n", __func__);
++
++ if (icl->power) {
++ ret = icl->power(&ov7670->i2c_client->dev, 1);
++ if (ret < 0) {
++ dev_err(icd->vdev->parent,
++ "Platform failed to power-on the camera.\n");
++ return ret;
++ }
++ } else {
++ /* soft powerup ? */
++ }
+
+ return 0; /*ov7670_initialize(client);*/
+}
+
+static int ov7670_release(struct soc_camera_device *icd)
+{
-+ /* Disable the chip ?? */
-+ /* TBDJB */
++ struct ov7670 *ov7670 = container_of(icd, struct ov7670, icd);
++ struct soc_camera_link *icl = ov7670->i2c_client->dev.platform_data;
++
+ printk(KERN_DEBUG "- %s\n", __func__);
++
++ /* powerdown the chip */
++ if (icl->power) {
++ icl->power(&ov7670->i2c_client->dev, 0);
++ } else {
++ /* soft powerdown ? */
++ }
++
+ return 0;
+}
+
@@ -578,13 +602,12 @@ Index: linux-2.6.29.6/drivers/media/video/ov7670_soc.c
+ unsigned char v;
+ int ret;
+
++ printk(KERN_DEBUG "- %s\n", __func__);
+#if 0
+ ret = ov7670_initialize(client);
+ if (ret < 0)
+ return ret;
+#endif
-+ ov7670_read(client, REG_MIDH, &v); /* first access after a reset
-+ might fail */
+ ret = ov7670_read(client, REG_MIDH, &v);
+ if (ret < 0)
+ return ret;
@@ -1400,6 +1423,7 @@ Index: linux-2.6.29.6/drivers/media/video/ov7670_soc.c
+ return 0;
+}
+
++#ifdef DEBUG
+static int
+ov7670_proc_read_register( __attribute__ ((unused)) struct file *file,
+ const char *buf, unsigned long count,
@@ -1433,18 +1457,26 @@ Index: linux-2.6.29.6/drivers/media/video/ov7670_soc.c
+
+ return len;
+}
++#endif
+
+/* Interface active, can use i2c. If it fails, it can indeed mean, that
+ * this wasn't our capture interface, so, we wait for the right one */
+static int ov7670_video_probe(struct soc_camera_device *icd)
+{
+ struct ov7670 *ov7670 = container_of(icd, struct ov7670, icd);
++ struct soc_camera_link *icl = ov7670->i2c_client->dev.platform_data;
+#ifdef DEBUG
+ struct proc_dir_entry *proc_read/*, *proc_write*/;
+#endif
+ struct i2c_client *client = ov7670->i2c_client;
+ int ret;
+
++ if (icl->reset) {
++ ret = icl->reset(&ov7670->i2c_client->dev);
++ } else {
++ ov7670_reset(client); /* soft reset */
++ }
++
+ ret = ov7670_detect(client);
+ if (ret < 0) {
+ dev_err(&client->dev, "Unable to detect " DRIVER_NAME " sensor\n");
@@ -1491,10 +1523,53 @@ Index: linux-2.6.29.6/drivers/media/video/ov7670_soc.c
+ soc_camera_video_stop(icd);
+}
+
++static int ov7670_suspend(struct soc_camera_device *icd, pm_message_t state)
++{
++ struct ov7670 *ov7670 = container_of(icd, struct ov7670, icd);
++ struct soc_camera_link *icl = ov7670->i2c_client->dev.platform_data;
++ int ret;
++
++ printk("--- %s %d\n", __func__, state.event);
++
++ /* supposing camera link power() is a powerdown: */
++ if (icl->power) {
++ ret = icl->power(&ov7670->i2c_client->dev, 0);
++ if (ret < 0) {
++ dev_err(icd->vdev->parent,
++ "Platform failed to powerdown the camera.\n");
++ return ret;
++ }
++ }
++
++ return 0;
++}
++
++static int ov7670_resume(struct soc_camera_device *icd)
++{
++ struct ov7670 *ov7670 = container_of(icd, struct ov7670, icd);
++ struct soc_camera_link *icl = ov7670->i2c_client->dev.platform_data;
++ int ret;
++
++ printk("--- %s\n", __func__);
++
++ if (icl->power) {
++ ret = icl->power(&ov7670->i2c_client->dev, 1);
++ if (ret < 0) {
++ dev_err(icd->vdev->parent,
++ "Platform failed to resume the camera.\n");
++ return ret;
++ }
++ }
++
++ return 0;
++}
++
+static struct soc_camera_ops ov7670_ops = {
+ .owner = THIS_MODULE,
+ .probe = ov7670_video_probe,
+ .remove = ov7670_video_remove,
++ .suspend = ov7670_suspend,
++ .resume = ov7670_resume,
+ .init = ov7670_init,
+ .release = ov7670_release,
+ .start_capture = ov7670_start_capture,
@@ -1617,8 +1692,8 @@ Index: linux-2.6.29.6/drivers/media/video/ov7670_soc.c
+module_exit(ov7670_mod_exit);
Index: linux-2.6.29.6/drivers/media/video/Kconfig
===================================================================
---- linux-2.6.29.6.orig/drivers/media/video/Kconfig 2010-05-19 17:48:31.000000000 +0200
-+++ linux-2.6.29.6/drivers/media/video/Kconfig 2010-05-19 17:48:46.000000000 +0200
+--- linux-2.6.29.6.orig/drivers/media/video/Kconfig 2010-05-31 13:51:22.000000000 +0200
++++ linux-2.6.29.6/drivers/media/video/Kconfig 2010-05-31 13:51:23.000000000 +0200
@@ -796,6 +796,12 @@
help
This is a ov772x camera driver
@@ -1634,8 +1709,8 @@ Index: linux-2.6.29.6/drivers/media/video/Kconfig
depends on VIDEO_DEV && PXA27x && SOC_CAMERA
Index: linux-2.6.29.6/drivers/media/video/Makefile
===================================================================
---- linux-2.6.29.6.orig/drivers/media/video/Makefile 2010-05-19 17:48:31.000000000 +0200
-+++ linux-2.6.29.6/drivers/media/video/Makefile 2010-05-19 17:48:46.000000000 +0200
+--- linux-2.6.29.6.orig/drivers/media/video/Makefile 2010-05-31 13:51:22.000000000 +0200
++++ linux-2.6.29.6/drivers/media/video/Makefile 2010-05-31 13:51:23.000000000 +0200
@@ -145,6 +145,7 @@
obj-$(CONFIG_SOC_CAMERA_MT9M111) += mt9m111.o
obj-$(CONFIG_SOC_CAMERA_MT9T031) += mt9t031.o
diff --git a/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/profile b/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/profile
index 8577545..417ec26 100644
--- a/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/profile
+++ b/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/profile
@@ -17,11 +17,11 @@ if [ "$PS1" ]; then
alias ls='/bin/ls --color=tty -F'
export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.png=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:';
else
- if [ "`id -u`" -eq 0 ]; then
- export PS1='# '
- else
- export PS1='$ '
- fi
+ if [ "`id -u`" -eq 0 ]; then
+ export PS1='# '
+ else
+ export PS1='$ '
+ fi
fi
export USER=`id -un`
@@ -42,12 +42,6 @@ if [ "$PS1" ]; then
### Some aliases
alias ps2='ps facux '
alias ps1='ps faxo "%U %t %p %a" '
- alias af='ps af'
alias cls='clear'
alias df='df -h'
- alias indent='indent -bad -bap -bbo -nbc -br -brs -c33 -cd33 -ncdb -ce -ci4 -cli0 -cp33 -cs -d0 -di1 -nfc1 -nfca -hnl -i4 -ip0 -l75 -lp -npcs -npsl -nsc -nsob -nss -ts4 '
- #alias bc='bc -l'
- alias minicom='minicom -c on'
- alias calc='calc -Cd '
- alias bc='calc -Cd '
fi;
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2010-05-27 14:20:30
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 6ff1c397a651fc663e2ccbe4d63d1679ba98ee75 (commit)
from a40d36a95a527fd2d138c873dede08e9aafba0bd (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 6ff1c397a651fc663e2ccbe4d63d1679ba98ee75
Author: Julien Boibessot <jul...@ar...>
Date: Thu May 27 16:19:34 2010 +0200
[LINUX] mx27camera: handles PIXCLK rising edge sampling
-----------------------------------------------------------------------
Summary of changes:
...deus-mx27camera-add_CSICR1_REDGE_handling.patch | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
create mode 100644 buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/357-armadeus-mx27camera-add_CSICR1_REDGE_handling.patch
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/357-armadeus-mx27camera-add_CSICR1_REDGE_handling.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/357-armadeus-mx27camera-add_CSICR1_REDGE_handling.patch
new file mode 100644
index 0000000..27c592b
--- /dev/null
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/357-armadeus-mx27camera-add_CSICR1_REDGE_handling.patch
@@ -0,0 +1,17 @@
+Strange but CSI's PIXCLK sampling on rising edge was not handled.
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+Index: linux-2.6.29.6/drivers/media/video/mx27_camera.c
+===================================================================
+--- linux-2.6.29.6.orig/drivers/media/video/mx27_camera.c 2010-05-27 11:07:37.000000000 +0200
++++ linux-2.6.29.6/drivers/media/video/mx27_camera.c 2010-05-27 15:09:34.000000000 +0200
+@@ -607,6 +607,8 @@
+
+ if (common_flags & SOCAM_PCLK_SAMPLE_FALLING)
+ csicr1 |= CSICR1_INV_PCLK;
++ if (common_flags & SOCAM_PCLK_SAMPLE_RISING)
++ csicr1 |= CSICR1_REDGE;
+ if (common_flags & SOCAM_HSYNC_ACTIVE_HIGH)
+ csicr1 |= CSICR1_HSYNC_POL;
+ if (pcdev->platform_flags & MX27_CAMERA_SWAP16)
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2010-05-26 13:12:13
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via a40d36a95a527fd2d138c873dede08e9aafba0bd (commit)
via 338b6882ebec6e49d70c77568a75533b1be3f5d8 (commit)
via c29c1aa6a05e54917d5c3f8e6529b9f0557b467b (commit)
from f4f5da1e532753f0b41e802553ee3f505f34579e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a40d36a95a527fd2d138c873dede08e9aafba0bd
Merge: 338b6882ebec6e49d70c77568a75533b1be3f5d8 f4f5da1e532753f0b41e802553ee3f505f34579e
Author: Julien Boibessot <jul...@ar...>
Date: Wed May 26 15:09:02 2010 +0200
Merge branch 'master' of ssh://artemys@armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 338b6882ebec6e49d70c77568a75533b1be3f5d8
Author: Julien Boibessot <jul...@ar...>
Date: Wed May 26 14:07:07 2010 +0200
[DEMOS] capture: do not use double buffer as mx2fb do not support it yet
commit c29c1aa6a05e54917d5c3f8e6529b9f0557b467b
Author: Julien Boibessot <jul...@ar...>
Date: Wed May 26 12:41:42 2010 +0200
[DEMOS] Makes input_test quit correctly when using CTRL+Z+kill or CTRL+C. + Indentation
-----------------------------------------------------------------------
Summary of changes:
target/demos/camera/capture/capture.c | 2 +-
target/demos/input_test/main.c | 198 ++++++++++++++++-----------------
2 files changed, 98 insertions(+), 102 deletions(-)
diff --git a/target/demos/camera/capture/capture.c b/target/demos/camera/capture/capture.c
index 23c8a8b..dc7e7ba 100644
--- a/target/demos/camera/capture/capture.c
+++ b/target/demos/camera/capture/capture.c
@@ -899,7 +899,7 @@ int main(int argc, char **argv)
exit(EXIT_FAILURE);
}
fprintf(stderr, "SDL OK\n");
- screen = SDL_SetVideoMode(width, height, 16, SDL_ANYFORMAT | SDL_DOUBLEBUF | SDL_HWSURFACE);
+ screen = SDL_SetVideoMode(width, height, 16, SDL_ANYFORMAT /*| SDL_DOUBLEBUF | SDL_HWSURFACE*/);
if (screen) {
printf("Video mode: %dx%dx%d\n", screen->w, screen->h,
screen->format->BitsPerPixel);
diff --git a/target/demos/input_test/main.c b/target/demos/input_test/main.c
index f27e064..0c97268 100644
--- a/target/demos/input_test/main.c
+++ b/target/demos/input_test/main.c
@@ -41,56 +41,56 @@ void process_events()
{
SDL_Event event;
- while (SDL_PollEvent(&event))
- {
- switch (event.type)
- {
- case SDL_KEYDOWN:
+ while (SDL_PollEvent(&event)) {
+ switch (event.type) {
+ case SDL_QUIT:
+ letsexit = 1;
+ break;
+
+ case SDL_KEYDOWN:
printf("\rKey %3d down (%s) ",
event.key.keysym.sym,
SDL_GetKeyName(event.key.keysym.sym));
fflush(stdout);
- switch (event.key.keysym.sym)
- {
- case SDLK_ESCAPE:
+ switch (event.key.keysym.sym) {
+ case SDLK_ESCAPE:
letsexit = 1;
break;
- case SDLK_LEFT:
+ case SDLK_LEFT:
xvel = -1;
break;
- case SDLK_RIGHT:
+ case SDLK_RIGHT:
xvel = 1;
break;
- case SDLK_UP:
+ case SDLK_UP:
yvel = -1;
break;
- case SDLK_DOWN:
+ case SDLK_DOWN:
yvel = 1;
break;
- default:
+ default:
break;
}
break;
- case SDL_KEYUP:
+ case SDL_KEYUP:
printf("\rKey %3d up ", event.key.keysym.sym);
fflush(stdout);
- switch (event.key.keysym.sym)
- {
- case SDLK_LEFT:
- case SDLK_RIGHT:
+ switch (event.key.keysym.sym) {
+ case SDLK_LEFT:
+ case SDLK_RIGHT:
xvel =0;
break;
- case SDLK_UP:
- case SDLK_DOWN:
+ case SDLK_UP:
+ case SDLK_DOWN:
yvel = 0;
break;
- default:
+ default:
break;
}
break;
- case SDL_MOUSEMOTION:
+ case SDL_MOUSEMOTION:
spritepos.x += event.motion.xrel;
spritepos.y += event.motion.yrel;
printf("\rMouse coords: (%3d, %3d)", event.motion.x,
@@ -98,94 +98,93 @@ void process_events()
fflush(stdout);
break;
- case SDL_MOUSEBUTTONDOWN:
+ case SDL_MOUSEBUTTONDOWN:
printf("\rMouse button %d down ", event.button.button);
fflush(stdout);
break;
- case SDL_MOUSEBUTTONUP:
+ case SDL_MOUSEBUTTONUP:
printf("\rMouse button %d up ", event.button.button);
fflush(stdout);
- break;
+ break;
- case SDL_JOYAXISMOTION:
- printf("\rJoy %d Axis %d = %d ",
- event.jaxis.which, event.jaxis.axis, event.jaxis.value);
- fflush(stdout);
- /* Even axes = verticals, odd = horizontals.
- jaxis.value are big so divide it by 2^14 */
- if (event.jaxis.axis % 2)
+ case SDL_JOYAXISMOTION:
+ printf("\rJoy %d Axis %d = %d ",
+ event.jaxis.which, event.jaxis.axis, event.jaxis.value);
+ fflush(stdout);
+ /* Even axes = verticals, odd = horizontals.
+ jaxis.value are big so divide it by 2^14 */
+ if (event.jaxis.axis % 2)
yvel = event.jaxis.value >> 14;
- else
+ else
xvel = event.jaxis.value >> 14;
- break;
-
- case SDL_JOYHATMOTION:
- printf("Joy %d Hat %d pos: ",
- event.jhat.which, event.jhat.hat);
- switch (event.jhat.value)
- {
- case SDL_HAT_CENTERED:
- xvel = 0; yvel = 0;
- printf("centered\n");
- break;
- case SDL_HAT_UP:
- xvel = 0; yvel = -1;
- printf("up\n");
- break;
- case SDL_HAT_RIGHT:
- xvel = 1; yvel = 0;
- printf("right\n");
- break;
- case SDL_HAT_DOWN:
- xvel = 0; yvel = 1;
- printf("down\n");
break;
- case SDL_HAT_LEFT:
- xvel = -1; yvel = 0;
- printf("left\n");
- break;
- case SDL_HAT_RIGHTUP:
- xvel = 1; yvel = -1;
- printf("right/up\n");
- break;
- case SDL_HAT_RIGHTDOWN:
- xvel = 1; yvel = 1;
- printf("right/down\n");
- break;
- case SDL_HAT_LEFTUP:
- xvel = -1; yvel = -1;
- printf("left/up\n");
- break;
- case SDL_HAT_LEFTDOWN:
- xvel = -1; yvel = 1;
- printf("left/down\n");
+
+ case SDL_JOYHATMOTION:
+ printf("Joy %d Hat %d pos: ",
+ event.jhat.which, event.jhat.hat);
+ switch (event.jhat.value) {
+ case SDL_HAT_CENTERED:
+ xvel = 0; yvel = 0;
+ printf("centered\n");
+ break;
+ case SDL_HAT_UP:
+ xvel = 0; yvel = -1;
+ printf("up\n");
+ break;
+ case SDL_HAT_RIGHT:
+ xvel = 1; yvel = 0;
+ printf("right\n");
+ break;
+ case SDL_HAT_DOWN:
+ xvel = 0; yvel = 1;
+ printf("down\n");
+ break;
+ case SDL_HAT_LEFT:
+ xvel = -1; yvel = 0;
+ printf("left\n");
+ break;
+ case SDL_HAT_RIGHTUP:
+ xvel = 1; yvel = -1;
+ printf("right/up\n");
+ break;
+ case SDL_HAT_RIGHTDOWN:
+ xvel = 1; yvel = 1;
+ printf("right/down\n");
+ break;
+ case SDL_HAT_LEFTUP:
+ xvel = -1; yvel = -1;
+ printf("left/up\n");
+ break;
+ case SDL_HAT_LEFTDOWN:
+ xvel = -1; yvel = 1;
+ printf("left/down\n");
+ break;
+ }
break;
- }
- break;
- case SDL_JOYBALLMOTION:
- spritepos.x += event.jball.xrel;
- spritepos.y += event.jball.yrel;
- printf("Joy %d Trackball %d moved: (%d, %d)\n",
- event.jball.which, event.jball.ball,
- event.jball.xrel, event.jball.yrel);
- break;
+ case SDL_JOYBALLMOTION:
+ spritepos.x += event.jball.xrel;
+ spritepos.y += event.jball.yrel;
+ printf("Joy %d Trackball %d moved: (%d, %d)\n",
+ event.jball.which, event.jball.ball,
+ event.jball.xrel, event.jball.yrel);
+ break;
- case SDL_JOYBUTTONDOWN:
- printf("\rJoy %d button %d down ",
- event.jbutton.which, event.jbutton.button);
- fflush(stdout);
- break;
+ case SDL_JOYBUTTONDOWN:
+ printf("\rJoy %d button %d down ",
+ event.jbutton.which, event.jbutton.button);
+ fflush(stdout);
+ break;
- case SDL_JOYBUTTONUP:
- printf("\rJoy %d button %d up ",
- event.jbutton.which, event.jbutton.button);
- fflush(stdout);
- break;
+ case SDL_JOYBUTTONUP:
+ printf("\rJoy %d button %d up ",
+ event.jbutton.which, event.jbutton.button);
+ fflush(stdout);
+ break;
- default:
- break;
+ default:
+ break;
}
}
}
@@ -205,8 +204,7 @@ int main(int argc, char * argv[])
int nbjoysticks;
int i;
- if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) < 0)
- {
+ if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) < 0) {
fprintf(stderr, "Error during SDL init: %s\n",
SDL_GetError());
return 1;
@@ -230,8 +228,7 @@ int main(int argc, char * argv[])
/* Find available Joysticks */
nbjoysticks = SDL_NumJoysticks();
printf("Number of Joysticks found: %d\n", nbjoysticks);
- for (i = 0; i < nbjoysticks; i++)
- {
+ for (i = 0; i < nbjoysticks; i++) {
SDL_Joystick * joy = SDL_JoystickOpen(i);
printf("--- Joystick %d: %s\n", i, SDL_JoystickName(i));
printf(" Axes: %d\n", SDL_JoystickNumAxes(joy));
@@ -262,8 +259,7 @@ int main(int argc, char * argv[])
spritepos.h = 0;
/* Main loop */
- while (!letsexit)
- {
+ while (!letsexit) {
process_events();
/* Update sprite pos */
hooks/post-receive
--
armadeus
|
|
From: jscheer <js...@us...> - 2010-05-25 13:01:45
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via f4f5da1e532753f0b41e802553ee3f505f34579e (commit)
via 48247025129ccb519d34f88ddcefe7e00f3f11fe (commit)
from 5a6d90070886315eeaf12fb8b57d93494725b79a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit f4f5da1e532753f0b41e802553ee3f505f34579e
Merge: 48247025129ccb519d34f88ddcefe7e00f3f11fe 5a6d90070886315eeaf12fb8b57d93494725b79a
Author: Jeremie Scheer <jeremie@laptop-jeremie-ubuntu.(none)>
Date: Tue May 25 14:59:20 2010 +0200
Merge branch 'master' of ssh://jscheer@armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 48247025129ccb519d34f88ddcefe7e00f3f11fe
Author: Jeremie Scheer <jeremie@laptop-jeremie-ubuntu.(none)>
Date: Fri May 21 10:12:11 2010 +0200
Change system timezone to France (CET+0).
-----------------------------------------------------------------------
Summary of changes:
.../device/armadeus/rootfs/target_skeleton/etc/TZ | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/TZ b/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/TZ
index 919d3a3..6b3f5c1 100644
--- a/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/TZ
+++ b/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/TZ
@@ -1 +1 @@
-CET-1DST,M3.5.0/2:00,M10.5.0/3:00
+CET+0DST,M3.5.0/2:00,M10.5.0/3:00
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2010-05-21 07:55:13
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 5a6d90070886315eeaf12fb8b57d93494725b79a (commit)
via 1abc6e04ef2708362cd00f5780d9c4a9fff2647f (commit)
from db19988720eb36850d5783e62d3d3ea54e0e5397 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 5a6d90070886315eeaf12fb8b57d93494725b79a
Author: Julien Boibessot <jul...@ar...>
Date: Thu May 20 21:14:58 2010 +0200
Typo...
commit 1abc6e04ef2708362cd00f5780d9c4a9fff2647f
Author: Julien Boibessot <jul...@ar...>
Date: Thu May 20 21:14:19 2010 +0200
[BUILDROOT] Convert lsof to DOWNLOAD helper
-----------------------------------------------------------------------
Summary of changes:
.../110-lsof-convert_to_DOWNLOAD_helper.patch | 15 +++++++++++++++
target/test/test_wifi.sh | 2 +-
2 files changed, 16 insertions(+), 1 deletions(-)
create mode 100644 patches/buildroot/110-lsof-convert_to_DOWNLOAD_helper.patch
diff --git a/patches/buildroot/110-lsof-convert_to_DOWNLOAD_helper.patch b/patches/buildroot/110-lsof-convert_to_DOWNLOAD_helper.patch
new file mode 100644
index 0000000..274ed2c
--- /dev/null
+++ b/patches/buildroot/110-lsof-convert_to_DOWNLOAD_helper.patch
@@ -0,0 +1,15 @@
+Not needed with recent BR.
+
+Index: buildroot/package/lsof/lsof.mk
+===================================================================
+--- buildroot.orig/package/lsof/lsof.mk 2010-05-20 21:11:44.000000000 +0200
++++ buildroot/package/lsof/lsof.mk 2010-05-20 21:12:13.000000000 +0200
+@@ -21,7 +21,7 @@
+ endif
+
+ $(DL_DIR)/$(LSOF_SOURCE):
+- $(WGET) -P $(DL_DIR) $(LSOF_SITE)/$(LSOF_SOURCE)
++ $(call DOWNLOAD,$(LSOF_SITE),$(LSOF_SOURCE))
+
+ lsof-source: $(DL_DIR)/$(LSOF_SOURCE)
+
diff --git a/target/test/test_wifi.sh b/target/test/test_wifi.sh
index e276746..a83d78e 100755
--- a/target/test/test_wifi.sh
+++ b/target/test/test_wifi.sh
@@ -50,7 +50,7 @@ test_wifi()
ask_user_choice "Which one is your AP ?" $AP_LIST
AP="$answer"
echo "Choosed: $AP"
- ask_user "Please enter you WEP key (default=$DEFAULT_WEP_KEY)"
+ ask_user "Please enter your WEP key (default=$DEFAULT_WEP_KEY)"
if [ "$response" == "" ]; then
WEP_KEY=$DEFAULT_WEP_KEY
else
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2010-05-20 16:10:39
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via db19988720eb36850d5783e62d3d3ea54e0e5397 (commit)
via 53156eaef88b0a6c937692d093334e6aa2a48f4b (commit)
from f53b3b7132d60d12a6287891a5ce874df6d274db (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit db19988720eb36850d5783e62d3d3ea54e0e5397
Merge: 53156eaef88b0a6c937692d093334e6aa2a48f4b f53b3b7132d60d12a6287891a5ce874df6d274db
Author: Julien Boibessot <jul...@ar...>
Date: Thu May 20 18:09:02 2010 +0200
Merge branch 'master' of ssh://artemys@armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 53156eaef88b0a6c937692d093334e6aa2a48f4b
Author: Julien Boibessot <jul...@ar...>
Date: Thu May 20 18:08:30 2010 +0200
[BUILDROOT] aumix SITE has changed
-----------------------------------------------------------------------
Summary of changes:
patches/buildroot/109-aumix-update_website.patch | 13 +++++++++
.../2010.02/109-aumix-update_website.patch | 27 ++++++++++++++++++++
2 files changed, 40 insertions(+), 0 deletions(-)
create mode 100644 patches/buildroot/109-aumix-update_website.patch
create mode 100644 patches/buildroot/2010.02/109-aumix-update_website.patch
diff --git a/patches/buildroot/109-aumix-update_website.patch b/patches/buildroot/109-aumix-update_website.patch
new file mode 100644
index 0000000..43d70eb
--- /dev/null
+++ b/patches/buildroot/109-aumix-update_website.patch
@@ -0,0 +1,13 @@
+Index: buildroot/package/audio/aumix/aumix.mk
+===================================================================
+--- buildroot.orig/package/audio/aumix/aumix.mk 2010-05-20 17:41:16.000000000 +0200
++++ buildroot/package/audio/aumix/aumix.mk 2010-05-20 17:42:03.000000000 +0200
+@@ -6,7 +6,7 @@
+
+ AUMIX_VERSION=2.8
+ AUMIX_SOURCE=aumix-$(AUMIX_VERSION).tar.bz2
+-AUMIX_SITE=http://jpj.net/~trevor/aumix
++AUMIX_SITE=http://jpj.net/~trevor/aumix/releases/
+ AUMIX_DIR=$(BUILD_DIR)/aumix-$(AUMIX_VERSION)
+ AUMIX_CAT:=$(BZCAT)
+
diff --git a/patches/buildroot/2010.02/109-aumix-update_website.patch b/patches/buildroot/2010.02/109-aumix-update_website.patch
new file mode 100644
index 0000000..a234131
--- /dev/null
+++ b/patches/buildroot/2010.02/109-aumix-update_website.patch
@@ -0,0 +1,27 @@
+From dc36961d7212902e74309320912f55950b9fc534 Mon Sep 17 00:00:00 2001
+From: Julien Boibessot <jul...@ar...>
+Date: Thu, 20 May 2010 17:58:05 +0200
+Subject: [PATCH] [PATCH] aumix SITE has changed
+
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+---
+ package/multimedia/aumix/aumix.mk | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/package/multimedia/aumix/aumix.mk b/package/multimedia/aumix/aumix.mk
+index e28a720..65d9d39 100644
+--- a/package/multimedia/aumix/aumix.mk
++++ b/package/multimedia/aumix/aumix.mk
+@@ -6,7 +6,7 @@
+
+ AUMIX_VERSION=2.8
+ AUMIX_SOURCE=aumix-$(AUMIX_VERSION).tar.bz2
+-AUMIX_SITE=http://jpj.net/~trevor/aumix
++AUMIX_SITE=http://jpj.net/~trevor/aumix/releases
+ AUMIX_AUTORECONF=YES
+
+ AUMIX_CONF_OPT = \
+--
+1.6.0.4
+
hooks/post-receive
--
armadeus
|