From 2f963b350d17d6d06185313037969aeb484901da Mon Sep 17 00:00:00 2001 From: follower Date: Sat, 3 Nov 2007 12:20:11 +0000 Subject: [PATCH] The delay functions are only used for PPPoE so we're ditching the files. git-svn-id: svn+ssh://oldsvn/home/mlalondesvn/svn/cral@44 3ee9b42a-b53c-0410-a25e-f0b6218d5d5b --- branches/follower/wiz810mj/src/lib/delay.c | 77 ---------------------- branches/follower/wiz810mj/src/lib/delay.h | 15 ----- 2 files changed, 92 deletions(-) delete mode 100644 branches/follower/wiz810mj/src/lib/delay.c delete mode 100644 branches/follower/wiz810mj/src/lib/delay.h diff --git a/branches/follower/wiz810mj/src/lib/delay.c b/branches/follower/wiz810mj/src/lib/delay.c deleted file mode 100644 index c404036..0000000 --- a/branches/follower/wiz810mj/src/lib/delay.c +++ /dev/null @@ -1,77 +0,0 @@ -/** - * @file delay.c - * @brief waiting functions - */ - -#include "types.h" -#include "delay.h" - - -//---- MODIFY_2005_10_31 : PM-A1 V1.1 --> V1.2 (16MHz --> 8MHz) -void wait_1us(u_int cnt) -{ - /* 16MHz : 16 CLK 1us : 1 + (1 + (1+1)*4 + 1 + (2+1))*cnt + 1 + 1*/ - /* - asm volatile - ( - "movw r24, %A0" "\n\t" - "L_US:" "\n\t" - "ldi r26, lo8(4)" "\n\t" - "L_US0:" "\n\t" - "dec r26" "\n\t" - "brne L_US0" "\n\t" - "sbiw r24, 1" "\n\t" - "brne L_US" "\n\t" - "nop" "\n\t" - : :"r" (cnt) - ); - */ - /* 8MHz : 8 CLK 1us : 1 + (1*5 + (2+1))*cnt + 1 + 1*/ - asm volatile - ( - "movw r24, %A0" "\n\t" - "L_US:" "\n\t" - "nop" "\n\t" - "nop" "\n\t" - "nop" "\n\t" - "nop" "\n\t" - "nop" "\n\t" - "sbiw r24, 1" "\n\t" - "brne L_US" "\n\t" - "nop" "\n\t" - : :"r" (cnt) - ); - -} -//---- END_MODIFY - -/* -******************************************************************************** -* WAIT FUNCTION -* -* Description : This function waits for 10 milliseconds -* Arguments : cnt - is the time to wait -* Returns : None -* Note : Internal Function -******************************************************************************** -*/ -void wait_10ms(u_int cnt) -{ - for (; cnt; cnt--) wait_1ms(10); -} - - -/* -******************************************************************************** -* WAIT FUNCTION -* -* Description : This function waits for 1 milliseconds -* Arguments : cnt - is the time to wait -* Returns : None -* Note : Internal Function -******************************************************************************** -*/ -void wait_1ms(u_int cnt) -{ - for (; cnt; cnt--) wait_1us(1000); -} diff --git a/branches/follower/wiz810mj/src/lib/delay.h b/branches/follower/wiz810mj/src/lib/delay.h deleted file mode 100644 index 27a563e..0000000 --- a/branches/follower/wiz810mj/src/lib/delay.h +++ /dev/null @@ -1,15 +0,0 @@ -/** - * @file delay.h - * @brief header for waiting functions - */ - -#ifndef _DELAY_H -#define _DELAY_H - -extern void wait_1us(u_int cnt); - -extern void wait_1ms(u_int cnt); - -extern void wait_10ms(u_int cnt); - -#endif