[PATCH 2/5] lib: move delay.c from calypso to lib
Wolfram Sang
wolfram at the-dreams.de
Wed May 4 22:58:14 CEST 2011
Nothing calypso-related in there and needed for Mediatek, too.
Signed-off-by: Wolfram Sang <wolfram at the-dreams.de>
---
src/target/firmware/calypso/Makefile | 2 +-
src/target/firmware/calypso/delay.c | 16 ----------------
src/target/firmware/lib/Makefile | 2 +-
src/target/firmware/lib/delay.c | 16 ++++++++++++++++
4 files changed, 18 insertions(+), 18 deletions(-)
delete mode 100644 src/target/firmware/calypso/delay.c
create mode 100644 src/target/firmware/lib/delay.c
diff --git a/src/target/firmware/calypso/Makefile b/src/target/firmware/calypso/Makefile
index c0620ed..610a82c 100644
--- a/src/target/firmware/calypso/Makefile
+++ b/src/target/firmware/calypso/Makefile
@@ -1,4 +1,4 @@
LIBRARIES+=calypso
calypso_DIR=calypso
-calypso_SRCS=arm.c buzzer.c clock.c delay.c dma.c dsp.c du.c i2c.c irq.c rtc.c sim.c spi.c tpu.c tsp.c keypad.c misc.c timer.c backlight.c uart.c uwire.c
+calypso_SRCS=arm.c buzzer.c clock.c dma.c dsp.c du.c i2c.c irq.c rtc.c sim.c spi.c tpu.c tsp.c keypad.c misc.c timer.c backlight.c uart.c uwire.c
diff --git a/src/target/firmware/calypso/delay.c b/src/target/firmware/calypso/delay.c
deleted file mode 100644
index 443ca82..0000000
--- a/src/target/firmware/calypso/delay.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <delay.h>
-
-/* FIXME: We need properly calibrated delay loops at some point! */
-void delay_us(unsigned int us)
-{
- volatile unsigned int i;
-
- for (i= 0; i < us*4; i++) { i; }
-}
-
-void delay_ms(unsigned int ms)
-{
- volatile unsigned int i;
-
- for (i= 0; i < ms*1300; i++) { i; }
-}
diff --git a/src/target/firmware/lib/Makefile b/src/target/firmware/lib/Makefile
index 987857c..83f9966 100644
--- a/src/target/firmware/lib/Makefile
+++ b/src/target/firmware/lib/Makefile
@@ -2,6 +2,6 @@
LIBRARIES+=mini
mini_DIR=lib
mini_SRCS=vsprintf.c string.c ctype.c printf.c console.c ctors.c \
- changebit.S clearbit.S div64.S lib1funcs.S memcpy.S memset.S setbit.S testchangebit.S testclearbit.S testsetbit.S
+ changebit.S clearbit.S delay.c div64.S lib1funcs.S memcpy.S memset.S setbit.S testchangebit.S testclearbit.S testsetbit.S
diff --git a/src/target/firmware/lib/delay.c b/src/target/firmware/lib/delay.c
new file mode 100644
index 0000000..443ca82
--- /dev/null
+++ b/src/target/firmware/lib/delay.c
@@ -0,0 +1,16 @@
+#include <delay.h>
+
+/* FIXME: We need properly calibrated delay loops at some point! */
+void delay_us(unsigned int us)
+{
+ volatile unsigned int i;
+
+ for (i= 0; i < us*4; i++) { i; }
+}
+
+void delay_ms(unsigned int ms)
+{
+ volatile unsigned int i;
+
+ for (i= 0; i < ms*1300; i++) { i; }
+}
--
1.7.2.5
More information about the baseband-devel
mailing list