|
From: <ak...@us...> - 2008-02-04 12:42:13
|
Revision: 811
http://can.svn.sourceforge.net/can/?rev=811&view=rev
Author: akhe
Date: 2008-02-04 04:42:08 -0800 (Mon, 04 Feb 2008)
Log Message:
-----------
Creating library structure for str win/lin dev
Added Paths:
-----------
trunk/firmware/arm/str/common/linux/
trunk/firmware/arm/str/common/windows/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ak...@us...> - 2008-02-04 12:43:16
|
Revision: 812
http://can.svn.sourceforge.net/can/?rev=812&view=rev
Author: akhe
Date: 2008-02-04 04:43:13 -0800 (Mon, 04 Feb 2008)
Log Message:
-----------
Moving linux str libs to Linux folder
Added Paths:
-----------
trunk/firmware/arm/str/common/linux/str71x_lib/
trunk/firmware/arm/str/common/linux/str73x_lib/
trunk/firmware/arm/str/common/linux/str75x_lib/
Removed Paths:
-------------
trunk/firmware/arm/str/common/str71x_lib/
trunk/firmware/arm/str/common/str73x_lib/
trunk/firmware/arm/str/common/str75x_lib/
Copied: trunk/firmware/arm/str/common/linux/str71x_lib (from rev 810, trunk/firmware/arm/str/common/str71x_lib)
Copied: trunk/firmware/arm/str/common/linux/str73x_lib (from rev 810, trunk/firmware/arm/str/common/str73x_lib)
Copied: trunk/firmware/arm/str/common/linux/str75x_lib (from rev 810, trunk/firmware/arm/str/common/str75x_lib)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ak...@us...> - 2008-02-04 12:10:06
|
Revision: 810
http://can.svn.sourceforge.net/can/?rev=810&view=rev
Author: akhe
Date: 2008-02-04 04:09:49 -0800 (Mon, 04 Feb 2008)
Log Message:
-----------
Stteing up new common str dev structure
Added Paths:
-----------
trunk/firmware/arm/str/common/str71x_lib/
trunk/firmware/arm/str/common/str71x_lib/Makefile
trunk/firmware/arm/str/common/str71x_lib/include/
trunk/firmware/arm/str/common/str71x_lib/include/71x_conf.h
trunk/firmware/arm/str/common/str71x_lib/include/71x_it.h
trunk/firmware/arm/str/common/str71x_lib/include/71x_lib.h
trunk/firmware/arm/str/common/str71x_lib/include/71x_map.h
trunk/firmware/arm/str/common/str71x_lib/include/71x_type.h
trunk/firmware/arm/str/common/str71x_lib/include/adc12.h
trunk/firmware/arm/str/common/str71x_lib/include/apb.h
trunk/firmware/arm/str/common/str71x_lib/include/bspi.h
trunk/firmware/arm/str/common/str71x_lib/include/can.h
trunk/firmware/arm/str/common/str71x_lib/include/eic.h
trunk/firmware/arm/str/common/str71x_lib/include/emi.h
trunk/firmware/arm/str/common/str71x_lib/include/flash.h
trunk/firmware/arm/str/common/str71x_lib/include/gpio.h
trunk/firmware/arm/str/common/str71x_lib/include/i2c.h
trunk/firmware/arm/str/common/str71x_lib/include/pcu.h
trunk/firmware/arm/str/common/str71x_lib/include/rccu.h
trunk/firmware/arm/str/common/str71x_lib/include/rtc.h
trunk/firmware/arm/str/common/str71x_lib/include/tim.h
trunk/firmware/arm/str/common/str71x_lib/include/uart.h
trunk/firmware/arm/str/common/str71x_lib/include/wdg.h
trunk/firmware/arm/str/common/str71x_lib/include/xti.h
trunk/firmware/arm/str/common/str71x_lib/libSTR71x_lib.a
trunk/firmware/arm/str/common/str71x_lib/src/
trunk/firmware/arm/str/common/str71x_lib/src/71x_lib.c
trunk/firmware/arm/str/common/str71x_lib/src/adc12.c
trunk/firmware/arm/str/common/str71x_lib/src/apb.c
trunk/firmware/arm/str/common/str71x_lib/src/bspi.c
trunk/firmware/arm/str/common/str71x_lib/src/can.c
trunk/firmware/arm/str/common/str71x_lib/src/eic.c
trunk/firmware/arm/str/common/str71x_lib/src/emi.c
trunk/firmware/arm/str/common/str71x_lib/src/flash.c
trunk/firmware/arm/str/common/str71x_lib/src/gpio.c
trunk/firmware/arm/str/common/str71x_lib/src/i2c.c
trunk/firmware/arm/str/common/str71x_lib/src/pcu.c
trunk/firmware/arm/str/common/str71x_lib/src/rccu.c
trunk/firmware/arm/str/common/str71x_lib/src/rtc.c
trunk/firmware/arm/str/common/str71x_lib/src/tim.c
trunk/firmware/arm/str/common/str71x_lib/src/uart.c
trunk/firmware/arm/str/common/str71x_lib/src/wdg.c
trunk/firmware/arm/str/common/str71x_lib/src/xti.c
trunk/firmware/arm/str/common/str73x_lib/
trunk/firmware/arm/str/common/str73x_lib/Makefile
trunk/firmware/arm/str/common/str73x_lib/include/
trunk/firmware/arm/str/common/str73x_lib/include/73x_adc.h
trunk/firmware/arm/str/common/str73x_lib/include/73x_bspi.h
trunk/firmware/arm/str/common/str73x_lib/include/73x_can.h
trunk/firmware/arm/str/common/str73x_lib/include/73x_cfg.h
trunk/firmware/arm/str/common/str73x_lib/include/73x_cmu.h
trunk/firmware/arm/str/common/str73x_lib/include/73x_conf.h
trunk/firmware/arm/str/common/str73x_lib/include/73x_dma.h
trunk/firmware/arm/str/common/str73x_lib/include/73x_eic.h
trunk/firmware/arm/str/common/str73x_lib/include/73x_flash.h
trunk/firmware/arm/str/common/str73x_lib/include/73x_gpio.h
trunk/firmware/arm/str/common/str73x_lib/include/73x_i2c.h
trunk/firmware/arm/str/common/str73x_lib/include/73x_lib.h
trunk/firmware/arm/str/common/str73x_lib/include/73x_map.h
trunk/firmware/arm/str/common/str73x_lib/include/73x_prccu.h
trunk/firmware/arm/str/common/str73x_lib/include/73x_pwm.h
trunk/firmware/arm/str/common/str73x_lib/include/73x_rtc.h
trunk/firmware/arm/str/common/str73x_lib/include/73x_tb.h
trunk/firmware/arm/str/common/str73x_lib/include/73x_tim.h
trunk/firmware/arm/str/common/str73x_lib/include/73x_type.h
trunk/firmware/arm/str/common/str73x_lib/include/73x_uart.h
trunk/firmware/arm/str/common/str73x_lib/include/73x_wdg.h
trunk/firmware/arm/str/common/str73x_lib/include/73x_wiu.h
trunk/firmware/arm/str/common/str73x_lib/include/73x_wut.h
trunk/firmware/arm/str/common/str73x_lib/libSTR73x_lib.a
trunk/firmware/arm/str/common/str73x_lib/src/
trunk/firmware/arm/str/common/str73x_lib/src/73x_adc.c
trunk/firmware/arm/str/common/str73x_lib/src/73x_bspi.c
trunk/firmware/arm/str/common/str73x_lib/src/73x_can.c
trunk/firmware/arm/str/common/str73x_lib/src/73x_cfg.c
trunk/firmware/arm/str/common/str73x_lib/src/73x_cmu.c
trunk/firmware/arm/str/common/str73x_lib/src/73x_dma.c
trunk/firmware/arm/str/common/str73x_lib/src/73x_eic.c
trunk/firmware/arm/str/common/str73x_lib/src/73x_flash.c
trunk/firmware/arm/str/common/str73x_lib/src/73x_gpio.c
trunk/firmware/arm/str/common/str73x_lib/src/73x_i2c.c
trunk/firmware/arm/str/common/str73x_lib/src/73x_lib.c
trunk/firmware/arm/str/common/str73x_lib/src/73x_prccu.c
trunk/firmware/arm/str/common/str73x_lib/src/73x_pwm.c
trunk/firmware/arm/str/common/str73x_lib/src/73x_rtc.c
trunk/firmware/arm/str/common/str73x_lib/src/73x_tb.c
trunk/firmware/arm/str/common/str73x_lib/src/73x_tim.c
trunk/firmware/arm/str/common/str73x_lib/src/73x_uart.c
trunk/firmware/arm/str/common/str73x_lib/src/73x_wdg.c
trunk/firmware/arm/str/common/str73x_lib/src/73x_wiu.c
trunk/firmware/arm/str/common/str73x_lib/src/73x_wut.c
trunk/firmware/arm/str/common/str75x_lib/
trunk/firmware/arm/str/common/str75x_lib/Makefile
trunk/firmware/arm/str/common/str75x_lib/include/
trunk/firmware/arm/str/common/str75x_lib/include/75x_adc.h
trunk/firmware/arm/str/common/str75x_lib/include/75x_can.h
trunk/firmware/arm/str/common/str75x_lib/include/75x_cfg.h
trunk/firmware/arm/str/common/str75x_lib/include/75x_conf.h
trunk/firmware/arm/str/common/str75x_lib/include/75x_dma.h
trunk/firmware/arm/str/common/str75x_lib/include/75x_eic.h
trunk/firmware/arm/str/common/str75x_lib/include/75x_extit.h
trunk/firmware/arm/str/common/str75x_lib/include/75x_gpio.h
trunk/firmware/arm/str/common/str75x_lib/include/75x_i2c.h
trunk/firmware/arm/str/common/str75x_lib/include/75x_lib.h
trunk/firmware/arm/str/common/str75x_lib/include/75x_map.h
trunk/firmware/arm/str/common/str75x_lib/include/75x_mrcc.h
trunk/firmware/arm/str/common/str75x_lib/include/75x_pwm.h
trunk/firmware/arm/str/common/str75x_lib/include/75x_rtc.h
trunk/firmware/arm/str/common/str75x_lib/include/75x_smi.h
trunk/firmware/arm/str/common/str75x_lib/include/75x_ssp.h
trunk/firmware/arm/str/common/str75x_lib/include/75x_tb.h
trunk/firmware/arm/str/common/str75x_lib/include/75x_tim.h
trunk/firmware/arm/str/common/str75x_lib/include/75x_type.h
trunk/firmware/arm/str/common/str75x_lib/include/75x_uart.h
trunk/firmware/arm/str/common/str75x_lib/include/75x_wdg.h
trunk/firmware/arm/str/common/str75x_lib/libSTR75x_lib.a
trunk/firmware/arm/str/common/str75x_lib/src/
trunk/firmware/arm/str/common/str75x_lib/src/75x_adc.c
trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c
trunk/firmware/arm/str/common/str75x_lib/src/75x_cfg.c
trunk/firmware/arm/str/common/str75x_lib/src/75x_dma.c
trunk/firmware/arm/str/common/str75x_lib/src/75x_eic.c
trunk/firmware/arm/str/common/str75x_lib/src/75x_extit.c
trunk/firmware/arm/str/common/str75x_lib/src/75x_gpio.c
trunk/firmware/arm/str/common/str75x_lib/src/75x_i2c.c
trunk/firmware/arm/str/common/str75x_lib/src/75x_lib.c
trunk/firmware/arm/str/common/str75x_lib/src/75x_mrcc.c
trunk/firmware/arm/str/common/str75x_lib/src/75x_pwm.c
trunk/firmware/arm/str/common/str75x_lib/src/75x_rtc.c
trunk/firmware/arm/str/common/str75x_lib/src/75x_smi.c
trunk/firmware/arm/str/common/str75x_lib/src/75x_ssp.c
trunk/firmware/arm/str/common/str75x_lib/src/75x_tb.c
trunk/firmware/arm/str/common/str75x_lib/src/75x_tim.c
trunk/firmware/arm/str/common/str75x_lib/src/75x_uart.c
trunk/firmware/arm/str/common/str75x_lib/src/75x_wdg.c
Added: trunk/firmware/arm/str/common/str71x_lib/Makefile
===================================================================
--- trunk/firmware/arm/str/common/str71x_lib/Makefile (rev 0)
+++ trunk/firmware/arm/str/common/str71x_lib/Makefile 2008-02-04 12:09:49 UTC (rev 810)
@@ -0,0 +1,37 @@
+# efsl library Makefile for STR710 by Giacomo Fazio and Antonio Nasca
+# (based on efsl library makefile for AT91SAM7S by Martin Thomas)
+
+MCU = arm7tdmi
+#THUMB = -mthumb -mthumb-interwork
+THUMB =
+
+LIBNAME = libSTR71x_lib.a
+
+COPT= -mcpu=$(MCU) $(THUMB) -gdwarf-2 -Wall -Os
+INCLUDEDIRS=-Iinclude
+CFLAGS=$(COPT) $(INCLUDEDIRS)
+# gcc4 unused code-removal:
+CFLAGS += -ffunction-sections -fdata-sections
+
+CC=arm-elf-gcc
+AR=arm-elf-ar
+OBJCOPY=arm-elf-objcopy
+
+OBJ=src/71x_lib.o src/adc12.o src/apb.o src/bspi.o
+OBJ+=src/can.o src/eic.o src/emi.o src/flash.o src/gpio.o
+OBJ+=src/i2c.o src/pcu.o src/rccu.o src/rtc.o src/tim.o src/uart.o
+OBJ+=src/wdg.o src/xti.o
+
+
+all: lib
+
+libandclean: lib srcclean
+
+lib: $(OBJ)
+ $(AR) rcs $(LIBNAME) $(OBJ)
+
+srcclean :
+ rm -f $(OBJ)
+
+clean :
+ rm -f $(OBJ) $(LIBNAME)
Added: trunk/firmware/arm/str/common/str71x_lib/include/71x_conf.h
===================================================================
--- trunk/firmware/arm/str/common/str71x_lib/include/71x_conf.h (rev 0)
+++ trunk/firmware/arm/str/common/str71x_lib/include/71x_conf.h 2008-02-04 12:09:49 UTC (rev 810)
@@ -0,0 +1,73 @@
+/******************** (C) COPYRIGHT 2003 STMicroelectronics ********************
+* File Name : 71x_conf.h
+* Author : MCD Application Team
+* Date First Issued : 16/05/2003
+* Description : Library configuration for the WDG example
+********************************************************************************
+* History:
+* 24/05/05 : V3.0
+* 30/11/04 : V2.0
+* 16/05/03 : Created
+*******************************************************************************
+ THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
+ CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+ AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+ OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+ OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+ CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+#ifndef __71x_CONF_H
+#define __71x_CONF_H
+
+/* Comment the line below to put the library in release mode */
+//#define DEBUG
+
+#define inline static __inline
+
+//#define USE_SERIAL_PORT
+//#define USE_UART0
+
+/* Main Oscillator Frequency value = 16 Mhz */
+//#define RCCU_Main_Osc 16000000
+
+/* Comment the lines below corresponding to unwanted peripherals */
+#define _ADC12
+#define _APB
+#define _APB1
+#define _APB2
+#define _BSPI
+#define _BSPI0
+#define _BSPI1
+#define _CAN
+#define _EIC
+#define _EMI
+#define _FLASH
+#define _GPIO
+#define _GPIO0
+#define _GPIO1
+#define _GPIO2
+#define _I2C
+#define _I2C0
+#define _I2C1
+#define _PCU
+#define _RCCU
+#define _RTC
+#define _TIM
+#define _TIM0
+#define _TIM1
+#define _TIM2
+#define _TIM3
+#define _UART
+#define _UART0
+#define _UART1
+#define _UART2
+#define _UART3
+#define _USB
+#define _WDG
+#define _XTI
+#define _IRQVectors
+
+#endif /* __71x_CONF_H */
+
+
+/******************* (C) COPYRIGHT 2003 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/common/str71x_lib/include/71x_it.h
===================================================================
--- trunk/firmware/arm/str/common/str71x_lib/include/71x_it.h (rev 0)
+++ trunk/firmware/arm/str/common/str71x_lib/include/71x_it.h 2008-02-04 12:09:49 UTC (rev 810)
@@ -0,0 +1,62 @@
+/******************** (C) COPYRIGHT 2003 STMicroelectronics ********************
+* File Name : 71x_it.h
+* Author : MCD Application Team
+* Date First Issued : 05/16/2003
+* Description : Interrupt handlers
+********************************************************************************
+* History:
+* 13/01/2006 : V3.1
+* 24/05/2005 : V3.0
+* 30/11/2004 : V2.0
+* 14/07/2004 : V1.3
+* 01/01/2004 : V1.2
+*******************************************************************************
+ THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
+ CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+ AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+ OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+ OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+ CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+
+#ifndef _71x_IT_H
+#define _71x_IT_H
+
+#include "71x_lib.h"
+
+void Undefined_Handler (void);
+void FIQ_Handler (void);
+void SWI_Handler (void);
+void Prefetch_Handler (void);
+void Abort_Handler (void);
+void T0TIMI_IRQHandler (void);
+void FLASH_IRQHandler (void);
+void RCCU_IRQHandler (void);
+void RTC_IRQHandler (void);
+void WDG_IRQHandler (void);
+void XTI_IRQHandler (void);
+void USBHP_IRQHandler (void);
+void I2C0ITERR_IRQHandler(void);
+void I2C1ITERR_IRQHandler(void);
+void UART0_IRQHandler (void);
+void UART1_IRQHandler (void);
+void UART2_IRQHandler (void);
+void UART3_IRQHandler (void);
+void BSPI0_IRQHandler (void);
+void BSPI1_IRQHandler (void);
+void I2C0_IRQHandler (void);
+void I2C1_IRQHandler (void);
+void CAN_IRQHandler (void);
+void ADC12_IRQHandler (void);
+void T1TIMI_IRQHandler (void);
+void T2TIMI_IRQHandler (void);
+void T3TIMI_IRQHandler (void);
+void HDLC_IRQHandler (void);
+void USBLP_IRQHandler (void);
+void T0TOI_IRQHandler (void);
+void T0OC1_IRQHandler (void);
+void T0OC2_IRQHandler (void);
+
+#endif /* _71x_IT_H */
+
+/******************* (C) COPYRIGHT 2003 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/common/str71x_lib/include/71x_lib.h
===================================================================
--- trunk/firmware/arm/str/common/str71x_lib/include/71x_lib.h (rev 0)
+++ trunk/firmware/arm/str/common/str71x_lib/include/71x_lib.h 2008-02-04 12:09:49 UTC (rev 810)
@@ -0,0 +1,102 @@
+/******************** (C) COPYRIGHT 2003 STMicroelectronics ********************
+* File Name : 71x_lib.h
+* Author : MCD Application Team
+* Date First Issued : 05/16/2003
+* Description : Global include for all peripherals
+********************************************************************************
+* History:
+* 13/01/2006 : V3.1
+* 24/05/2005 : V3.0
+* 30/11/2004 : V2.0
+* 14/07/2004 : V1.3
+* 01/01/2004 : V1.2
+*******************************************************************************
+ THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
+ CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+ AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+ OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+ OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+ CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+#ifndef __71x_LIB_H
+#define __71x_LIB_H
+
+#include "71x_map.h"
+#include "71x_conf.h"
+
+
+#ifdef _ADC12
+ #include "adc12.h"
+#endif
+
+#ifdef _APB
+ #include "apb.h"
+#endif
+
+#ifdef _BSPI
+ #include "bspi.h"
+#endif
+
+#ifdef _CAN
+ #include "can.h"
+#endif
+
+#ifdef _EIC
+ #include "eic.h"
+#endif
+
+#ifdef _EMI
+ #include "emi.h"
+#endif
+
+#ifdef _FLASH
+ #include "flash.h"
+#endif
+
+#ifdef _GPIO
+ #include "gpio.h"
+#endif
+
+#ifdef _I2C
+ #include "i2c.h"
+#endif
+
+#ifdef _PCU
+ #include "pcu.h"
+#endif
+
+#ifdef _RCCU
+ #include "rccu.h"
+#endif
+
+#ifdef _RTC
+ #include "rtc.h"
+#endif
+
+#ifdef _TIM
+ #include "tim.h"
+#endif
+
+#ifdef _UART
+ #include "uart.h"
+#endif
+
+#ifdef _USB
+#endif
+
+#ifdef _WDG
+ #include "wdg.h"
+#endif
+
+#ifdef _XTI
+ #include "xti.h"
+#endif
+
+
+#ifdef LIBDEBUG
+ void libdebug(void);
+#endif
+
+#endif /* __71x_LIB_H */
+
+/******************* (C) COPYRIGHT 2003 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/common/str71x_lib/include/71x_map.h
===================================================================
--- trunk/firmware/arm/str/common/str71x_lib/include/71x_map.h (rev 0)
+++ trunk/firmware/arm/str/common/str71x_lib/include/71x_map.h 2008-02-04 12:09:49 UTC (rev 810)
@@ -0,0 +1,612 @@
+/******************** (C) COPYRIGHT 2003 STMicroelectronics ********************
+* File Name : 71x_map.h
+* Author : MCD Application Team
+* Date First Issued : 05/16/2003
+* Description : Peripherals memory mapping and registers structures
+********************************************************************************
+* History:
+* 13/01/2006 : V3.1
+* 24/05/2005 : V3.0
+* 30/11/2004 : V2.0
+* 14/07/2004 : V1.3
+* 01/01/2004 : V1.2
+*******************************************************************************
+ THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
+ CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+ AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+ OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+ OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+ CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+
+#ifndef __71x_MAP_H
+#define __71x_MAP_H
+
+#ifndef EXT
+ #define EXT extern
+#endif
+
+#include "71x_conf.h"
+#include "71x_type.h"
+
+
+/* IP registers structures */
+
+typedef volatile struct
+{
+ vu16 DATA0;
+ vu16 EMPTY1[3];
+ vu16 DATA1;
+ vu16 EMPTY2[3];
+ vu16 DATA2;
+ vu16 EMPTY3[3];
+ vu16 DATA3;
+ vu16 EMPTY4[3];
+ vu16 CSR;
+ vu16 EMPTY5[7];
+ vu16 CPR;
+} ADC12_TypeDef;
+
+typedef volatile struct
+{
+ vu32 CKDIS;
+ vu32 SWRES;
+} APB_TypeDef;
+
+typedef volatile struct
+{
+ vu16 RXR;
+ vu16 EMPTY1;
+ vu16 TXR;
+ vu16 EMPTY2;
+ vu16 CSR1;
+ vu16 EMPTY3;
+ vu16 CSR2;
+ vu16 EMPTY4;
+ vu16 CLK;
+} BSPI_TypeDef;
+
+typedef volatile struct
+{
+ vu16 CRR;
+ vu16 EMPTY1;
+ vu16 CMR;
+ vu16 EMPTY2;
+ vu16 M1R;
+ vu16 EMPTY3;
+ vu16 M2R;
+ vu16 EMPTY4;
+ vu16 A1R;
+ vu16 EMPTY5;
+ vu16 A2R;
+ vu16 EMPTY6;
+ vu16 MCR;
+ vu16 EMPTY7;
+ vu16 DA1R;
+ vu16 EMPTY8;
+ vu16 DA2R;
+ vu16 EMPTY9;
+ vu16 DB1R;
+ vu16 EMPTY10;
+ vu16 DB2R;
+ vu16 EMPTY11[27];
+} CAN_MsgObj_TypeDef;
+
+typedef volatile struct
+{
+ vu16 CR;
+ vu16 EMPTY1;
+ vu16 SR;
+ vu16 EMPTY2;
+ vu16 ERR;
+ vu16 EMPTY3;
+ vu16 BTR;
+ vu16 EMPTY4;
+ vu16 IDR;
+ vu16 EMPTY5;
+ vu16 TESTR;
+ vu16 EMPTY6;
+ vu16 BRPR;
+ vu16 EMPTY7[3];
+ CAN_MsgObj_TypeDef sMsgObj[2];
+ vu16 EMPTY8[16];
+ vu16 TR1R;
+ vu16 EMPTY9;
+ vu16 TR2R;
+ vu16 EMPTY10[13];
+ vu16 ND1R;
+ vu16 EMPTY11;
+ vu16 ND2R;
+ vu16 EMPTY12[13];
+ vu16 IP1R;
+ vu16 EMPTY13;
+ vu16 IP2R;
+ vu16 EMPTY14[13];
+ vu16 MV1R;
+ vu16 EMPTY15;
+ vu16 MV2R;
+ vu16 EMPTY16;
+} CAN_TypeDef;
+
+typedef volatile struct
+{
+ vu32 ICR;
+ vu32 CICR;
+ vu32 CIPR;
+ vu32 EMPTY1[3];
+ vu32 IVR;
+ vu32 FIR;
+ vu32 IER;
+ vu32 EMPTY2[7];
+ vu32 IPR;
+ vu32 EMPTY3[7];
+ vu32 SIR[32];
+} EIC_TypeDef;
+
+typedef volatile struct
+{
+ vu16 BCON0;
+ vu16 EMPTY1;
+ vu16 BCON1;
+ vu16 EMPTY2;
+ vu16 BCON2;
+ vu16 EMPTY3;
+ vu16 BCON3;
+ vu16 EMPTY4;
+} EMI_TypeDef;
+
+typedef volatile struct
+{
+ vu32 CR0;
+ vu32 CR1;
+ vu32 DR0;
+ vu32 DR1;
+ vu32 AR;
+ vu32 ER;
+} FLASHR_TypeDef;
+
+typedef volatile struct
+{
+ vu32 NVWPAR;
+ vu32 EMPTY;
+ vu32 NVAPR0;
+ vu32 NVAPR1;
+} FLASHPR_TypeDef;
+
+typedef volatile struct
+{
+ vu16 PC0;
+ vu16 EMPTY1;
+ vu16 PC1;
+ vu16 EMPTY2;
+ vu16 PC2;
+ vu16 EMPTY3;
+ vu16 PD;
+ vu16 EMPTY4;
+} GPIO_TypeDef;
+
+typedef volatile struct
+{
+ vu8 CR;
+ vu8 EMPTY1[3];
+ vu8 SR1;
+ vu8 EMPTY2[3];
+ vu8 SR2;
+ vu8 EMPTY3[3];
+ vu8 CCR;
+ vu8 EMPTY4[3];
+ vu8 OAR1;
+ vu8 EMPTY5[3];
+ vu8 OAR2;
+ vu8 EMPTY6[3];
+ vu8 DR;
+ vu8 EMPTY7[3];
+ vu8 ECCR;
+} I2C_TypeDef;
+
+typedef volatile struct
+{
+ vu32 CCR;
+ vu32 EMPTY1;
+ vu32 CFR;
+ vu32 EMPTY2[3];
+ vu32 PLL1CR;
+ vu32 PER;
+ vu32 SMR;
+} RCCU_TypeDef;
+
+typedef volatile struct
+{
+ vu16 MDIVR;
+ vu16 EMPTY1;
+ vu16 PDIVR;
+ vu16 EMPTY2;
+ vu16 RSTR;
+ vu16 EMPTY3;
+ vu16 PLL2CR;
+ vu16 EMPTY4;
+ vu16 BOOTCR;
+ vu16 EMPTY5;
+ vu16 PWRCR;
+} PCU_TypeDef;
+
+typedef volatile struct
+{
+ vu16 CRH;
+ vu16 EMPTY1;
+ vu16 CRL;
+ vu16 EMPTY2;
+ vu16 PRLH;
+ vu16 EMPTY3;
+ vu16 PRLL;
+ vu16 EMPTY4;
+ vu16 DIVH;
+ vu16 EMPTY5;
+ vu16 DIVL;
+ vu16 EMPTY6;
+ vu16 CNTH;
+ vu16 EMPTY7;
+ vu16 CNTL;
+ vu16 EMPTY8;
+ vu16 ALRH;
+ vu16 EMPTY9;
+ vu16 ALRL;
+} RTC_TypeDef;
+
+typedef volatile struct
+{
+ vu16 ICAR;
+ vu16 EMPTY1;
+ vu16 ICBR;
+ vu16 EMPTY2;
+ vu16 OCAR;
+ vu16 EMPTY3;
+ vu16 OCBR;
+ vu16 EMPTY4;
+ vu16 CNTR;
+ vu16 EMPTY5;
+ vu16 CR1;
+ vu16 EMPTY6;
+ vu16 CR2;
+ vu16 EMPTY7;
+ vu16 SR;
+} TIM_TypeDef;
+
+typedef volatile struct
+{
+ vu16 BR;
+ vu16 EMPTY1;
+ vu16 TxBUFR;
+ vu16 EMPTY2;
+ vu16 RxBUFR;
+ vu16 EMPTY3;
+ vu16 CR;
+ vu16 EMPTY4;
+ vu16 IER;
+ vu16 EMPTY5;
+ vu16 SR;
+ vu16 EMPTY6;
+ vu16 GTR;
+ vu16 EMPTY7;
+ vu16 TOR;
+ vu16 EMPTY8;
+ vu16 TxRSTR;
+ vu16 EMPTY9;
+ vu16 RxRSTR;
+} UART_TypeDef;
+
+typedef volatile struct
+{
+ vu32 EP0R;
+ vu32 EP1R;
+ vu32 EP2R;
+ vu32 EP3R;
+ vu32 EP4R;
+ vu32 EP5R;
+ vu32 EP6R;
+ vu32 EP7R;
+ vu32 EP8R;
+ vu32 EP9R;
+ vu32 EP10R;
+ vu32 EP11R;
+ vu32 EP12R;
+ vu32 EP13R;
+ vu32 EP14R;
+ vu32 EP15R;
+ vu32 CNTR;
+ vu32 ISTR;
+ vu32 FNR;
+ vu32 DADDR;
+ vu32 BTABLE;
+} USB_TypeDef;
+
+typedef volatile struct
+{
+ vu16 CR;
+ vu16 EMPTY1;
+ vu16 PR;
+ vu16 EMPTY2;
+ vu16 VR;
+ vu16 EMPTY3;
+ vu16 CNT;
+ vu16 EMPTY4;
+ vu16 SR;
+ vu16 EMPTY5;
+ vu16 MR;
+ vu16 EMPTY6;
+ vu16 KR;
+} WDG_TypeDef;
+
+typedef volatile struct
+{
+ vu8 SR;
+ vu8 EMPTY1[7];
+ vu8 CTRL;
+ vu8 EMPTY2[3];
+ vu8 MRH;
+ vu8 EMPTY3[3];
+ vu8 MRL;
+ vu8 EMPTY4[3];
+ vu8 TRH;
+ vu8 EMPTY5[3];
+ vu8 TRL;
+ vu8 EMPTY6[3];
+ vu8 PRH;
+ vu8 EMPTY7[3];
+ vu8 PRL;
+} XTI_TypeDef;
+
+
+/* IRQ vectors */
+typedef volatile struct
+{
+ vu32 T0TIMI_IRQHandler;
+ vu32 FLASH_IRQHandler;
+ vu32 RCCU_IRQHandler;
+ vu32 RTC_IRQHandler;
+ vu32 WDG_IRQHandler;
+ vu32 XTI_IRQHandler;
+ vu32 USBHP_IRQHandler;
+ vu32 I2C0ITERR_IRQHandler;
+ vu32 I2C1ITERR_IRQHandler;
+ vu32 UART0_IRQHandler;
+ vu32 UART1_IRQHandler;
+ vu32 UART2_IRQHandler;
+ vu32 UART3_IRQHandler;
+ vu32 BSPI0_IRQHandler;
+ vu32 BSPI1_IRQHandler;
+ vu32 I2C0_IRQHandler;
+ vu32 I2C1_IRQHandler;
+ vu32 CAN_IRQHandler;
+ vu32 ADC12_IRQHandler;
+ vu32 T1TIMI_IRQHandler;
+ vu32 T2TIMI_IRQHandler;
+ vu32 T3TIMI_IRQHandler;
+ vu32 EMPTY1[3];
+ vu32 HDLC_IRQHandler;
+ vu32 USBLP_IRQHandler;
+ vu32 EMPTY2[2];
+ vu32 T0TOI_IRQHandler;
+ vu32 T0OC1_IRQHandler;
+ vu32 T0OC2_IRQHandler;
+} IRQVectors_TypeDef;
+
+/*===================================================================*/
+
+/* Memory mapping */
+
+#define RAM_BASE 0x20000000
+
+#define FLASHR_BASE 0x40100000
+#define FLASHPR_BASE 0x4010DFB0
+
+#define EXTMEM_BASE 0x60000000
+#define RCCU_BASE 0xA0000000
+#define PCU_BASE 0xA0000040
+#define APB1_BASE 0xC0000000
+#define APB2_BASE 0xE0000000
+#define EIC_BASE 0xFFFFF800
+
+#define I2C0_BASE (APB1_BASE + 0x1000)
+#define I2C1_BASE (APB1_BASE + 0x2000)
+#define UART0_BASE (APB1_BASE + 0x4000)
+#define UART1_BASE (APB1_BASE + 0x5000)
+#define UART2_BASE (APB1_BASE + 0x6000)
+#define UART3_BASE (APB1_BASE + 0x7000)
+#define CAN_BASE (APB1_BASE + 0x9000)
+#define BSPI0_BASE (APB1_BASE + 0xA000)
+#define BSPI1_BASE (APB1_BASE + 0xB000)
+#define USB_BASE (APB1_BASE + 0x8800)
+
+#define XTI_BASE (APB2_BASE + 0x101C)
+#define GPIO0_BASE (APB2_BASE + 0x3000)
+#define GPIO1_BASE (APB2_BASE + 0x4000)
+#define GPIO2_BASE (APB2_BASE + 0x5000)
+#define ADC12_BASE (APB2_BASE + 0x7000)
+#define TIM0_BASE (APB2_BASE + 0x9000)
+#define TIM1_BASE (APB2_BASE + 0xA000)
+#define TIM2_BASE (APB2_BASE + 0xB000)
+#define TIM3_BASE (APB2_BASE + 0xC000)
+#define RTC_BASE (APB2_BASE + 0xD000)
+#define WDG_BASE (APB2_BASE + 0xE000)
+
+#define EMI_BASE (EXTMEM_BASE + 0x0C000000)
+
+/*===================================================================*/
+
+/* IP data access */
+
+#ifndef LIBDEBUG
+ #define ADC12 ((ADC12_TypeDef *)ADC12_BASE)
+
+ #define APB1 ((APB_TypeDef *)(APB1_BASE+0x10))
+ #define APB2 ((APB_TypeDef *)(APB2_BASE+0x10))
+
+ #define BSPI0 ((BSPI_TypeDef *)BSPI0_BASE)
+ #define BSPI1 ((BSPI_TypeDef *)BSPI1_BASE)
+
+ #define CAN ((CAN_TypeDef *)CAN_BASE)
+
+ #define EIC ((EIC_TypeDef *)EIC_BASE)
+
+ #define EMI ((EMI_TypeDef *)EMI_BASE)
+
+ #define FLASHR ((FLASHR_TypeDef *)FLASHR_BASE)
+ #define FLASHPR ((FLASHPR_TypeDef *)FLASHPR_BASE)
+
+ #define GPIO0 ((GPIO_TypeDef *)GPIO0_BASE)
+ #define GPIO1 ((GPIO_TypeDef *)GPIO1_BASE)
+ #define GPIO2 ((GPIO_TypeDef *)GPIO2_BASE)
+
+ #define I2C0 ((I2C_TypeDef *)I2C0_BASE)
+ #define I2C1 ((I2C_TypeDef *)I2C1_BASE)
+
+ #define PCU ((PCU_TypeDef *)PCU_BASE)
+
+ #define RCCU ((RCCU_TypeDef *)RCCU_BASE)
+
+ #define RTC ((RTC_TypeDef *)RTC_BASE)
+
+ #define TIM0 ((TIM_TypeDef *)TIM0_BASE)
+ #define TIM1 ((TIM_TypeDef *)TIM1_BASE)
+ #define TIM2 ((TIM_TypeDef *)TIM2_BASE)
+ #define TIM3 ((TIM_TypeDef *)TIM3_BASE)
+
+ #define UART0 ((UART_TypeDef *)UART0_BASE)
+ #define UART1 ((UART_TypeDef *)UART1_BASE)
+ #define UART2 ((UART_TypeDef *)UART2_BASE)
+ #define UART3 ((UART_TypeDef *)UART3_BASE)
+
+ #define USB ((USB_TypeDef *)USB_BASE)
+
+ #define WDG ((WDG_TypeDef *)WDG_BASE)
+
+ #define XTI ((XTI_TypeDef *)XTI_BASE)
+
+ #define IRQVectors ((IRQVectors_TypeDef *)&T0TIMI_Addr)
+
+#else /* LIBDEBUG */
+
+ #ifdef _ADC12
+ EXT ADC12_TypeDef *ADC12;
+ #endif
+
+ #ifdef _APB
+ #ifdef _APB1
+ EXT APB_TypeDef *APB1;
+ #endif
+ #ifdef _APB2
+ EXT APB_TypeDef *APB2;
+ #endif
+ #endif
+
+ #ifdef _BSPI
+ #ifdef _BSPI0
+ EXT BSPI_TypeDef *BSPI0;
+ #endif
+ #ifdef _BSPI1
+ EXT BSPI_TypeDef *BSPI1;
+ #endif
+ #endif
+
+ #ifdef _CAN
+ EXT CAN_TypeDef *CAN;
+ #endif
+
+ #ifdef _EIC
+ EXT EIC_TypeDef *EIC;
+ #endif
+
+ #ifdef _EMI
+ EXT EMI_TypeDef *EMI;
+ #endif
+
+ #ifdef _FLASH
+ EXT FLASHR_TypeDef *FLASHR;
+ EXT FLASHPR_TypeDef *FLASHPR;
+ #endif
+
+ #ifdef _GPIO
+ #ifdef _GPIO0
+ EXT GPIO_TypeDef *GPIO0;
+ #endif
+ #ifdef _GPIO1
+ EXT GPIO_TypeDef *GPIO1;
+ #endif
+ #ifdef _GPIO2
+ EXT GPIO_TypeDef *GPIO2;
+ #endif
+ #endif
+
+ #ifdef _I2C
+ #ifdef _I2C0
+ EXT I2C_TypeDef *I2C0;
+ #endif
+ #ifdef _I2C1
+ EXT I2C_TypeDef *I2C1;
+ #endif
+ #endif
+
+ #ifdef _PCU
+ EXT PCU_TypeDef *PCU;
+ #endif
+
+ #ifdef _RCCU
+ EXT RCCU_TypeDef *RCCU;
+ #endif
+
+ #ifdef _RTC
+ EXT RTC_TypeDef *RTC;
+ #endif
+
+ #ifdef _TIM
+ #ifdef _TIM0
+ EXT TIM_TypeDef *TIM0;
+ #endif
+ #ifdef _TIM1
+ EXT TIM_TypeDef *TIM1;
+ #endif
+ #ifdef _TIM2
+ EXT TIM_TypeDef *TIM2;
+ #endif
+ #ifdef _TIM3
+ EXT TIM_TypeDef *TIM3;
+ #endif
+ #endif
+
+ #ifdef _UART
+ #ifdef _UART0
+ EXT UART_TypeDef *UART0;
+ #endif
+ #ifdef _UART1
+ EXT UART_TypeDef *UART1;
+ #endif
+ #ifdef _UART2
+ EXT UART_TypeDef *UART2;
+ #endif
+ #ifdef _UART3
+ EXT UART_TypeDef *UART3;
+ #endif
+ #endif
+
+ #ifdef _USB
+ EXT USB_TypeDef *USB;
+ #endif
+
+ #ifdef _WDG
+ EXT WDG_TypeDef *WDG;
+ #endif
+
+ #ifdef _XTI
+ EXT XTI_TypeDef *XTI;
+ #endif
+
+ #ifdef _IRQVectors
+ EXT IRQVectors_TypeDef *IRQVectors;
+ #endif
+
+#endif /* LIBDEBUG */
+
+#endif /* __71x_MAP_H */
+
+/******************* (C) COPYRIGHT 2003 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/common/str71x_lib/include/71x_type.h
===================================================================
--- trunk/firmware/arm/str/common/str71x_lib/include/71x_type.h (rev 0)
+++ trunk/firmware/arm/str/common/str71x_lib/include/71x_type.h 2008-02-04 12:09:49 UTC (rev 810)
@@ -0,0 +1,52 @@
+/******************** (C) COPYRIGHT 2003 STMicroelectronics ********************
+* File Name : 71x_type.h
+* Author : MCD Application Team
+* Date First Issued : 05/16/2003
+* Description : Common data types
+********************************************************************************
+* History:
+* 13/01/2006 : V3.1
+* 24/05/2005 : V3.0
+* 30/11/2004 : V2.0
+* 14/07/2004 : V1.3
+* 01/01/2004 : V1.2
+*******************************************************************************
+ THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
+ CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+ AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+ OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+ OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+ CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+**************************************************************...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-04 13:02:50
|
Revision: 815
http://can.svn.sourceforge.net/can/?rev=815&view=rev
Author: akhe
Date: 2008-02-04 05:02:45 -0800 (Mon, 04 Feb 2008)
Log Message:
-----------
str dev struct
Added Paths:
-----------
trunk/firmware/arm/str/common/str71x_lib/
trunk/firmware/arm/str/common/str71x_lib/Makefile
trunk/firmware/arm/str/common/str71x_lib/Makefile.linux
trunk/firmware/arm/str/common/str71x_lib/Makefile.windows
trunk/firmware/arm/str/common/str71x_lib/include/
trunk/firmware/arm/str/common/str71x_lib/libSTR71x_lib.a
trunk/firmware/arm/str/common/str71x_lib/src/
trunk/firmware/arm/str/common/str73x_lib/
trunk/firmware/arm/str/common/str73x_lib/Makefile
trunk/firmware/arm/str/common/str73x_lib/Makefile.linux
trunk/firmware/arm/str/common/str73x_lib/Makefile.windows
trunk/firmware/arm/str/common/str73x_lib/include/
trunk/firmware/arm/str/common/str73x_lib/libSTR73x_lib.a
trunk/firmware/arm/str/common/str73x_lib/src/
trunk/firmware/arm/str/common/str75x_lib/
trunk/firmware/arm/str/common/str75x_lib/Makefile
trunk/firmware/arm/str/common/str75x_lib/Makefile.linux
trunk/firmware/arm/str/common/str75x_lib/Makefile.windows
trunk/firmware/arm/str/common/str75x_lib/include/
trunk/firmware/arm/str/common/str75x_lib/libSTR75x_lib.a
trunk/firmware/arm/str/common/str75x_lib/src/
Removed Paths:
-------------
trunk/firmware/arm/str/common/str71x_lib/Makefile
trunk/firmware/arm/str/common/str71x_lib/include/
trunk/firmware/arm/str/common/str71x_lib/libSTR71x_lib.a
trunk/firmware/arm/str/common/str71x_lib/src/
trunk/firmware/arm/str/common/str73x_lib/Makefile
trunk/firmware/arm/str/common/str73x_lib/include/
trunk/firmware/arm/str/common/str73x_lib/libSTR73x_lib.a
trunk/firmware/arm/str/common/str73x_lib/src/
trunk/firmware/arm/str/common/str75x_lib/Makefile
trunk/firmware/arm/str/common/str75x_lib/include/
trunk/firmware/arm/str/common/str75x_lib/libSTR75x_lib.a
trunk/firmware/arm/str/common/str75x_lib/src/
trunk/firmware/arm/str/common/windows/str71x_lib/
trunk/firmware/arm/str/common/windows/str73x_lib/
trunk/firmware/arm/str/common/windows/str75x_lib/
Copied: trunk/firmware/arm/str/common/str71x_lib (from rev 813, trunk/firmware/arm/str/common/windows/str71x_lib)
Deleted: trunk/firmware/arm/str/common/str71x_lib/Makefile
===================================================================
--- trunk/firmware/arm/str/common/windows/str71x_lib/Makefile 2008-02-04 12:53:41 UTC (rev 813)
+++ trunk/firmware/arm/str/common/str71x_lib/Makefile 2008-02-04 13:02:45 UTC (rev 815)
@@ -1,37 +0,0 @@
-# efsl library Makefile for STR710 by Giacomo Fazio and Antonio Nasca
-# (based on efsl library makefile for AT91SAM7S by Martin Thomas)
-
-MCU = arm7tdmi
-#THUMB = -mthumb -mthumb-interwork
-THUMB =
-
-LIBNAME = libSTR71x_lib.a
-
-COPT= -mcpu=$(MCU) $(THUMB) -gdwarf-2 -Wall -Os
-INCLUDEDIRS=-Iinclude
-CFLAGS=$(COPT) $(INCLUDEDIRS)
-# gcc4 unused code-removal:
-CFLAGS += -ffunction-sections -fdata-sections
-
-CC=arm-elf-gcc
-AR=arm-elf-ar
-OBJCOPY=arm-elf-objcopy
-
-OBJ=src/71x_lib.o src/adc12.o src/apb.o src/bspi.o
-OBJ+=src/can.o src/eic.o src/emi.o src/flash.o src/gpio.o
-OBJ+=src/i2c.o src/pcu.o src/rccu.o src/rtc.o src/tim.o src/uart.o
-OBJ+=src/wdg.o src/xti.o
-
-
-all: lib
-
-libandclean: lib srcclean
-
-lib: $(OBJ)
- $(AR) rcs $(LIBNAME) $(OBJ)
-
-srcclean :
- rm -f $(OBJ)
-
-clean :
- rm -f $(OBJ) $(LIBNAME)
Copied: trunk/firmware/arm/str/common/str71x_lib/Makefile (from rev 814, trunk/firmware/arm/str/common/windows/str71x_lib/Makefile)
===================================================================
--- trunk/firmware/arm/str/common/str71x_lib/Makefile (rev 0)
+++ trunk/firmware/arm/str/common/str71x_lib/Makefile 2008-02-04 13:02:45 UTC (rev 815)
@@ -0,0 +1,37 @@
+# efsl library Makefile for STR710 by Giacomo Fazio and Antonio Nasca
+# (based on efsl library makefile for AT91SAM7S by Martin Thomas)
+
+MCU = arm7tdmi
+#THUMB = -mthumb -mthumb-interwork
+THUMB =
+
+LIBNAME = libSTR71x_lib.a
+
+COPT= -mcpu=$(MCU) $(THUMB) -gdwarf-2 -Wall -Os
+INCLUDEDIRS=-Iinclude
+CFLAGS=$(COPT) $(INCLUDEDIRS)
+# gcc4 unused code-removal:
+CFLAGS += -ffunction-sections -fdata-sections
+
+CC=arm-elf-gcc
+AR=arm-elf-ar
+OBJCOPY=arm-elf-objcopy
+
+OBJ=src/71x_lib.o src/adc12.o src/apb.o src/bspi.o
+OBJ+=src/can.o src/eic.o src/emi.o src/flash.o src/gpio.o
+OBJ+=src/i2c.o src/pcu.o src/rccu.o src/rtc.o src/tim.o src/uart.o
+OBJ+=src/wdg.o src/xti.o
+
+
+all: lib
+
+libandclean: lib srcclean
+
+lib: $(OBJ)
+ $(AR) rcs $(LIBNAME) $(OBJ)
+
+srcclean :
+ rm -f $(OBJ)
+
+clean :
+ rm -f $(OBJ) $(LIBNAME)
Copied: trunk/firmware/arm/str/common/str71x_lib/Makefile.linux (from rev 814, trunk/firmware/arm/str/common/windows/str71x_lib/Makefile.linux)
===================================================================
--- trunk/firmware/arm/str/common/str71x_lib/Makefile.linux (rev 0)
+++ trunk/firmware/arm/str/common/str71x_lib/Makefile.linux 2008-02-04 13:02:45 UTC (rev 815)
@@ -0,0 +1,37 @@
+# efsl library Makefile for STR710 by Giacomo Fazio and Antonio Nasca
+# (based on efsl library makefile for AT91SAM7S by Martin Thomas)
+
+MCU = arm7tdmi
+#THUMB = -mthumb -mthumb-interwork
+THUMB =
+
+LIBNAME = libSTR71x_lib.a
+
+COPT= -mcpu=$(MCU) $(THUMB) -gdwarf-2 -Wall -Os
+INCLUDEDIRS=-Iinclude
+CFLAGS=$(COPT) $(INCLUDEDIRS)
+# gcc4 unused code-removal:
+CFLAGS += -ffunction-sections -fdata-sections
+
+CC=arm-elf-gcc
+AR=arm-elf-ar
+OBJCOPY=arm-elf-objcopy
+
+OBJ=src/71x_lib.o src/adc12.o src/apb.o src/bspi.o
+OBJ+=src/can.o src/eic.o src/emi.o src/flash.o src/gpio.o
+OBJ+=src/i2c.o src/pcu.o src/rccu.o src/rtc.o src/tim.o src/uart.o
+OBJ+=src/wdg.o src/xti.o
+
+
+all: lib
+
+libandclean: lib srcclean
+
+lib: $(OBJ)
+ $(AR) rcs $(LIBNAME) $(OBJ)
+
+srcclean :
+ rm -f $(OBJ)
+
+clean :
+ rm -f $(OBJ) $(LIBNAME)
Copied: trunk/firmware/arm/str/common/str71x_lib/Makefile.windows (from rev 814, trunk/firmware/arm/str/common/windows/str71x_lib/Makefile.windows)
===================================================================
--- trunk/firmware/arm/str/common/str71x_lib/Makefile.windows (rev 0)
+++ trunk/firmware/arm/str/common/str71x_lib/Makefile.windows 2008-02-04 13:02:45 UTC (rev 815)
@@ -0,0 +1,37 @@
+# efsl library Makefile for STR710 by Giacomo Fazio and Antonio Nasca
+# (based on efsl library makefile for AT91SAM7S by Martin Thomas)
+
+MCU = arm7tdmi
+#THUMB = -mthumb -mthumb-interwork
+THUMB =
+
+LIBNAME = libSTR71x_lib.a
+
+COPT= -mcpu=$(MCU) $(THUMB) -gdwarf-2 -Wall -Os
+INCLUDEDIRS=-Iinclude
+CFLAGS=$(COPT) $(INCLUDEDIRS)
+# gcc4 unused code-removal:
+CFLAGS += -ffunction-sections -fdata-sections
+
+CC=arm-elf-gcc
+AR=arm-elf-ar
+OBJCOPY=arm-elf-objcopy
+
+OBJ=src/71x_lib.o src/adc12.o src/apb.o src/bspi.o
+OBJ+=src/can.o src/eic.o src/emi.o src/flash.o src/gpio.o
+OBJ+=src/i2c.o src/pcu.o src/rccu.o src/rtc.o src/tim.o src/uart.o
+OBJ+=src/wdg.o src/xti.o
+
+
+all: lib
+
+libandclean: lib srcclean
+
+lib: $(OBJ)
+ $(AR) rcs $(LIBNAME) $(OBJ)
+
+srcclean :
+ rm -f $(OBJ)
+
+clean :
+ rm -f $(OBJ) $(LIBNAME)
Copied: trunk/firmware/arm/str/common/str71x_lib/include (from rev 814, trunk/firmware/arm/str/common/windows/str71x_lib/include)
Deleted: trunk/firmware/arm/str/common/str71x_lib/libSTR71x_lib.a
===================================================================
(Binary files differ)
Copied: trunk/firmware/arm/str/common/str71x_lib/libSTR71x_lib.a (from rev 814, trunk/firmware/arm/str/common/windows/str71x_lib/libSTR71x_lib.a)
===================================================================
(Binary files differ)
Copied: trunk/firmware/arm/str/common/str71x_lib/src (from rev 814, trunk/firmware/arm/str/common/windows/str71x_lib/src)
Copied: trunk/firmware/arm/str/common/str73x_lib (from rev 813, trunk/firmware/arm/str/common/windows/str73x_lib)
Deleted: trunk/firmware/arm/str/common/str73x_lib/Makefile
===================================================================
--- trunk/firmware/arm/str/common/windows/str73x_lib/Makefile 2008-02-04 12:53:41 UTC (rev 813)
+++ trunk/firmware/arm/str/common/str73x_lib/Makefile 2008-02-04 13:02:45 UTC (rev 815)
@@ -1,38 +0,0 @@
-# efsl library Makefile for STR730 by Giacomo Fazio and Antonio Nasca
-# (based on efsl library makefile for AT91SAM7S by Martin Thomas)
-
-
-MCU = arm7tdmi
-#THUMB = -mthumb -mthumb-interwork
-THUMB =
-
-LIBNAME = libSTR73x_lib.a
-
-COPT= -mcpu=$(MCU) $(THUMB) -gdwarf-2 -Wall -Os
-INCLUDEDIRS=-Iinclude
-CFLAGS=$(COPT) $(INCLUDEDIRS)
-# gcc4 unused code-removal:
-CFLAGS += -ffunction-sections -fdata-sections
-
-CC=arm-elf-gcc
-AR=arm-elf-ar
-OBJCOPY=arm-elf-objcopy
-
-OBJ=src/73x_lib.o src/73x_cfg.o src/73x_adc.o src/73x_bspi.o
-OBJ+=src/73x_can.o src/73x_cmu.o src/73x_dma.o src/73x_flash.o src/73x_eic.o src/73x_gpio.o
-OBJ+=src/73x_i2c.o src/73x_prccu.o src/73x_pwm.o src/73x_rtc.o src/73x_tb.o src/73x_tim.o
-OBJ+=src/73x_uart.o src/73x_wdg.o src/73x_wiu.o src/73x_wut.o
-
-
-all: lib
-
-libandclean: lib srcclean
-
-lib: $(OBJ)
- $(AR) rcs $(LIBNAME) $(OBJ)
-
-srcclean :
- rm -f $(OBJ)
-
-clean :
- rm -f $(OBJ) $(LIBNAME)
Copied: trunk/firmware/arm/str/common/str73x_lib/Makefile (from rev 814, trunk/firmware/arm/str/common/windows/str73x_lib/Makefile)
===================================================================
--- trunk/firmware/arm/str/common/str73x_lib/Makefile (rev 0)
+++ trunk/firmware/arm/str/common/str73x_lib/Makefile 2008-02-04 13:02:45 UTC (rev 815)
@@ -0,0 +1,38 @@
+# efsl library Makefile for STR730 by Giacomo Fazio and Antonio Nasca
+# (based on efsl library makefile for AT91SAM7S by Martin Thomas)
+
+
+MCU = arm7tdmi
+#THUMB = -mthumb -mthumb-interwork
+THUMB =
+
+LIBNAME = libSTR73x_lib.a
+
+COPT= -mcpu=$(MCU) $(THUMB) -gdwarf-2 -Wall -Os
+INCLUDEDIRS=-Iinclude
+CFLAGS=$(COPT) $(INCLUDEDIRS)
+# gcc4 unused code-removal:
+CFLAGS += -ffunction-sections -fdata-sections
+
+CC=arm-elf-gcc
+AR=arm-elf-ar
+OBJCOPY=arm-elf-objcopy
+
+OBJ=src/73x_lib.o src/73x_cfg.o src/73x_adc.o src/73x_bspi.o
+OBJ+=src/73x_can.o src/73x_cmu.o src/73x_dma.o src/73x_flash.o src/73x_eic.o src/73x_gpio.o
+OBJ+=src/73x_i2c.o src/73x_prccu.o src/73x_pwm.o src/73x_rtc.o src/73x_tb.o src/73x_tim.o
+OBJ+=src/73x_uart.o src/73x_wdg.o src/73x_wiu.o src/73x_wut.o
+
+
+all: lib
+
+libandclean: lib srcclean
+
+lib: $(OBJ)
+ $(AR) rcs $(LIBNAME) $(OBJ)
+
+srcclean :
+ rm -f $(OBJ)
+
+clean :
+ rm -f $(OBJ) $(LIBNAME)
Copied: trunk/firmware/arm/str/common/str73x_lib/Makefile.linux (from rev 814, trunk/firmware/arm/str/common/windows/str73x_lib/Makefile.linux)
===================================================================
--- trunk/firmware/arm/str/common/str73x_lib/Makefile.linux (rev 0)
+++ trunk/firmware/arm/str/common/str73x_lib/Makefile.linux 2008-02-04 13:02:45 UTC (rev 815)
@@ -0,0 +1,38 @@
+# efsl library Makefile for STR730 by Giacomo Fazio and Antonio Nasca
+# (based on efsl library makefile for AT91SAM7S by Martin Thomas)
+
+
+MCU = arm7tdmi
+#THUMB = -mthumb -mthumb-interwork
+THUMB =
+
+LIBNAME = libSTR73x_lib.a
+
+COPT= -mcpu=$(MCU) $(THUMB) -gdwarf-2 -Wall -Os
+INCLUDEDIRS=-Iinclude
+CFLAGS=$(COPT) $(INCLUDEDIRS)
+# gcc4 unused code-removal:
+CFLAGS += -ffunction-sections -fdata-sections
+
+CC=arm-elf-gcc
+AR=arm-elf-ar
+OBJCOPY=arm-elf-objcopy
+
+OBJ=src/73x_lib.o src/73x_cfg.o src/73x_adc.o src/73x_bspi.o
+OBJ+=src/73x_can.o src/73x_cmu.o src/73x_dma.o src/73x_flash.o src/73x_eic.o src/73x_gpio.o
+OBJ+=src/73x_i2c.o src/73x_prccu.o src/73x_pwm.o src/73x_rtc.o src/73x_tb.o src/73x_tim.o
+OBJ+=src/73x_uart.o src/73x_wdg.o src/73x_wiu.o src/73x_wut.o
+
+
+all: lib
+
+libandclean: lib srcclean
+
+lib: $(OBJ)
+ $(AR) rcs $(LIBNAME) $(OBJ)
+
+srcclean :
+ rm -f $(OBJ)
+
+clean :
+ rm -f $(OBJ) $(LIBNAME)
Copied: trunk/firmware/arm/str/common/str73x_lib/Makefile.windows (from rev 814, trunk/firmware/arm/str/common/windows/str73x_lib/Makefile.windows)
===================================================================
--- trunk/firmware/arm/str/common/str73x_lib/Makefile.windows (rev 0)
+++ trunk/firmware/arm/str/common/str73x_lib/Makefile.windows 2008-02-04 13:02:45 UTC (rev 815)
@@ -0,0 +1,38 @@
+# efsl library Makefile for STR730 by Giacomo Fazio and Antonio Nasca
+# (based on efsl library makefile for AT91SAM7S by Martin Thomas)
+
+
+MCU = arm7tdmi
+#THUMB = -mthumb -mthumb-interwork
+THUMB =
+
+LIBNAME = libSTR73x_lib.a
+
+COPT= -mcpu=$(MCU) $(THUMB) -gdwarf-2 -Wall -Os
+INCLUDEDIRS=-Iinclude
+CFLAGS=$(COPT) $(INCLUDEDIRS)
+# gcc4 unused code-removal:
+CFLAGS += -ffunction-sections -fdata-sections
+
+CC=arm-elf-gcc
+AR=arm-elf-ar
+OBJCOPY=arm-elf-objcopy
+
+OBJ=src/73x_lib.o src/73x_cfg.o src/73x_adc.o src/73x_bspi.o
+OBJ+=src/73x_can.o src/73x_cmu.o src/73x_dma.o src/73x_flash.o src/73x_eic.o src/73x_gpio.o
+OBJ+=src/73x_i2c.o src/73x_prccu.o src/73x_pwm.o src/73x_rtc.o src/73x_tb.o src/73x_tim.o
+OBJ+=src/73x_uart.o src/73x_wdg.o src/73x_wiu.o src/73x_wut.o
+
+
+all: lib
+
+libandclean: lib srcclean
+
+lib: $(OBJ)
+ $(AR) rcs $(LIBNAME) $(OBJ)
+
+srcclean :
+ rm -f $(OBJ)
+
+clean :
+ rm -f $(OBJ) $(LIBNAME)
Copied: trunk/firmware/arm/str/common/str73x_lib/include (from rev 814, trunk/firmware/arm/str/common/windows/str73x_lib/include)
Deleted: trunk/firmware/arm/str/common/str73x_lib/libSTR73x_lib.a
===================================================================
(Binary files differ)
Copied: trunk/firmware/arm/str/common/str73x_lib/libSTR73x_lib.a (from rev 814, trunk/firmware/arm/str/common/windows/str73x_lib/libSTR73x_lib.a)
===================================================================
(Binary files differ)
Copied: trunk/firmware/arm/str/common/str73x_lib/src (from rev 814, trunk/firmware/arm/str/common/windows/str73x_lib/src)
Copied: trunk/firmware/arm/str/common/str75x_lib (from rev 813, trunk/firmware/arm/str/common/windows/str75x_lib)
Deleted: trunk/firmware/arm/str/common/str75x_lib/Makefile
===================================================================
--- trunk/firmware/arm/str/common/windows/str75x_lib/Makefile 2008-02-04 12:53:41 UTC (rev 813)
+++ trunk/firmware/arm/str/common/str75x_lib/Makefile 2008-02-04 13:02:45 UTC (rev 815)
@@ -1,38 +0,0 @@
-# efsl library Makefile for STR750 by Giacomo Fazio and Antonio Nasca
-# (based on efsl library makefile for AT91SAM7S by Martin Thomas)
-
-
-MCU = arm7tdmi
-#THUMB = -mthumb -mthumb-interwork
-THUMB =
-
-LIBNAME = libSTR75x_lib.a
-
-COPT= -mcpu=$(MCU) $(THUMB) -gdwarf-2 -Wall -Os
-INCLUDEDIRS=-Iinclude
-CFLAGS=$(COPT) $(INCLUDEDIRS)
-# gcc4 unused code-removal:
-CFLAGS += -ffunction-sections -fdata-sections
-
-CC=arm-elf-gcc
-AR=arm-elf-ar
-OBJCOPY=arm-elf-objcopy
-
-OBJ=src/75x_lib.o src/75x_cfg.o src/75x_adc.o src/75x_can.o
-OBJ+=src/75x_dma.o src/75x_eic.o src/75x_extit.o src/75x_gpio.o src/75x_i2c.o src/75x_mrcc.o
-OBJ+=src/75x_pwm.o src/75x_rtc.o src/75x_smi.o src/75x_ssp.o
-OBJ+=src/75x_tb.o src/75x_tim.o src/75x_uart.o src/75x_wdg.o
-
-
-all: lib
-
-libandclean: lib srcclean
-
-lib: $(OBJ)
- $(AR) rcs $(LIBNAME) $(OBJ)
-
-srcclean :
- rm -f $(OBJ)
-
-clean :
- rm -f $(OBJ) $(LIBNAME)
Copied: trunk/firmware/arm/str/common/str75x_lib/Makefile (from rev 814, trunk/firmware/arm/str/common/windows/str75x_lib/Makefile)
===================================================================
--- trunk/firmware/arm/str/common/str75x_lib/Makefile (rev 0)
+++ trunk/firmware/arm/str/common/str75x_lib/Makefile 2008-02-04 13:02:45 UTC (rev 815)
@@ -0,0 +1,38 @@
+# efsl library Makefile for STR750 by Giacomo Fazio and Antonio Nasca
+# (based on efsl library makefile for AT91SAM7S by Martin Thomas)
+
+
+MCU = arm7tdmi
+#THUMB = -mthumb -mthumb-interwork
+THUMB =
+
+LIBNAME = libSTR75x_lib.a
+
+COPT= -mcpu=$(MCU) $(THUMB) -gdwarf-2 -Wall -Os
+INCLUDEDIRS=-Iinclude
+CFLAGS=$(COPT) $(INCLUDEDIRS)
+# gcc4 unused code-removal:
+CFLAGS += -ffunction-sections -fdata-sections
+
+CC=arm-elf-gcc
+AR=arm-elf-ar
+OBJCOPY=arm-elf-objcopy
+
+OBJ=src/75x_lib.o src/75x_cfg.o src/75x_adc.o src/75x_can.o
+OBJ+=src/75x_dma.o src/75x_eic.o src/75x_extit.o src/75x_gpio.o src/75x_i2c.o src/75x_mrcc.o
+OBJ+=src/75x_pwm.o src/75x_rtc.o src/75x_smi.o src/75x_ssp.o
+OBJ+=src/75x_tb.o src/75x_tim.o src/75x_uart.o src/75x_wdg.o
+
+
+all: lib
+
+libandclean: lib srcclean
+
+lib: $(OBJ)
+ $(AR) rcs $(LIBNAME) $(OBJ)
+
+srcclean :
+ rm -f $(OBJ)
+
+clean :
+ rm -f $(OBJ) $(LIBNAME)
Copied: trunk/firmware/arm/str/common/str75x_lib/Makefile.linux (from rev 814, trunk/firmware/arm/str/common/windows/str75x_lib/Makefile.linux)
===================================================================
--- trunk/firmware/arm/str/common/str75x_lib/Makefile.linux (rev 0)
+++ trunk/firmware/arm/str/common/str75x_lib/Makefile.linux 2008-02-04 13:02:45 UTC (rev 815)
@@ -0,0 +1,38 @@
+# efsl library Makefile for STR750 by Giacomo Fazio and Antonio Nasca
+# (based on efsl library makefile for AT91SAM7S by Martin Thomas)
+
+
+MCU = arm7tdmi
+#THUMB = -mthumb -mthumb-interwork
+THUMB =
+
+LIBNAME = libSTR75x_lib.a
+
+COPT= -mcpu=$(MCU) $(THUMB) -gdwarf-2 -Wall -Os
+INCLUDEDIRS=-Iinclude
+CFLAGS=$(COPT) $(INCLUDEDIRS)
+# gcc4 unused code-removal:
+CFLAGS += -ffunction-sections -fdata-sections
+
+CC=arm-elf-gcc
+AR=arm-elf-ar
+OBJCOPY=arm-elf-objcopy
+
+OBJ=src/75x_lib.o src/75x_cfg.o src/75x_adc.o src/75x_can.o
+OBJ+=src/75x_dma.o src/75x_eic.o src/75x_extit.o src/75x_gpio.o src/75x_i2c.o src/75x_mrcc.o
+OBJ+=src/75x_pwm.o src/75x_rtc.o src/75x_smi.o src/75x_ssp.o
+OBJ+=src/75x_tb.o src/75x_tim.o src/75x_uart.o src/75x_wdg.o
+
+
+all: lib
+
+libandclean: lib srcclean
+
+lib: $(OBJ)
+ $(AR) rcs $(LIBNAME) $(OBJ)
+
+srcclean :
+ rm -f $(OBJ)
+
+clean :
+ rm -f $(OBJ) $(LIBNAME)
Copied: trunk/firmware/arm/str/common/str75x_lib/Makefile.windows (from rev 814, trunk/firmware/arm/str/common/windows/str75x_lib/Makefile.windows)
===================================================================
--- trunk/firmware/arm/str/common/str75x_lib/Makefile.windows (rev 0)
+++ trunk/firmware/arm/str/common/str75x_lib/Makefile.windows 2008-02-04 13:02:45 UTC (rev 815)
@@ -0,0 +1,38 @@
+# efsl library Makefile for STR750 by Giacomo Fazio and Antonio Nasca
+# (based on efsl library makefile for AT91SAM7S by Martin Thomas)
+
+
+MCU = arm7tdmi
+#THUMB = -mthumb -mthumb-interwork
+THUMB =
+
+LIBNAME = libSTR75x_lib.a
+
+COPT= -mcpu=$(MCU) $(THUMB) -gdwarf-2 -Wall -Os
+INCLUDEDIRS=-Iinclude
+CFLAGS=$(COPT) $(INCLUDEDIRS)
+# gcc4 unused code-removal:
+CFLAGS += -ffunction-sections -fdata-sections
+
+CC=arm-elf-gcc
+AR=arm-elf-ar
+OBJCOPY=arm-elf-objcopy
+
+OBJ=src/75x_lib.o src/75x_cfg.o src/75x_adc.o src/75x_can.o
+OBJ+=src/75x_dma.o src/75x_eic.o src/75x_extit.o src/75x_gpio.o src/75x_i2c.o src/75x_mrcc.o
+OBJ+=src/75x_pwm.o src/75x_rtc.o src/75x_smi.o src/75x_ssp.o
+OBJ+=src/75x_tb.o src/75x_tim.o src/75x_uart.o src/75x_wdg.o
+
+
+all: lib
+
+libandclean: lib srcclean
+
+lib: $(OBJ)
+ $(AR) rcs $(LIBNAME) $(OBJ)
+
+srcclean :
+ rm -f $(OBJ)
+
+clean :
+ rm -f $(OBJ) $(LIBNAME)
Copied: trunk/firmware/arm/str/common/str75x_lib/include (from rev 814, trunk/firmware/arm/str/common/windows/str75x_lib/include)
Deleted: trunk/firmware/arm/str/common/str75x_lib/libSTR75x_lib.a
===================================================================
(Binary files differ)
Copied: trunk/firmware/arm/str/common/str75x_lib/libSTR75x_lib.a (from rev 814, trunk/firmware/arm/str/common/windows/str75x_lib/libSTR75x_lib.a)
===================================================================
(Binary files differ)
Copied: trunk/firmware/arm/str/common/str75x_lib/src (from rev 814, trunk/firmware/arm/str/common/windows/str75x_lib/src)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ak...@us...> - 2008-02-04 13:04:07
|
Revision: 816
http://can.svn.sourceforge.net/can/?rev=816&view=rev
Author: akhe
Date: 2008-02-04 05:04:01 -0800 (Mon, 04 Feb 2008)
Log Message:
-----------
str dev struct
y
Removed Paths:
-------------
trunk/firmware/arm/str/common/linux/
trunk/firmware/arm/str/common/windows/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ak...@us...> - 2008-02-04 13:08:49
|
Revision: 817
http://can.svn.sourceforge.net/can/?rev=817&view=rev
Author: akhe
Date: 2008-02-04 05:08:44 -0800 (Mon, 04 Feb 2008)
Log Message:
-----------
Removed Paths:
-------------
trunk/firmware/arm/str/common/str71x_lib/Makefile
trunk/firmware/arm/str/common/str73x_lib/Makefile
trunk/firmware/arm/str/common/str75x_lib/Makefile
Deleted: trunk/firmware/arm/str/common/str71x_lib/Makefile
===================================================================
--- trunk/firmware/arm/str/common/str71x_lib/Makefile 2008-02-04 13:04:01 UTC (rev 816)
+++ trunk/firmware/arm/str/common/str71x_lib/Makefile 2008-02-04 13:08:44 UTC (rev 817)
@@ -1,37 +0,0 @@
-# efsl library Makefile for STR710 by Giacomo Fazio and Antonio Nasca
-# (based on efsl library makefile for AT91SAM7S by Martin Thomas)
-
-MCU = arm7tdmi
-#THUMB = -mthumb -mthumb-interwork
-THUMB =
-
-LIBNAME = libSTR71x_lib.a
-
-COPT= -mcpu=$(MCU) $(THUMB) -gdwarf-2 -Wall -Os
-INCLUDEDIRS=-Iinclude
-CFLAGS=$(COPT) $(INCLUDEDIRS)
-# gcc4 unused code-removal:
-CFLAGS += -ffunction-sections -fdata-sections
-
-CC=arm-elf-gcc
-AR=arm-elf-ar
-OBJCOPY=arm-elf-objcopy
-
-OBJ=src/71x_lib.o src/adc12.o src/apb.o src/bspi.o
-OBJ+=src/can.o src/eic.o src/emi.o src/flash.o src/gpio.o
-OBJ+=src/i2c.o src/pcu.o src/rccu.o src/rtc.o src/tim.o src/uart.o
-OBJ+=src/wdg.o src/xti.o
-
-
-all: lib
-
-libandclean: lib srcclean
-
-lib: $(OBJ)
- $(AR) rcs $(LIBNAME) $(OBJ)
-
-srcclean :
- rm -f $(OBJ)
-
-clean :
- rm -f $(OBJ) $(LIBNAME)
Deleted: trunk/firmware/arm/str/common/str73x_lib/Makefile
===================================================================
--- trunk/firmware/arm/str/common/str73x_lib/Makefile 2008-02-04 13:04:01 UTC (rev 816)
+++ trunk/firmware/arm/str/common/str73x_lib/Makefile 2008-02-04 13:08:44 UTC (rev 817)
@@ -1,38 +0,0 @@
-# efsl library Makefile for STR730 by Giacomo Fazio and Antonio Nasca
-# (based on efsl library makefile for AT91SAM7S by Martin Thomas)
-
-
-MCU = arm7tdmi
-#THUMB = -mthumb -mthumb-interwork
-THUMB =
-
-LIBNAME = libSTR73x_lib.a
-
-COPT= -mcpu=$(MCU) $(THUMB) -gdwarf-2 -Wall -Os
-INCLUDEDIRS=-Iinclude
-CFLAGS=$(COPT) $(INCLUDEDIRS)
-# gcc4 unused code-removal:
-CFLAGS += -ffunction-sections -fdata-sections
-
-CC=arm-elf-gcc
-AR=arm-elf-ar
-OBJCOPY=arm-elf-objcopy
-
-OBJ=src/73x_lib.o src/73x_cfg.o src/73x_adc.o src/73x_bspi.o
-OBJ+=src/73x_can.o src/73x_cmu.o src/73x_dma.o src/73x_flash.o src/73x_eic.o src/73x_gpio.o
-OBJ+=src/73x_i2c.o src/73x_prccu.o src/73x_pwm.o src/73x_rtc.o src/73x_tb.o src/73x_tim.o
-OBJ+=src/73x_uart.o src/73x_wdg.o src/73x_wiu.o src/73x_wut.o
-
-
-all: lib
-
-libandclean: lib srcclean
-
-lib: $(OBJ)
- $(AR) rcs $(LIBNAME) $(OBJ)
-
-srcclean :
- rm -f $(OBJ)
-
-clean :
- rm -f $(OBJ) $(LIBNAME)
Deleted: trunk/firmware/arm/str/common/str75x_lib/Makefile
===================================================================
--- trunk/firmware/arm/str/common/str75x_lib/Makefile 2008-02-04 13:04:01 UTC (rev 816)
+++ trunk/firmware/arm/str/common/str75x_lib/Makefile 2008-02-04 13:08:44 UTC (rev 817)
@@ -1,38 +0,0 @@
-# efsl library Makefile for STR750 by Giacomo Fazio and Antonio Nasca
-# (based on efsl library makefile for AT91SAM7S by Martin Thomas)
-
-
-MCU = arm7tdmi
-#THUMB = -mthumb -mthumb-interwork
-THUMB =
-
-LIBNAME = libSTR75x_lib.a
-
-COPT= -mcpu=$(MCU) $(THUMB) -gdwarf-2 -Wall -Os
-INCLUDEDIRS=-Iinclude
-CFLAGS=$(COPT) $(INCLUDEDIRS)
-# gcc4 unused code-removal:
-CFLAGS += -ffunction-sections -fdata-sections
-
-CC=arm-elf-gcc
-AR=arm-elf-ar
-OBJCOPY=arm-elf-objcopy
-
-OBJ=src/75x_lib.o src/75x_cfg.o src/75x_adc.o src/75x_can.o
-OBJ+=src/75x_dma.o src/75x_eic.o src/75x_extit.o src/75x_gpio.o src/75x_i2c.o src/75x_mrcc.o
-OBJ+=src/75x_pwm.o src/75x_rtc.o src/75x_smi.o src/75x_ssp.o
-OBJ+=src/75x_tb.o src/75x_tim.o src/75x_uart.o src/75x_wdg.o
-
-
-all: lib
-
-libandclean: lib srcclean
-
-lib: $(OBJ)
- $(AR) rcs $(LIBNAME) $(OBJ)
-
-srcclean :
- rm -f $(OBJ)
-
-clean :
- rm -f $(OBJ) $(LIBNAME)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ak...@us...> - 2008-02-04 13:17:00
|
Revision: 820
http://can.svn.sourceforge.net/can/?rev=820&view=rev
Author: akhe
Date: 2008-02-04 05:16:58 -0800 (Mon, 04 Feb 2008)
Log Message:
-----------
str dev env
Added Paths:
-----------
trunk/firmware/arm/str/common/73x_lcd.c
trunk/firmware/arm/str/common/73x_lcd.h
trunk/firmware/arm/str/common/delay.c
trunk/firmware/arm/str/common/delay.h
trunk/firmware/arm/str/common/eclipse_dev/
trunk/firmware/arm/str/common/flash/
trunk/firmware/arm/str/common/sysTime.c
trunk/firmware/arm/str/common/sysTime.h
Removed Paths:
-------------
trunk/firmware/arm/str/common/str/73x_lcd.c
trunk/firmware/arm/str/common/str/73x_lcd.h
trunk/firmware/arm/str/common/str/Flash/
trunk/firmware/arm/str/common/str/delay.c
trunk/firmware/arm/str/common/str/delay.h
trunk/firmware/arm/str/common/str/str_eclipse_dev/
trunk/firmware/arm/str/common/str/sysTime.c
trunk/firmware/arm/str/common/str/sysTime.h
Copied: trunk/firmware/arm/str/common/73x_lcd.c (from rev 818, trunk/firmware/arm/str/common/str/73x_lcd.c)
===================================================================
--- trunk/firmware/arm/str/common/73x_lcd.c (rev 0)
+++ trunk/firmware/arm/str/common/73x_lcd.c 2008-02-04 13:16:58 UTC (rev 820)
@@ -0,0 +1,457 @@
+/******************** (C) COPYRIGHT 2005 STMicroelectronics **********************
+* File Name : 73x_lcd.c
+* Author : MCD Application Team
+* Date First Issued : 09/27/2005 : V1.0
+* Description : This file provides all the LCD software functions.
+**********************************************************************************
+* History:
+* 09/27/2005 : V1.0
+**********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
+* CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+* OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+* OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*********************************************************************************/
+/* Standard includes -----------------------------------------------------------*/
+#include "73x_lcd.h"
+#include "73x_lib.h"
+#include "systime.h"
+#include "delay.h"
+/* Include of other module interface headers -----------------------------------*/
+/* Local includes --------------------------------------------------------------*/
+/* Private typedef -------------------------------------------------------------*/
+/* Private define --------------------------------------------------------------*/
+/* Private macro ---------------------------------------------------------------*/
+/* Private variables -----------------------------------------------------------*/
+/* Private function prototypes -------------------------------------------------*/
+// Define GPIO Init Structure */
+GPIO_InitTypeDef GPIO_InitStructure0;
+/* Interface functions ---------------------------------------------------------*/
+/* Private functions -----------------------------------------------------------*/
+
+
+/*******************************************************************************
+* Function Name : LCD_Init
+* Description : Initializes the LCD driver.
+* Input : None
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_Init(void)
+{
+ /* GPIO6 Clock Enable */
+ CFG_PeripheralClockConfig(CFG_CLK_GPIO6 , ENABLE);
+ /* GPIO6 Configuration */
+ GPIO_InitStructure0.GPIO_Mode = GPIO_Mode_OUT_PP;
+ GPIO_InitStructure0.GPIO_Pins = GPIO_PIN_0 | GPIO_PIN_1 |GPIO_PIN_10;
+ GPIO_Init(GPIO6, &GPIO_InitStructure0);
+
+ /* GPIO5 Clock Enable */
+ CFG_PeripheralClockConfig(CFG_CLK_GPIO5 , ENABLE);
+ /* GPIO5 Configuration */
+ GPIO_InitStructure0.GPIO_Mode = GPIO_Mode_OUT_PP;
+ GPIO_InitStructure0.GPIO_Pins = GPIO_PIN_12 | GPIO_PIN_13 |GPIO_PIN_14 |GPIO_PIN_15;
+ GPIO_Init(GPIO5, &GPIO_InitStructure0);
+
+ /* GPIO2 Clock Enable */
+ CFG_PeripheralClockConfig(CFG_CLK_GPIO2 , ENABLE);
+ /* GPIO2 Configuration */
+ GPIO_InitStructure0.GPIO_Mode = GPIO_Mode_OUT_PP;
+ GPIO_InitStructure0.GPIO_Pins = GPIO_PIN_0;
+ GPIO_Init(GPIO2, &GPIO_InitStructure0);
+ GPIO_BitWrite(GPIO2, GPIO_PIN_0, Bit_SET);
+
+ // Wait 110 ms
+ delay_ms( 110 );
+ LCD_Send_Command_4bit(0x30);
+
+ // Wait 6 ms
+ delay_ms( 6 );
+ LCD_Send_Command_4bit(0x30);
+
+ // Wait 6 ms
+ delay_ms( 6 );
+ LCD_Send_Command_4bit(0x30);
+
+ // Wait 6 ms
+ delay_ms( 6 );
+ LCD_Send_Command_4bit(0x20);
+
+ // Wait 6 ms
+ delay_ms( 6 );
+ LCD_Send_Command_4bit(0x20);
+
+ // Wait 6 ms
+ delay_ms( 6 );
+ LCD_Send_Command_4bit(0xF0);
+
+ // Wait 6 ms
+ delay_ms( 6 );
+ LCD_Send_Command_4bit(0x00);
+
+ // Wait 6 ms
+ delay_ms( 6 );
+ LCD_Send_Command_4bit(0x80);
+
+ // Wait 6 ms
+ delay_ms( 6 );
+ LCD_Send_Command_4bit(0x00);
+
+ // Wait 6 ms
+ delay_ms( 6 );
+ LCD_Send_Command_4bit(0x10);
+
+ // Wait 6 ms
+ delay_ms( 6 );
+ LCD_Send_Command_4bit(0x00);
+
+ // Wait 6 ms
+ delay_ms( 6 );
+ LCD_Send_Command_4bit(0x60);
+
+ // Wait 6 ms
+ delay_ms( 6 );
+
+}
+
+/*******************************************************************************
+* Function Name : LCD_E_High
+* Description : Puts the LCD Enable line (E) high.
+* Input : None
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_E_High(void)
+{
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_SET);
+}
+
+/*******************************************************************************
+* Function Name : LCD_E_Low
+* Description : Puts the LCD Enable line (E) low.
+* Input : None
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_E_Low(void)
+{
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_RESET);
+}
+
+/*******************************************************************************
+* Function name : LCD_Send_Command_4bit
+* Description : Sends a command to the LCD.
+* Input param : Cmd: command to be sent.
+* Output param : None
+* Return : None
+*******************************************************************************/
+void LCD_Send_Command_4bit(u8 Cmd)
+{
+ // Reset RW bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_RW, Bit_RESET);
+
+ // Reset RS bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_RS, Bit_RESET);
+
+ // Set E bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_SET);
+
+ // Send the command
+ GPIO_ByteWrite(GPIO5, GPIO_MSB, Cmd & 0xF0);
+
+ // Reset E bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_RESET);
+
+ // Cmd Shift
+ Cmd = Cmd << 4;
+
+ // Set E bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_SET);
+
+ // Send the command
+ GPIO_ByteWrite(GPIO5, GPIO_MSB, Cmd & 0xF0);
+
+ // Reset E bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_RESET);
+
+ // Set RS bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_RS, Bit_SET);
+
+ // Set RW bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_RW, Bit_SET);
+}
+
+/*******************************************************************************
+* Function Name : LCD_SendData_4bit
+* Description : Sends data to the LCD.
+* Input : Data: data to be displayed.
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_SendData_4bit(u8 Data)
+{
+
+ // Set RS bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_RS, Bit_SET);
+
+ // Reset RW bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_RW, Bit_RESET);
+
+ // Set E bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_SET);
+
+ // Data on GPIO_MSB
+ GPIO_ByteWrite(GPIO5, GPIO_MSB, Data & 0xF0);
+
+
+ // Reset E bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_RESET);
+
+ // Data Shift
+ Data = Data << 4;
+
+ // Set E bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_SET);
+
+ // Data on GPIO_MSB
+ GPIO_ByteWrite(GPIO5, GPIO_MSB, Data);
+
+
+ // Reset E bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_RESET);
+
+ // Reset RS bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_RS, Bit_RESET);
+
+ // Reset RW bit
+ GPIO_BitWrite(GPIO6, LCD_PIN_RW, Bit_SET);
+}
+
+/*******************************************************************************
+* Function Name : LCD_SendString
+* Description : Displays a string on the LCD.
+* Input : - pBuffer: pointer to the buffer containing the data to be
+* displayed on the LCD.
+* - Line: specifies the line where the string will be displayed.
+* - Column: specifies the start column from where the string will
+* be displayed.
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_SendString(u8 *pBuffer, u8 Line, u8 Column)
+{
+ u8 len = 0, count = 0;
+
+ len = strlen(( const char *)pBuffer);
+
+ if((len < (LCD_HALF_LENGTH + 2 - Column)))
+ {
+ LCD_SetPosCur(Line, Column);
+
+ for(count =0; count < len; count++)
+ {
+ LCD_SendData_4bit(pBuffer[count]);
+ }
+ }
+ else
+ {
+ LCD_SetPosCur(Line, Column);
+
+ for(count = 0; count <= (LCD_HALF_LENGTH-Column); count++)
+ {
+ LCD_SendData_4bit(pBuffer[count]);
+ }
+
+ LCD_SetPosCur(2, 1);
+
+ for(count = (LCD_HALF_LENGTH-Column+1); count < len; count++)
+ {
+ LCD_SendData_4bit(pBuffer[count]);
+ }
+ }
+}
+
+/*******************************************************************************
+* Function Name : LCD_SendStringByStep
+* Description : Displays a string on the LCD by step.
+* Input : - pBuffer: pointer to the buffer containing the data to be
+* displayed on the LCD.
+* - Line: specifies the line where the string will be displayed.
+* - Column: specifies the start column from where the string will
+* be displayed.
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_SendStringByStep(u8 *pBuffer, u8 Line, u8 Column)
+{
+ u8 len = 0, count = 0;
+
+ len = strlen(( const char *)pBuffer);
+
+ if(len < (LCD_HALF_LENGTH + 2 - Column))
+ {
+ LCD_SetPosCur(Line, Column);
+
+ for(count =0; count < len; count++)
+ {
+ // wait 200 ms
+ delay_ms( 200 );
+ LCD_SendData_4bit(pBuffer[count]);
+ }
+ }
+ else
+ {
+ LCD_SetPosCur(Line, Column);
+
+ for(count = 0; count <= (LCD_HALF_LENGTH-Column); count++)
+ {
+ // wait 200 ms
+ delay_ms( 200 );
+ LCD_SendData_4bit(pBuffer[count]);
+ }
+
+ LCD_SetPosCur(2, 1);
+
+ for(count = (LCD_HALF_LENGTH-Column+1); count < len; count++)
+ {
+ // wait 200 ms
+ delay_ms( 200 );
+ LCD_SendData_4bit(pBuffer[count]);
+ }
+ }
+}
+
+/*******************************************************************************
+* Function Name : LCD_SendStringPinPong
+* Description : Displays a string on the LCD as ping pong.
+* Input : - pBuffer: pointer to the buffer containing the data to be
+* displayed on the LCD.
+* - Line: specifies the line where the string will be displayed.
+* - nTime: number of ping pong.
+* Output :
+* Return : None
+*******************************************************************************/
+void LCD_SendStringPinPong(u8 *pBuffer, u8 Line, u32 nTime)
+{
+ u8 len = 0, index = 1;
+ bool Direction = TRUE;
+
+ len = strlen(( const char *)pBuffer);
+
+ while(nTime--)
+ {
+ if(Direction)
+ {
+ LCD_SendString(pBuffer, Line, index);
+ // wait 200 ms
+ delay_ms( 200 );
+ index++;
+ LCD_LineClear(Line);
+ if(index == (LCD_HALF_LENGTH - len) + 1)
+ {
+ Direction = FALSE;
+ }
+ }
+ else
+ {
+ LCD_SendString(pBuffer, Line, index);
+ // wait 200 ms
+ delay_ms( 200 );
+ index--;
+ LCD_LineClear(Line);
+ if(index == 1)
+ {
+ Direction = TRUE;
+ }
+ }
+ }
+}
+
+/*******************************************************************************
+* Function Name : LCD_SetPosCur
+* Description : Sets the line and column position of the LCD cursor.
+* Input : - Line: specifies the cursor's line position.
+* - Column: specifies cursor's column position.
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_SetPosCur(u8 Line, u8 Column)
+{
+ if(Line == 1)
+ {
+ Column = Column - 1;
+ }
+ else
+ {
+ Column = Column -1 + 64;
+ }
+
+ LCD_Send_Command_4bit(Column | 0x80);
+}
+
+/*******************************************************************************
+* Function Name : LCD_Clear
+* Description : Clears the LCD display.
+* Input : None
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_Clear(void)
+{
+ /* reset RS bit */
+ GPIO_BitWrite(GPIO6, LCD_PIN_RS, Bit_RESET);
+
+ /* send "DISPLAY CLEAR COMMAND" command */
+ LCD_Send_Command_4bit(LCD_CMD_CLR_DISP);
+
+}
+
+/*******************************************************************************
+* Function Name : LCD_LineClear
+* Description : Clears the LCD specified line.
+* Input : Line: line to be cleared.
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_LineClear(u8 Line)
+{
+ u8 j = 0;
+
+ /* reset RS bit */
+ GPIO_BitWrite(GPIO6, LCD_PIN_RS, Bit_RESET);
+
+ LCD_SetPosCur(Line, 1);
+
+ /* set RS bit */
+ GPIO_BitWrite(GPIO6, LCD_PIN_RS, Bit_SET);
+
+ /* write LCD_HALF_LENGTH spaces to clear the line */
+ for(j = LCD_HALF_LENGTH; j != 0; j--)
+ {
+ LCD_SendData_4bit(' ');
+ }
+}
+
+/*******************************************************************************
+* Function Name : LCD_DigitDisplay
+* Description : Displays a digit on the LCD.
+* Input : - Digit: digit to be displayed.
+* - Line: specifies the line where the digit will be displayed.
+* - Column: specifies the start column from where the digit will
+* be displayed.
+* Output : None
+* Return : None
+*******************************************************************************/
+void LCD_DigitDisplay(u8 Digit, u8 Line, u8 Column)
+{
+ LCD_SetPosCur(Line, Column);
+
+ LCD_SendData_4bit(Digit + 48);
+}
+
+
+
+
+/******************* (C) COPYRIGHT 2005 STMicroelectronics *****END OF FILE****/
Copied: trunk/firmware/arm/str/common/73x_lcd.h (from rev 818, trunk/firmware/arm/str/common/str/73x_lcd.h)
===================================================================
--- trunk/firmware/arm/str/common/73x_lcd.h (rev 0)
+++ trunk/firmware/arm/str/common/73x_lcd.h 2008-02-04 13:16:58 UTC (rev 820)
@@ -0,0 +1,92 @@
+/******************** (C) COPYRIGHT 2005 STMicroelectronics ********************
+* File Name : 73x_lcd.h
+* Author : MCD Application Team
+* Date First Issued : 09/27/2005 : V1.0
+* Description : This file contains all the functions prototypes for the
+* LCD software library.
+**********************************************************************************
+* History:
+* 09/27/2005 : V1.0
+**********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
+* CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+* OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+* OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*********************************************************************************/
+
+/* Define to prevent recursive inclusion ---------------------------------------*/
+#ifndef __73x_LCD_H
+#define __73x_LCD_H
+
+/* Includes ----------------------------------------------------------------- */
+#include "73x_lib.h"
+#include <string.h>
+
+/* Exported types ----------------------------------------------------------- */
+
+#define LCD_LENGTH 32
+#define LCD_HALF_LENGTH (LCD_LENGTH/2)
+
+#define LCD_PORT_COMMAND GPIO6
+#define LCD_PORT_DATA GPIO6
+
+#define LCD_PIN_E GPIO_PIN_0
+#define LCD_PIN_RS GPIO_PIN_1
+#define LCD_PIN_RW GPIO_PIN_10
+
+#define LCD_CMD_4BIT 0x20
+
+#define LCD_CMD_CLR_DISP 0x01
+#define LCD_CMD_CRS_HOME 0x02
+#define LCD_CMD_DECREM_NOSHIFT 0x04
+#define LCD_CMD_DECREM_SHIFT 0x05
+#define LCD_CMD_INCREM_NOSHIFT 0x06
+#define LCD_CMD_INCREM_SHIFT 0x07
+
+#define LCD_CMD_DISPOFF_CURSOFF_BLKOFF 0x08
+#define LCD_CMD_DISPOFF_CURSOFF_BLKON 0x09
+#define LCD_CMD_DISPOFF_CURSON_BLKOFF 0x0A
+#define LCD_CMD_DISPOFF_CURSON_BLKON 0x0B
+#define LCD_CMD_DISPON_CURSOFF_BLKOFF 0x0C
+#define LCD_CMD_DISPON_CURSOFF_BLKON 0x0D
+#define LCD_CMD_DISPON_CURSON_BLKOFF 0x0E
+#define LCD_CMD_DISPON_CURSON_BLKON 0x0F
+
+#define LCD_CMD_CURSMOVE_SHIFTL 0x10
+#define LCD_CMD_CURSMOVE_SHIFTR 0x14
+#define LCD_CMD_DISPSHIFT_SHIFTL 0x18
+#define LCD_CMD_DISPSHIFT_SHIFTR 0x1C
+
+#define LCD_CMD_4BIT_1LINE_8DOT 0x20
+#define LCD_CMD_4BIT_1LINE_10DOT 0x24
+#define LCD_CMD_4BIT_2LINE_8DOT 0x28
+#define LCD_CMD_4BIT_2LINE_10DOT 0x2C
+
+
+/* Module private variables ----------------------------------------------------*/
+
+/* Exported macro --------------------------------------------------------------*/
+
+/* Private functions -----------------------------------------------------------*/
+
+/* Exported functions ----------------------------------------------------------*/
+void LCD_Init(void);
+void LCD_E_High(void);
+void LCD_E_Low(void);
+void LCD_Send_Command_4bit(u8 Cmd);
+void LCD_SendData_4bits(u8 Data);
+void LCD_SendString(u8 *pBuffer, u8 Line, u8 Column);
+void LCD_SendStringByStep(u8 *pBuffer, u8 Line, u8 Column);
+void LCD_SendStringPinPong(u8 *pBuffer, u8 Line, u32 nTime);
+void LCD_SetPosCur(u8 Line, u8 Column);
+void LCD_Clear(void);
+void LCD_LineClear(u8 Line);
+void LCD_DigitDisplay(u8 Digit, u8 Line, u8 Column);
+
+#endif /*__73x_LCD_H */
+
+/******************* (C) COPYRIGHT 2005 STMicroelectronics *****END OF FILE******/
+
+
Copied: trunk/firmware/arm/str/common/delay.c (from rev 818, trunk/firmware/arm/str/common/str/delay.c)
===================================================================
--- trunk/firmware/arm/str/common/delay.c (rev 0)
+++ trunk/firmware/arm/str/common/delay.c 2008-02-04 13:16:58 UTC (rev 820)
@@ -0,0 +1,21 @@
+/*
+ Precise Delay Functions for LPC2100
+ Martin Thomas, 11/2004
+*/
+
+#include "73x_lib.h"
+#include "systime.h"
+#include "delay.h"
+
+
+void delay_us_( u32 delayval )
+{
+ // Not implemented yet
+}
+
+
+void delay_ms( u32 delayval )
+{
+ u32 d = (delayval * 1e-3 * sysTICSperSEC ) + .5;
+ pause( d );
+}
Copied: trunk/firmware/arm/str/common/delay.h (from rev 818, trunk/firmware/arm/str/common/str/delay.h)
===================================================================
--- trunk/firmware/arm/str/common/delay.h (rev 0)
+++ trunk/firmware/arm/str/common/delay.h 2008-02-04 13:16:58 UTC (rev 820)
@@ -0,0 +1,14 @@
+
+#ifndef _delay_h_
+#define _delay_h_
+
+#define TUNE_FAC 0.96154
+
+//#include <types.h>
+
+//#define delay_us(delayval) delay_us_( (uint32_t)( (FOSC*PLL_MUL) / (1000000/delayval) /2 ) )
+#define delay_us(delayval) delay_us_( (uint32_t)( (FOSC*PLL_MUL) / (1000000/delayval) /4 * TUNE_FAC) )
+void delay_us_(u32 delayval);
+void delay_ms(u32 delayval);
+
+#endif
Copied: trunk/firmware/arm/str/common/eclipse_dev (from rev 818, trunk/firmware/arm/str/common/str/str_eclipse_dev)
Copied: trunk/firmware/arm/str/common/flash (from rev 818, trunk/firmware/arm/str/common/str/Flash)
Deleted: trunk/firmware/arm/str/common/str/73x_lcd.c
===================================================================
--- trunk/firmware/arm/str/common/str/73x_lcd.c 2008-02-04 13:14:12 UTC (rev 819)
+++ trunk/firmware/arm/str/common/str/73x_lcd.c 2008-02-04 13:16:58 UTC (rev 820)
@@ -1,457 +0,0 @@
-/******************** (C) COPYRIGHT 2005 STMicroelectronics **********************
-* File Name : 73x_lcd.c
-* Author : MCD Application Team
-* Date First Issued : 09/27/2005 : V1.0
-* Description : This file provides all the LCD software functions.
-**********************************************************************************
-* History:
-* 09/27/2005 : V1.0
-**********************************************************************************
-* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
-* CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
-* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
-* OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
-* OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
-* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-*********************************************************************************/
-/* Standard includes -----------------------------------------------------------*/
-#include "73x_lcd.h"
-#include "73x_lib.h"
-#include "systime.h"
-#include "delay.h"
-/* Include of other module interface headers -----------------------------------*/
-/* Local includes --------------------------------------------------------------*/
-/* Private typedef -------------------------------------------------------------*/
-/* Private define --------------------------------------------------------------*/
-/* Private macro ---------------------------------------------------------------*/
-/* Private variables -----------------------------------------------------------*/
-/* Private function prototypes -------------------------------------------------*/
-// Define GPIO Init Structure */
-GPIO_InitTypeDef GPIO_InitStructure0;
-/* Interface functions ---------------------------------------------------------*/
-/* Private functions -----------------------------------------------------------*/
-
-
-/*******************************************************************************
-* Function Name : LCD_Init
-* Description : Initializes the LCD driver.
-* Input : None
-* Output : None
-* Return : None
-*******************************************************************************/
-void LCD_Init(void)
-{
- /* GPIO6 Clock Enable */
- CFG_PeripheralClockConfig(CFG_CLK_GPIO6 , ENABLE);
- /* GPIO6 Configuration */
- GPIO_InitStructure0.GPIO_Mode = GPIO_Mode_OUT_PP;
- GPIO_InitStructure0.GPIO_Pins = GPIO_PIN_0 | GPIO_PIN_1 |GPIO_PIN_10;
- GPIO_Init(GPIO6, &GPIO_InitStructure0);
-
- /* GPIO5 Clock Enable */
- CFG_PeripheralClockConfig(CFG_CLK_GPIO5 , ENABLE);
- /* GPIO5 Configuration */
- GPIO_InitStructure0.GPIO_Mode = GPIO_Mode_OUT_PP;
- GPIO_InitStructure0.GPIO_Pins = GPIO_PIN_12 | GPIO_PIN_13 |GPIO_PIN_14 |GPIO_PIN_15;
- GPIO_Init(GPIO5, &GPIO_InitStructure0);
-
- /* GPIO2 Clock Enable */
- CFG_PeripheralClockConfig(CFG_CLK_GPIO2 , ENABLE);
- /* GPIO2 Configuration */
- GPIO_InitStructure0.GPIO_Mode = GPIO_Mode_OUT_PP;
- GPIO_InitStructure0.GPIO_Pins = GPIO_PIN_0;
- GPIO_Init(GPIO2, &GPIO_InitStructure0);
- GPIO_BitWrite(GPIO2, GPIO_PIN_0, Bit_SET);
-
- // Wait 110 ms
- delay_ms( 110 );
- LCD_Send_Command_4bit(0x30);
-
- // Wait 6 ms
- delay_ms( 6 );
- LCD_Send_Command_4bit(0x30);
-
- // Wait 6 ms
- delay_ms( 6 );
- LCD_Send_Command_4bit(0x30);
-
- // Wait 6 ms
- delay_ms( 6 );
- LCD_Send_Command_4bit(0x20);
-
- // Wait 6 ms
- delay_ms( 6 );
- LCD_Send_Command_4bit(0x20);
-
- // Wait 6 ms
- delay_ms( 6 );
- LCD_Send_Command_4bit(0xF0);
-
- // Wait 6 ms
- delay_ms( 6 );
- LCD_Send_Command_4bit(0x00);
-
- // Wait 6 ms
- delay_ms( 6 );
- LCD_Send_Command_4bit(0x80);
-
- // Wait 6 ms
- delay_ms( 6 );
- LCD_Send_Command_4bit(0x00);
-
- // Wait 6 ms
- delay_ms( 6 );
- LCD_Send_Command_4bit(0x10);
-
- // Wait 6 ms
- delay_ms( 6 );
- LCD_Send_Command_4bit(0x00);
-
- // Wait 6 ms
- delay_ms( 6 );
- LCD_Send_Command_4bit(0x60);
-
- // Wait 6 ms
- delay_ms( 6 );
-
-}
-
-/*******************************************************************************
-* Function Name : LCD_E_High
-* Description : Puts the LCD Enable line (E) high.
-* Input : None
-* Output : None
-* Return : None
-*******************************************************************************/
-void LCD_E_High(void)
-{
- GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_SET);
-}
-
-/*******************************************************************************
-* Function Name : LCD_E_Low
-* Description : Puts the LCD Enable line (E) low.
-* Input : None
-* Output : None
-* Return : None
-*******************************************************************************/
-void LCD_E_Low(void)
-{
- GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_RESET);
-}
-
-/*******************************************************************************
-* Function name : LCD_Send_Command_4bit
-* Description : Sends a command to the LCD.
-* Input param : Cmd: command to be sent.
-* Output param : None
-* Return : None
-*******************************************************************************/
-void LCD_Send_Command_4bit(u8 Cmd)
-{
- // Reset RW bit
- GPIO_BitWrite(GPIO6, LCD_PIN_RW, Bit_RESET);
-
- // Reset RS bit
- GPIO_BitWrite(GPIO6, LCD_PIN_RS, Bit_RESET);
-
- // Set E bit
- GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_SET);
-
- // Send the command
- GPIO_ByteWrite(GPIO5, GPIO_MSB, Cmd & 0xF0);
-
- // Reset E bit
- GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_RESET);
-
- // Cmd Shift
- Cmd = Cmd << 4;
-
- // Set E bit
- GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_SET);
-
- // Send the command
- GPIO_ByteWrite(GPIO5, GPIO_MSB, Cmd & 0xF0);
-
- // Reset E bit
- GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_RESET);
-
- // Set RS bit
- GPIO_BitWrite(GPIO6, LCD_PIN_RS, Bit_SET);
-
- // Set RW bit
- GPIO_BitWrite(GPIO6, LCD_PIN_RW, Bit_SET);
-}
-
-/*******************************************************************************
-* Function Name : LCD_SendData_4bit
-* Description : Sends data to the LCD.
-* Input : Data: data to be displayed.
-* Output : None
-* Return : None
-*******************************************************************************/
-void LCD_SendData_4bit(u8 Data)
-{
-
- // Set RS bit
- GPIO_BitWrite(GPIO6, LCD_PIN_RS, Bit_SET);
-
- // Reset RW bit
- GPIO_BitWrite(GPIO6, LCD_PIN_RW, Bit_RESET);
-
- // Set E bit
- GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_SET);
-
- // Data on GPIO_MSB
- GPIO_ByteWrite(GPIO5, GPIO_MSB, Data & 0xF0);
-
-
- // Reset E bit
- GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_RESET);
-
- // Data Shift
- Data = Data << 4;
-
- // Set E bit
- GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_SET);
-
- // Data on GPIO_MSB
- GPIO_ByteWrite(GPIO5, GPIO_MSB, Data);
-
-
- // Reset E bit
- GPIO_BitWrite(GPIO6, LCD_PIN_E, Bit_RESET);
-
- // Reset RS bit
- GPIO_BitWrite(GPIO6, LCD_PIN_RS, Bit_RESET);
-
- // Reset RW bit
- GPIO_BitWrite(GPIO6, LCD_PIN_RW, Bit_SET);
-}
-
-/*******************************************************************************
-* Function Name : LCD_SendString
-* Description : Displays a string on the LCD.
-* Input : - pBuffer: pointer to the buffer containing the data to be
-* displayed on the LCD.
-* - Line: specifies the line where the string will be displayed.
-* - Column: specifies the start column from where the string will
-* be displayed.
-* Output : None
-* Return : None
-*******************************************************************************/
-void LCD_SendString(u8 *pBuffer, u8 Line, u8 Column)
-{
- u8 len = 0, count = 0;
-
- len = strlen(( const char *)pBuffer);
-
- if((len < (LCD_HALF_LENGTH + 2 - Column)))
- {
- LCD_SetPosCur(Line, Column);
-
- for(count =0; count < len; count++)
- {
- LCD_SendData_4bit(pBuffer[count]);
- }
- }
- else
- {
- LCD_SetPosCur(Line, Column);
-
- for(count = 0; count <= (LCD_HALF_LENGTH-Column); count++)
- {
- LCD_SendData_4bit(pBuffer[count]);
- }
-
- LCD_SetPosCur(2, 1);
-
- for(count = (LCD_HALF_LENGTH-Column+1); count < len; count++)
- {
- LCD_SendData_4bit(pBuffer[count]);
- }
- }
-}
-
-/*******************************************************************************
-* Function Name : LCD_SendStringByStep
-* Description : Displays a string on the LCD by step.
-* Input : - pBuffer: pointer to the buffer containing the data to be
-* displayed on the LCD.
-* - Line: specifies the line where the string will be displayed.
-* - Column: specifies the start column from where the string will
-* be displayed.
-* Output : None
-* Return : None
-*******************************************************************************/
-void LCD_SendStringByStep(u8 *pBuffer, u8 Line, u8 Column)
-{
- u8 len = 0, count = 0;
-
- len = strlen(( const char *)pBuffer);
-
- if(len < (LCD_HALF_LENGTH + 2 - Column))
- {
- LCD_SetPosCur(Line, Column...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-04 13:24:18
|
Revision: 822
http://can.svn.sourceforge.net/can/?rev=822&view=rev
Author: akhe
Date: 2008-02-04 05:24:06 -0800 (Mon, 04 Feb 2008)
Log Message:
-----------
str dev env
Added Paths:
-----------
trunk/firmware/arm/str/common/openocd/
trunk/firmware/arm/str/common/openocd/linux/
trunk/firmware/arm/str/common/openocd/linux/str71x-configs/
trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_armusbocd-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_armusbocd-flash-program.cfg
trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_armusbocd.cfg
trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_flash.gdb
trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_flasherase.ocd
trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_flashprobe.gdb
trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_flashprogram.ocd
trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_jtagkey-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_jtagkey-flash-program.cfg
trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_jtagkey.cfg
trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_pp-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_pp-flash-program.cfg
trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_pp.cfg
trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_ram.gdb
trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_signalyzer-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_signalyzer-flash-program.cfg
trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_signalyzer.cfg
trunk/firmware/arm/str/common/openocd/linux/str72x-configs/
trunk/firmware/arm/str/common/openocd/linux/str72x-configs/str72x_armusbocd-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/linux/str72x-configs/str72x_armusbocd-flash-program.cfg
trunk/firmware/arm/str/common/openocd/linux/str72x-configs/str72x_armusbocd.cfg
trunk/firmware/arm/str/common/openocd/linux/str72x-configs/str72x_flash.gdb
trunk/firmware/arm/str/common/openocd/linux/str72x-configs/str72x_flasherase.ocd
trunk/firmware/arm/str/common/openocd/linux/str72x-configs/str72x_flashprobe.gdb
trunk/firmware/arm/str/common/openocd/linux/str72x-configs/str72x_flashprogram.ocd
trunk/firmware/arm/str/common/openocd/linux/str72x-configs/str72x_jtagkey-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/linux/str72x-configs/str72x_jtagkey-flash-program.cfg
trunk/firmware/arm/str/common/openocd/linux/str72x-configs/str72x_jtagkey.cfg
trunk/firmware/arm/str/common/openocd/linux/str72x-configs/str72x_pp-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/linux/str72x-configs/str72x_pp-flash-program.cfg
trunk/firmware/arm/str/common/openocd/linux/str72x-configs/str72x_pp.cfg
trunk/firmware/arm/str/common/openocd/linux/str72x-configs/str72x_ram.gdb
trunk/firmware/arm/str/common/openocd/linux/str72x-configs/str72x_signalyzer-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/linux/str72x-configs/str72x_signalyzer-flash-program.cfg
trunk/firmware/arm/str/common/openocd/linux/str72x-configs/str72x_signalyzer.cfg
trunk/firmware/arm/str/common/openocd/linux/str73x-configs/
trunk/firmware/arm/str/common/openocd/linux/str73x-configs/str73x_armusbocd-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/linux/str73x-configs/str73x_armusbocd-flash-program.cfg
trunk/firmware/arm/str/common/openocd/linux/str73x-configs/str73x_armusbocd.cfg
trunk/firmware/arm/str/common/openocd/linux/str73x-configs/str73x_flash.gdb
trunk/firmware/arm/str/common/openocd/linux/str73x-configs/str73x_flasherase.ocd
trunk/firmware/arm/str/common/openocd/linux/str73x-configs/str73x_flashprobe.gdb
trunk/firmware/arm/str/common/openocd/linux/str73x-configs/str73x_flashprogram.ocd
trunk/firmware/arm/str/common/openocd/linux/str73x-configs/str73x_jtagkey-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/linux/str73x-configs/str73x_jtagkey-flash-program.cfg
trunk/firmware/arm/str/common/openocd/linux/str73x-configs/str73x_jtagkey.cfg
trunk/firmware/arm/str/common/openocd/linux/str73x-configs/str73x_pp-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/linux/str73x-configs/str73x_pp-flash-program.cfg
trunk/firmware/arm/str/common/openocd/linux/str73x-configs/str73x_pp.cfg
trunk/firmware/arm/str/common/openocd/linux/str73x-configs/str73x_ram.gdb
trunk/firmware/arm/str/common/openocd/linux/str73x-configs/str73x_signalyzer-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/linux/str73x-configs/str73x_signalyzer-flash-program.cfg
trunk/firmware/arm/str/common/openocd/linux/str73x-configs/str73x_signalyzer.cfg
trunk/firmware/arm/str/common/openocd/linux/str75x-configs/
trunk/firmware/arm/str/common/openocd/linux/str75x-configs/str75x_armusbocd-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/linux/str75x-configs/str75x_armusbocd-flash-program.cfg
trunk/firmware/arm/str/common/openocd/linux/str75x-configs/str75x_armusbocd.cfg
trunk/firmware/arm/str/common/openocd/linux/str75x-configs/str75x_flash.gdb
trunk/firmware/arm/str/common/openocd/linux/str75x-configs/str75x_flasherase.ocd
trunk/firmware/arm/str/common/openocd/linux/str75x-configs/str75x_flashprobe.gdb
trunk/firmware/arm/str/common/openocd/linux/str75x-configs/str75x_flashprogram.ocd
trunk/firmware/arm/str/common/openocd/linux/str75x-configs/str75x_jtagkey-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/linux/str75x-configs/str75x_jtagkey-flash-program.cfg
trunk/firmware/arm/str/common/openocd/linux/str75x-configs/str75x_jtagkey.cfg
trunk/firmware/arm/str/common/openocd/linux/str75x-configs/str75x_pp-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/linux/str75x-configs/str75x_pp-flash-program.cfg
trunk/firmware/arm/str/common/openocd/linux/str75x-configs/str75x_pp.cfg
trunk/firmware/arm/str/common/openocd/linux/str75x-configs/str75x_ram.gdb
trunk/firmware/arm/str/common/openocd/linux/str75x-configs/str75x_signalyzer-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/linux/str75x-configs/str75x_signalyzer-flash-program.cfg
trunk/firmware/arm/str/common/openocd/linux/str75x-configs/str75x_signalyzer.cfg
trunk/firmware/arm/str/common/openocd/linux/str91x-configs/
trunk/firmware/arm/str/common/openocd/linux/str91x-configs/str91x_armusbocd-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/linux/str91x-configs/str91x_armusbocd-flash-program.cfg
trunk/firmware/arm/str/common/openocd/linux/str91x-configs/str91x_armusbocd.cfg
trunk/firmware/arm/str/common/openocd/linux/str91x-configs/str91x_flash.gdb
trunk/firmware/arm/str/common/openocd/linux/str91x-configs/str91x_flasherase.ocd
trunk/firmware/arm/str/common/openocd/linux/str91x-configs/str91x_flashprobe.gdb
trunk/firmware/arm/str/common/openocd/linux/str91x-configs/str91x_flashprogram.ocd
trunk/firmware/arm/str/common/openocd/linux/str91x-configs/str91x_jtagkey-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/linux/str91x-configs/str91x_jtagkey-flash-program.cfg
trunk/firmware/arm/str/common/openocd/linux/str91x-configs/str91x_jtagkey.cfg
trunk/firmware/arm/str/common/openocd/linux/str91x-configs/str91x_pp-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/linux/str91x-configs/str91x_pp-flash-program.cfg
trunk/firmware/arm/str/common/openocd/linux/str91x-configs/str91x_pp.cfg
trunk/firmware/arm/str/common/openocd/linux/str91x-configs/str91x_ram.gdb
trunk/firmware/arm/str/common/openocd/linux/str91x-configs/str91x_signalyzer-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/linux/str91x-configs/str91x_signalyzer-flash-program.cfg
trunk/firmware/arm/str/common/openocd/linux/str91x-configs/str91x_signalyzer.cfg
trunk/firmware/arm/str/common/openocd/windows/
trunk/firmware/arm/str/common/openocd/windows/str71x-configs/
trunk/firmware/arm/str/common/openocd/windows/str71x-configs/str71x_armusbocd-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/windows/str71x-configs/str71x_armusbocd-flash-program.cfg
trunk/firmware/arm/str/common/openocd/windows/str71x-configs/str71x_armusbocd.cfg
trunk/firmware/arm/str/common/openocd/windows/str71x-configs/str71x_flash.gdb
trunk/firmware/arm/str/common/openocd/windows/str71x-configs/str71x_flasherase.ocd
trunk/firmware/arm/str/common/openocd/windows/str71x-configs/str71x_flashprobe.gdb
trunk/firmware/arm/str/common/openocd/windows/str71x-configs/str71x_flashprogram.ocd
trunk/firmware/arm/str/common/openocd/windows/str71x-configs/str71x_jtagkey-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/windows/str71x-configs/str71x_jtagkey-flash-program.cfg
trunk/firmware/arm/str/common/openocd/windows/str71x-configs/str71x_jtagkey.cfg
trunk/firmware/arm/str/common/openocd/windows/str71x-configs/str71x_pp-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/windows/str71x-configs/str71x_pp-flash-program.cfg
trunk/firmware/arm/str/common/openocd/windows/str71x-configs/str71x_pp.cfg
trunk/firmware/arm/str/common/openocd/windows/str71x-configs/str71x_ram.gdb
trunk/firmware/arm/str/common/openocd/windows/str71x-configs/str71x_signalyzer-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/windows/str71x-configs/str71x_signalyzer-flash-program.cfg
trunk/firmware/arm/str/common/openocd/windows/str71x-configs/str71x_signalyzer.cfg
trunk/firmware/arm/str/common/openocd/windows/str72x-configs/
trunk/firmware/arm/str/common/openocd/windows/str72x-configs/str72x_armusbocd-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/windows/str72x-configs/str72x_armusbocd-flash-program.cfg
trunk/firmware/arm/str/common/openocd/windows/str72x-configs/str72x_armusbocd.cfg
trunk/firmware/arm/str/common/openocd/windows/str72x-configs/str72x_flash.gdb
trunk/firmware/arm/str/common/openocd/windows/str72x-configs/str72x_flasherase.ocd
trunk/firmware/arm/str/common/openocd/windows/str72x-configs/str72x_flashprobe.gdb
trunk/firmware/arm/str/common/openocd/windows/str72x-configs/str72x_flashprogram.ocd
trunk/firmware/arm/str/common/openocd/windows/str72x-configs/str72x_jtagkey-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/windows/str72x-configs/str72x_jtagkey-flash-program.cfg
trunk/firmware/arm/str/common/openocd/windows/str72x-configs/str72x_jtagkey.cfg
trunk/firmware/arm/str/common/openocd/windows/str72x-configs/str72x_pp-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/windows/str72x-configs/str72x_pp-flash-program.cfg
trunk/firmware/arm/str/common/openocd/windows/str72x-configs/str72x_pp.cfg
trunk/firmware/arm/str/common/openocd/windows/str72x-configs/str72x_ram.gdb
trunk/firmware/arm/str/common/openocd/windows/str72x-configs/str72x_signalyzer-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/windows/str72x-configs/str72x_signalyzer-flash-program.cfg
trunk/firmware/arm/str/common/openocd/windows/str72x-configs/str72x_signalyzer.cfg
trunk/firmware/arm/str/common/openocd/windows/str73x-configs/
trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_armusbocd-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_armusbocd-flash-program.cfg
trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_armusbocd.cfg
trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_flash.gdb
trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_flasherase.ocd
trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_flashprobe.gdb
trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_flashprogram.ocd
trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_jtagkey-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_jtagkey-flash-program.cfg
trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_jtagkey.cfg
trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_pp-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_pp-flash-program.cfg
trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_pp.cfg
trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_ram.gdb
trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_signalyzer-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_signalyzer-flash-program.cfg
trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_signalyzer.cfg
trunk/firmware/arm/str/common/openocd/windows/str75x-configs/
trunk/firmware/arm/str/common/openocd/windows/str75x-configs/str75x_armusbocd-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/windows/str75x-configs/str75x_armusbocd-flash-program.cfg
trunk/firmware/arm/str/common/openocd/windows/str75x-configs/str75x_armusbocd.cfg
trunk/firmware/arm/str/common/openocd/windows/str75x-configs/str75x_flash.gdb
trunk/firmware/arm/str/common/openocd/windows/str75x-configs/str75x_flasherase.ocd
trunk/firmware/arm/str/common/openocd/windows/str75x-configs/str75x_flashprobe.gdb
trunk/firmware/arm/str/common/openocd/windows/str75x-configs/str75x_flashprogram.ocd
trunk/firmware/arm/str/common/openocd/windows/str75x-configs/str75x_jtagkey-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/windows/str75x-configs/str75x_jtagkey-flash-program.cfg
trunk/firmware/arm/str/common/openocd/windows/str75x-configs/str75x_jtagkey.cfg
trunk/firmware/arm/str/common/openocd/windows/str75x-configs/str75x_pp-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/windows/str75x-configs/str75x_pp-flash-program.cfg
trunk/firmware/arm/str/common/openocd/windows/str75x-configs/str75x_pp.cfg
trunk/firmware/arm/str/common/openocd/windows/str75x-configs/str75x_ram.gdb
trunk/firmware/arm/str/common/openocd/windows/str75x-configs/str75x_signalyzer-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/windows/str75x-configs/str75x_signalyzer-flash-program.cfg
trunk/firmware/arm/str/common/openocd/windows/str75x-configs/str75x_signalyzer.cfg
trunk/firmware/arm/str/common/openocd/windows/str91x-configs/
trunk/firmware/arm/str/common/openocd/windows/str91x-configs/str91x_armusbocd-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/windows/str91x-configs/str91x_armusbocd-flash-program.cfg
trunk/firmware/arm/str/common/openocd/windows/str91x-configs/str91x_armusbocd.cfg
trunk/firmware/arm/str/common/openocd/windows/str91x-configs/str91x_flash.gdb
trunk/firmware/arm/str/common/openocd/windows/str91x-configs/str91x_flasherase.ocd
trunk/firmware/arm/str/common/openocd/windows/str91x-configs/str91x_flashprobe.gdb
trunk/firmware/arm/str/common/openocd/windows/str91x-configs/str91x_flashprogram.ocd
trunk/firmware/arm/str/common/openocd/windows/str91x-configs/str91x_jtagkey-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/windows/str91x-configs/str91x_jtagkey-flash-program.cfg
trunk/firmware/arm/str/common/openocd/windows/str91x-configs/str91x_jtagkey.cfg
trunk/firmware/arm/str/common/openocd/windows/str91x-configs/str91x_pp-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/windows/str91x-configs/str91x_pp-flash-program.cfg
trunk/firmware/arm/str/common/openocd/windows/str91x-configs/str91x_pp.cfg
trunk/firmware/arm/str/common/openocd/windows/str91x-configs/str91x_ram.gdb
trunk/firmware/arm/str/common/openocd/windows/str91x-configs/str91x_signalyzer-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/windows/str91x-configs/str91x_signalyzer-flash-program.cfg
trunk/firmware/arm/str/common/openocd/windows/str91x-configs/str91x_signalyzer.cfg
Added: trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_armusbocd-flash-erase.cfg
===================================================================
--- trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_armusbocd-flash-erase.cfg (rev 0)
+++ trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_armusbocd-flash-erase.cfg 2008-02-04 13:24:06 UTC (rev 822)
@@ -0,0 +1,36 @@
+#daemon configuration
+telnet_port 4444
+gdb_port 3333
+
+#interface
+interface ft2232
+ft2232_device_desc "Olimex OpenOCD JTAG A"
+ft2232_layout "olimex-jtag"
+ft2232_vid_pid 0x15BA 0x0003
+jtag_speed 0
+jtag_nsrst_delay 200
+jtag_ntrst_delay 200
+
+#use combined on interfaces or targets that can't set TRST/SRST separately
+reset_config trst_and_srst srst_pulls_trst
+
+#jtag scan chain
+#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
+jtag_device 4 0x1 0xf 0xe
+
+#target configuration
+daemon_startup reset
+
+#target <type> <startup mode>
+#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
+target arm7tdmi little run_and_init 0 arm7tdmi
+run_and_halt_time 0 30
+
+working_area 0 0x2000C000 0x4000 nobackup
+
+#flash bank <driver> <base> <size> <chip_width> <bus_width>
+flash bank str7x 0x40000000 0x00040000 0 0 0 STR71x
+flash bank cfi 0x60000000 0x00400000 2 2 0
+
+#Script used for FLASH erasing
+target_script 0 reset /home/l3golas/openocd-configs/str71x-configs/str71x_flasherase.ocd
Added: trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_armusbocd-flash-program.cfg
===================================================================
--- trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_armusbocd-flash-program.cfg (rev 0)
+++ trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_armusbocd-flash-program.cfg 2008-02-04 13:24:06 UTC (rev 822)
@@ -0,0 +1,36 @@
+#daemon configuration
+telnet_port 4444
+gdb_port 3333
+
+#interface
+interface ft2232
+ft2232_device_desc "Olimex OpenOCD JTAG A"
+ft2232_layout "olimex-jtag"
+ft2232_vid_pid 0x15BA 0x0003
+jtag_speed 0
+jtag_nsrst_delay 200
+jtag_ntrst_delay 200
+
+#use combined on interfaces or targets that can't set TRST/SRST separately
+reset_config trst_and_srst srst_pulls_trst
+
+#jtag scan chain
+#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
+jtag_device 4 0x1 0xf 0xe
+
+#target configuration
+daemon_startup reset
+
+#target <type> <startup mode>
+#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
+target arm7tdmi little run_and_init 0 arm7tdmi
+run_and_halt_time 0 30
+
+working_area 0 0x2000C000 0x4000 nobackup
+
+#flash bank <driver> <base> <size> <chip_width> <bus_width>
+flash bank str7x 0x40000000 0x00040000 0 0 0 STR71x
+flash bank cfi 0x60000000 0x00400000 2 2 0
+
+#Script used for FLASH programming
+target_script 0 reset /home/l3golas/openocd-configs/str71x-configs/str71x_flashprogram.ocd
Added: trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_armusbocd.cfg
===================================================================
--- trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_armusbocd.cfg (rev 0)
+++ trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_armusbocd.cfg 2008-02-04 13:24:06 UTC (rev 822)
@@ -0,0 +1,35 @@
+#daemon configuration
+telnet_port 4444
+gdb_port 3333
+
+#interface
+interface ft2232
+ft2232_device_desc "Olimex OpenOCD JTAG A"
+ft2232_layout "olimex-jtag"
+ft2232_vid_pid 0x15BA 0x0003
+jtag_speed 0
+
+
+#use combined on interfaces or targets that can't set TRST/SRST separately
+reset_config trst_and_srst srst_pulls_trst
+
+#jtag scan chain
+#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
+jtag_device 4 0x1 0xf 0xe
+
+#target configuration
+daemon_startup reset
+
+#target <type> <startup mode>
+#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
+target arm7tdmi little run_and_halt 0 arm7tdmi
+run_and_halt_time 0 30
+
+working_area 0 0x2000C000 0x4000 nobackup
+
+#flash bank <driver> <base> <size> <chip_width> <bus_width>
+flash bank str7x 0x40000000 0x00040000 0 0 0 STR71x
+flash bank cfi 0x60000000 0x00400000 2 2 0
+
+# For more information about the configuration files, take a look at:
+# http://openfacts.berlios.de/index-en.phtml?title=Open+On-Chip+Debugger
Added: trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_flash.gdb
===================================================================
--- trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_flash.gdb (rev 0)
+++ trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_flash.gdb 2008-02-04 13:24:06 UTC (rev 822)
@@ -0,0 +1,15 @@
+target remote localhost:3333
+monitor reset
+monitor sleep 500
+monitor poll
+monitor soft_reset_halt
+monitor arm7_9 force_hw_bkpts enable
+monitor mww 0xA0000050 0x01c0
+monitor mdw 0xA0000050
+monitor mww 0xE0005000 0x000F
+monitor mww 0xE0005004 0x000F
+monitor mww 0xE0005008 0x000F
+monitor mww 0x6C000000 0x8001
+monitor mdw 0x6C000000
+monitor mww 0x6C000004 0x8001
+monitor mdw 0x6C000004
Added: trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_flasherase.ocd
===================================================================
--- trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_flasherase.ocd (rev 0)
+++ trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_flasherase.ocd 2008-02-04 13:24:06 UTC (rev 822)
@@ -0,0 +1,14 @@
+wait_halt
+mww 0xE0005000 0x000F
+mww 0xE0005004 0x000F
+mww 0xE0005008 0x000F
+mww 0x6C000000 0x8001
+mdw 0x6C000000
+flash probe 1
+sleep 1000
+flash protect 0 0 9 off
+flash protect 1 0 70 off
+flash erase 0 0 9
+flash erase 1 0 70
+reset
+shutdown
Added: trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_flashprobe.gdb
===================================================================
--- trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_flashprobe.gdb (rev 0)
+++ trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_flashprobe.gdb 2008-02-04 13:24:06 UTC (rev 822)
@@ -0,0 +1,11 @@
+target remote localhost:3333
+monitor reset
+monitor sleep 500
+monitor poll
+monitor soft_reset_halt
+monitor flash banks
+monitor flash probe 0
+monitor flash info 0
+monitor flash probe 1
+monitor flash info 1
+monitor reset run
Added: trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_flashprogram.ocd
===================================================================
--- trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_flashprogram.ocd (rev 0)
+++ trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_flashprogram.ocd 2008-02-04 13:24:06 UTC (rev 822)
@@ -0,0 +1,18 @@
+wait_halt
+mww 0xE0005000 0x000F
+mww 0xE0005004 0x000F
+mww 0xE0005008 0x000F
+mww 0x6C000000 0x8001
+mdw 0x6C000000
+mww 0x6C000004 0x8001
+mdw 0x6C000004
+flash probe 1
+sleep 1000
+flash protect 0 0 9 off
+flash protect 1 0 70 off
+flash erase 0 0 9
+flash erase 1 0 70
+flash write 0 main.bin 0
+flash write 1 main.bin 0
+reset
+shutdown
Added: trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_jtagkey-flash-erase.cfg
===================================================================
--- trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_jtagkey-flash-erase.cfg (rev 0)
+++ trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_jtagkey-flash-erase.cfg 2008-02-04 13:24:06 UTC (rev 822)
@@ -0,0 +1,36 @@
+#daemon configuration
+telnet_port 4444
+gdb_port 3333
+
+#interface
+interface ft2232
+ft2232_device_desc "Amontec JTAGkey A"
+ft2232_layout jtagkey
+ft2232_vid_pid 0x0403 0xcff8
+jtag_speed 0
+jtag_nsrst_delay 200
+jtag_ntrst_delay 200
+
+#use combined on interfaces or targets that can't set TRST/SRST separately
+reset_config trst_and_srst srst_pulls_trst
+
+#jtag scan chain
+#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
+jtag_device 4 0x1 0xf 0xe
+
+#target configuration
+daemon_startup reset
+
+#target <type> <startup mode>
+#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
+target arm7tdmi little run_and_init 0 arm7tdmi
+run_and_halt_time 0 30
+
+working_area 0 0x2000C000 0x4000 nobackup
+
+#flash bank <driver> <base> <size> <chip_width> <bus_width>
+flash bank str7x 0x40000000 0x00040000 0 0 0 STR71x
+flash bank cfi 0x60000000 0x00400000 2 2 0
+
+#Script used for FLASH erasing
+target_script 0 reset /home/l3golas/openocd-configs/str71x-configs/str71x_flasherase.ocd
Added: trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_jtagkey-flash-program.cfg
===================================================================
--- trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_jtagkey-flash-program.cfg (rev 0)
+++ trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_jtagkey-flash-program.cfg 2008-02-04 13:24:06 UTC (rev 822)
@@ -0,0 +1,36 @@
+#daemon configuration
+telnet_port 4444
+gdb_port 3333
+
+#interface
+interface ft2232
+ft2232_device_desc "Amontec JTAGkey A"
+ft2232_layout jtagkey
+ft2232_vid_pid 0x0403 0xcff8
+jtag_speed 0
+jtag_nsrst_delay 200
+jtag_ntrst_delay 200
+
+#use combined on interfaces or targets that can't set TRST/SRST separately
+reset_config trst_and_srst srst_pulls_trst
+
+#jtag scan chain
+#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
+jtag_device 4 0x1 0xf 0xe
+
+#target configuration
+daemon_startup reset
+
+#target <type> <startup mode>
+#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
+target arm7tdmi little run_and_init 0 arm7tdmi
+run_and_halt_time 0 30
+
+working_area 0 0x2000C000 0x4000 nobackup
+
+#flash bank <driver> <base> <size> <chip_width> <bus_width>
+flash bank str7x 0x40000000 0x00040000 0 0 0 STR71x
+flash bank cfi 0x60000000 0x00400000 2 2 0
+
+#Script used for FLASH programming
+target_script 0 reset /home/l3golas/openocd-configs/str71x-configs/str71x_flashprogram.ocd
Added: trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_jtagkey.cfg
===================================================================
--- trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_jtagkey.cfg (rev 0)
+++ trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_jtagkey.cfg 2008-02-04 13:24:06 UTC (rev 822)
@@ -0,0 +1,34 @@
+#daemon configuration
+telnet_port 4444
+gdb_port 3333
+
+#interface
+interface ft2232
+ft2232_device_desc "Amontec JTAGkey A"
+ft2232_layout jtagkey
+ft2232_vid_pid 0x0403 0xcff8
+jtag_speed 0
+
+#use combined on interfaces or targets that can't set TRST/SRST separately
+reset_config trst_and_srst srst_pulls_trst
+
+#jtag scan chain
+#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
+jtag_device 4 0x1 0xf 0xe
+
+#target configuration
+daemon_startup reset
+
+#target <type> <startup mode>
+#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
+target arm7tdmi little run_and_halt 0 arm7tdmi
+run_and_halt_time 0 30
+
+working_area 0 0x2000C000 0x4000 nobackup
+
+#flash bank <driver> <base> <size> <chip_width> <bus_width>
+flash bank str7x 0x40000000 0x00040000 0 0 0 STR71x
+flash bank cfi 0x60000000 0x00400000 2 2 0
+
+# For more information about the configuration files, take a look at:
+# http://openfacts.berlios.de/index-en.phtml?title=Open+On-Chip+Debugger
Added: trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_pp-flash-erase.cfg
===================================================================
--- trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_pp-flash-erase.cfg (rev 0)
+++ trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_pp-flash-erase.cfg 2008-02-04 13:24:06 UTC (rev 822)
@@ -0,0 +1,35 @@
+#daemon configuration
+telnet_port 4444
+gdb_port 3333
+
+#interface
+interface parport
+parport_port 0
+parport_cable wiggler
+jtag_speed 0
+jtag_nsrst_delay 200
+jtag_ntrst_delay 200
+
+#use combined on interfaces or targets that can't set TRST/SRST separately
+reset_config trst_and_srst srst_pulls_trst
+
+#jtag scan chain
+#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
+jtag_device 4 0x1 0xf 0xe
+
+#target configuration
+daemon_startup reset
+
+#target <type> <startup mode>
+#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
+target arm7tdmi little run_and_init 0 arm7tdmi
+run_and_halt_time 0 30
+
+working_area 0 0x2000C000 0x4000 nobackup
+
+#flash bank <driver> <base> <size> <chip_width> <bus_width>
+flash bank str7x 0x40000000 0x00040000 0 0 0 STR71x
+flash bank cfi 0x60000000 0x00400000 2 2 0
+
+#Script used for FLASH erasing
+target_script 0 reset /home/l3golas/openocd-configs/str71x-configs/str71x_flasherase.ocd
Added: trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_pp-flash-program.cfg
===================================================================
--- trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_pp-flash-program.cfg (rev 0)
+++ trunk/firmware/arm/str/common/openocd/linux/str71x-configs/str71x_pp-flash-program.cfg 2008-02-04 13:24:06 UTC (rev 822)
@@ -0,0 +1,35 @@
+#daemon configuration
+telnet_port 4444
+gdb_port 3333
+
+#interface
+interface parport
+parport_port 0
+parport_cable wiggler
+jtag_speed 0
+jtag_nsrst_delay 200
+jtag_ntrst_delay 200
+
+#use combined on interfaces or targets that can't set TRST/SRST separately
+reset_config trst_and_srst srst_pulls_trst
+
+#jtag scan chain
+#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
+jtag_device 4 0x1 0xf 0xe
+
+#target configuration
+daemon_startup reset
+
+#target <type> <startup mode>
+#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
+target arm7tdmi little run_and_init 0 arm7tdmi
+run_and_halt_time 0 30
+
+working_area 0 0x2000C000 0x4000 nobackup
+
+#flash bank <driver> ...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-06 12:48:47
|
Revision: 828
http://can.svn.sourceforge.net/can/?rev=828&view=rev
Author: akhe
Date: 2008-02-06 04:48:42 -0800 (Wed, 06 Feb 2008)
Log Message:
-----------
Added templates for all STR7 uP's
Modified Paths:
--------------
trunk/firmware/arm/str/common/str71x_lib/libSTR71x_lib.a
Added Paths:
-----------
trunk/firmware/arm/str/common/str72x_lib/
trunk/firmware/arm/str/common/str72x_lib/Makefile
trunk/firmware/arm/str/common/str72x_lib/include/
trunk/firmware/arm/str/common/str72x_lib/include/720_a3brg.h
trunk/firmware/arm/str/common/str72x_lib/include/720_adc.h
trunk/firmware/arm/str/common/str72x_lib/include/720_agcr.h
trunk/firmware/arm/str/common/str72x_lib/include/720_ahb.h
trunk/firmware/arm/str/common/str72x_lib/include/720_bspi.h
trunk/firmware/arm/str/common/str72x_lib/include/720_can.h
trunk/firmware/arm/str/common/str72x_lib/include/720_cgc.h
trunk/firmware/arm/str/common/str72x_lib/include/720_conf.h
trunk/firmware/arm/str/common/str72x_lib/include/720_dmac.h
trunk/firmware/arm/str/common/str72x_lib/include/720_dramc.h
trunk/firmware/arm/str/common/str72x_lib/include/720_eft.h
trunk/firmware/arm/str/common/str72x_lib/include/720_eic.h
trunk/firmware/arm/str/common/str72x_lib/include/720_emi.h
trunk/firmware/arm/str/common/str72x_lib/include/720_gpio.h
trunk/firmware/arm/str/common/str72x_lib/include/720_ide.h
trunk/firmware/arm/str/common/str72x_lib/include/720_it.h
trunk/firmware/arm/str/common/str72x_lib/include/720_lib.h
trunk/firmware/arm/str/common/str72x_lib/include/720_map.h
trunk/firmware/arm/str/common/str72x_lib/include/720_rccu.h
trunk/firmware/arm/str/common/str72x_lib/include/720_rtc.h
trunk/firmware/arm/str/common/str72x_lib/include/720_sapb.h
trunk/firmware/arm/str/common/str72x_lib/include/720_type.h
trunk/firmware/arm/str/common/str72x_lib/include/720_uart.h
trunk/firmware/arm/str/common/str72x_lib/include/720_wdg.h
trunk/firmware/arm/str/common/str72x_lib/include/720_wiu.h
trunk/firmware/arm/str/common/str72x_lib/libSTR72x_lib.a
trunk/firmware/arm/str/common/str72x_lib/src/
trunk/firmware/arm/str/common/str72x_lib/src/720_a3brg.c
trunk/firmware/arm/str/common/str72x_lib/src/720_adc.c
trunk/firmware/arm/str/common/str72x_lib/src/720_bspi.c
trunk/firmware/arm/str/common/str72x_lib/src/720_can.c
trunk/firmware/arm/str/common/str72x_lib/src/720_cgc.c
trunk/firmware/arm/str/common/str72x_lib/src/720_dmac.c
trunk/firmware/arm/str/common/str72x_lib/src/720_dramc.c
trunk/firmware/arm/str/common/str72x_lib/src/720_eft.c
trunk/firmware/arm/str/common/str72x_lib/src/720_eic.c
trunk/firmware/arm/str/common/str72x_lib/src/720_emi.c
trunk/firmware/arm/str/common/str72x_lib/src/720_gpio.c
trunk/firmware/arm/str/common/str72x_lib/src/720_ide.c
trunk/firmware/arm/str/common/str72x_lib/src/720_lib.c
trunk/firmware/arm/str/common/str72x_lib/src/720_rccu.c
trunk/firmware/arm/str/common/str72x_lib/src/720_rtc.c
trunk/firmware/arm/str/common/str72x_lib/src/720_uart.c
trunk/firmware/arm/str/common/str72x_lib/src/720_wdg.c
trunk/firmware/arm/str/common/str72x_lib/src/720_wiu.c
Modified: trunk/firmware/arm/str/common/str71x_lib/libSTR71x_lib.a
===================================================================
(Binary files differ)
Added: trunk/firmware/arm/str/common/str72x_lib/Makefile
===================================================================
--- trunk/firmware/arm/str/common/str72x_lib/Makefile (rev 0)
+++ trunk/firmware/arm/str/common/str72x_lib/Makefile 2008-02-06 12:48:42 UTC (rev 828)
@@ -0,0 +1,37 @@
+# efsl library Makefile for STR720 by Giacomo Fazio and Antonio Nasca
+# (based on efsl library makefile for AT91SAM7S by Martin Thomas)
+
+MCU = arm7tdmi
+#THUMB = -mthumb -mthumb-interwork
+THUMB =
+
+LIBNAME = libSTR72x_lib.a
+
+COPT= -mcpu=$(MCU) $(THUMB) -gdwarf-2 -Wall -Os
+INCLUDEDIRS=-Iinclude
+CFLAGS=$(COPT) $(INCLUDEDIRS)
+# gcc4 unused code-removal:
+CFLAGS += -ffunction-sections -fdata-sections
+
+CC=arm-elf-gcc
+AR=arm-elf-ar
+OBJCOPY=arm-elf-objcopy
+
+OBJ=src/720_a3brg.o src/720_adc.o src/720_bspi.o src/720_can.o
+OBJ+=src/720_cgc.o src/720_dmac.o src/720_dramc.o src/720_eft.o
+OBJ+=src/720_eic.o src/720_emi.o src/720_gpio.o src/720_ide.o src/720_lib.o
+OBJ+=src/720_rccu.o src/720_rtc.o src/720_uart.o src/720_wdg.o src/720_wiu.o
+
+
+all: lib
+
+libandclean: lib srcclean
+
+lib: $(OBJ)
+ $(AR) rcs $(LIBNAME) $(OBJ)
+
+srcclean :
+ rm -f $(OBJ)
+
+clean :
+ rm -f $(OBJ) $(LIBNAME)
Added: trunk/firmware/arm/str/common/str72x_lib/include/720_a3brg.h
===================================================================
--- trunk/firmware/arm/str/common/str72x_lib/include/720_a3brg.h (rev 0)
+++ trunk/firmware/arm/str/common/str72x_lib/include/720_a3brg.h 2008-02-06 12:48:42 UTC (rev 828)
@@ -0,0 +1,138 @@
+/******************** (C) COPYRIGHT 2004 STMicroelectronics ********************
+* File Name : 720_a3brg.h
+* Author : MCD Application Team
+* Date First Issued : 08/02/2004
+* Description : This file provides all the Asynchronous AHB-APB bridge
+* software functions headers
+**********************************************************************************
+* History:
+* 12/20/2004 : V1.1
+* 08/02/2004 : V1.0
+**********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+* OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+* OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*********************************************************************************/
+
+/* Standard include ----------------------------------------------------------*/
+/* Include of other module interface headers ---------------------------------*/
+/* Local includes ------------------------------------------------------------*/
+/* Private typedef -----------------------------------------------------------*/
+/* Private define ------------------------------------------------------------*/
+/* Private macro -------------------------------------------------------------*/
+/* Private variables ---------------------------------------------------------*/
+/* Private function prototypes -----------------------------------------------*/
+/* Interface functions -------------------------------------------------------*/
+/* Private functions ---------------------------------------------------------*/
+/* Define to prevent recursive inclusion -------------------------------------*/
+
+/* Includes ------------------------------------------------------------------*/
+
+#ifndef _720_A3BRG_H
+#define _720_A3BRG_H
+
+#include "720_lib.h"
+/* define the A3BRG Peripherals' clock and reset line masks*/
+
+typedef enum
+ {
+ GPIO2_RC = 0x04,
+ BSPI1_RC = 0x08,
+ BSPI2_RC = 0x10,
+ UART1_RC = 0x20,
+ UART2_RC = 0x40,
+ EFT1_RC = 0x80,
+ EFT2_RC = 0x100,
+ ADC_RC = 0x200,
+ CAN_RC = 0x400,
+ USB_RC = 0x800
+ }A3BRG_Peripherals;
+/*******************************************************************************
+* Function Name : A3BRG_ClkConfig
+* Description : This routine is used to enable or disable the clock signal
+* for the specified peripheral.
+* Input : Periph: the peripheral to enable or disable the clock
+* signal.
+* refer to the values defines above for more details on
+* the allowed values of this parameter.
+*
+* NewState: The reset line Status
+* Return : None
+*******************************************************************************/
+void A3BRG_ClkConfig( A3BRG_Peripherals Periph, FunctionalState NewState );
+/*******************************************************************************
+* Function Name : A3BRG_ResetConfig
+* Description : This routine is used to activate or deactivate the reset
+* line for the specified peripheral.
+* Input : Periph: the peripheral to activate or deactivate the
+* reset line.
+* refer to the values defines above for more details on
+* the allowed values of this parameter.
+*
+* NewState: The reset line Status
+* Return : None
+*******************************************************************************/
+void A3BRG_ResetConfig( A3BRG_Peripherals Periph, FunctionalState NewState );
+/*******************************************************************************
+* Function Name : A3BRG_ClkEmuConfig
+* Description : This routine is used to configure the status of the clock for
+* the peripheral controlled by the bridge while the application
+* is stopped due to a debug request.
+* Input : Periph: the peripheral to activate or deactivate the
+* reset line.
+* refer to the values defines above for more details on
+* the allowed values of this parameter.
+*
+* NewState: The reset line Status
+* Return : None
+*******************************************************************************/
+void A3BRG_ClkEmuConfig( A3BRG_Peripherals Periph, FunctionalState NewState );
+/*******************************************************************************
+* Function Name : A3BRG_AbortError
+* Description : This routine is used to indicate if a previous AHB access has
+* been aborted because it generates an error.
+* Input : NONE
+* Return : status of the previous access
+* if 0 : No error
+* !0 : an error takes place during the pervious access.
+*******************************************************************************/
+u32 A3BRG_AbortError ( void );
+/*******************************************************************************
+* Function Name : A3BRG_ErrorSource
+* Description : This routine is used to return the error source of the
+* previous access if it has been aborted otherwise it retunrs 0
+* Input : NONE
+* Return : source of the error
+* if 00 : No error
+* 10 : An access out of memory
+* 40 : an access to a protected peripheral
+* 80 : an access to a non clocked peripheral
+* 100 : an access to a peripheral under reset
+*******************************************************************************/
+u32 A3BRG_ErrorSource ( void );
+/*******************************************************************************
+* Function Name : A3BRG_AccessType
+* Description : This routine is used to return the type of access that
+* generated the error
+* Input : NONE
+* Return : access type
+* if 0 : Read Accesss
+* 1 : Write access
+*******************************************************************************/
+u32 A3BRG_AccessType ( void );
+/*******************************************************************************
+* Function Name : A3BRG_AddressError
+* Description : This routine is used to return the address of the location
+* whose previous access has generated an error.
+* Input : NONE
+* Return : Location address offset
+*******************************************************************************/
+u32 A3BRG_AddressError ( void );
+
+#endif /* _720_A3BRG_H*/
+
+
+/******************* (C) COPYRIGHT 2004 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/common/str72x_lib/include/720_adc.h
===================================================================
--- trunk/firmware/arm/str/common/str72x_lib/include/720_adc.h (rev 0)
+++ trunk/firmware/arm/str/common/str72x_lib/include/720_adc.h 2008-02-06 12:48:42 UTC (rev 828)
@@ -0,0 +1,199 @@
+/******************** (C) COPYRIGHT 2004 STMicroelectronics ********************
+* File Name : 720_adc.h
+* Author : MCD Application Team
+* Date First Issued : 08/02/2004
+* Description : This file provides all the ADC software functions headers
+**********************************************************************************
+* History:
+* 12/20/2004 : V1.1
+* 08/02/2004 : V1.0
+**********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+* OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+* OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*********************************************************************************/
+
+#ifndef __720_ADC_H
+#define __720_ADC_H
+
+#include "720_lib.h"
+
+#ifndef _RCCU
+ #error _RCCU Must be Defined in "720_conf.h"
+#endif
+
+
+
+
+//--------------------ADC Conversion modes-----------------------------------
+typedef enum
+{
+ ADC_SINGLE,
+ ADC_ROUND
+} ADC_Modes;
+
+//--------------------ADC Channels-------------------------------------------
+typedef enum
+{
+ ADC_CHANNEL0 = 0x00,
+ ADC_CHANNEL1 = 0x10,
+ ADC_CHANNEL2 = 0x20,
+ ADC_CHANNEL3 = 0x30
+} ADC_Channels;
+
+//--------------------ADC control status register flag-----------------------
+
+#define ADC_DA0 0x01
+#define ADC_DA1 0x02
+#define ADC_DA2 0x04
+#define ADC_DA3 0x08
+#define ADC_OR 0x2000
+#define ADC_DEC 0x4000
+
+// Masks for the update of interrupt bit for channel n
+#define ADC_IT0_Mask 0x0100
+#define ADC_IT1_Mask 0x0200
+#define ADC_IT2_Mask 0x0400
+#define ADC_IT3_Mask 0x0800
+
+//Mask for the update of all the interrupt bit in the CSR
+#define ADC_IT_Mask 0x0F00
+
+//Mask for Selecting mode
+#define ADC_Mode_Mask 0x0040
+
+//Mask for configuring the converter
+#define ADC_Start_Mask 0x0000
+#define ADC_Stop_Mask 0x0004
+#define ADC_Decimation_Mask 0x4000
+
+/*******************************************************************************
+* Function Name : ADC_Init
+* Description : Intialize the ADC
+* Input : None.
+* Return : None.
+*******************************************************************************/
+void ADC_Init(void);
+
+/*******************************************************************************
+* Function Name : ADC_DecimationMode
+* Description : Select the decimation mode .
+* Input : None
+* Return : None
+*******************************************************************************/
+static inline void ADC_DecimationMode (void)
+{
+ // Set the ADC_DEC bit of the ADCCSR register
+ ADC->CSR |= ADC_Decimation_Mask;
+}
+
+/*******************************************************************************
+* Function Name : ADC_ConvertsionStart
+* Description : Declenche the Conversion.
+* Input : None
+* Return : None
+*******************************************************************************/
+static inline void ADC_ConvertionStart(void)
+{
+ // Clear the ADC_STOP bit of the AGCR1 register
+ AGCR->CR1 &= ADC_Start_Mask;
+}
+
+/*******************************************************************************
+* Function Name : ADC_ConversionStop
+* Description : Stop the ADC
+* Input : None.
+* Return : None.
+*******************************************************************************/
+static inline void ADC_ConversionStop(void)
+{
+ // Set the ADC_STOP bit of the AGCR1 register
+ AGCR->CR1 |= ADC_Stop_Mask;
+}
+
+/*******************************************************************************
+* Function Name : ADC_ModeConfig
+* Description : Configure the mode of conversion
+* Input : ADC_SINGLE: single channel mode
+* ADC_ROUND : round robin mode
+* Return : None
+*******************************************************************************/
+static inline void ADC_ModeConfig (ADC_Modes Mode)
+{
+ // Select the mode of conversion and update the CSR[6]
+ ADC->CSR= Mode == ADC_SINGLE ? ADC->CSR | ADC_Mode_Mask : ADC->CSR & ~ADC_Mode_Mask;
+}
+
+/*******************************************************************************
+* Function Name : ADC_PrescalerConfig
+* Description : Configure the prescaler
+* Input : ADC_clk: Sampling frequency.
+* Return : None.
+*******************************************************************************/
+void ADC_PrescalerConfig(vu32 ADC_clk);
+
+/*******************************************************************************
+* Function Name : ADC_ChannelSelect
+* Description : select the channel passed as parameter to be converted.
+* Input : ADC_Channel: channel selected to be converted it may be
+* ADC_CHANNEL0 : select channel 0
+* ADC_CHANNEL1 : select channel 1
+* ADC_CHANNEL2 : select channel 2
+* ADC_CHANNEL3 : select channel 3
+* Return : None
+*******************************************************************************/
+static inline void ADC_ChannelSelect(ADC_Channels ADC_Channel)
+{
+ // Update the CSR by the value of the selected channel
+ ADC->CSR |= ADC_Channel;
+}
+
+/*******************************************************************************
+* Function Name : ADC_GetStatus
+* Description : test if the flag passed in parameter is set or not
+* Input : ADC_DA0 :Data Available on Channel 0
+* ADC_DA1 :Data Available on Channel 1
+* ADC_DA2 :Data Available on Channel 2
+* ADC_DA3 :Data Available on Channel 3
+* ADC_OR :Overrun
+* ADC_DEC :Decimation
+* Return : SET: if the flag is set
+* RESET: if the flag is clear
+*******************************************************************************/
+static inline u16 ADC_GetStatus (vu16 ADC_Flag)
+{
+ // Test on the flag status and return set or RESET
+ return ADC->CSR & ADC_Flag ? SET : RESET;
+}
+
+/*******************************************************************************
+* Function Name : ADC_ConversionValue
+* Description : Read the conversion result from the data register.
+* Input : ADC_Channel :number of the register to read
+* ADC_CHANNEL0 : read the DATA0 register
+* ADC_CHANNEL1 : read the DATA1 register
+* ADC_CHANNEL2 : read the DATA2 register
+* ADC_CHANNEL3 : read the DATA3 register
+* Return : the register value of the channel converted
+*******************************************************************************/
+static inline u16 ADC_ConversionValue( ADC_Channels ADC_Channel)
+{
+ // Only the 12 MSB of the DATAn Register are taken
+ return *(u16 *)(ADC_BASE + (ADC_Channel >> 1)) >> 4;
+}
+
+/*******************************************************************************
+* Function Name : ADC_ITConfig
+* Description : enable or disable the interruption
+* Input : NewState=ENABLE=>enable interrupt
+* NewState=DISABLE=>disable interrupt
+* Return : None
+*******************************************************************************/
+void ADC_ITConfig (FunctionalState NewState);
+
+#endif // __720_ADC_H
+
+/******************* (C) COPYRIGHT 2004 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/common/str72x_lib/include/720_agcr.h
===================================================================
--- trunk/firmware/arm/str/common/str72x_lib/include/720_agcr.h (rev 0)
+++ trunk/firmware/arm/str/common/str72x_lib/include/720_agcr.h 2008-02-06 12:48:42 UTC (rev 828)
@@ -0,0 +1,66 @@
+/******************** (C) COPYRIGHT 2004 STMicroelectronics ********************
+* File Name : 720_agcr.h
+* Author : MCD Application Team
+* Date First Issued : 08/02/2004
+* Description : This file provides all the AGCR software functions headers
+**********************************************************************************
+* History:
+* 12/20/2004 : V1.1
+* 08/02/2004 : V1.0
+**********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+* OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+* OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*********************************************************************************/
+
+
+/* Standard include ----------------------------------------------------------*/
+/* Include of other module interface headers ---------------------------------*/
+/* Local includes ------------------------------------------------------------*/
+/* Private typedef -----------------------------------------------------------*/
+/* Private define ------------------------------------------------------------*/
+/* Private macro -------------------------------------------------------------*/
+/* Private variables ---------------------------------------------------------*/
+/* Private function prototypes -----------------------------------------------*/
+/* Interface functions -------------------------------------------------------*/
+/* Private functions ---------------------------------------------------------*/
+/* Define to prevent recursive inclusion -------------------------------------*/
+
+#ifndef _720_AGCR_H
+#define _720_AGCR_H
+/* Includes ------------------------------------------------------------------*/
+#include "720_lib.h"
+/* Exported types ------------------------------------------------------------*/
+
+/*******************************************************************************
+* Function Name : AGCR_Init
+* Description : Init AGCR register
+* Input 1 : None
+* Input 2 : None
+* Output : None
+* Return : None
+*******************************************************************************/
+void AGCR_Init(void);
+/*******************************************************************************
+* Function Name : AGCR_ADCStopConfig
+* Description : Stop/Run ADC Operations
+* Input 1 : ENABLE/DISABLE
+* Output : None
+* Return : None
+*******************************************************************************/
+void AGCR_ADCStopConfig(FunctionalState Xstatus);
+/*******************************************************************************
+* Function Name : AGCR_ADCOffConfig
+* Description : Switch off/on ADC Analog section
+* Input 1 : ENABLE/DISABLE
+* Output : None
+* Return : None
+*******************************************************************************/
+void AGCR_ADCOffConfig(FunctionalState Xstatus);
+
+#endif /* _720_AGCR_H */
+
+/******************* (C) COPYRIGHT 2004 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/common/str72x_lib/include/720_ahb.h
===================================================================
--- trunk/firmware/arm/str/common/str72x_lib/include/720_ahb.h (rev 0)
+++ trunk/firmware/arm/str/common/str72x_lib/include/720_ahb.h 2008-02-06 12:48:42 UTC (rev 828)
@@ -0,0 +1,51 @@
+/******************** (C) COPYRIGHT 2004 STMicroelectronics ********************
+* File Name : 720_ahb.h
+* Author : MCD Application Team
+* Date First Issued : 08/02/2004
+* Description : This file provides all the wiu software functions headers
+**********************************************************************************
+* History:
+* 12/20/2004 : V1.1
+* 08/02/2004 : V1.0
+**********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+* OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+* OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*********************************************************************************/
+
+/* Standard include ----------------------------------------------------------*/
+/* Include of other module interface headers ---------------------------------*/
+/* Local includes ------------------------------------------------------------*/
+/* Private typedef -----------------------------------------------------------*/
+/* Private define ------------------------------------------------------------*/
+/* Private macro -------------------------------------------------------------*/
+/* Private variables ---------------------------------------------------------*/
+/* Private function prototypes -----------------------------------------------*/
+/* Interface functions -------------------------------------------------------*/
+/* Private functions ---------------------------------------------------------*/
+/* Define to prevent recursive inclusion -------------------------------------*/
+
+#ifndef __720_AHB_H
+#define __720_AHB_H
+/* Includes ------------------------------------------------------------------*/
+#include "720_lib.h"
+/* Exported types ------------------------------------------------------------*/
+
+/*******************************************************************************
+* Function Name : AHB_Init
+* Description : Init AHB Block
+* Input 1 : None
+* Input 2 : None
+* Output : None
+* Return : None
+*******************************************************************************/
+void AHB_Init(void);
+
+
+
+#endif /* __720_AHB_H */
+
+/******************* (C) COPYRIGHT 2004 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/common/str72x_lib/include/720_bspi.h
===================================================================
--- trunk/firmware/arm/str/common/str72x_lib/include/720_bspi.h (rev 0)
+++ trunk/firmware/arm/str/common/str72x_lib/include/720_bspi.h 2008-02-06 12:48:42 UTC (rev 828)
@@ -0,0 +1,425 @@
+/******************** (C) COPYRIGHT 2004 STMicroelectronics ********************
+* File Name : bspi.h
+* Author : MCD Application Team
+* Date First Issued : 08/02/2004
+* Description : This file contains all the functions prototypes for the
+* BSPI software library.
+**********************************************************************************
+* History:
+* 12/20/2004 : V1.1
+* 08/02/2004 : V1.0
+**********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+* OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+* OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*********************************************************************************/
+
+#ifndef __720_BSPI_H
+#define __720_BSPI_H
+
+#include "720_lib.h"
+
+typedef enum {
+ BSPI_MASTER = 0x0002,
+ BSPI_SLAVE
+} BSPIMode_TypeDef;
+
+typedef enum {
+ BSPI_16b = 0x0400,
+ BSPI_8b = 0x0C00
+} BSPIWord_TypeDef;
+
+typedef enum {
+ BSPI_FirstEdge = 0xFDFF,
+ BSPI_SecondEdge=0x0200
+} BSPICLKPhase_TypeDef;
+
+typedef enum {
+ BSPI_LOW = 0x0100,
+ BSPI_HIGH
+} BSPICLKPolarity_TypeDef;
+
+typedef enum {
+ BSPI_BERIT = 0x0080,
+ BSPI_RxIT = 0x0010,
+ BSPI_ALL = 0x0090
+} BSPIITConfig_TypeDef;
+
+typedef enum {
+ BSPI_BERR = 0x004,
+ BSPI_RxFNE = 0x008,
+ BSPI_RxFF = 0x010,
+ BSPI_RxOFL = 0x020,
+ BSPI_TxFE = 0x040,
+ BSPI_TxUFL = 0x080,
+ BSPI_TxFF = 0x100,
+ BSPI_TxFNE = 0x200
+} BSPIFlags_TypeDef ;
+
+typedef enum {
+ BSPI_TxITFE = 0x4000 ,
+ BSPI_TxITUFL = 0x8000,
+ BSPI_TxITFF = 0xC000,
+ BSPI_TxITDIS
+} BSPITxIT_TypeDef;
+
+typedef enum {
+ BSPI_RxITFNE = 0x0004,
+ BSPI_RxITFF = 0x000C,
+ BSPI_RxITDIS
+} BSPIRxIT_TypeDef;
+
+typedef enum {
+ BSPI_Tx1Word = 0x00F3,
+ BSPI_Tx4Word = 0x0004,
+ BSPI_Tx8Word = 0x0008,
+ BSPI_Tx16Word = 0x000C
+} BSPITxBurst_TypeDef;
+
+typedef enum {
+ BSPI_Rx1Word = 0x00CF,
+ BSPI_Rx4Word = 0x0010,
+ BSPI_Rx8Word = 0x0020,
+ BSPI_Rx16Word = 0x0030
+} BSPIRxBurst_TypeDef;
+
+#define BSPI_BSPE 0x01
+#define BSPI_DFIFO 0x0001
+#define BSPI_MaskSlave 0x0001
+#define BSPI_MaskDMAConfig 0x0002
+#define BSPI_TREQ 0x0040
+#define BSPI_RREQ 0x0080
+
+/*******************************************************************************
+* Function Name : BSPI_Init
+* Description : Initializes BSPI peripheral con...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-12 17:34:12
|
Revision: 838
http://can.svn.sourceforge.net/can/?rev=838&view=rev
Author: akhe
Date: 2008-02-12 09:34:09 -0800 (Tue, 12 Feb 2008)
Log Message:
-----------
Fixed bug in STR standard 73x library for sending extended identifier CAN messages.
Modified Paths:
--------------
trunk/firmware/arm/str/common/73x_lcd.c
trunk/firmware/arm/str/common/73x_lcd.h
trunk/firmware/arm/str/common/str73x_lib/libSTR73x_lib.a
trunk/firmware/arm/str/common/str73x_lib/src/73x_can.c
Modified: trunk/firmware/arm/str/common/73x_lcd.c
===================================================================
--- trunk/firmware/arm/str/common/73x_lcd.c 2008-02-11 17:33:26 UTC (rev 837)
+++ trunk/firmware/arm/str/common/73x_lcd.c 2008-02-12 17:34:09 UTC (rev 838)
@@ -237,7 +237,7 @@
* Output : None
* Return : None
*******************************************************************************/
-void LCD_SendString( u8 *pBuffer, u8 Line, u8 Column )
+void LCD_SendString( char *pBuffer, u8 Line, u8 Column )
{
u8 len = 0, count = 0;
@@ -277,7 +277,7 @@
* Output : None
* Return : None
*******************************************************************************/
-void LCD_SendStringByStep( u8 *pBuffer, u8 Line, u8 Column )
+void LCD_SendStringByStep( char *pBuffer, u8 Line, u8 Column )
{
u8 len = 0, count = 0;
@@ -322,7 +322,7 @@
* Output :
* Return : None
*******************************************************************************/
-void LCD_SendStringPinPong( u8 *pBuffer, u8 Line, u32 nTime )
+void LCD_SendStringPinPong( char *pBuffer, u8 Line, u32 nTime )
{
u8 len = 0;
u8 idx = 1;
Modified: trunk/firmware/arm/str/common/73x_lcd.h
===================================================================
--- trunk/firmware/arm/str/common/73x_lcd.h 2008-02-11 17:33:26 UTC (rev 837)
+++ trunk/firmware/arm/str/common/73x_lcd.h 2008-02-12 17:34:09 UTC (rev 838)
@@ -77,9 +77,9 @@
void LCD_E_Low(void);
void LCD_Send_Command_4bit(u8 Cmd);
void LCD_SendData_4bit(u8 Data);
-void LCD_SendString(u8 *pBuffer, u8 Line, u8 Column);
-void LCD_SendStringByStep(u8 *pBuffer, u8 Line, u8 Column);
-void LCD_SendStringPinPong(u8 *pBuffer, u8 Line, u32 nTime);
+void LCD_SendString(char *pBuffer, u8 Line, u8 Column);
+void LCD_SendStringByStep(char *pBuffer, u8 Line, u8 Column);
+void LCD_SendStringPinPong(char *pBuffer, u8 Line, u32 nTime);
void LCD_SetPosCur(u8 Line, u8 Column);
void LCD_Clear(void);
void LCD_LineClear(u8 Line);
Modified: trunk/firmware/arm/str/common/str73x_lib/libSTR73x_lib.a
===================================================================
(Binary files differ)
Modified: trunk/firmware/arm/str/common/str73x_lib/src/73x_can.c
===================================================================
--- trunk/firmware/arm/str/common/str73x_lib/src/73x_can.c 2008-02-11 17:33:26 UTC (rev 837)
+++ trunk/firmware/arm/str/common/str73x_lib/src/73x_can.c 2008-02-12 17:34:09 UTC (rev 838)
@@ -384,9 +384,11 @@
}
else
{
- /* extended ID*/
- CANx->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
- CANx->sMsgObj[0].A2R = (CANx->sMsgObj[0].A2R & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ /* extended ID AKHE Fixed bug */
+ //CANx->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
+ //CANx->sMsgObj[0].A2R = (CANx->sMsgObj[0].A2R & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ CANx->sMsgObj[0].A1R = pCanMsg->Id & 0xffff;
+ CANx->sMsgObj[0].A2R = (CANx->sMsgObj[0].A2R & 0xE000) | ( ( pCanMsg->Id >> 16 ) & 0xffff);
}
CANx->sMsgObj[0].MCR = (CANx->sMsgObj[0].MCR & 0xFEF0) | CAN_MCR_NEWDAT | CAN_MCR_TXRQST | pCanMsg->Dlc;
@@ -507,9 +509,11 @@
}
else
{
- /* extended ID*/
- CANx->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
- CANx->sMsgObj[0].A2R = ((CANx->sMsgObj[0].A2R) & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ /* extended ID - AKHE Fixed bug */
+ //CANx->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
+ //CANx->sMsgObj[0].A2R = ((CANx->sMsgObj[0].A2R) & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ CANx->sMsgObj[0].A1R = pCanMsg->Id & 0xffff;
+ CANx->sMsgObj[0].A2R = (CANx->sMsgObj[0].A2R & 0xE000) | ( ( pCanMsg->Id >> 16 ) & 0xffff);
}
CANx->sMsgObj[0].MCR = (CANx->sMsgObj[0].MCR & 0xFCF0) | pCanMsg->Dlc;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ak...@us...> - 2008-02-17 12:24:34
|
Revision: 844
http://can.svn.sourceforge.net/can/?rev=844&view=rev
Author: akhe
Date: 2008-02-17 04:24:27 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
Fixed CAN extended id bug in str71x_lib, str72x_lib and str75x_lib
Modified Paths:
--------------
trunk/firmware/arm/str/common/str71x_lib/libSTR71x_lib.a
trunk/firmware/arm/str/common/str71x_lib/src/can.c
trunk/firmware/arm/str/common/str72x_lib/libSTR72x_lib.a
trunk/firmware/arm/str/common/str72x_lib/src/720_can.c
trunk/firmware/arm/str/common/str73x_lib/src/73x_can.c
trunk/firmware/arm/str/common/str75x_lib/libSTR75x_lib.a
trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c
Modified: trunk/firmware/arm/str/common/str71x_lib/libSTR71x_lib.a
===================================================================
(Binary files differ)
Modified: trunk/firmware/arm/str/common/str71x_lib/src/can.c
===================================================================
--- trunk/firmware/arm/str/common/str71x_lib/src/can.c 2008-02-17 11:51:48 UTC (rev 843)
+++ trunk/firmware/arm/str/common/str71x_lib/src/can.c 2008-02-17 12:24:27 UTC (rev 844)
@@ -362,9 +362,11 @@
}
else
{
- // extended ID
- CAN->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
- CAN->sMsgObj[0].A2R = (CAN->sMsgObj[0].A2R & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ // extended ID - Fixed AKHE
+ //CAN->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
+ //CAN->sMsgObj[0].A2R = (CAN->sMsgObj[0].A2R & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ CAN->sMsgObj[0].A1R = pCanMsg->Id & 0xffff;
+ CAN->sMsgObj[0].A2R = (CAN->sMsgObj[0].A2R & 0xE000) | ( ( pCanMsg->Id >> 16 ) & 0xffff);
}
CAN->sMsgObj[0].MCR = (CAN->sMsgObj[0].MCR & 0xFEF0) | CAN_MCR_NEWDAT | CAN_MCR_TXRQST | pCanMsg->Dlc;
@@ -417,9 +419,10 @@
}
else
{
- /* extended ID */
+ /* extended ID - Fixed AKHE*/
pCanMsg->IdType = CAN_EXT_ID;
- pCanMsg->Id = ((CAN->sMsgObj[1].A2R >> 2) & 0x07FF) | ((u32)CAN->sMsgObj[1].A1R << 11) | (((u32)CAN->sMsgObj[1].A2R & 0x0003) << 27);
+ //pCanMsg->Id = ((CAN->sMsgObj[1].A2R >> 2) & 0x07FF) | ((u32)CAN->sMsgObj[1].A1R << 11) | (((u32)CAN->sMsgObj[1].A2R & 0x0003) << 27);
+ pCanMsg->Id = CAN->sMsgObj[1].A1R + ( ( CAN->sMsgObj[1].A2R & 0x1fff ) >> 16 );
}
pCanMsg->Dlc = CAN->sMsgObj[1].MCR & 0x0F;
@@ -478,9 +481,9 @@
}
else
{
- /* extended ID */
- CAN->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
- CAN->sMsgObj[0].A2R = (CAN->sMsgObj[0].A2R & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ /* extended ID - Fixe AKHE*/
+ //CAN->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
+ //CAN->sMsgObj[0].A2R = (CAN->sMsgObj[0].A2R & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
}
CAN->sMsgObj[0].MCR = (CAN->sMsgObj[0].MCR & 0xFCF0) | pCanMsg->Dlc;
@@ -526,7 +529,8 @@
{
/* extended ID */
pCanMsg->IdType = CAN_EXT_ID;
- pCanMsg->Id = ((CAN->sMsgObj[1].A2R >> 2) & 0x07FF) | ((u32)CAN->sMsgObj[1].A1R << 11) | (((u32)CAN->sMsgObj[1].A2R & 0x0003) << 27);
+ //pCanMsg->Id = ((CAN->sMsgObj[1].A2R >> 2) & 0x07FF) | ((u32)CAN->sMsgObj[1].A1R << 11) | (((u32)CAN->sMsgObj[1].A2R & 0x0003) << 27);
+ pCanMsg->Id = CAN->sMsgObj[1].A1R + ( ( CAN->sMsgObj[1].A2R & 0x1fff ) >> 16 );
}
pCanMsg->Dlc = CAN->sMsgObj[1].MCR & 0x0F;
Modified: trunk/firmware/arm/str/common/str72x_lib/libSTR72x_lib.a
===================================================================
(Binary files differ)
Modified: trunk/firmware/arm/str/common/str72x_lib/src/720_can.c
===================================================================
--- trunk/firmware/arm/str/common/str72x_lib/src/720_can.c 2008-02-17 11:51:48 UTC (rev 843)
+++ trunk/firmware/arm/str/common/str72x_lib/src/720_can.c 2008-02-17 12:24:27 UTC (rev 844)
@@ -348,14 +348,16 @@
if ((CAN->sMsgObj[0].ARB2 & CAN_ARB_XTD) == 0)
{
// standard ID
- CAN->sMsgObj[0].ARB1 = 0;
- CAN->sMsgObj[0].ARB2 = (CAN->sMsgObj[0].ARB2 & 0xE000) | STD_FIXED_ID_ARB(pCanMsg->Id);
+ CAN->sMsgObj[0].ARB1 = 0;
+ CAN->sMsgObj[0].ARB2 = (CAN->sMsgObj[0].ARB2 & 0xE000) | STD_FIXED_ID_ARB(pCanMsg->Id);
}
else
{
- // extended ID
- CAN->sMsgObj[0].ARB1 = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
- CAN->sMsgObj[0].ARB2 = (CAN->sMsgObj[0].ARB2 & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ // extended ID - fixed AKHE
+ //CAN->sMsgObj[0].ARB1 = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
+ //CAN->sMsgObj[0].ARB2 = (CAN->sMsgObj[0].ARB2 & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ CAN->sMsgObj[0].ARB1 = pCanMsg->Id & 0xffff;
+ CAN->sMsgObj[0].ARB2 = (CAN->sMsgObj[0].ARB2 & 0xE000) | ( ( pCanMsg->Id >> 16 ) & 0xffff);
}
CAN->sMsgObj[0].MSGC = (CAN->sMsgObj[0].MSGC & 0xFEF0) | CAN_CTL_NEWDAT | CAN_CTL_TXRQST | pCanMsg->Dlc;
@@ -408,9 +410,10 @@
}
else
{
- // extended ID
+ // extended ID - Fixed AKHE
pCanMsg->IdType = CAN_EXT_ID;
- pCanMsg->Id = ((CAN->sMsgObj[1].ARB2 >> 2) & 0x07FF) | ((u32)CAN->sMsgObj[1].ARB1 << 11) | (((u32)CAN->sMsgObj[1].ARB2 & 0x0003) << 27);
+ //pCanMsg->Id = ((CAN->sMsgObj[1].ARB2 >> 2) & 0x07FF) | ((u32)CAN->sMsgObj[1].ARB1 << 11) | (((u32)CAN->sMsgObj[1].ARB2 & 0x0003) << 27);
+ pCanMsg->Id = CAN->sMsgObj[1].ARB1 + ( ( CAN->sMsgObj[1].ARB2 & 0x1fff ) >> 16 );
}
pCanMsg->Dlc = CAN->sMsgObj[1].MSGC & 0x0F;
@@ -469,9 +472,11 @@
}
else
{
- // extended ID
- CAN->sMsgObj[0].ARB1 = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
- CAN->sMsgObj[0].ARB2 = (CAN->sMsgObj[0].ARB2 & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ // extended ID - Fixed AKHE
+ //CAN->sMsgObj[0].ARB1 = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
+ //CAN->sMsgObj[0].ARB2 = (CAN->sMsgObj[0].ARB2 & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ CAN->sMsgObj[0].ARB1 = pCanMsg->Id & 0xffff;
+ CAN->sMsgObj[0].ARB2 = (CAN->sMsgObj[0].ARB2 & 0xE000) | ( ( pCanMsg->Id >> 16 ) & 0xffff);
}
CAN->sMsgObj[0].MSGC = (CAN->sMsgObj[0].MSGC & 0xFCF0) | pCanMsg->Dlc;
@@ -517,7 +522,8 @@
{
// extended ID
pCanMsg->IdType = CAN_EXT_ID;
- pCanMsg->Id = ((CAN->sMsgObj[1].ARB2 >> 2) & 0x07FF) | ((u32)CAN->sMsgObj[1].ARB1 << 11) | (((u32)CAN->sMsgObj[1].ARB2 & 0x0003) << 27);
+ //pCanMsg->Id = ((CAN->sMsgObj[1].ARB2 >> 2) & 0x07FF) | ((u32)CAN->sMsgObj[1].ARB1 << 11) | (((u32)CAN->sMsgObj[1].ARB2 & 0x0003) << 27);
+ pCanMsg->Id = CAN->sMsgObj[1].ARB1 + ( ( CAN->sMsgObj[1].ARB2 & 0x1fff ) >> 16 );
}
pCanMsg->Dlc = CAN->sMsgObj[1].MSGC & 0x0F;
Modified: trunk/firmware/arm/str/common/str73x_lib/src/73x_can.c
===================================================================
--- trunk/firmware/arm/str/common/str73x_lib/src/73x_can.c 2008-02-17 11:51:48 UTC (rev 843)
+++ trunk/firmware/arm/str/common/str73x_lib/src/73x_can.c 2008-02-17 12:24:27 UTC (rev 844)
@@ -117,7 +117,7 @@
void CAN_SetBitrate(CAN_TypeDef *CANx, u32 bitrate)
{
CANx->BTR = CanTimings[bitrate]; /*write the predefined timing value*/
- CANx->BRPR = 0; /*clear the Extended Baud Rate Prescaler*/
+ CANx->BRPR = 0; /*clear the Extended Baud Rate Prescaler*/
}
/********************************************************************************/
Modified: trunk/firmware/arm/str/common/str75x_lib/libSTR75x_lib.a
===================================================================
(Binary files differ)
Modified: trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c
===================================================================
--- trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c 2008-02-17 11:51:48 UTC (rev 843)
+++ trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c 2008-02-17 12:24:27 UTC (rev 844)
@@ -417,9 +417,11 @@
}
else
{
- /* extended ID*/
- CAN->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
- CAN->sMsgObj[0].A2R = (CAN->sMsgObj[0].A2R & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ /* extended ID - Fixed AKHE*/
+ //CAN->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
+ //CAN->sMsgObj[0].A2R = (CAN->sMsgObj[0].A2R & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ CAN->sMsgObj[0].A1R = pCanMsg->Id & 0xffff;
+ CAN->sMsgObj[0].A2R = (CAN->sMsgObj[0].A2R & 0xE000) | ( ( pCanMsg->Id >> 16 ) & 0xffff);
}
CAN->sMsgObj[0].MCR = (CAN->sMsgObj[0].MCR & 0xFEF0) | CAN_MCR_NEWDAT | CAN_MCR_TXRQST | pCanMsg->Dlc;
@@ -483,11 +485,12 @@
}
else
{
- /* extended ID*/
+ /* extended ID - Fixed AKHE*/
pCanMsg->IdType = CAN_EXT_ID;
- pCanMsg->Id = ((CAN->sMsgObj[1].A2R >> 2) & 0x07FF);
- pCanMsg->Id |= ((u32)CAN->sMsgObj[1].A1R << 11);
- pCanMsg->Id |= (((u32)CAN->sMsgObj[1].A2R & 0x0003) << 27);
+ //pCanMsg->Id = ((CAN->sMsgObj[1].A2R >> 2) & 0x07FF);
+ //pCanMsg->Id |= ((u32)CAN->sMsgObj[1].A1R << 11);
+ //pCanMsg->Id |= (((u32)CAN->sMsgObj[1].A2R & 0x0003) << 27);
+ pCanMsg->Id = CAN->sMsgObj[1].A1R + ( ( CAN->sMsgObj[1].A2R & 0x1fff ) >> 16 );
}
pCanMsg->Dlc = CAN->sMsgObj[1].MCR & 0x0F;
@@ -555,9 +558,11 @@
}
else
{
- /* extended ID*/
- CAN->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
- CAN->sMsgObj[0].A2R = ((CAN->sMsgObj[0].A2R) & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ /* extended ID Fixed AKHE*/
+ //CAN->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
+ //CAN->sMsgObj[0].A2R = ((CAN->sMsgObj[0].A2R) & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ CAN->sMsgObj[0].A1R = pCanMsg->Id & 0xffff;
+ CAN->sMsgObj[0].A2R = (CAN->sMsgObj[0].A2R & 0xE000) | ( ( pCanMsg->Id >> 16 ) & 0xffff);
}
CAN->sMsgObj[0].MCR = (CAN->sMsgObj[0].MCR & 0xFCF0) | pCanMsg->Dlc;
@@ -608,11 +613,12 @@
}
else
{
- /* extended ID*/
+ /* extended ID - Fixed AKHE */
pCanMsg->IdType = CAN_EXT_ID;
- pCanMsg->Id = ((CAN->sMsgObj[1].A2R >> 2) & 0x07FF);
- pCanMsg->Id |= ((u32)CAN->sMsgObj[1].A1R << 11);
- pCanMsg->Id |= (((u32)CAN->sMsgObj[1].A2R & 0x0003) << 27);
+ //pCanMsg->Id = ((CAN->sMsgObj[1].A2R >> 2) & 0x07FF);
+ //pCanMsg->Id |= ((u32)CAN->sMsgObj[1].A1R << 11);
+ //pCanMsg->Id |= (((u32)CAN->sMsgObj[1].A2R & 0x0003) << 27);
+ pCanMsg->Id = CAN->sMsgObj[1].A1R + ( ( CAN->sMsgObj[1].A2R & 0x1fff ) >> 16 );
}
pCanMsg->Dlc = CAN->sMsgObj[1].MCR & 0x0F;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ak...@us...> - 2008-02-17 15:47:15
|
Revision: 848
http://can.svn.sourceforge.net/can/?rev=848&view=rev
Author: akhe
Date: 2008-02-17 07:47:03 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
Changed name of common files thta are uP dependent
Modified Paths:
--------------
trunk/firmware/arm/str/common/delay.c
Added Paths:
-----------
trunk/firmware/arm/str/common/sysTime73x.c
trunk/firmware/arm/str/common/sysTime73x.h
trunk/firmware/arm/str/common/sysTime75x.c
trunk/firmware/arm/str/common/sysTime75x.h
Removed Paths:
-------------
trunk/firmware/arm/str/common/sysTime.c
trunk/firmware/arm/str/common/sysTime.h
Modified: trunk/firmware/arm/str/common/delay.c
===================================================================
--- trunk/firmware/arm/str/common/delay.c 2008-02-17 15:42:27 UTC (rev 847)
+++ trunk/firmware/arm/str/common/delay.c 2008-02-17 15:47:03 UTC (rev 848)
@@ -3,8 +3,7 @@
Martin Thomas, 11/2004
*/
-#include "73x_lib.h"
-#include "systime.h"
+
#include "delay.h"
Deleted: trunk/firmware/arm/str/common/sysTime.c
===================================================================
--- trunk/firmware/arm/str/common/sysTime.c 2008-02-17 15:42:27 UTC (rev 847)
+++ trunk/firmware/arm/str/common/sysTime.c 2008-02-17 15:47:03 UTC (rev 848)
@@ -1,127 +0,0 @@
-/******************************************************************************
- *
- * $RCSfile: sysTime.c,v $
- * $Revision: 1.4 $
- *
- * This module provides the interface routines for initializing and
- * accessing the system timing functions.
- * Copyright 2004, R O SoftWare
- * No guarantees, warrantees, or promises, implied or otherwise.
- * May be used for hobby or commercial purposes provided copyright
- * notice remains intact.
- *
- *****************************************************************************/
-
-//
-// The TB2_IRQHandler handler in vectors.c must be implemented fot this to work
-// This rotine should update the sysTICs value once each millisecond.
-// Something like this is needed
-//
-// sysTICs++;
-// TB_FlagClear( TB2 );
-//
-
-#include "sysTime.h"
-
-volatile vu32 sysTICs;
-
-/******************************************************************************
- *
- * Function Name: initTimebase2()
- *
- * Description:
- * This function initializes the TB2 for use as the system timer.
- *
- * Calling Sequence:
- * void
- *
- * Returns:
- * void
- *
- *****************************************************************************/
-void initTimebase2(void)
-{
- TB_InitTypeDef TB_InitStructure;
-
- sysTICs = 0;
-
- CFG_PeripheralClockConfig( CFG_CLK_TB2, ENABLE );
-
- // TB2 Configuration to get timbase IRQ each 1ms
- TB_InitStructure.TB_CLK_Source = TB_CLK_INTERNAL ;
- TB_InitStructure.TB_Prescaler = 50; // The internal TB Frequency = 160KHz
- TB_InitStructure.TB_Preload = 160; // 160000Hz * 0.001 s = 160
-
- TB_Init( TB2, &TB_InitStructure );
- TB_ITConfig( TB2, ENABLE );
-
- EIC_IRQChannelConfig( TB2_IRQChannel, ENABLE ); // Enable IRQ
-
- TB_Cmd( TB2, ENABLE ); // Enable the timer
-}
-
-/******************************************************************************
- *
- * Function Name: getSysTICs()
- *
- * Description:
- * This function returns the current syetem time in TICs.
- *
- * Calling Sequence:
- * void
- *
- * Returns:
- * The current time in TICs as represented by sysTICs
- *
- *****************************************************************************/
-u32 getSysTICs(void)
-{
- return sysTICs;
-}
-
-
-/******************************************************************************
- *
- * Function Name: getElapsedSysTICs()
- *
- * Description:
- * This function then returns the difference in TICs between the
- * given starting time and the current system time.
- *
- * Calling Sequence:
- * The starting time.
- *
- * Returns:
- * The time difference.
- *
- *****************************************************************************/
-u32 getElapsedSysTICs( u32 startTime )
-{
- return ( getSysTICs() - startTime );
-}
-
-
-/******************************************************************************
- *
- * Function Name: pause()
- *
- * Description:
- * This function does not return until the specified 'duration' in
- * TICs has elapsed.
- *
- * Calling Sequence:
- * duration - length of time in TICs to wait before returning
- *
- * Returns:
- * void
- *
- *****************************************************************************/
-void pause( u32 duration )
-{
- u32 startTime = getSysTICs();
-
- while ( getElapsedSysTICs( startTime ) < duration ) ;
-
-}
-
-
Deleted: trunk/firmware/arm/str/common/sysTime.h
===================================================================
--- trunk/firmware/arm/str/common/sysTime.h 2008-02-17 15:42:27 UTC (rev 847)
+++ trunk/firmware/arm/str/common/sysTime.h 2008-02-17 15:47:03 UTC (rev 848)
@@ -1,108 +0,0 @@
-/******************************************************************************
- *
- * $RCSfile: sysTime.h,v $
- * $Revision: 1.2 $
- *
- * This module provides the interface definitions for sysTime.c
- * Copyright 2004, R O SoftWare
- *
- * Ported for STR73xF 2006 <ak...@do...>
- *
- * No guarantees, warrantees, or promises, implied or otherwise.
- * May be used for hobby or commercial purposes provided copyright
- * notice remains intact.
- *
- *****************************************************************************/
-#ifndef INC_SYS_TIME_H
-#define INC_SYS_TIME_H
-
-#include "73x_lib.h"
-
-// setup parameters
-#define sysTICSperSEC 1000
-
-// some helpful times for pause()
-#define ONE_MS (u32)(( 1e-3 * sysTICSperSEC) + .5)
-#define TWO_MS (u32)(( 2e-3 * sysTICSperSEC) + .5)
-#define FIVE_MS (u32)(( 5e-3 * sysTICSperSEC) + .5)
-#define TEN_MS (u32)(( 10e-3 * sysTICSperSEC) + .5)
-#define TWENTY_MS (u32)(( 20e-3 * sysTICSperSEC) + .5)
-#define THIRTY_MS (u32)(( 30e-3 * sysTICSperSEC) + .5)
-#define FIFTY_MS (u32)(( 50e-3 * sysTICSperSEC) + .5)
-#define HUNDRED_MS (u32)((100e-3 * sysTICSperSEC) + .5)
-#define ONE_FIFTY_MS (u32)((150e-3 * sysTICSperSEC) + .5)
-#define QUARTER_SEC (u32)((250e-3 * sysTICSperSEC) + .5)
-#define HALF_SEC (u32)((500e-3 * sysTICSperSEC) + .5)
-#define ONE_SEC (u32)(( 1.0 * sysTICSperSEC) + .5)
-#define TWO_SEC (u32)(( 2.0 * sysTICSperSEC) + .5)
-#define FIVE_SEC (u32)(( 5.0 * sysTICSperSEC) + .5)
-#define TEN_SEC (u32)((10.0 * sysTICSperSEC) + .5)
-
-
-/******************************************************************************
- *
- * Function Name: initTimebase2()
- *
- * Description:
- * Init. TB2 for 1ms interrupts.
- *
- * Calling Sequence:
- * void
- *
- * Returns:
- * void
- *
- *****************************************************************************/
-void initTimebase2(void);
-
-/******************************************************************************
- *
- * Function Name: getSysTICs()
- *
- * Description:
- * This function returns the current system time in TICs.
- *
- * Calling Sequence:
- * void
- *
- * Returns:
- * The current time in TICs
- *
- *****************************************************************************/
-u32 getSysTICs(void);
-
-/******************************************************************************
- *
- * Function Name: getElapsedSysTICs()
- *
- * Description:
- * This function then returns the difference in TICs between the
- * given starting time and the current system time.
- *
- * Calling Sequence:
- * The starting time.
- *
- * Returns:
- * The time difference.
- *
- *****************************************************************************/
-u32 getElapsedSysTICs( u32 startTime);
-
-/******************************************************************************
- *
- * Function Name: pause()
- *
- * Description:
- * This function does not return until the specified 'duration' in
- * TICs has elapsed.
- *
- * Calling Sequence:
- * duration - length of time in TICs to wait before returning
- *
- * Returns:
- * void
- *
- *****************************************************************************/
-void pause( u32 duration);
-
-#endif
Copied: trunk/firmware/arm/str/common/sysTime73x.c (from rev 842, trunk/firmware/arm/str/common/sysTime.c)
===================================================================
--- trunk/firmware/arm/str/common/sysTime73x.c (rev 0)
+++ trunk/firmware/arm/str/common/sysTime73x.c 2008-02-17 15:47:03 UTC (rev 848)
@@ -0,0 +1,127 @@
+/******************************************************************************
+ *
+ * $RCSfile: sysTime.c,v $
+ * $Revision: 1.4 $
+ *
+ * This module provides the interface routines for initializing and
+ * accessing the system timing functions.
+ * Copyright 2004, R O SoftWare
+ * No guarantees, warrantees, or promises, implied or otherwise.
+ * May be used for hobby or commercial purposes provided copyright
+ * notice remains intact.
+ *
+ *****************************************************************************/
+
+//
+// The TB2_IRQHandler handler in vectors.c must be implemented fot this to work
+// This rotine should update the sysTICs value once each millisecond.
+// Something like this is needed
+//
+// sysTICs++;
+// TB_FlagClear( TB2 );
+//
+
+#include "sysTime.h"
+
+volatile vu32 sysTICs;
+
+/******************************************************************************
+ *
+ * Function Name: initTimebase2()
+ *
+ * Description:
+ * This function initializes the TB2 for use as the system timer.
+ *
+ * Calling Sequence:
+ * void
+ *
+ * Returns:
+ * void
+ *
+ *****************************************************************************/
+void initTimebase2(void)
+{
+ TB_InitTypeDef TB_InitStructure;
+
+ sysTICs = 0;
+
+ CFG_PeripheralClockConfig( CFG_CLK_TB2, ENABLE );
+
+ // TB2 Configuration to get timbase IRQ each 1ms
+ TB_InitStructure.TB_CLK_Source = TB_CLK_INTERNAL ;
+ TB_InitStructure.TB_Prescaler = 50; // The internal TB Frequency = 160KHz
+ TB_InitStructure.TB_Preload = 160; // 160000Hz * 0.001 s = 160
+
+ TB_Init( TB2, &TB_InitStructure );
+ TB_ITConfig( TB2, ENABLE );
+
+ EIC_IRQChannelConfig( TB2_IRQChannel, ENABLE ); // Enable IRQ
+
+ TB_Cmd( TB2, ENABLE ); // Enable the timer
+}
+
+/******************************************************************************
+ *
+ * Function Name: getSysTICs()
+ *
+ * Description:
+ * This function returns the current syetem time in TICs.
+ *
+ * Calling Sequence:
+ * void
+ *
+ * Returns:
+ * The current time in TICs as represented by sysTICs
+ *
+ *****************************************************************************/
+u32 getSysTICs(void)
+{
+ return sysTICs;
+}
+
+
+/******************************************************************************
+ *
+ * Function Name: getElapsedSysTICs()
+ *
+ * Description:
+ * This function then returns the difference in TICs between the
+ * given starting time and the current system time.
+ *
+ * Calling Sequence:
+ * The starting time.
+ *
+ * Returns:
+ * The time difference.
+ *
+ *****************************************************************************/
+u32 getElapsedSysTICs( u32 startTime )
+{
+ return ( getSysTICs() - startTime );
+}
+
+
+/******************************************************************************
+ *
+ * Function Name: pause()
+ *
+ * Description:
+ * This function does not return until the specified 'duration' in
+ * TICs has elapsed.
+ *
+ * Calling Sequence:
+ * duration - length of time in TICs to wait before returning
+ *
+ * Returns:
+ * void
+ *
+ *****************************************************************************/
+void pause( u32 duration )
+{
+ u32 startTime = getSysTICs();
+
+ while ( getElapsedSysTICs( startTime ) < duration ) ;
+
+}
+
+
Copied: trunk/firmware/arm/str/common/sysTime73x.h (from rev 842, trunk/firmware/arm/str/common/sysTime.h)
===================================================================
--- trunk/firmware/arm/str/common/sysTime73x.h (rev 0)
+++ trunk/firmware/arm/str/common/sysTime73x.h 2008-02-17 15:47:03 UTC (rev 848)
@@ -0,0 +1,108 @@
+/******************************************************************************
+ *
+ * $RCSfile: sysTime.h,v $
+ * $Revision: 1.2 $
+ *
+ * This module provides the interface definitions for sysTime.c
+ * Copyright 2004, R O SoftWare
+ *
+ * Ported for STR73xF 2006 <ak...@do...>
+ *
+ * No guarantees, warrantees, or promises, implied or otherwise.
+ * May be used for hobby or commercial purposes provided copyright
+ * notice remains intact.
+ *
+ *****************************************************************************/
+#ifndef INC_SYS_TIME_H
+#define INC_SYS_TIME_H
+
+#include "73x_lib.h"
+
+// setup parameters
+#define sysTICSperSEC 1000
+
+// some helpful times for pause()
+#define ONE_MS (u32)(( 1e-3 * sysTICSperSEC) + .5)
+#define TWO_MS (u32)(( 2e-3 * sysTICSperSEC) + .5)
+#define FIVE_MS (u32)(( 5e-3 * sysTICSperSEC) + .5)
+#define TEN_MS (u32)(( 10e-3 * sysTICSperSEC) + .5)
+#define TWENTY_MS (u32)(( 20e-3 * sysTICSperSEC) + .5)
+#define THIRTY_MS (u32)(( 30e-3 * sysTICSperSEC) + .5)
+#define FIFTY_MS (u32)(( 50e-3 * sysTICSperSEC) + .5)
+#define HUNDRED_MS (u32)((100e-3 * sysTICSperSEC) + .5)
+#define ONE_FIFTY_MS (u32)((150e-3 * sysTICSperSEC) + .5)
+#define QUARTER_SEC (u32)((250e-3 * sysTICSperSEC) + .5)
+#define HALF_SEC (u32)((500e-3 * sysTICSperSEC) + .5)
+#define ONE_SEC (u32)(( 1.0 * sysTICSperSEC) + .5)
+#define TWO_SEC (u32)(( 2.0 * sysTICSperSEC) + .5)
+#define FIVE_SEC (u32)(( 5.0 * sysTICSperSEC) + .5)
+#define TEN_SEC (u32)((10.0 * sysTICSperSEC) + .5)
+
+
+/******************************************************************************
+ *
+ * Function Name: initTimebase2()
+ *
+ * Description:
+ * Init. TB2 for 1ms interrupts.
+ *
+ * Calling Sequence:
+ * void
+ *
+ * Returns:
+ * void
+ *
+ *****************************************************************************/
+void initTimebase2(void);
+
+/******************************************************************************
+ *
+ * Function Name: getSysTICs()
+ *
+ * Description:
+ * This function returns the current system time in TICs.
+ *
+ * Calling Sequence:
+ * void
+ *
+ * Returns:
+ * The current time in TICs
+ *
+ *****************************************************************************/
+u32 getSysTICs(void);
+
+/******************************************************************************
+ *
+ * Function Name: getElapsedSysTICs()
+ *
+ * Description:
+ * This function then returns the difference in TICs between the
+ * given starting time and the current system time.
+ *
+ * Calling Sequence:
+ * The starting time.
+ *
+ * Returns:
+ * The time difference.
+ *
+ *****************************************************************************/
+u32 getElapsedSysTICs( u32 startTime);
+
+/******************************************************************************
+ *
+ * Function Name: pause()
+ *
+ * Description:
+ * This function does not return until the specified 'duration' in
+ * TICs has elapsed.
+ *
+ * Calling Sequence:
+ * duration - length of time in TICs to wait before returning
+ *
+ * Returns:
+ * void
+ *
+ *****************************************************************************/
+void pause( u32 duration);
+
+#endif
Added: trunk/firmware/arm/str/common/sysTime75x.c
===================================================================
--- trunk/firmware/arm/str/common/sysTime75x.c (rev 0)
+++ trunk/firmware/arm/str/common/sysTime75x.c 2008-02-17 15:47:03 UTC (rev 848)
@@ -0,0 +1,127 @@
+/******************************************************************************
+ *
+ * $RCSfile: sysTime.c,v $
+ * $Revision: 1.4 $
+ *
+ * This module provides the interface routines for initializing and
+ * accessing the system timing functions.
+ * Copyright 2004, R O SoftWare
+ * No guarantees, warrantees, or promises, implied or otherwise.
+ * May be used for hobby or commercial purposes provided copyright
+ * notice remains intact.
+ *
+ *****************************************************************************/
+
+//
+// The TB2_IRQHandler handler in vectors.c must be implemented fot this to work
+// This rotine should update the sysTICs value once each millisecond.
+// Something like this is needed
+//
+// sysTICs++;
+// TB_FlagClear( TB2 );
+//
+
+#include "sysTime75x.h"
+
+volatile vu32 sysTICs;
+
+/******************************************************************************
+ *
+ * Function Name: initTimebase2()
+ *
+ * Description:
+ * This function initializes the TB2 for use as the system timer.
+ *
+ * Calling Sequence:
+ * void
+ *
+ * Returns:
+ * void
+ *
+ *****************************************************************************/
+void initTimebase2(void)
+{
+ TB_InitTypeDef TB_InitStructure;
+
+ sysTICs = 0;
+
+ CFG_PeripheralClockConfig( CFG_CLK_TB2, ENABLE );
+
+ // TB2 Configuration to get timbase IRQ each 1ms
+ TB_InitStructure.TB_CLK_Source = TB_CLK_INTERNAL ;
+ TB_InitStructure.TB_Prescaler = 50; // The internal TB Frequency = 160KHz
+ TB_InitStructure.TB_Preload = 160; // 160000Hz * 0.001 s = 160
+
+ TB_Init( TB2, &TB_InitStructure );
+ TB_ITConfig( TB2, ENABLE );
+
+ EIC_IRQChannelConfig( TB2_IRQChannel, ENABLE ); // Enable IRQ
+
+ TB_Cmd( TB2, ENABLE ); // Enable the timer
+}
+
+/******************************************************************************
+ *
+ * Function Name: getSysTICs()
+ *
+ * Description:
+ * This function returns the current syetem time in TICs.
+ *
+ * Calling Sequence:
+ * void
+ *
+ * Returns:
+ * The current time in TICs as represented by sysTICs
+ *
+ *****************************************************************************/
+u32 getSysTICs(void)
+{
+ return sysTICs;
+}
+
+
+/******************************************************************************
+ *
+ * Function Name: getElapsedSysTICs()
+ *
+ * Description:
+ * This function then returns the difference in TICs between the
+ * given starting time and the current system time.
+ *
+ * Calling Sequence:
+ * The starting time.
+ *
+ * Returns:
+ * The time difference.
+ *
+ *****************************************************************************/
+u32 getElapsedSysTICs( u32 startTime )
+{
+ return ( getSysTICs() - startTime );
+}
+
+
+/******************************************************************************
+ *
+ * Function Name: pause()
+ *
+ * Description:
+ * This function does not return until the specified 'duration' in
+ * TICs has elapsed.
+ *
+ * Calling Sequence:
+ * duration - length of time in TICs to wait before returning
+ *
+ * Returns:
+ * void
+ *
+ *****************************************************************************/
+void pause( u32 duration )
+{
+ u32 startTime = getSysTICs();
+
+ while ( getElapsedSysTICs( startTime ) < duration ) ;
+
+}
+
+
Added: trunk/firmware/arm/str/common/sysTime75x.h
===================================================================
--- trunk/firmware/arm/str/common/sysTime75x.h (rev 0)
+++ trunk/firmware/arm/str/common/sysTime75x.h 2008-02-17 15:47:03 UTC (rev 848)
@@ -0,0 +1,108 @@
+/******************************************************************************
+ *
+ * $RCSfile: sysTime.h,v $
+ * $Revision: 1.2 $
+ *
+ * This module provides the interface definitions for sysTime.c
+ * Copyright 2004, R O SoftWare
+ *
+ * Ported for STR73xF 2006 <ak...@do...>
+ *
+ * No guarantees, warrantees, or promises, implied or otherwise.
+ * May be used for hobby or commercial purposes provided copyright
+ * notice remains intact.
+ *
+ *****************************************************************************/
+#ifndef INC_SYS_TIME_H
+#define INC_SYS_TIME_H
+
+#include "75x_lib.h"
+
+// setup parameters
+#define sysTICSperSEC 1000
+
+// some helpful times for pause()
+#define ONE_MS (u32)(( 1e-3 * sysTICSperSEC) + .5)
+#define TWO_MS (u32)(( 2e-3 * sysTICSperSEC) + .5)
+#define FIVE_MS (u32)(( 5e-3 * sysTICSperSEC) + .5)
+#define TEN_MS (u32)(( 10e-3 * sysTICSperSEC) + .5)
+#define TWENTY_MS (u32)(( 20e-3 * sysTICSperSEC) + .5)
+#define THIRTY_MS (u32)(( 30e-3 * sysTICSperSEC) + .5)
+#define FIFTY_MS (u32)(( 50e-3 * sysTICSperSEC) + .5)
+#define HUNDRED_MS (u32)((100e-3 * sysTICSperSEC) + .5)
+#define ONE_FIFTY_MS (u32)((150e-3 * sysTICSperSEC) + .5)
+#define QUARTER_SEC (u32)((250e-3 * sysTICSperSEC) + .5)
+#define HALF_SEC (u32)((500e-3 * sysTICSperSEC) + .5)
+#define ONE_SEC (u32)(( 1.0 * sysTICSperSEC) + .5)
+#define TWO_SEC (u32)(( 2.0 * sysTICSperSEC) + .5)
+#define FIVE_SEC (u32)(( 5.0 * sysTICSperSEC) + .5)
+#define TEN_SEC (u32)((10.0 * sysTICSperSEC) + .5)
+
+
+/******************************************************************************
+ *
+ * Function Name: initTimebase2()
+ *
+ * Description:
+ * Init. TB2 for 1ms interrupts.
+ *
+ * Calling Sequence:
+ * void
+ *
+ * Returns:
+ * void
+ *
+ *****************************************************************************/
+void initTimebase2(void);
+
+/******************************************************************************
+ *
+ * Function Name: getSysTICs()
+ *
+ * Description:
+ * This function returns the current system time in TICs.
+ *
+ * Calling Sequence:
+ * void
+ *
+ * Returns:
+ * The current time in TICs
+ *
+ *****************************************************************************/
+u32 getSysTICs(void);
+
+/******************************************************************************
+ *
+ * Function Name: getElapsedSysTICs()
+ *
+ * Description:
+ * This function then returns the difference in TICs between the
+ * given starting time and the current system time.
+ *
+ * Calling Sequence:
+ * The starting time.
+ *
+ * Returns:
+ * The time difference.
+ *
+ *****************************************************************************/
+u32 getElapsedSysTICs( u32 startTime);
+
+/******************************************************************************
+ *
+ * Function Name: pause()
+ *
+ * Description:
+ * This function does not return until the specified 'duration' in
+ * TICs has elapsed.
+ *
+ * Calling Sequence:
+ * duration - length of time in TICs to wait before returning
+ *
+ * Returns:
+ * void
+ *
+ *****************************************************************************/
+void pause( u32 duration);
+
+#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ak...@us...> - 2008-02-17 16:44:20
|
Revision: 852
http://can.svn.sourceforge.net/can/?rev=852&view=rev
Author: akhe
Date: 2008-02-17 08:44:13 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
Added str USB library code
Added Paths:
-----------
trunk/firmware/arm/str/common/usblib/
trunk/firmware/arm/str/common/usblib/inc/
trunk/firmware/arm/str/common/usblib/inc/usb_core.h
trunk/firmware/arm/str/common/usblib/inc/usb_def.h
trunk/firmware/arm/str/common/usblib/inc/usb_init.h
trunk/firmware/arm/str/common/usblib/inc/usb_int.h
trunk/firmware/arm/str/common/usblib/inc/usb_lib.h
trunk/firmware/arm/str/common/usblib/inc/usb_mem.h
trunk/firmware/arm/str/common/usblib/inc/usb_regs.h
trunk/firmware/arm/str/common/usblib/inc/usb_type.h
trunk/firmware/arm/str/common/usblib/src/
trunk/firmware/arm/str/common/usblib/src/usb_core.c
trunk/firmware/arm/str/common/usblib/src/usb_init.c
trunk/firmware/arm/str/common/usblib/src/usb_int.c
trunk/firmware/arm/str/common/usblib/src/usb_mem.c
trunk/firmware/arm/str/common/usblib/src/usb_regs.c
Added: trunk/firmware/arm/str/common/usblib/inc/usb_core.h
===================================================================
--- trunk/firmware/arm/str/common/usblib/inc/usb_core.h (rev 0)
+++ trunk/firmware/arm/str/common/usblib/inc/usb_core.h 2008-02-17 16:44:13 UTC (rev 852)
@@ -0,0 +1,236 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_core.h
+* Author : MCD Application Team
+* Date First Issued : 10/27/2003 : V1.0
+* Description : Standard protocol processing functions prototypes
+********************************************************************************
+* History:
+* 09/18/2006 : V3.0
+* 09/01/2006 : V2.0
+* 10/27/2003 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_CORE_H
+#define __USB_CORE_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+typedef enum _CONTROL_STATE {
+ WAIT_SETUP, /* 0 */
+ SETTING_UP, /* 1 */
+ IN_DATA, /* 2 */
+ OUT_DATA, /* 3 */
+ LAST_IN_DATA, /* 4 */
+ LAST_OUT_DATA, /* 5 */
+ WAIT_STATUS_IN, /* 7 */
+ WAIT_STATUS_OUT, /* 8 */
+ STALLED, /* 9 */
+ PAUSE /* 10 */
+} CONTROL_STATE; /* The state machine states of a control pipe */
+
+typedef struct OneDescriptor {
+ u8 *Descriptor;
+ u16 Descriptor_Size;
+} ONE_DESCRIPTOR, *PONE_DESCRIPTOR;
+/* All the request process routines return a value of this type
+ If the return value is not SUCCESS or NOT_READY,
+ the software will STALL the correspond endpoint
+*/
+typedef enum _RESULT {
+ USB_SUCCESS = 0, /* Process sucessfully */
+ USB_ERROR,
+ USB_UNSUPPORT,
+ USB_NOT_READY /* The process has not been finished, */
+ /* endpoint will be NAK to further rquest */
+} RESULT;
+
+
+/*-*-*-*-*-*-*-*-*-*-* Definitions for endpoint level -*-*-*-*-*-*-*-*-*-*-*-*/
+
+typedef struct _ENDPOINT_INFO {
+ /*
+ When send data out of the device,
+ CopyData() is used to get data buffer 'Length' bytes data
+ if Length is 0,
+ CopyData() returns the total length of the data
+ if the request is not supported, returns 0
+ (NEW Feature )
+ if CopyData() returns -1, the calling routine should not proceed
+ further and will resume the SETUP process by the class device
+ if Length is not 0,
+ CopyData() returns a pointer to indicate the data location
+ Usb_wLength is the data remain to be sent,
+ Usb_wOffset is the Offset of original data
+ When receive data from the host,
+ CopyData() is used to get user data buffer which is capable
+ of Length bytes data to copy data from the endpoint buffer.
+ if Length is 0,
+ CopyData() returns the available data length,
+ if Length is not 0,
+ CopyData() returns user buffer address
+ Usb_rLength is the data remain to be received,
+ Usb_rPointer is the Offset of data buffer
+ */
+ u16 Usb_wLength;
+ u16 Usb_wOffset;
+ u16 PacketSize;
+ u8 *(*CopyData)(u16 Length);
+} ENDPOINT_INFO;
+
+/*-*-*-*-*-*-*-*-*-*-*-* Definitions for device level -*-*-*-*-*-*-*-*-*-*-*-*/
+
+typedef struct _DEVICE {
+ u8 Total_Endpoint; /* Number of endpoints that are used */
+ u8 Total_Configuration;/* Number of configuration available */
+} DEVICE;
+
+typedef union {
+ u16 w;
+ struct BW {
+ u8 bb1;
+ u8 bb0;
+ } bw;
+} u16_u8;
+
+typedef struct _DEVICE_INFO {
+ u8 USBbmRequestType; /* bmRequestType */
+ u8 USBbRequest; /* bRequest */
+ u16_u8 USBwValues; /* wValue */
+ u16_u8 USBwIndexs; /* wIndex */
+ u16_u8 USBwLengths; /* wLength */
+
+ u8 ControlState; /* of type CONTROL_STATE */
+ u8 Current_Feature;
+
+ u8 Current_Configuration; /* Selected configuration */
+ u8 Current_Interface; /* Selected interface of current configuration */
+ u8 Current_AlternateSetting;/* Selected Alternate Setting of current interface*/
+
+ ENDPOINT_INFO Ctrl_Info;
+} DEVICE_INFO;
+
+typedef struct _DEVICE_PROP {
+ void (*Init)(void); /* Initialize the device */
+ void (*Reset)(void); /* Reset routine of this device */
+
+ /* Device dependent process after the status stage */
+ void (*Process_Status_IN)(void);
+ void (*Process_Status_OUT)(void);
+
+ /* Procedure of process on setup stage of a class specified request with data stage */
+ /* All class specified requests with data stage are processed in Class_Data_Setup
+ Class_Data_Setup()
+ responses to check all special requests and fills ENDPOINT_INFO
+ according to the request
+ If IN tokens are expected, then wLength & wOffset will be filled
+ with the total transferring bytes and the starting position
+ If OUT tokens are expected, then rLength & rOffset will be filled
+ with the total expected bytes and the starting position in the buffer
+
+ If the request is valid, Class_Data_Setup returns SUCCESS, else UNSUPPORT
+
+ CAUTION:
+ Since GET_CONFIGURATION & GET_INTERFACE are highly related to
+ the individual classes, they will be checked and processed here.
+ */
+ RESULT (*Class_Data_Setup)(u8 RequestNo);
+
+ /* Procedure of process on setup stage of a class specified request without data stage */
+ /* All class specified requests without data stage are processed in Class_NoData_Setup
+ Class_NoData_Setup
+ responses to check all special requests and perform the request
+
+ CAUTION:
+ Since SET_CONFIGURATION & SET_INTERFACE are highly related to
+ the individual classes, they will be checked and processed here.
+ */
+ RESULT (*Class_NoData_Setup)(u8 RequestNo);
+
+ /*Class_Get_Interface_Setting
+ This function is used by the file usb_core.c to test if the selected Interface
+ and Alternate Setting (u8 Interface, u8 AlternateSetting) are supported by
+ the application.
+ This function is writing by user. It should return "SUCCESS" if the Interface
+ and Alternate Setting are supported by the application or "UNSUPPORT" if they
+ are not supported. */
+
+ RESULT (*Class_Get_Interface_Setting)(u8 Interface,u8 AlternateSetting);
+
+ u8* (*GetDeviceDescriptor)(u16 Length);
+ u8* (*GetConfigDescriptor)(u16 Length);
+ u8* (*GetStringDescriptor)(u16 Length);
+
+ u8* RxEP_buffer;
+ u8 MaxPacketSize;
+
+} DEVICE_PROP;
+
+typedef struct _USER_STANDARD_REQUESTS {
+ void (*User_GetConfiguration)(void); /* Get Configuration */
+ void (*User_SetConfiguration)(void); /* Set Configuration */
+ void (*User_GetInterface)(void);
+ void (*User_SetInterface)(void);
+ void (*User_GetStatus)(void);
+ void (*User_ClearFeature)(void);
+ void (*User_SetEndPointFeature)(void);
+ void (*User_SetDeviceFeature)(void);
+ void (*User_SetDeviceAddress)(void);
+} USER_STANDARD_REQUESTS;
+
+
+
+
+/* Exported constants --------------------------------------------------------*/
+#define Type_Recipient (pInformation->USBbmRequestType & (REQUEST_TYPE | RECIPIENT))
+
+#define Usb_rLength Usb_wLength
+#define Usb_rOffset Usb_wOffset
+
+#define USBwValue USBwValues.w
+#define USBwValue0 USBwValues.bw.bb0
+#define USBwValue1 USBwValues.bw.bb1
+#define USBwIndex USBwIndexs.w
+#define USBwIndex0 USBwIndexs.bw.bb0
+#define USBwIndex1 USBwIndexs.bw.bb1
+#define USBwLength USBwLengths.w
+#define USBwLength0 USBwLengths.bw.bb0
+#define USBwLength1 USBwLengths.bw.bb1
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+u8 Setup0_Process(void);
+u8 Post0_Process(void);
+u8 Out0_Process(void);
+u8 In0_Process(void);
+
+RESULT Standard_SetEndPointFeature(void);
+RESULT Standard_SetDeviceFeature(void);
+
+u8 *Standard_GetConfiguration(u16 Length);
+RESULT Standard_SetConfiguration(void);
+u8 *Standard_GetInterface(u16 Length);
+RESULT Standard_SetInterface(void);
+u8 *Standard_GetDescriptorData(u16 Length, PONE_DESCRIPTOR pDesc);
+
+u8 *Standard_GetStatus(u16 Length);
+RESULT Standard_ClearFeature(void);
+void SetDeviceAddress(u8);
+void NOP_Process(void);
+
+extern DEVICE_PROP Device_Property;
+extern USER_STANDARD_REQUESTS User_Standard_Requests;
+extern DEVICE Device_Table;
+extern DEVICE_INFO Device_Info;
+
+/* cells saving status during interrupt servicing */
+extern u16 SaveRState;
+extern u16 SaveTState;
+#endif /* __USB_CORE_H */
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/common/usblib/inc/usb_def.h
===================================================================
--- trunk/firmware/arm/str/common/usblib/inc/usb_def.h (rev 0)
+++ trunk/firmware/arm/str/common/usblib/inc/usb_def.h 2008-02-17 16:44:13 UTC (rev 852)
@@ -0,0 +1,78 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_def.h
+* Author : MCD Application Team
+* Date First Issued : 10/27/2003 : V1.0
+* Description : Definitions related to USB Core
+********************************************************************************
+* History:
+* 09/18/2006 : V3.0
+* 09/01/2006 : V2.0
+* 10/27/2003 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_DEF_H
+#define __USB_DEF_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+typedef enum _RECIPIENT_TYPE {
+ DEVICE_RECIPIENT, /* Recipient device */
+ INTERFACE_RECIPIENT, /* Recipient interface */
+ ENDPOINT_RECIPIENT, /* Recipient endpoint */
+ OTHER_RECIPIENT
+} RECIPIENT_TYPE;
+
+
+typedef enum _STANDARD_REQUESTS {
+ GET_STATUS = 0,
+ CLEAR_FEATURE,
+ RESERVED1,
+ SET_FEATURE,
+ RESERVED2,
+ SET_ADDRESS,
+ GET_DESCRIPTOR,
+ SET_DESCRIPTOR,
+ GET_CONFIGURATION,
+ SET_CONFIGURATION,
+ GET_INTERFACE,
+ SET_INTERFACE,
+ TOTAL_sREQUEST, /* Total number of Standard request */
+ SYNCH_FRAME = 12
+} STANDARD_REQUESTS;
+
+/* Definition of "USBwValue" */
+typedef enum _DESCRIPTOR_TYPE {
+ DEVICE_DESCRIPTOR = 1,
+ CONFIG_DESCRIPTOR,
+ STRING_DESCRIPTOR,
+ INTERFACE_DESCRIPTOR,
+ ENDPOINT_DESCRIPTOR
+} DESCRIPTOR_TYPE;
+
+/* Feature selector of a SET_FEATURE or CLEAR_FEATURE */
+typedef enum _FEATURE_SELECTOR {
+ ENDPOINT_STALL,
+ DEVICE_REMOTE_WAKEUP
+} FEATURE_SELECTOR;
+
+/* Exported constants --------------------------------------------------------*/
+
+/* Definition of "USBbmRequestType" */
+#define REQUEST_TYPE 0x60 /* Mask to get request type */
+#define STANDARD_REQUEST 0x00 /* Standard request */
+#define CLASS_REQUEST 0x20 /* Class request */
+#define VENDOR_REQUEST 0x40 /* Vendor request */
+
+#define RECIPIENT 0x1F /* Mask to get recipient */
+
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+#endif /* __USB_DEF_H */
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/common/usblib/inc/usb_init.h
===================================================================
--- trunk/firmware/arm/str/common/usblib/inc/usb_init.h (rev 0)
+++ trunk/firmware/arm/str/common/usblib/inc/usb_init.h 2008-02-17 16:44:13 UTC (rev 852)
@@ -0,0 +1,51 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_init.h
+* Author : MCD Application Team
+* Date First Issued : 10/27/2003 : V1.0
+* Description : Initialization routines & global variables
+********************************************************************************
+* History:
+* 09/18/2006 : V3.0
+* 09/01/2006 : V2.0
+* 10/27/2003 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_INIT_H
+#define __USB_INIT_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+void USB_Init(void);
+/* External variables --------------------------------------------------------*/
+
+/* The number of current endpoint, it will be used to specify an endpoint */
+extern u8 EPindex;
+/* The number of current device, it is an index to the Device_Table */
+/*extern u8 Device_no; */
+/* Points to the DEVICE_INFO structure of current device */
+/* The purpose of this register is to speed up the execution */
+extern DEVICE_INFO* pInformation;
+/* Points to the DEVICE_PROP structure of current device */
+/* The purpose of this register is to speed up the execution */
+extern DEVICE_PROP* pProperty;
+/* Temporary save the state of Rx & Tx status. */
+/* Whenever the Rx or Tx state is changed, its value is saved */
+/* in this variable first and will be set to the EPRB or EPRA */
+/* at the end of interrupt process */
+extern USER_STANDARD_REQUESTS *pUser_Standard_Requests;
+
+extern u16 SaveState ;
+extern u16 wInterrupt_Mask;
+#endif /* __USB_INIT_H */
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
+
Added: trunk/firmware/arm/str/common/usblib/inc/usb_int.h
===================================================================
--- trunk/firmware/arm/str/common/usblib/inc/usb_int.h (rev 0)
+++ trunk/firmware/arm/str/common/usblib/inc/usb_int.h 2008-02-17 16:44:13 UTC (rev 852)
@@ -0,0 +1,32 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_int.h
+* Author : MCD Application Team
+* Date First Issued : 10/27/2003 : V1.0
+* Description : Endpoint CTR (Low and High) interrupt's service routines
+* prototypes
+********************************************************************************
+* History:
+* 09/18/2006 : V3.0
+* 09/01/2006 : V2.0
+* 10/27/2003 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_INT_H
+#define __USB_INT_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+void CTR_LP(void);
+void CTR_HP(void);
+/* External variables --------------------------------------------------------*/
+#endif /* __USB_INT_H */
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/common/usblib/inc/usb_lib.h
===================================================================
--- trunk/firmware/arm/str/common/usblib/inc/usb_lib.h (rev 0)
+++ trunk/firmware/arm/str/common/usblib/inc/usb_lib.h 2008-02-17 16:44:13 UTC (rev 852)
@@ -0,0 +1,38 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_lib.h
+* Author : MCD Application Team
+* Date First Issued : 10/27/2003 : V1.0
+* Description : USB library include files
+********************************************************************************
+* History:
+* 09/18/2006 : V3.0
+* 09/01/2006 : V2.0
+* 10/27/2003 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_LIB_H
+#define __USB_LIB_H
+/* Includes ------------------------------------------------------------------*/
+#include "usb_type.h"
+#include "usb_regs.h"
+#include "usb_def.h"
+#include "usb_core.h"
+#include "usb_init.h"
+#include "usb_mem.h"
+#include "usb_int.h"
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+/* External variables --------------------------------------------------------*/
+#endif /* __USB_LIB_H */
+
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/common/usblib/inc/usb_mem.h
===================================================================
--- trunk/firmware/arm/str/common/usblib/inc/usb_mem.h (rev 0)
+++ trunk/firmware/arm/str/common/usblib/inc/usb_mem.h 2008-02-17 16:44:13 UTC (rev 852)
@@ -0,0 +1,35 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_mem.h
+* Author : MCD Application Team
+* Date First Issued : 10/27/2003 : V1.0
+* Description : Utility prototypes functions for memory/PMA transfers
+********************************************************************************
+* History:
+* 09/18/2006 : V3.0
+* 09/01/2006 : V2.0
+* 10/27/2003 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_MEM_H
+#define __USB_MEM_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+void UserToPMABufferCopy(u8 *pbUsrBuf,u16 wPMABufAddr, u16 wNBytes);
+void PMAToUserBufferCopy(u8 *pbUsrBuf,u16 wPMABufAddr, u16 wNBytes);
+/* External variables --------------------------------------------------------*/
+
+#endif /*__USB_MEM_H*/
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
+
Added: trunk/firmware/arm/str/common/usblib/inc/usb_regs.h
===================================================================
--- trunk/firmware/arm/str/common/usblib/inc/usb_regs.h (rev 0)
+++ trunk/firmware/arm/str/common/usblib/inc/usb_regs.h 2008-02-17 16:44:13 UTC (rev 852)
@@ -0,0 +1,724 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_regs.h
+* Author : MCD Application Team
+* Date First Issued : 10/27/2003 : V1.0
+* Description : Interface prototype functions to USB cell registers
+********************************************************************************
+* History:
+* 09/18/2006 : V3.0
+* 09/01/2006 : V2.0
+* 10/27/2003 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_REGS_H
+#define __USB_REGS_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+
+typedef enum _EP_DBUF_DIR{ /* double buffered endpoint direction */
+ EP_DBUF_ERR,
+ EP_DBUF_OUT,
+ EP_DBUF_IN
+}EP_DBUF_DIR;
+
+/* endpoint buffer number */
+enum EP_BUF_NUM{
+ EP_NOBUF,
+ EP_BUF0,
+ EP_BUF1
+};
+
+/* Exported constants --------------------------------------------------------*/
+#ifdef STR7xx
+
+ #ifdef STR71x /*STR71x family*/
+ #define RegBase (0xC0008800L) /* USB_IP Peripheral Registers base address */
+ #define PMAAddr (0xC0008000L) /* USB_IP Packet Memory Area base address */
+ #endif /*end of STR71x family*/
+
+ #ifdef STR75x /*STR75x family*/
+ #define RegBase (0xFFFFA800L) /* USB_IP Peripheral Registers base address */
+ #define PMAAddr (0xFFFFA000L) /* USB_IP Packet Memory Area base address */
+ #endif /*end of STR75x family*/
+
+#endif /*end of STR7xx family*/
+
+#ifdef STR91x /*STR91x family*/
+
+ #ifdef STR91x_USB_BUFFERED
+ #define RegBase (0x60000800L) /* USB_IP Peripheral Registers base address */
+ #define PMAAddr (0x60000000L) /* USB_IP Packet Memory Area base address */
+ #endif
+
+ #ifdef STR91x_USB_NON_BUFFERED
+ #define RegBase (0x70000800L) /* USB_IP Peripheral Registers base address */
+ #define PMAAddr (0x70000000L) /* USB_IP Packet Memory Area base address */
+ #endif
+#endif
+
+/* General registers */
+#define CNTR ((volatile unsigned *)(RegBase + 0x40)) /* Control register */
+#define ISTR ((volatile unsigned *)(RegBase + 0x44)) /* Interrupt status register */
+#define FNR ((volatile unsigned *)(RegBase + 0x48)) /* Frame number register */
+#define DADDR ((volatile unsigned *)(RegBase + 0x4C)) /* Device address register */
+#define BTABLE ((volatile unsigned *)(RegBase + 0x50)) /* Buffer Table address register */
+
+#ifdef STR91x /*STR91x family DMA registers*/
+
+#define DMACR1 ((volatile unsigned *)(RegBase + 0x54)) /* DMA control register 1 */
+#define DMACR2 ((volatile unsigned *)(RegBase + 0x58)) /* DMA control register 2 */
+#define DMACR3 ((volatile unsigned *)(RegBase + 0x5C)) /* DMA control register 3 */
+#define DMABSIZE ((volatile unsigned *)(RegBase + 0x60))/* DMA burst size register */
+#define DMALLI ((volatile unsigned *)(RegBase + 0x64)) /* DMA LLI register */
+
+#endif
+
+/* Endpoint registers */
+#define EP0REG ((volatile unsigned *)(RegBase)) /* endpoint 0 register address */
+/* endpoints enumeration */
+#define ENDP0 ((u8)0)
+#define ENDP1 ((u8)1)
+#define ENDP2 ((u8)2)
+#define ENDP3 ((u8)3)
+#define ENDP4 ((u8)4)
+#define ENDP5 ((u8)5)
+#define ENDP6 ((u8)6)
+#define ENDP7 ((u8)7) /* Only 8 endpoints for STR75x Family */
+#define ENDP8 ((u8)8)
+#define ENDP9 ((u8)9) /* Only 10 endpoints for STR91x Family */
+#define ENDP10 ((u8)10)
+#define ENDP11 ((u8)11)
+#define ENDP12 ((u8)12)
+#define ENDP13 ((u8)13)
+#define ENDP14 ((u8)14)
+#define ENDP15 ((u8)15)
+
+/*******************************************************************************/
+/* ISTR interrupt events */
+/*******************************************************************************/
+#define ISTR_CTR (0x8000) /* Correct TRansfer (clear-only bit) */
+#define ISTR_DOVR (0x4000) /* DMA OVeR/underrun (clear-only bit) */
+#define ISTR_ERR (0x2000) /* ERRor (clear-only bit) */
+#define ISTR_WKUP (0x1000) /* WaKe UP (clear-only bit) */
+#define ISTR_SUSP (0x0800) /* SUSPend (clear-only bit) */
+#define ISTR_RESET (0x0400) /* RESET (clear-only bit) */
+#define ISTR_SOF (0x0200) /* Start Of Frame (clear-only bit) */
+#define ISTR_ESOF (0x0100) /* Expected Start Of Frame (clear-only bit) */
+
+#ifdef STR91x /*STR91x family*/
+#define ISTR_SZDPR (0x0080) /* Short or Zero-Length Received Data Packet */
+#endif
+
+#define ISTR_DIR (0x0010) /* DIRection of transaction (read-only bit) */
+#define ISTR_EP_ID (0x000F) /* EndPoint IDentifier (read-only bit) */
+
+#define CLR_CTR (~ISTR_CTR) /* clear Correct TRansfer bit */
+#define CLR_DOVR (~ISTR_DOVR) /* clear DMA OVeR/underrun bit*/
+#define CLR_ERR (~ISTR_ERR) /* clear ERRor bit */
+#define CLR_WKUP (~ISTR_WKUP) /* clear WaKe UP bit */
+#define CLR_SUSP (~ISTR_SUSP) /* clear SUSPend bit */
+#define CLR_RESET (~ISTR_RESET) /* clear RESET bit */
+#define CLR_SOF (~ISTR_SOF) /* clear Start Of Frame bit */
+#define CLR_ESOF (~ISTR_ESOF) /* clear Expected Start Of Frame bit */
+
+#ifdef STR91x /*STR91x family*/
+#define CLR_SZDPR (~ISTR_SZDPR)/* clear SZDPR bit */
+#endif
+
+/*******************************************************************************/
+/* CNTR control register bits definitions */
+/*******************************************************************************/
+#define CNTR_CTRM (0x8000) /* Correct TRansfer Mask */
+#define CNTR_DOVRM (0x4000) /* DMA OVeR/underrun Mask */
+#define CNTR_ERRM (0x2000) /* ERRor Mask */
+#define CNTR_WKUPM (0x1000) /* WaKe UP Mask */
+#define CNTR_SUSPM (0x0800) /* SUSPend Mask */
+#define CNTR_RESETM (0x0400) /* RESET Mask */
+#define CNTR_SOFM (0x0200) /* Start Of Frame Mask */
+#define CNTR_ESOFM (0x0100) /* Expected Start Of Frame Mask */
+
+#ifdef STR91x /*STR91x family*/
+#define CNTR_SZDPRM (0x0080) /* Short or Zero-Length Received Data Packet Mask*/
+#endif
+
+#define CNTR_RESUME (0x0010) /* RESUME request */
+#define CNTR_FSUSP (0x0008) /* Force SUSPend */
+#define CNTR_LPMODE (0x0004) /* Low-power MODE */
+#define CNTR_PDWN (0x0002) /* Power DoWN */
+#define CNTR_FRES (0x0001) /* Force USB RESet */
+
+/************************...
[truncated message content] |