Browse Source

RRRrrrrr!

Alexander M Gladtsin 4 years ago
parent
commit
2e647868b8
35 changed files with 29889 additions and 15364 deletions
  1. 0 34
      STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/Makefile
  2. 0 31
      STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/SysTick/TimeBase1/Makefile
  3. 0 173
      STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/SysTick/TimeBase1/main.c
  4. 0 38
      STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/SysTick/TimeBase1/main.h
  5. 0 101
      STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/SysTick/TimeBase1/readme.txt
  6. 0 77
      STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/SysTick/TimeBase1/stm32f10x_conf.h
  7. 0 169
      STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/SysTick/TimeBase1/stm32f10x_it.c
  8. 0 46
      STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/SysTick/TimeBase1/stm32f10x_it.h
  9. 0 1094
      STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/SysTick/TimeBase1/system_stm32f10x.c
  10. 0 173
      STM32F10x_StdPeriph_Lib_V3.5.0/Utilities/STM32_EVAL/main.c
  11. BIN
      stm32f1_02/build/main.o
  12. BIN
      stm32f1_02/build/startup_stm32f10x_ld.o
  13. 0 118
      stm32f1_02/inc/fonts.h
  14. 0 277
      stm32f1_02/inc/stm3210c_eval.h
  15. 0 537
      stm32f1_02/inc/stm3210c_eval_ioe.h
  16. 0 379
      stm32f1_02/inc/stm3210c_eval_lcd.h
  17. 0 368
      stm32f1_02/inc/stm32_eval.h
  18. 0 201
      stm32f1_02/inc/stm32_eval_i2c_ee.h
  19. 0 173
      stm32f1_02/inc/stm32_eval_i2c_tsensor.h
  20. 0 397
      stm32f1_02/inc/stm32_eval_sdio_sd.h
  21. 0 151
      stm32f1_02/inc/stm32_eval_spi_flash.h
  22. 0 280
      stm32f1_02/inc/stm32_eval_spi_sd.h
  23. 0 997
      stm32f1_02/lib/fonts.c
  24. 0 604
      stm32f1_02/lib/stm3210c_eval.c
  25. 0 1594
      stm32f1_02/lib/stm3210c_eval_ioe.c
  26. 0 1407
      stm32f1_02/lib/stm3210c_eval_lcd.c
  27. 0 120
      stm32f1_02/lib/stm32_eval.c
  28. 0 854
      stm32f1_02/lib/stm32_eval_i2c_ee.c
  29. 0 977
      stm32f1_02/lib/stm32_eval_i2c_tsensor.c
  30. 0 2502
      stm32f1_02/lib/stm32_eval_sdio_sd.c
  31. 0 541
      stm32f1_02/lib/stm32_eval_spi_flash.c
  32. 0 901
      stm32f1_02/lib/stm32_eval_spi_sd.c
  33. 495 50
      stm32f1_02/main.c
  34. 10 0
      stm32f1_02/main.h
  35. 29384 0
      stm32f1_02/megacode.c

+ 0 - 34
STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/Makefile

@@ -1,34 +0,0 @@
-CC=arm-none-eabi-gcc
-AR=arm-none-eabi-ar
-
-###########################################
-
-vpath %.c STM32F10x_StdPeriph_Driver/src
-
-CFLAGS ?= -g -Os -Wall -flto
-CFLAGS += -mlittle-endian -mthumb -mcpu=cortex-m0 -march=armv6s-m
-CFLAGS += -ffreestanding -nostdlib
-CFLAGS += -includestm32f10x_conf.h -ICMSIS/Include -ICMSIS/Device/ST/STM32F10x/Include -ISTM32F10x_StdPeriph_Driver/inc
-
-
-SRCS = stm32f10x_adc.c stm32f10x_cec.c stm32f10x_comp.c stm32f10x_crc.c \
-	stm32f10x_dac.c stm32f10x_dbgmcu.c stm32f10x_dma.c stm32f10x_exti.c \
-	stm32f10x_flash.c stm32f10x_gpio.c stm32f10x_i2c.c stm32f10x_iwdg.c \
-	stm32f10x_misc.c stm32f10x_pwr.c stm32f10x_rcc.c stm32f10x_rtc.c \
-	stm32f10x_spi.c stm32f10x_syscfg.c stm32f10x_tim.c \
-	stm32f10x_usart.c stm32f10x_wwdg.c
-
-OBJS = $(SRCS:.c=.o)
-
-.PHONY: libstm32f10.a
-
-all: libstm32f10.a
-
-%.o : %.c
-	$(CC) $(CFLAGS) -c -o $@ $^
-
-libstm32f10.a: $(OBJS)
-	$(AR) -r $@ $(OBJS)
-
-clean:
-	rm -f $(OBJS) libstm32f10.a

+ 0 - 31
STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/SysTick/TimeBase1/Makefile

@@ -1,31 +0,0 @@
-CC      = arm-none-eabi-gcc
-LD      = arm-none-eabi-gcc -v
-CP      = arm-none-eabi-objcopy
-OD      = arm-none-eabi-objdump
-
-CFLAGS  =  -I./ -I./lib -I./inc -c -fno-common -O0 -g -mcpu=cortex-m0 -mthumb 
-LFLAGS  = -Tstm32f0.ld -nostartfiles
-ODFLAGS = -S
-AR+= -rcs
-
-all: test
-
-clean: -rm build/main.lst build/startup_stm32f0xx.o build/main.o build/main.elf build/main.lst build/main.bin
-
-test: main.elf 
-	@ echo "...copying"
-	$(CP) -O binary build/main.elf build/main.bin
-	$(CP) -O ihex build/main.elf build/main.hex
-	$(OD) $(ODFLAGS) build/main.elf > build/main.lst
-
-main.elf: main.o startup.o STM32F030F4P6_flash.ld
-	@ echo "..linking"
-	$(LD) $(LFLAGS) -o build/main.elf build/main.o build/startup_stm32f0xx.o
-
-main.o: source/main.c
-	@ echo ".compiling"
-	$(CC) $(CFLAGS) source/main.c -o build/main.o
-
-startup.o: source/startup_stm32f0xx.s
-	@ echo ".compiling"
-	$(CC) $(CFLAGS) source/startup_stm32f0xx.s -o build/startup_stm32f0xx.o

+ 0 - 173
STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/SysTick/TimeBase1/main.c

@@ -1,173 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    SysTick/TimeBase/main.c 
-  * @author  MCD Application Team
-  * @version V3.5.0
-  * @date    08-April-2011
-  * @brief   Main program body.
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE 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 FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
-  ******************************************************************************
-  */ 
-
-/* Includes ------------------------------------------------------------------*/
-#include "main.h"
-
-/** @addtogroup STM32F10x_StdPeriph_Examples
-  * @{
-  */
-
-/** @addtogroup SysTick_TimeBase
-  * @{
-  */ 
-
-/* Private typedef -----------------------------------------------------------*/
-/* Private define ------------------------------------------------------------*/
-/* Private macro -------------------------------------------------------------*/
-/* Private variables ---------------------------------------------------------*/
-static __IO uint32_t TimingDelay;
-
-/* Private function prototypes -----------------------------------------------*/
-void Delay(__IO uint32_t nTime);
-
-/* Private functions ---------------------------------------------------------*/
-
-/**
-  * @brief  Main program.
-  * @param  None
-  * @retval None
-  */
-int main(void)
-{
-  /*!< At this stage the microcontroller clock setting is already configured, 
-       this is done through SystemInit() function which is called from startup
-       file (startup_stm32f10x_xx.s) before to branch to application main.
-       To reconfigure the default setting of SystemInit() function, refer to
-       system_stm32f10x.c file
-     */     
-
-  /* Initialize Leds mounted on STM3210X-EVAL board */
-  STM_EVAL_LEDInit(LED1);
-  STM_EVAL_LEDInit(LED2);
-  STM_EVAL_LEDInit(LED3);
-  STM_EVAL_LEDInit(LED4);
-
-  /* Turn on LED1 and LED3 */
-  STM_EVAL_LEDOn(LED1);
-  STM_EVAL_LEDOn(LED3);
-
-  /* Setup SysTick Timer for 1 msec interrupts.
-     ------------------------------------------
-    1. The SysTick_Config() function is a CMSIS function which configure:
-       - The SysTick Reload register with value passed as function parameter.
-       - Configure the SysTick IRQ priority to the lowest value (0x0F).
-       - Reset the SysTick Counter register.
-       - Configure the SysTick Counter clock source to be Core Clock Source (HCLK).
-       - Enable the SysTick Interrupt.
-       - Start the SysTick Counter.
-    
-    2. You can change the SysTick Clock source to be HCLK_Div8 by calling the
-       SysTick_CLKSourceConfig(SysTick_CLKSource_HCLK_Div8) just after the
-       SysTick_Config() function call. The SysTick_CLKSourceConfig() is defined
-       inside the misc.c file.
-
-    3. You can change the SysTick IRQ priority by calling the
-       NVIC_SetPriority(SysTick_IRQn,...) just after the SysTick_Config() function 
-       call. The NVIC_SetPriority() is defined inside the core_cm3.h file.
-
-    4. To adjust the SysTick time base, use the following formula:
-                            
-         Reload Value = SysTick Counter Clock (Hz) x  Desired Time base (s)
-    
-       - Reload Value is the parameter to be passed for SysTick_Config() function
-       - Reload Value should not exceed 0xFFFFFF
-   */
-  if (SysTick_Config(SystemCoreClock / 1000))
-  { 
-    /* Capture error */ 
-    while (1);
-  }
-
-  while (1)
-  {
-    /* Toggle LED2 and LED4 */
-    STM_EVAL_LEDToggle(LED2);
-    STM_EVAL_LEDToggle(LED4);
-
-    /* Insert 50 ms delay */
-    Delay(50);
-
-    /* Toggle LED1 and LED3 */
-    STM_EVAL_LEDToggle(LED1);
-    STM_EVAL_LEDToggle(LED3);
-
-    /* Insert 100 ms delay */
-    Delay(100);
-  }
-}
-
-/**
-  * @brief  Inserts a delay time.
-  * @param  nTime: specifies the delay time length, in milliseconds.
-  * @retval None
-  */
-void Delay(__IO uint32_t nTime)
-{ 
-  TimingDelay = nTime;
-
-  while(TimingDelay != 0);
-}
-
-/**
-  * @brief  Decrements the TimingDelay variable.
-  * @param  None
-  * @retval None
-  */
-void TimingDelay_Decrement(void)
-{
-  if (TimingDelay != 0x00)
-  { 
-    TimingDelay--;
-  }
-}
-
-#ifdef  USE_FULL_ASSERT
-
-/**
-  * @brief  Reports the name of the source file and the source line number
-  *         where the assert_param error has occurred.
-  * @param  file: pointer to the source file name
-  * @param  line: assert_param error line source number
-  * @retval None
-  */
-void assert_failed(uint8_t* file, uint32_t line)
-{ 
-  /* User can add his own implementation to report the file name and line number,
-     ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
-
-  /* Infinite loop */
-  while (1)
-  {
-  }
-}
-
-#endif
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 38
STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/SysTick/TimeBase1/main.h

@@ -1,38 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    SysTick/TimeBase/main.h 
-  * @author  MCD Application Team
-  * @version V3.5.0
-  * @date    08-April-2011
-  * @brief   Header for main.c module
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE 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 FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
-  ******************************************************************************
-  */ 
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __MAIN_H
-#define __MAIN_H
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f10x.h"
-#include "stm32_eval.h"
-
-/* Exported types ------------------------------------------------------------*/
-/* Exported constants --------------------------------------------------------*/
-/* Exported macro ------------------------------------------------------------*/
-/* Exported functions ------------------------------------------------------- */
-void TimingDelay_Decrement(void);
-
-#endif /* __MAIN_H */
-
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 101
STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/SysTick/TimeBase1/readme.txt

@@ -1,101 +0,0 @@
-/**
-  @page SysTick_TimeBase SysTick Time Base example
-  
-  @verbatim
-  ******************** (C) COPYRIGHT 2011 STMicroelectronics *******************
-  * @file    SysTick/TimeBase/readme.txt 
-  * @author  MCD Application Team
-  * @version V3.5.0
-  * @date    08-April-2011
-  * @brief   Description of the SysTick Time Base example.
-  ******************************************************************************
-  * THE PRESENT FIRMWARE 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 FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  ******************************************************************************
-   @endverbatim
-
-@par Example Description 
-
-This example shows how to configure the SysTick to generate a time base equal to
-1 ms. The system clock is set to 24 MHz on Value line devices and to 72 MHz on 
-other devices, the SysTick is clocked by the AHB clock (HCLK).
-
-A "Delay" function is implemented based on the SysTick end-of-count event.
-Four LEDs are toggled with a timing defined by the Delay function.
-
-@par Directory contents 
-
-  - SysTick/TimeBase/stm32f10x_conf.h     Library Configuration file
-  - SysTick/TimeBase/stm32f10x_it.c       Interrupt handlers
-  - SysTick/TimeBase/stm32f10x_it.h       Header for stm32f10x_it.c
-  - SysTick/TimeBase/main.c               Main program
-  - SysTick/TimeBase/main.h               Header for main.c
-  - SysTick/TimeBase/system_stm32f10x.c   STM32F10x system source file
-  
-@par Hardware and Software environment 
-
-  - This example runs on STM32F10x Connectivity line, High-Density, High-Density 
-    Value line, Medium-Density, XL-Density, Medium-Density Value line, 
-    Low-Density and Low-Density Value line Devices.
-  
-  - This example has been tested with STMicroelectronics STM32100E-EVAL (High-Density
-    Value line), STM32100B-EVAL (Medium-Density Value line), STM3210C-EVAL 
-    (Connectivity line), STM3210E-EVAL (High-Density and XL-Density) 
-    and STM3210B-EVAL (Medium-Density) evaluation boards and can be easily
-    tailored to any other supported device and development board.
-    To select the STMicroelectronics evaluation board used to run the example, 
-    uncomment the corresponding line in stm32_eval.h file (under Utilities\STM32_EVAL)
-
-  - STM32100E-EVAL Set-up 
-    - Use LED1, LED2, LED3 and LED4 connected respectively to PF.06, PF0.7, PF.08
-      and PF.09 pins
-      
-  - STM32100B-EVAL Set-up  
-    - Use LED1, LED2, LED3 and LED4 connected respectively to PC.06, PC.07, PC.08
-      and PC.09 pins
-      
-  - STM3210C-EVAL Set-up 
-    - Use LED1, LED2, LED3 and LED4 connected respectively to PD.07, PD.13, PF.03
-      and PD.04 pins
-    
-  - STM3210E-EVAL Set-up 
-    - Use LED1, LED2, LED3 and LED4 connected respectively to PF.06, PF0.7, PF.08
-      and PF.09 pins
-
-  - STM3210B-EVAL Set-up  
-    - Use LED1, LED2, LED3 and LED4 connected respectively to PC.06, PC.07, PC.08
-      and PC.09 pins
-
-          
-@par How to use it ? 
-
-In order to make the program work, you must do the following :
- - Copy all source files from this example folder to the template folder under
-   Project\STM32F10x_StdPeriph_Template
- - Open your preferred toolchain 
- - Rebuild all files and load your image into target memory
- - Run the example 
-
-@note
- - Low-density Value line devices are STM32F100xx microcontrollers where the 
-   Flash memory density ranges between 16 and 32 Kbytes.
- - Low-density devices are STM32F101xx, STM32F102xx and STM32F103xx 
-   microcontrollers where the Flash memory density ranges between 16 and 32 Kbytes.
- - Medium-density Value line devices are STM32F100xx microcontrollers where
-   the Flash memory density ranges between 64 and 128 Kbytes.  
- - Medium-density devices are STM32F101xx, STM32F102xx and STM32F103xx 
-   microcontrollers where the Flash memory density ranges between 64 and 128 Kbytes.
- - High-density Value line devices are STM32F100xx microcontrollers where
-   the Flash memory density ranges between 256 and 512 Kbytes.
- - High-density devices are STM32F101xx and STM32F103xx microcontrollers where
-   the Flash memory density ranges between 256 and 512 Kbytes.   
- - XL-density devices are STM32F101xx and STM32F103xx microcontrollers where
-   the Flash memory density ranges between 512 and 1024 Kbytes.
- - Connectivity line devices are STM32F105xx and STM32F107xx microcontrollers.
-   
- * <h3><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h3>
- */

+ 0 - 77
STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/SysTick/TimeBase1/stm32f10x_conf.h

@@ -1,77 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    SysTick/TimeBase/stm32f10x_conf.h 
-  * @author  MCD Application Team
-  * @version V3.5.0
-  * @date    08-April-2011
-  * @brief   Library configuration file.
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE 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 FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
-  ******************************************************************************
-  */ 
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __STM32F10x_CONF_H
-#define __STM32F10x_CONF_H
-
-/* Includes ------------------------------------------------------------------*/
-/* Uncomment/Comment the line below to enable/disable peripheral header file inclusion */
-#include "stm32f10x_adc.h"
-#include "stm32f10x_bkp.h"
-#include "stm32f10x_can.h"
-#include "stm32f10x_cec.h"
-#include "stm32f10x_crc.h"
-#include "stm32f10x_dac.h"
-#include "stm32f10x_dbgmcu.h"
-#include "stm32f10x_dma.h"
-#include "stm32f10x_exti.h"
-#include "stm32f10x_flash.h"
-#include "stm32f10x_fsmc.h"
-#include "stm32f10x_gpio.h"
-#include "stm32f10x_i2c.h"
-#include "stm32f10x_iwdg.h"
-#include "stm32f10x_pwr.h"
-#include "stm32f10x_rcc.h"
-#include "stm32f10x_rtc.h"
-#include "stm32f10x_sdio.h"
-#include "stm32f10x_spi.h"
-#include "stm32f10x_tim.h"
-#include "stm32f10x_usart.h"
-#include "stm32f10x_wwdg.h"
-#include "misc.h" /* High level functions for NVIC and SysTick (add-on to CMSIS functions) */
-
-/* Exported types ------------------------------------------------------------*/
-/* Exported constants --------------------------------------------------------*/
-/* Uncomment the line below to expanse the "assert_param" macro in the 
-   Standard Peripheral Library drivers code */
-/* #define USE_FULL_ASSERT    1 */
-
-/* Exported macro ------------------------------------------------------------*/
-#ifdef  USE_FULL_ASSERT
-
-/**
-  * @brief  The assert_param macro is used for function's parameters check.
-  * @param  expr: If expr is false, it calls assert_failed function which reports 
-  *         the name of the source file and the source line number of the call 
-  *         that failed. If expr is true, it returns no value.
-  * @retval None
-  */
-  #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
-/* Exported functions ------------------------------------------------------- */
-  void assert_failed(uint8_t* file, uint32_t line);
-#else
-  #define assert_param(expr) ((void)0)
-#endif /* USE_FULL_ASSERT */
-
-#endif /* __STM32F10x_CONF_H */
-
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 169
STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/SysTick/TimeBase1/stm32f10x_it.c

@@ -1,169 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    SysTick/TimeBase/stm32f10x_it.c 
-  * @author  MCD Application Team
-  * @version V3.5.0
-  * @date    08-April-2011
-  * @brief   Main Interrupt Service Routines.
-  *          This file provides template for all exceptions handler and peripherals
-  *          interrupt service routine.
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE 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 FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
-  ******************************************************************************
-  */ 
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f10x_it.h"
-#include "main.h"
-
-/** @addtogroup STM32F10x_StdPeriph_Examples
-  * @{
-  */
-
-/** @addtogroup SysTick_TimeBase
-  * @{
-  */
-
-/* Private typedef -----------------------------------------------------------*/
-/* Private define ------------------------------------------------------------*/
-/* Private macro -------------------------------------------------------------*/
-/* Private variables ---------------------------------------------------------*/
-/* Private function prototypes -----------------------------------------------*/
-/* Private functions ---------------------------------------------------------*/
-
-/******************************************************************************/
-/*            Cortex-M3 Processor Exceptions Handlers                         */
-/******************************************************************************/
-
-/**
-  * @brief  This function handles NMI exception.
-  * @param  None
-  * @retval None
-  */
-void NMI_Handler(void)
-{
-}
-
-/**
-  * @brief  This function handles Hard Fault exception.
-  * @param  None
-  * @retval None
-  */
-void HardFault_Handler(void)
-{
-  /* Go to infinite loop when Hard Fault exception occurs */
-  while (1)
-  {
-  }
-}
-
-/**
-  * @brief  This function handles Memory Manage exception.
-  * @param  None
-  * @retval None
-  */
-void MemManage_Handler(void)
-{
-  /* Go to infinite loop when Memory Manage exception occurs */
-  while (1)
-  {
-  }
-}
-
-/**
-  * @brief  This function handles Bus Fault exception.
-  * @param  None
-  * @retval None
-  */
-void BusFault_Handler(void)
-{
-  /* Go to infinite loop when Bus Fault exception occurs */
-  while (1)
-  {
-  }
-}
-
-/**
-  * @brief  This function handles Usage Fault exception.
-  * @param  None
-  * @retval None
-  */
-void UsageFault_Handler(void)
-{
-  /* Go to infinite loop when Usage Fault exception occurs */
-  while (1)
-  {
-  }
-}
-
-/**
-  * @brief  This function handles SVCall exception.
-  * @param  None
-  * @retval None
-  */
-void SVC_Handler(void)
-{
-}
-
-/**
-  * @brief  This function handles Debug Monitor exception.
-  * @param  None
-  * @retval None
-  */
-void DebugMon_Handler(void)
-{
-}
-
-/**
-  * @brief  This function handles PendSV_Handler exception.
-  * @param  None
-  * @retval None
-  */
-void PendSV_Handler(void)
-{
-}
-
-/**
-  * @brief  This function handles SysTick Handler.
-  * @param  None
-  * @retval None
-  */
-void SysTick_Handler(void)
-{
-  TimingDelay_Decrement();
-}
-
-/******************************************************************************/
-/*                 STM32F10x Peripherals Interrupt Handlers                   */
-/*  Add here the Interrupt Handler for the used peripheral(s) (PPP), for the  */
-/*  available peripheral interrupt handler's name please refer to the startup */
-/*  file (startup_stm32f10x_xx.s).                                            */
-/******************************************************************************/
-
-/**
-  * @brief  This function handles PPP interrupt request.
-  * @param  None
-  * @retval None
-  */
-/*void PPP_IRQHandler(void)
-{
-}*/
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 46
STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/SysTick/TimeBase1/stm32f10x_it.h

@@ -1,46 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    SysTick/TimeBase/stm32f10x_it.h 
-  * @author  MCD Application Team
-  * @version V3.5.0
-  * @date    08-April-2011
-  * @brief   This file contains the headers of the interrupt handlers.
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE 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 FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
-  ******************************************************************************
-  */ 
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __STM32F10x_IT_H
-#define __STM32F10x_IT_H
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f10x.h"
-
-/* Exported types ------------------------------------------------------------*/
-/* Exported constants --------------------------------------------------------*/
-/* Exported macro ------------------------------------------------------------*/
-/* Exported functions ------------------------------------------------------- */
-
-void NMI_Handler(void);
-void HardFault_Handler(void);
-void MemManage_Handler(void);
-void BusFault_Handler(void);
-void UsageFault_Handler(void);
-void SVC_Handler(void);
-void DebugMon_Handler(void);
-void PendSV_Handler(void);
-void SysTick_Handler(void);
-
-#endif /* __STM32F10x_IT_H */
-
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

File diff suppressed because it is too large
+ 0 - 1094
STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/SysTick/TimeBase1/system_stm32f10x.c


+ 0 - 173
STM32F10x_StdPeriph_Lib_V3.5.0/Utilities/STM32_EVAL/main.c

@@ -1,173 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    SysTick/TimeBase/main.c 
-  * @author  MCD Application Team
-  * @version V3.5.0
-  * @date    08-April-2011
-  * @brief   Main program body.
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE 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 FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
-  ******************************************************************************
-  */ 
-
-/* Includes ------------------------------------------------------------------*/
-#include "main.h"
-
-/** @addtogroup STM32F10x_StdPeriph_Examples
-  * @{
-  */
-
-/** @addtogroup SysTick_TimeBase
-  * @{
-  */ 
-
-/* Private typedef -----------------------------------------------------------*/
-/* Private define ------------------------------------------------------------*/
-/* Private macro -------------------------------------------------------------*/
-/* Private variables ---------------------------------------------------------*/
-static __IO uint32_t TimingDelay;
-
-/* Private function prototypes -----------------------------------------------*/
-void Delay(__IO uint32_t nTime);
-
-/* Private functions ---------------------------------------------------------*/
-
-/**
-  * @brief  Main program.
-  * @param  None
-  * @retval None
-  */
-int main(void)
-{
-  /*!< At this stage the microcontroller clock setting is already configured, 
-       this is done through SystemInit() function which is called from startup
-       file (startup_stm32f10x_xx.s) before to branch to application main.
-       To reconfigure the default setting of SystemInit() function, refer to
-       system_stm32f10x.c file
-     */     
-
-  /* Initialize Leds mounted on STM3210X-EVAL board */
-  STM_EVAL_LEDInit(LED1);
-  STM_EVAL_LEDInit(LED2);
-  STM_EVAL_LEDInit(LED3);
-  STM_EVAL_LEDInit(LED4);
-
-  /* Turn on LED1 and LED3 */
-  STM_EVAL_LEDOn(LED1);
-  STM_EVAL_LEDOn(LED3);
-
-  /* Setup SysTick Timer for 1 msec interrupts.
-     ------------------------------------------
-    1. The SysTick_Config() function is a CMSIS function which configure:
-       - The SysTick Reload register with value passed as function parameter.
-       - Configure the SysTick IRQ priority to the lowest value (0x0F).
-       - Reset the SysTick Counter register.
-       - Configure the SysTick Counter clock source to be Core Clock Source (HCLK).
-       - Enable the SysTick Interrupt.
-       - Start the SysTick Counter.
-    
-    2. You can change the SysTick Clock source to be HCLK_Div8 by calling the
-       SysTick_CLKSourceConfig(SysTick_CLKSource_HCLK_Div8) just after the
-       SysTick_Config() function call. The SysTick_CLKSourceConfig() is defined
-       inside the misc.c file.
-
-    3. You can change the SysTick IRQ priority by calling the
-       NVIC_SetPriority(SysTick_IRQn,...) just after the SysTick_Config() function 
-       call. The NVIC_SetPriority() is defined inside the core_cm3.h file.
-
-    4. To adjust the SysTick time base, use the following formula:
-                            
-         Reload Value = SysTick Counter Clock (Hz) x  Desired Time base (s)
-    
-       - Reload Value is the parameter to be passed for SysTick_Config() function
-       - Reload Value should not exceed 0xFFFFFF
-   */
-  if (SysTick_Config(SystemCoreClock / 1000))
-  { 
-    /* Capture error */ 
-    while (1);
-  }
-
-  while (1)
-  {
-    /* Toggle LED2 and LED4 */
-    STM_EVAL_LEDToggle(LED2);
-    STM_EVAL_LEDToggle(LED4);
-
-    /* Insert 50 ms delay */
-    Delay(50);
-
-    /* Toggle LED1 and LED3 */
-    STM_EVAL_LEDToggle(LED1);
-    STM_EVAL_LEDToggle(LED3);
-
-    /* Insert 100 ms delay */
-    Delay(100);
-  }
-}
-
-/**
-  * @brief  Inserts a delay time.
-  * @param  nTime: specifies the delay time length, in milliseconds.
-  * @retval None
-  */
-void Delay(__IO uint32_t nTime)
-{ 
-  TimingDelay = nTime;
-
-  while(TimingDelay != 0);
-}
-
-/**
-  * @brief  Decrements the TimingDelay variable.
-  * @param  None
-  * @retval None
-  */
-void TimingDelay_Decrement(void)
-{
-  if (TimingDelay != 0x00)
-  { 
-    TimingDelay--;
-  }
-}
-
-#ifdef  USE_FULL_ASSERT
-
-/**
-  * @brief  Reports the name of the source file and the source line number
-  *         where the assert_param error has occurred.
-  * @param  file: pointer to the source file name
-  * @param  line: assert_param error line source number
-  * @retval None
-  */
-void assert_failed(uint8_t* file, uint32_t line)
-{ 
-  /* User can add his own implementation to report the file name and line number,
-     ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
-
-  /* Infinite loop */
-  while (1)
-  {
-  }
-}
-
-#endif
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

BIN
stm32f1_02/build/main.o


BIN
stm32f1_02/build/startup_stm32f10x_ld.o


+ 0 - 118
stm32f1_02/inc/fonts.h

@@ -1,118 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    fonts.h
-  * @author  MCD Application Team
-  * @version V4.5.0
-  * @date    07-March-2011
-  * @brief   Header for fonts.c
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE 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 FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
-  ******************************************************************************  
-  */ 
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __FONTS_H
-#define __FONTS_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include <stdint.h>
-
-/** @addtogroup Utilities
-  * @{
-  */
-  
-/** @addtogroup STM32_EVAL
-  * @{
-  */ 
-
-/** @addtogroup Common
-  * @{
-  */
-
-/** @addtogroup FONTS
-  * @{
-  */ 
-
-/** @defgroup FONTS_Exported_Types
-  * @{
-  */ 
-typedef struct _tFont
-{    
-  const uint16_t *table;
-  uint16_t Width;
-  uint16_t Height;
-  
-} sFONT;
-
-extern sFONT Font16x24;
-extern sFONT Font12x12;
-extern sFONT Font8x12;
-extern sFONT Font8x8;
-
-/**
-  * @}
-  */ 
-
-/** @defgroup FONTS_Exported_Constants
-  * @{
-  */ 
-#define LINE(x) ((x) * (((sFONT *)LCD_GetFont())->Height))
-
-/**
-  * @}
-  */ 
-
-/** @defgroup FONTS_Exported_Macros
-  * @{
-  */ 
-/**
-  * @}
-  */ 
-
-/** @defgroup FONTS_Exported_Functions
-  * @{
-  */ 
-/**
-  * @}
-  */
-
-#ifdef __cplusplus
-}
-#endif
-  
-#endif /* __FONTS_H */
- 
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */      
-
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 277
stm32f1_02/inc/stm3210c_eval.h

@@ -1,277 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm3210c_eval.h
-  * @author  MCD Application Team
-  * @version V4.5.0
-  * @date    07-March-2011
-  * @brief   This file contains definitions for STM3210C_EVAL's Leds, push-buttons
-  *          COM ports, SD Card on SPI and sEE on I2C hardware resources.
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE 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 FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 210 STMicroelectronics</center></h2>
-  */ 
-  
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __STM3210C_EVAL_H
-#define __STM3210C_EVAL_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32_eval.h"
-
-/** @addtogroup Utilities
-  * @{
-  */
-
-/** @addtogroup STM32_EVAL
-  * @{
-  */
-    
-/** @addtogroup STM3210C_EVAL
-  * @{
-  */ 
-
-/** @addtogroup STM3210C_EVAL_LOW_LEVEL
-  * @{
-  */ 
-  
-/** @defgroup STM3210C_EVAL_LOW_LEVEL_Exported_Types
-  * @{
-  */
-/**
-  * @}
-  */ 
-
-/** @defgroup STM3210C_EVAL_LOW_LEVEL_Exported_Constants
-  * @{
-  */ 
-
-/** @addtogroup STM3210C_EVAL_LOW_LEVEL_LED
-  * @{
-  */
-#define LEDn                             4
-
-#define LED1_PIN                         GPIO_Pin_7
-#define LED1_GPIO_PORT                   GPIOD
-#define LED1_GPIO_CLK                    RCC_APB2Periph_GPIOD  
-  
-#define LED2_PIN                         GPIO_Pin_13
-#define LED2_GPIO_PORT                   GPIOD
-#define LED2_GPIO_CLK                    RCC_APB2Periph_GPIOD  
-
-#define LED3_PIN                         GPIO_Pin_3  
-#define LED3_GPIO_PORT                   GPIOD
-#define LED3_GPIO_CLK                    RCC_APB2Periph_GPIOD  
-
-#define LED4_PIN                         GPIO_Pin_4  
-#define LED4_GPIO_PORT                   GPIOD
-#define LED4_GPIO_CLK                    RCC_APB2Periph_GPIOD  
-
-
-/**
-  * @}
-  */ 
-  
-/** @addtogroup STM3210C_EVAL_LOW_LEVEL_BUTTON
-  * @{
-  */  
-#define BUTTONn                          3 /*!< Joystick pins are connected to 
-                                                an IO Expander (accessible through 
-                                                I2C1 interface) */
-
-/**
- * @brief Wakeup push-button
- */
-#define WAKEUP_BUTTON_PIN                GPIO_Pin_0
-#define WAKEUP_BUTTON_GPIO_PORT          GPIOA
-#define WAKEUP_BUTTON_GPIO_CLK           RCC_APB2Periph_GPIOA
-#define WAKEUP_BUTTON_EXTI_LINE          EXTI_Line0
-#define WAKEUP_BUTTON_EXTI_PORT_SOURCE   GPIO_PortSourceGPIOA
-#define WAKEUP_BUTTON_EXTI_PIN_SOURCE    GPIO_PinSource0
-#define WAKEUP_BUTTON_EXTI_IRQn          EXTI0_IRQn 
-
-/**
- * @brief Tamper push-button
- */
-#define TAMPER_BUTTON_PIN                GPIO_Pin_13
-#define TAMPER_BUTTON_GPIO_PORT          GPIOC
-#define TAMPER_BUTTON_GPIO_CLK           RCC_APB2Periph_GPIOC
-#define TAMPER_BUTTON_EXTI_LINE          EXTI_Line13
-#define TAMPER_BUTTON_EXTI_PORT_SOURCE   GPIO_PortSourceGPIOC
-#define TAMPER_BUTTON_EXTI_PIN_SOURCE    GPIO_PinSource13
-#define TAMPER_BUTTON_EXTI_IRQn          EXTI15_10_IRQn 
-
-/**
- * @brief Key push-button
- */
-#define KEY_BUTTON_PIN                   GPIO_Pin_9
-#define KEY_BUTTON_GPIO_PORT             GPIOB
-#define KEY_BUTTON_GPIO_CLK              RCC_APB2Periph_GPIOB
-#define KEY_BUTTON_EXTI_LINE             EXTI_Line9
-#define KEY_BUTTON_EXTI_PORT_SOURCE      GPIO_PortSourceGPIOB
-#define KEY_BUTTON_EXTI_PIN_SOURCE       GPIO_PinSource9
-#define KEY_BUTTON_EXTI_IRQn             EXTI9_5_IRQn
-/**
-  * @}
-  */ 
-
-/** @addtogroup STM3210C_EVAL_LOW_LEVEL_COM
-  * @{
-  */
-#define COMn                             1
-
-/**
- * @brief Definition for COM port1, connected to USART2 (USART2 pins remapped on GPIOD)
- */ 
-#define EVAL_COM1                        USART2
-#define EVAL_COM1_CLK                    RCC_APB1Periph_USART2
-#define EVAL_COM1_TX_PIN                 GPIO_Pin_5
-#define EVAL_COM1_TX_GPIO_PORT           GPIOD
-#define EVAL_COM1_TX_GPIO_CLK            RCC_APB2Periph_GPIOD
-#define EVAL_COM1_RX_PIN                 GPIO_Pin_6
-#define EVAL_COM1_RX_GPIO_PORT           GPIOD
-#define EVAL_COM1_RX_GPIO_CLK            RCC_APB2Periph_GPIOD
-#define EVAL_COM1_IRQn                   USART2_IRQn
-
-/**
-  * @}
-  */ 
-
-/** @addtogroup STM3210B_EVAL_SD_SPI
-  * @{
-  */
-/**
-  * @brief  SD SPI Interface pins
-  */
-#define SD_SPI                           SPI3
-#define SD_SPI_CLK                       RCC_APB1Periph_SPI3
-#define SD_SPI_SCK_PIN                   GPIO_Pin_10                 /* PC.10 */
-#define SD_SPI_SCK_GPIO_PORT             GPIOC                       /* GPIOC */
-#define SD_SPI_SCK_GPIO_CLK              RCC_APB2Periph_GPIOC
-#define SD_SPI_MISO_PIN                  GPIO_Pin_11                 /* PC.11 */
-#define SD_SPI_MISO_GPIO_PORT            GPIOC                       /* GPIOC */
-#define SD_SPI_MISO_GPIO_CLK             RCC_APB2Periph_GPIOC
-#define SD_SPI_MOSI_PIN                  GPIO_Pin_12                 /* PC.12 */
-#define SD_SPI_MOSI_GPIO_PORT            GPIOC                       /* GPIOC */
-#define SD_SPI_MOSI_GPIO_CLK             RCC_APB2Periph_GPIOC
-#define SD_CS_PIN                        GPIO_Pin_4                  /* PA.04 */
-#define SD_CS_GPIO_PORT                  GPIOA                       /* GPIOA */
-#define SD_CS_GPIO_CLK                   RCC_APB2Periph_GPIOA
-#define SD_DETECT_PIN                    GPIO_Pin_0                  /* PE.00 */
-#define SD_DETECT_GPIO_PORT              GPIOE                       /* GPIOE */
-#define SD_DETECT_GPIO_CLK               RCC_APB2Periph_GPIOE
-
-/**
-  * @}
-  */
-
-/** @addtogroup STM3210C_EVAL_LOW_LEVEL_I2C_EE
-  * @{
-  */
-/**
-  * @brief  I2C EEPROM Interface pins
-  */  
-#define sEE_I2C                          I2C1
-#define sEE_I2C_CLK                      RCC_APB1Periph_I2C1
-#define sEE_I2C_SCL_PIN                  GPIO_Pin_6                  /* PB.06 */
-#define sEE_I2C_SCL_GPIO_PORT            GPIOB                       /* GPIOB */
-#define sEE_I2C_SCL_GPIO_CLK             RCC_APB2Periph_GPIOB
-#define sEE_I2C_SDA_PIN                  GPIO_Pin_7                  /* PB.07 */
-#define sEE_I2C_SDA_GPIO_PORT            GPIOB                       /* GPIOB */
-#define sEE_I2C_SDA_GPIO_CLK             RCC_APB2Periph_GPIOB
-#define sEE_M24C64_32
-
-#define sEE_I2C_DMA                      DMA1   
-#define sEE_I2C_DMA_CHANNEL_TX           DMA1_Channel6
-#define sEE_I2C_DMA_CHANNEL_RX           DMA1_Channel7 
-#define sEE_I2C_DMA_FLAG_TX_TC           DMA1_IT_TC6   
-#define sEE_I2C_DMA_FLAG_TX_GL           DMA1_IT_GL6 
-#define sEE_I2C_DMA_FLAG_RX_TC           DMA1_IT_TC7 
-#define sEE_I2C_DMA_FLAG_RX_GL           DMA1_IT_GL7    
-#define sEE_I2C_DMA_CLK                  RCC_AHBPeriph_DMA1
-#define sEE_I2C_DR_Address               ((uint32_t)0x40005410)
-#define sEE_USE_DMA
-   
-#define sEE_I2C_DMA_TX_IRQn              DMA1_Channel6_IRQn
-#define sEE_I2C_DMA_RX_IRQn              DMA1_Channel7_IRQn
-#define sEE_I2C_DMA_TX_IRQHandler        DMA1_Channel6_IRQHandler
-#define sEE_I2C_DMA_RX_IRQHandler        DMA1_Channel7_IRQHandler   
-#define sEE_I2C_DMA_PREPRIO              0
-#define sEE_I2C_DMA_SUBPRIO              0   
-   
-#define sEE_DIRECTION_TX                 0
-#define sEE_DIRECTION_RX                 1   
-
-/* Time constant for the delay caclulation allowing to have a millisecond 
-   incrementing counter. This value should be equal to (System Clock / 1000).
-   ie. if system clock = 72MHz then sEE_TIME_CONST should be 72. */
-#define sEE_TIME_CONST                   72 
-   
-/**
-  * @}
-  */
-   
-/**
-  * @}
-  */ 
-  
-/** @defgroup STM3210C_EVAL_LOW_LEVEL_Exported_Macros
-  * @{
-  */ 
-/**
-  * @}
-  */ 
-
-
-/** @defgroup STM3210C_EVAL_LOW_LEVEL_Exported_Functions
-  * @{
-  */ 
-void STM_EVAL_LEDInit(Led_TypeDef Led);
-void STM_EVAL_LEDOn(Led_TypeDef Led);
-void STM_EVAL_LEDOff(Led_TypeDef Led);
-void STM_EVAL_LEDToggle(Led_TypeDef Led);
-void STM_EVAL_PBInit(Button_TypeDef Button, ButtonMode_TypeDef Button_Mode);
-uint32_t STM_EVAL_PBGetState(Button_TypeDef Button);
-void STM_EVAL_COMInit(COM_TypeDef COM, USART_InitTypeDef* USART_InitStruct); 
-void SD_LowLevel_DeInit(void);
-void SD_LowLevel_Init(void); 
-void sEE_LowLevel_DeInit(void);
-void sEE_LowLevel_Init(void); 
-void sEE_LowLevel_DMAConfig(uint32_t pBuffer, uint32_t BufferSize, uint32_t Direction);
-/**
-  * @}
-  */
-  
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM3210C_EVAL_H */
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-    
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 537
stm32f1_02/inc/stm3210c_eval_ioe.h

@@ -1,537 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm3210c_eval_ioe.h
-  * @author  MCD Application Team
-  * @version V4.5.0
-  * @date    07-March-2011
-  * @brief   This file contains all the functions prototypes for the IO Expander
-  *   firmware driver.
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE 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 FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
-  ******************************************************************************  
-  */ 
-
-  /* File Info : ---------------------------------------------------------------
-    SUPPORTED FEATURES:
-      - IO Read/write : Set/Reset and Read (Polling/Interrupt)
-      - Joystick: config and Read (Polling/Interrupt)
-      - Touch Screen Features: Single point mode (Polling/Interrupt)
-      - TempSensor Feature: accuracy not determined (Polling).
-
-    UNSUPPORTED FEATURES:
-      - Row ADC Feature is not supported (not implemented on STM3210C-EVAL board)
-  ----------------------------------------------------------------------------*/
-
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __STM3210C_EVAL_IOE_H
-#define __STM3210C_EVAL_IOE_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif   
-   
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f10x.h"
-
-/** @addtogroup Utilities
-  * @{
-  */
-
-/** @addtogroup STM32_EVAL
-  * @{
-  */ 
-
-/** @addtogroup STM3210C_EVAL
-  * @{
-  */
-    
-/** @defgroup STM3210C_EVAL_IOE 
-  * @{
-  */ 
-
-/** @defgroup STM3210C_EVAL_IOE_Exported_Types
-  * @{
-  */ 
-
-/** 
-  * @brief  Touch Screen Information structure  
-  */ 
-typedef struct
-{
-  uint16_t TouchDetected;
-  uint16_t X;
-  uint16_t Y;
-  uint16_t Z;
-}TS_STATE; 
-  
-/** 
-  * @brief  Joystick State definitions  
-  */ 
-#ifndef __STM32_EVAL_H
-typedef enum 
-{ 
-  JOY_NONE = 0,
-  JOY_SEL = 1,
-  JOY_DOWN = 2,
-  JOY_LEFT = 3,
-  JOY_RIGHT = 4,
-  JOY_UP = 5
-} JOYState_TypeDef
-;
-#endif /* __STM32_EVAL_H */
- 
-/** 
-  * @brief  IO_Expander Error codes  
-  */ 
-typedef enum
-{
-  IOE_OK = 0,
-  IOE_FAILURE, 
-  IOE_TIMEOUT,
-  PARAM_ERROR,
-  IOE1_NOT_OPERATIONAL, 
-  IOE2_NOT_OPERATIONAL
-}IOE_Status_TypDef;
-
-/** 
-  * @brief  IO bit values  
-  */ 
-typedef enum
-{
-  BitReset = 0,
-  BitSet = 1
-}IOE_BitValue_TypeDef;
-
-/** 
-  * @brief  IOE DMA Direction  
-  */ 
-typedef enum
-{
-  IOE_DMA_TX = 0,
-  IOE_DMA_RX = 1
-}IOE_DMADirection_TypeDef;
-
-/**
-  * @}
-  */ 
-
-
-/** @defgroup STM3210C_EVAL_IOE_Exported_Constants
-  * @{
-  */ 
-
-/**
- * @brief Uncomment the line below to enable verfying each written byte in write
- *        operation. The I2C_WriteDeviceRegister() function will then compare the
- *        written and read data and return error status if a mismatch occurs.
- */
-/* #define VERIFY_WRITTENDATA */
-
-/**
- * @brief Uncomment the line below if you want to use user defined Delay function
- *        (for precise timing), otherwise default _delay_ function defined within
- *         this driver is used (less precise timing).  
- */
-/* #define USE_Delay */
-
-/**
- * @brief Uncomment the line below if you want to use user timeout callback.
- *        Function prototypes is declared in this file but function body may be
- *        implemented into user application.  
- */
-/* #define USE_TIMEOUT_USER_CALLBACK */
-
-#ifdef USE_Delay
-#include "main.h"
- 
-  #define _delay_     Delay  /* !< User can provide more timing precise _delay_ function
-                                   (with 10ms time base), using SysTick for example */
-#else
-  #define _delay_     delay      /* !< Default _delay_ function with less precise timing */
-#endif    
-
-/*------------------------------------------------------------------------------
-    Hardware Configuration 
-------------------------------------------------------------------------------*/
-/** 
-  * @brief  I2C port definitions  
-  */
-#define IOE_I2C                          I2C1
-#define IOE_I2C_CLK                      RCC_APB1Periph_I2C1
-#define IOE_I2C_SCL_PIN                  GPIO_Pin_6
-#define IOE_I2C_SCL_GPIO_PORT            GPIOB
-#define IOE_I2C_SCL_GPIO_CLK             RCC_APB2Periph_GPIOB
-#define IOE_I2C_SDA_PIN                  GPIO_Pin_7
-#define IOE_I2C_SDA_GPIO_PORT            GPIOB
-#define IOE_I2C_SDA_GPIO_CLK             RCC_APB2Periph_GPIOB
-#define IOE_I2C_DR                       ((uint32_t)0x40005410)
-#define IOE_I2C_SPEED                    300000  
-
-/** 
-  * @brief  IOE DMA definitions  
-  */
-#define IOE_DMA                          DMA1
-#define IOE_DMA_CLK                      RCC_AHBPeriph_DMA1
-#define IOE_DMA_TX_CHANNEL               DMA1_Channel6
-#define IOE_DMA_RX_CHANNEL               DMA1_Channel7
-#define IOE_DMA_TX_TCFLAG                DMA1_FLAG_TC6
-#define IOE_DMA_RX_TCFLAG                DMA1_FLAG_TC7
-
-
-/** 
-  * @brief  IO Expander Interrupt line on EXTI  
-  */ 
-#define IOE_IT_PIN                       GPIO_Pin_14
-#define IOE_IT_GPIO_PORT                 GPIOB
-#define IOE_IT_GPIO_CLK                  RCC_APB2Periph_GPIOB
-#define IOE_IT_EXTI_PORT_SOURCE          GPIO_PortSourceGPIOB
-#define IOE_IT_EXTI_PIN_SOURCE           GPIO_PinSource14
-#define IOE_IT_EXTI_LINE                 EXTI_Line14
-#define IOE_IT_EXTI_IRQn                 EXTI15_10_IRQn       
-
-/**
-  * @brief Eval Board IO Pins definition 
-  */ 
-#define AUDIO_RESET_PIN             IO_Pin_2 /* IO_Exapnader_2 */ /* Output */
-#define MII_INT_PIN                 IO_Pin_0 /* IO_Exapnader_2 */ /* Output */
-#define VBAT_DIV_PIN                IO_Pin_0 /* IO_Exapnader_1 */ /* Output */
-#define MEMS_INT1_PIN               IO_Pin_3 /* IO_Exapnader_1 */ /* Input */
-#define MEMS_INT2_PIN               IO_Pin_2 /* IO_Exapnader_1 */ /* Input */
-
- 
-/**
-  * @brief Eval Board both IO Exapanders Pins definition 
-  */ 
-#define IO1_IN_ALL_PINS          (uint32_t)(MEMS_INT1_PIN | MEMS_INT2_PIN)
-#define IO2_IN_ALL_PINS          (uint32_t)(JOY_IO_PINS)
-#define IO1_OUT_ALL_PINS         (uint32_t)(VBAT_DIV_PIN)
-#define IO2_OUT_ALL_PINS         (uint32_t)(AUDIO_RESET_PIN | MII_INT_PIN)
-
-/** 
-  * @brief  The 7 bits IO Expanders adresses and chip IDs  
-  */ 
-#define IOE_1_ADDR                 0x82    
-#define IOE_2_ADDR                 0x88    
-#define STMPE811_ID                0x0811
-
-
-/*------------------------------------------------------------------------------
-    Functional and Interrupt Management
-------------------------------------------------------------------------------*/
-/** 
-  * @brief  IO Expander Functionalities definitions  
-  */ 
-#define IOE_ADC_FCT              0x01
-#define IOE_TS_FCT               0x02
-#define IOE_IO_FCT               0x04
-#define IOE_TEMPSENS_FCT         0x08
-
-/** 
-  * @brief  Interrupt source configuration definitons  
-  */ 
-#define IOE_ITSRC_TSC           0x01  /* IO_Exapnder 1 */
-#define IOE_ITSRC_INMEMS        0x02  /* IO_Exapnder 1 */
-#define IOE_ITSRC_JOYSTICK      0x04  /* IO_Exapnder 2 */
-#define IOE_ITSRC_TEMPSENS      0x08  /* IO_Exapnder 2 */
-
-/** 
-  * @brief  Glaobal Interrupts definitions  
-  */ 
-#define IOE_GIT_GPIO             0x80
-#define IOE_GIT_ADC              0x40
-#define IOE_GIT_TEMP             0x20
-#define IOE_GIT_FE               0x10
-#define IOE_GIT_FF               0x08
-#define IOE_GIT_FOV              0x04
-#define IOE_GIT_FTH              0x02
-#define IOE_GIT_TOUCH            0x01
-
-
-/*------------------------------------------------------------------------------
-    STMPE811 device register definition
-------------------------------------------------------------------------------*/
-/** 
-  * @brief  Identification registers  
-  */ 
-#define IOE_REG_CHP_ID             0x00
-#define IOE_REG_ID_VER             0x02
-
-/** 
-  * @brief  General Control Registers  
-  */ 
-#define IOE_REG_SYS_CTRL1          0x03
-#define IOE_REG_SYS_CTRL2          0x04
-#define IOE_REG_SPI_CFG            0x08 
-
-/** 
-  * @brief  Interrupt Control register  
-  */ 
-#define IOE_REG_INT_CTRL           0x09
-#define IOE_REG_INT_EN             0x0A
-#define IOE_REG_INT_STA            0x0B
-#define IOE_REG_GPIO_INT_EN        0x0C
-#define IOE_REG_GPIO_INT_STA       0x0D
-
-/** 
-  * @brief  GPIO Registers  
-  */ 
-#define IOE_REG_GPIO_SET_PIN       0x10
-#define IOE_REG_GPIO_CLR_PIN       0x11
-#define IOE_REG_GPIO_MP_STA        0x12
-#define IOE_REG_GPIO_DIR           0x13
-#define IOE_REG_GPIO_ED            0x14
-#define IOE_REG_GPIO_RE            0x15
-#define IOE_REG_GPIO_FE            0x16
-#define IOE_REG_GPIO_AF            0x17
-
-/** 
-  * @brief  ADC Registers  
-  */ 
-#define IOE_REG_ADC_INT_EN         0x0E
-#define IOE_REG_ADC_INT_STA        0x0F
-#define IOE_REG_ADC_CTRL1          0x20
-#define IOE_REG_ADC_CTRL2          0x21
-#define IOE_REG_ADC_CAPT           0x22
-#define IOE_REG_ADC_DATA_CH0       0x30 /* 16-Bit register */
-#define IOE_REG_ADC_DATA_CH1       0x32 /* 16-Bit register */
-#define IOE_REG_ADC_DATA_CH2       0x34 /* 16-Bit register */
-#define IOE_REG_ADC_DATA_CH3       0x36 /* 16-Bit register */
-#define IOE_REG_ADC_DATA_CH4       0x38 /* 16-Bit register */
-#define IOE_REG_ADC_DATA_CH5       0x3A /* 16-Bit register */
-#define IOE_REG_ADC_DATA_CH6       0x3B /* 16-Bit register */
-#define IOE_REG_ADC_DATA_CH7       0x3C /* 16-Bit register */ 
-
-/** 
-  * @brief  TouchScreen Registers  
-  */ 
-#define IOE_REG_TSC_CTRL           0x40
-#define IOE_REG_TSC_CFG            0x41
-#define IOE_REG_WDM_TR_X           0x42 
-#define IOE_REG_WDM_TR_Y           0x44
-#define IOE_REG_WDM_BL_X           0x46
-#define IOE_REG_WDM_BL_Y           0x48
-#define IOE_REG_FIFO_TH            0x4A
-#define IOE_REG_FIFO_STA           0x4B
-#define IOE_REG_FIFO_SIZE          0x4C
-#define IOE_REG_TSC_DATA_X         0x4D 
-#define IOE_REG_TSC_DATA_Y         0x4F
-#define IOE_REG_TSC_DATA_Z         0x51
-#define IOE_REG_TSC_DATA_XYZ       0x52 
-#define IOE_REG_TSC_FRACT_XYZ      0x56
-#define IOE_REG_TSC_DATA           0x57
-#define IOE_REG_TSC_I_DRIVE        0x58
-#define IOE_REG_TSC_SHIELD         0x59
-
-/** 
-  * @brief  Temperature Sensor registers  
-  */ 
-#define IOE_REG_TEMP_CTRL          0x60
-#define IOE_REG_TEMP_DATA          0x61
-#define IOE_REG_TEMP_TH            0x62
-
-
-/*------------------------------------------------------------------------------
-    Functions parameters defines
-------------------------------------------------------------------------------*/
-/**
-  * @brief Touch Screen Pins definition 
-  */ 
-#define TOUCH_YD                    IO_Pin_1 /* IO_Exapnader_1 */ /* Input */
-#define TOUCH_XD                    IO_Pin_2 /* IO_Exapnader_1 */ /* Input */
-#define TOUCH_YU                    IO_Pin_3 /* IO_Exapnader_1 */ /* Input */
-#define TOUCH_XU                    IO_Pin_4 /* IO_Exapnader_1 */ /* Input */
-#define TOUCH_IO_ALL                (uint32_t)(IO_Pin_1 | IO_Pin_2 | IO_Pin_3 | IO_Pin_4)
-
-/**
-  * @brief  JOYSTICK Pins definition 
-  */ 
-#define JOY_IO_SEL                   IO_Pin_7
-#define JOY_IO_DOWN                  IO_Pin_6
-#define JOY_IO_LEFT                  IO_Pin_5
-#define JOY_IO_RIGHT                 IO_Pin_4
-#define JOY_IO_UP                    IO_Pin_3
-#define JOY_IO_NONE                  JOY_IO_PINS
-#define JOY_IO_PINS                  (uint32_t)(IO_Pin_3 | IO_Pin_4 | IO_Pin_5 | IO_Pin_6 | IO_Pin_7)
-
-/** 
-  * @brief  IO Pins  
-  */ 
-#define IO_Pin_0                 0x01
-#define IO_Pin_1                 0x02
-#define IO_Pin_2                 0x04
-#define IO_Pin_3                 0x08
-#define IO_Pin_4                 0x10
-#define IO_Pin_5                 0x20
-#define IO_Pin_6                 0x40
-#define IO_Pin_7                 0x80
-#define IO_Pin_ALL               0xFF
-
-/** 
-  * @brief  IO Pin directions  
-  */ 
-#define Direction_IN             0x00
-#define Direction_OUT            0x01
-
-/** 
-  * @brief  Interrupt Line output parameters  
-  */ 
-#define Polarity_Low             0x00
-#define Polarity_High            0x04
-#define Type_Level               0x00
-#define Type_Edge                0x02
-
-/** 
-  * @brief IO Interrupts  
-  */ 
-#define IO_IT_0                  0x01
-#define IO_IT_1                  0x02
-#define IO_IT_2                  0x04
-#define IO_IT_3                  0x08
-#define IO_IT_4                  0x10
-#define IO_IT_5                  0x20
-#define IO_IT_6                  0x40
-#define IO_IT_7                  0x80
-#define ALL_IT                   0xFF
-#define IOE_JOY_IT               (uint8_t)(IO_IT_3 | IO_IT_4 | IO_IT_5 | IO_IT_6 | IO_IT_7)
-#define IOE_TS_IT                (uint8_t)(IO_IT_0 | IO_IT_1 | IO_IT_2)
-#define IOE_INMEMS_IT            (uint8_t)(IO_IT_2 | IO_IT_3)
-
-/** 
-  * @brief  Edge detection value  
-  */ 
-#define EDGE_FALLING              0x01
-#define EDGE_RISING               0x02
-
-/** 
-  * @brief  Global interrupt Enable bit  
-  */ 
-#define IOE_GIT_EN                0x01
-
-/**
-  * @}
-  */ 
-
-
-
-/** @defgroup STM3210C_EVAL_IOE_Exported_Macros
-  * @{
-  */ 
-/**
-  * @}
-  */ 
-
-
-
-/** @defgroup STM3210C_EVAL_IOE_Exported_Functions
-  * @{
-  */ 
-
-/** 
-  * @brief  Configuration and initialization functions  
-  */
-uint8_t IOE_Config(void);
-uint8_t IOE_ITConfig(uint32_t IOE_ITSRC_Source);
-
-/** 
-  * @brief  Timeout user callback function. This function is called when a timeout
-  *         condition occurs during communication with IO Expander. Only protoype
-  *         of this function is decalred in IO Expander driver. Its implementation
-  *         may be done into user application. This function may typically stop
-  *         current operations and reset the I2C peripheral and IO Expander.
-  *         To enable this function use uncomment the define USE_TIMEOUT_USER_CALLBACK
-  *         at the top of this file.          
-  */
-#ifdef USE_TIMEOUT_USER_CALLBACK 
- uint8_t IOE_TimeoutUserCallback(void);
-#else
- #define IOE_TimeoutUserCallback()  IOE_TIMEOUT
-#endif /* USE_TIMEOUT_USER_CALLBACK */
-
-/** 
-  * @brief IO pins control functions
-  */
-uint8_t IOE_WriteIOPin(uint8_t IO_Pin, IOE_BitValue_TypeDef BitVal);
-uint8_t IOE_ReadIOPin(uint32_t IO_Pin);
-JOYState_TypeDef
- IOE_JoyStickGetState(void);
-
-/** 
-  * @brief Touch Screen controller functions
-  */
-TS_STATE* IOE_TS_GetState(void);
-
-/** 
-  * @brief Interrupts Mangement functions
-  */
-FlagStatus IOE_GetGITStatus(uint8_t DeviceAddr, uint8_t Global_IT);
-uint8_t IOE_ClearGITPending(uint8_t DeviceAddr, uint8_t IO_IT);
-FlagStatus IOE_GetIOITStatus(uint8_t DeviceAddr, uint8_t IO_IT);
-uint8_t IOE_ClearIOITPending(uint8_t DeviceAddr, uint8_t IO_IT);
-
-/** 
-  * @brief Temperature Sensor functions
-  */
-uint32_t IOE_TempSens_GetData(void);
-
-/** 
-  * @brief IO-Expander Control functions
-  */
-uint8_t IOE_IsOperational(uint8_t DeviceAddr);
-uint8_t IOE_Reset(uint8_t DeviceAddr);
-uint16_t IOE_ReadID(uint8_t DeviceAddr);
-
-uint8_t IOE_FnctCmd(uint8_t DeviceAddr, uint8_t Fct, FunctionalState NewState);
-uint8_t IOE_IOPinConfig(uint8_t DeviceAddr, uint8_t IO_Pin, uint8_t Direction);
-uint8_t IOE_GITCmd(uint8_t DeviceAddr, FunctionalState NewState);
-uint8_t IOE_GITConfig(uint8_t DeviceAddr, uint8_t Global_IT, FunctionalState NewState);
-uint8_t IOE_IOITConfig(uint8_t DeviceAddr, uint8_t IO_IT, FunctionalState NewState);
-
-/** 
-  * @brief Low Layer functions
-  */
-uint8_t IOE_TS_Config(void);
-uint8_t IOE_TempSens_Config(void);
-uint8_t IOE_IOAFConfig(uint8_t DeviceAddr, uint8_t IO_Pin, FunctionalState NewState);
-uint8_t IOE_IOEdgeConfig(uint8_t DeviceAddr, uint8_t IO_Pin, uint8_t Edge);
-uint8_t IOE_ITOutConfig(uint8_t Polarity, uint8_t Type);
-
-uint8_t I2C_WriteDeviceRegister(uint8_t DeviceAddr, uint8_t RegisterAddr, uint8_t RegisterValue);
-uint8_t I2C_ReadDeviceRegister(uint8_t DeviceAddr, uint8_t RegisterAddr);
-uint16_t I2C_ReadDataBuffer(uint8_t DeviceAddr, uint32_t RegisterAddr);
-
-#ifdef __cplusplus
-}
-
-#endif
-#endif /* __STM3210C_EVAL_IOE_H */
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */     
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 379
stm32f1_02/inc/stm3210c_eval_lcd.h

@@ -1,379 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm3210c_eval_lcd.h
-  * @author  MCD Application Team
-  * @version V4.5.0
-  * @date    07-March-2011
-  * @brief   This file contains all the functions prototypes for the lcd firmware driver.
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE 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 FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
-  ******************************************************************************  
-  */ 
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __STM3210C_EVAL_LCD_H
-#define __STM3210C_EVAL_LCD_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f10x.h"
-#include "../Common/fonts.h"
-
-/** @addtogroup Utilities
-  * @{
-  */
-
-/** @addtogroup STM32_EVAL
-  * @{
-  */ 
-
-/** @addtogroup STM3210C_EVAL
-  * @{
-  */
-    
-/** @addtogroup STM3210C_EVAL_LCD
-  * @{
-  */ 
-
-
-/** @defgroup STM3210C_EVAL_LCD_Exported_Types
-  * @{
-  */
-typedef struct 
-{
-  int16_t X;
-  int16_t Y;
-} Point, * pPoint;   
-/**
-  * @}
-  */ 
-
-/** @defgroup STM3210C_EVAL_LCD_Exported_Constants
-  * @{
-  */ 
-
-/**
- * @brief Uncomment the line below if you want to use LCD_DrawBMP function to
- *        display a bitmap picture on the LCD. This function assumes that the bitmap
- *        file is loaded in the SPI Flash (mounted on STM3210C-EVAL board), however
- *        user can tailor it according to his application hardware requirement.     
- */
-/*#define USE_LCD_DrawBMP*/
-
-/**
- * @brief Uncomment the line below if you want to use user defined Delay function
- *        (for precise timing), otherwise default _delay_ function defined within
- *         this driver is used (less precise timing).  
- */
-/* #define USE_Delay */
-
-#ifdef USE_Delay
-#include "main.h"
- 
-  #define _delay_     Delay  /* !< User can provide more timing precise _delay_ function
-                                   (with 10ms time base), using SysTick for example */
-#else
-  #define _delay_     delay      /* !< Default _delay_ function with less precise timing */
-#endif 
-
-/** 
-  * @brief  LCD Control pins  
-  */ 
-#define LCD_NCS_PIN             GPIO_Pin_2                  
-#define LCD_NCS_GPIO_PORT       GPIOB                       
-#define LCD_NCS_GPIO_CLK        RCC_APB2Periph_GPIOB  
-
-/** 
-  * @brief  LCD SPI Interface pins 
-  */ 
-#define LCD_SPI			            SPI3
-#define LCD_SPI_CLK		          RCC_APB1Periph_SPI3
-#define LCD_SPI_SCK_PIN         GPIO_Pin_10                 
-#define LCD_SPI_SCK_GPIO_PORT   GPIOC                       
-#define LCD_SPI_SCK_GPIO_CLK    RCC_APB2Periph_GPIOC  
-#define LCD_SPI_MISO_PIN        GPIO_Pin_11                 
-#define LCD_SPI_MISO_GPIO_PORT  GPIOC                       
-#define LCD_SPI_MISO_GPIO_CLK   RCC_APB2Periph_GPIOC  
-#define LCD_SPI_MOSI_PIN        GPIO_Pin_12                 
-#define LCD_SPI_MOSI_GPIO_PORT  GPIOC                       
-#define LCD_SPI_MOSI_GPIO_CLK   RCC_APB2Periph_GPIOC       
-
-/** 
-  * @brief  LCD Registers  
-  */ 
-#define LCD_REG_0             0x00
-#define LCD_REG_1             0x01
-#define LCD_REG_2             0x02
-#define LCD_REG_3             0x03
-#define LCD_REG_4             0x04
-#define LCD_REG_5             0x05
-#define LCD_REG_6             0x06
-#define LCD_REG_7             0x07
-#define LCD_REG_8             0x08
-#define LCD_REG_9             0x09
-#define LCD_REG_10            0x0A
-#define LCD_REG_12            0x0C
-#define LCD_REG_13            0x0D
-#define LCD_REG_14            0x0E
-#define LCD_REG_15            0x0F
-#define LCD_REG_16            0x10
-#define LCD_REG_17            0x11
-#define LCD_REG_18            0x12
-#define LCD_REG_19            0x13
-#define LCD_REG_20            0x14
-#define LCD_REG_21            0x15
-#define LCD_REG_22            0x16
-#define LCD_REG_23            0x17
-#define LCD_REG_24            0x18
-#define LCD_REG_25            0x19
-#define LCD_REG_26            0x1A
-#define LCD_REG_27            0x1B
-#define LCD_REG_28            0x1C
-#define LCD_REG_29            0x1D
-#define LCD_REG_30            0x1E
-#define LCD_REG_31            0x1F
-#define LCD_REG_32            0x20
-#define LCD_REG_33            0x21
-#define LCD_REG_34            0x22
-#define LCD_REG_36            0x24
-#define LCD_REG_37            0x25
-#define LCD_REG_40            0x28
-#define LCD_REG_41            0x29
-#define LCD_REG_43            0x2B
-#define LCD_REG_45            0x2D
-#define LCD_REG_48            0x30
-#define LCD_REG_49            0x31
-#define LCD_REG_50            0x32
-#define LCD_REG_51            0x33
-#define LCD_REG_52            0x34
-#define LCD_REG_53            0x35
-#define LCD_REG_54            0x36
-#define LCD_REG_55            0x37
-#define LCD_REG_56            0x38
-#define LCD_REG_57            0x39
-#define LCD_REG_59            0x3B
-#define LCD_REG_60            0x3C
-#define LCD_REG_61            0x3D
-#define LCD_REG_62            0x3E
-#define LCD_REG_63            0x3F
-#define LCD_REG_64            0x40
-#define LCD_REG_65            0x41
-#define LCD_REG_66            0x42
-#define LCD_REG_67            0x43
-#define LCD_REG_68            0x44
-#define LCD_REG_69            0x45
-#define LCD_REG_70            0x46
-#define LCD_REG_71            0x47
-#define LCD_REG_72            0x48
-#define LCD_REG_73            0x49
-#define LCD_REG_74            0x4A
-#define LCD_REG_75            0x4B
-#define LCD_REG_76            0x4C
-#define LCD_REG_77            0x4D
-#define LCD_REG_78            0x4E
-#define LCD_REG_79            0x4F
-#define LCD_REG_80            0x50
-#define LCD_REG_81            0x51
-#define LCD_REG_82            0x52
-#define LCD_REG_83            0x53
-#define LCD_REG_96            0x60
-#define LCD_REG_97            0x61
-#define LCD_REG_106           0x6A
-#define LCD_REG_118           0x76
-#define LCD_REG_128           0x80
-#define LCD_REG_129           0x81
-#define LCD_REG_130           0x82
-#define LCD_REG_131           0x83
-#define LCD_REG_132           0x84
-#define LCD_REG_133           0x85
-#define LCD_REG_134           0x86
-#define LCD_REG_135           0x87
-#define LCD_REG_136           0x88
-#define LCD_REG_137           0x89
-#define LCD_REG_139           0x8B
-#define LCD_REG_140           0x8C
-#define LCD_REG_141           0x8D
-#define LCD_REG_143           0x8F
-#define LCD_REG_144           0x90
-#define LCD_REG_145           0x91
-#define LCD_REG_146           0x92
-#define LCD_REG_147           0x93
-#define LCD_REG_148           0x94
-#define LCD_REG_149           0x95
-#define LCD_REG_150           0x96
-#define LCD_REG_151           0x97
-#define LCD_REG_152           0x98
-#define LCD_REG_153           0x99
-#define LCD_REG_154           0x9A
-#define LCD_REG_157           0x9D
-#define LCD_REG_192           0xC0
-#define LCD_REG_193           0xC1
-#define LCD_REG_229           0xE5
-
-/** 
-  * @brief  LCD color  
-  */ 
-#define LCD_COLOR_WHITE          0xFFFF
-#define LCD_COLOR_BLACK          0x0000
-#define LCD_COLOR_GREY           0xF7DE
-#define LCD_COLOR_BLUE           0x001F
-#define LCD_COLOR_BLUE2          0x051F
-#define LCD_COLOR_RED            0xF800
-#define LCD_COLOR_MAGENTA        0xF81F
-#define LCD_COLOR_GREEN          0x07E0
-#define LCD_COLOR_CYAN           0x7FFF
-#define LCD_COLOR_YELLOW         0xFFE0
-
-/** 
-  * @brief  LCD Lines depending on the chosen fonts.  
-  */ 
-#define LCD_LINE_0               LINE(0)
-#define LCD_LINE_1               LINE(1)
-#define LCD_LINE_2               LINE(2)
-#define LCD_LINE_3               LINE(3)
-#define LCD_LINE_4               LINE(4)
-#define LCD_LINE_5               LINE(5)
-#define LCD_LINE_6               LINE(6)
-#define LCD_LINE_7               LINE(7)
-#define LCD_LINE_8               LINE(8)
-#define LCD_LINE_9               LINE(9)
-#define LCD_LINE_10              LINE(10)
-#define LCD_LINE_11              LINE(11)
-#define LCD_LINE_12              LINE(12)
-#define LCD_LINE_13              LINE(13)
-#define LCD_LINE_14              LINE(14)
-#define LCD_LINE_15              LINE(15)
-#define LCD_LINE_16              LINE(16)
-#define LCD_LINE_17              LINE(17)
-#define LCD_LINE_18              LINE(18)
-#define LCD_LINE_19              LINE(19)
-#define LCD_LINE_20              LINE(20)
-#define LCD_LINE_21              LINE(21)
-#define LCD_LINE_22              LINE(22)
-#define LCD_LINE_23              LINE(23)
-#define LCD_LINE_24              LINE(24)
-#define LCD_LINE_25              LINE(25)
-#define LCD_LINE_26              LINE(26)
-#define LCD_LINE_27              LINE(27)
-#define LCD_LINE_28              LINE(28)
-#define LCD_LINE_29              LINE(29)
-
-/** 
-  * @brief LCD default font 
-  */ 
-#define LCD_DEFAULT_FONT         Font16x24
-
-/** 
-  * @brief  LCD Direction  
-  */ 
-#define LCD_DIR_HORIZONTAL       0x0000
-#define LCD_DIR_VERTICAL         0x0001
-
-/** 
-  * @brief  LCD Size (Width and Height)  
-  */ 
-#define LCD_PIXEL_WIDTH          0x0140
-#define LCD_PIXEL_HEIGHT         0x00F0
-
-/**
-  * @}
-  */ 
-
-/** @defgroup STM3210C_EVAL_LCD_Exported_Macros
-  * @{
-  */
-#define ASSEMBLE_RGB(R, G, B)    ((((R)& 0xF8) << 8) | (((G) & 0xFC) << 3) | (((B) & 0xF8) >> 3))   
-/**
-  * @}
-  */ 
-
-/** @defgroup STM3210C_EVAL_LCD_Exported_Functions
-  * @{
-  */
-void LCD_DeInit(void);   
-void LCD_Setup(void);
-void STM3210C_LCD_Init(void);
-void LCD_SetColors(__IO uint16_t _TextColor, __IO uint16_t _BackColor); 
-void LCD_GetColors(__IO uint16_t *_TextColor, __IO uint16_t *_BackColor);
-void LCD_SetTextColor(__IO uint16_t Color);
-void LCD_SetBackColor(__IO uint16_t Color);
-void LCD_ClearLine(uint8_t Line);
-void LCD_Clear(uint16_t Color);
-void LCD_SetCursor(uint8_t Xpos, uint16_t Ypos);
-void LCD_DrawChar(uint8_t Xpos, uint16_t Ypos, const uint16_t *c);
-void LCD_DisplayChar(uint8_t Line, uint16_t Column, uint8_t Ascii);
-void LCD_SetFont(sFONT *fonts);
-sFONT *LCD_GetFont(void);
-void LCD_DisplayStringLine(uint8_t Line, uint8_t *ptr);
-void LCD_SetDisplayWindow(uint8_t Xpos, uint16_t Ypos, uint8_t Height, uint16_t Width);
-void LCD_WindowModeDisable(void);
-void LCD_DrawLine(uint8_t Xpos, uint16_t Ypos, uint16_t Length, uint8_t Direction);
-void LCD_DrawRect(uint8_t Xpos, uint16_t Ypos, uint8_t Height, uint16_t Width);
-void LCD_DrawCircle(uint8_t Xpos, uint16_t Ypos, uint16_t Radius);
-void LCD_DrawMonoPict(const uint32_t *Pict);
-#ifdef USE_LCD_DrawBMP
-//void LCD_DrawBMP(uint32_t BmpAddress);
-void LCD_DrawBMP(const uint16_t *BmpAddress);
-#endif 
-void LCD_DrawUniLine(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2);
-void LCD_DrawFullRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height);
-void LCD_DrawFullCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius);
-void LCD_PolyLine(pPoint Points, uint16_t PointCount);
-void LCD_PolyLineRelative(pPoint Points, uint16_t PointCount);
-void LCD_ClosedPolyLine(pPoint Points, uint16_t PointCount);
-void LCD_ClosedPolyLineRelative(pPoint Points, uint16_t PointCount);
-void LCD_FillPolyLine(pPoint Points, uint16_t PointCount);
-
-void LCD_nCS_StartByte(uint8_t Start_Byte);
-void LCD_WriteRegIndex(uint8_t LCD_Reg);
-void LCD_WriteReg(uint8_t LCD_Reg, uint16_t LCD_RegValue);
-void LCD_WriteRAM_Prepare(void);
-void LCD_WriteRAMWord(uint16_t RGB_Code);
-uint16_t LCD_ReadReg(uint8_t LCD_Reg);
-void LCD_WriteRAM(uint16_t RGB_Code);
-void LCD_PowerOn(void);
-void LCD_DisplayOn(void);
-void LCD_DisplayOff(void);
-
-void LCD_CtrlLinesConfig(void);
-void LCD_CtrlLinesWrite(GPIO_TypeDef* GPIOx, uint16_t CtrlPins, BitAction BitVal);
-void LCD_SPIConfig(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM3210C_EVAL_LCD_H */
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-     
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 368
stm32f1_02/inc/stm32_eval.h

@@ -1,368 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32_eval.h
-  * @author  MCD Application Team
-  * @version V4.5.0
-  * @date    07-March-2011
-  * @brief   Header file for stm32_eval.c module.
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE 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 FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
-  ******************************************************************************  
-  */ 
-  
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __STM32_EVAL_H
-#define __STM32_EVAL_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif 
-
-/* Includes ------------------------------------------------------------------*/
-
-/** @addtogroup Utilities
-  * @{
-  */ 
-  
-/** @addtogroup STM32_EVAL
-  * @{
-  */ 
-
-/** @defgroup STM32_EVAL_Abstraction_Layer
-  * @{
-  */
-  
-/** @defgroup STM32_EVAL_HARDWARE_RESOURCES
-  * @{
-  */
-
-/**
-@code  
- The table below gives an overview of the hardware resources supported by each 
- STM32 EVAL board.
-     - LCD: TFT Color LCD (Parallel (FSMC) and Serial (SPI))
-     - IOE: IO Expander on I2C
-     - sFLASH: serial SPI FLASH (M25Pxxx)
-     - sEE: serial I2C EEPROM (M24C08, M24C32, M24C64)
-     - TSENSOR: Temperature Sensor (LM75)
-     - SD: SD Card memory (SPI and SDIO (SD Card MODE)) 
-  =================================================================================================================+
-    STM32 EVAL     | LED | Buttons  | Com Ports |    LCD    | IOE  | sFLASH | sEE | TSENSOR | SD (SPI) | SD(SDIO)  |
-  =================================================================================================================+
-   STM3210B-EVAL   |  4  |    8     |     2     | YES (SPI) | NO   |  YES   | NO  |   YES   |    YES   |    NO     |
-  -----------------------------------------------------------------------------------------------------------------+
-   STM3210E-EVAL   |  4  |    8     |     2     | YES (FSMC)| NO   |  YES   | NO  |   YES   |    NO    |    YES    |
-  -----------------------------------------------------------------------------------------------------------------+
-   STM3210C-EVAL   |  4  |    3     |     1     | YES (SPI) | YES  |  NO    | YES |   NO    |    YES   |    NO     |
-  -----------------------------------------------------------------------------------------------------------------+
-   STM32100B-EVAL  |  4  |    8     |     2     | YES (SPI) | NO   |  YES   | NO  |   YES   |    YES   |    NO     |
-  -----------------------------------------------------------------------------------------------------------------+
-   STM32L152-EVAL  |  4  |    8     |     2     | YES (SPI) | NO   |  NO    | NO  |   YES   |    YES   |    NO     |
-  -----------------------------------------------------------------------------------------------------------------+
-   STM32100E-EVAL  |  4  |    8     |     2     | YES (FSMC)| YES  |  YES   | YES |   YES   |    YES   |    NO     |
-  =================================================================================================================+
-@endcode
-*/
-
-/**
-  * @}
-  */
-  
-/** @defgroup STM32_EVAL_Exported_Types
-  * @{
-  */
-typedef enum 
-{
-  LED1 = 0,
-  LED2 = 1,
-  LED3 = 2,
-  LED4 = 3
-} Led_TypeDef;
-
-typedef enum 
-{  
-  BUTTON_WAKEUP = 0,
-  BUTTON_TAMPER = 1,
-  BUTTON_KEY = 2,
-  BUTTON_RIGHT = 3,
-  BUTTON_LEFT = 4,
-  BUTTON_UP = 5,
-  BUTTON_DOWN = 6,
-  BUTTON_SEL = 7
-} Button_TypeDef;
-
-typedef enum 
-{  
-  BUTTON_MODE_GPIO = 0,
-  BUTTON_MODE_EXTI = 1
-} ButtonMode_TypeDef;
-
-typedef enum 
-{ 
-  JOY_NONE = 0,
-  JOY_SEL = 1,
-  JOY_DOWN = 2,
-  JOY_LEFT = 3,
-  JOY_RIGHT = 4,
-  JOY_UP = 5
-} JOYState_TypeDef
-;
-
-typedef enum 
-{
-  COM1 = 0,
-  COM2 = 1
-} COM_TypeDef;   
-/**
-  * @}
-  */ 
-  
-/** @defgroup STM32_EVAL_Exported_Constants
-  * @{
-  */
-
-/** 
-  * @brief  Uncomment the line corresponding to the STMicroelectronics evaluation
-  *   board used in your application.
-  *   
-  *  Tip: To avoid modifying this file each time you need to switch between these
-  *       boards, you can define the board in your toolchain compiler preprocessor.    
-  */ 
-#if !defined (USE_STM32100B_EVAL) && !defined (USE_STM3210B_EVAL) &&  !defined (USE_STM3210E_EVAL)\
-   &&  !defined (USE_STM3210C_EVAL) &&  !defined (USE_STM32L152_EVAL) &&  !defined (USE_STM32100E_EVAL)
- //#define USE_STM32100B_EVAL
- //#define USE_STM3210B_EVAL
- //#define USE_STM3210E_EVAL
-#define USE_STM3210C_EVAL
- //#define USE_STM32L152_EVAL
- //#define USE_STM32100E_EVAL
-#endif
-
-#ifdef USE_STM32100B_EVAL
- #include "stm32f10x.h"
- #include "stm32100b_eval/stm32100b_eval.h"
-#elif defined USE_STM3210B_EVAL
- #include "stm32f10x.h"
- #include "stm3210b_eval/stm3210b_eval.h" 
-#elif defined USE_STM3210E_EVAL
- #include "stm32f10x.h"
- #include "stm3210e_eval/stm3210e_eval.h"
-#elif defined USE_STM3210C_EVAL
- #include "stm32f10x.h"
- #include "stm3210c_eval.h"
-#elif defined USE_STM32L152_EVAL
- #include "stm32l1xx.h"
- #include "stm32l152_eval/stm32l152_eval.h" 
-#elif defined USE_STM32100E_EVAL
- #include "stm32f10x.h"
- #include "stm32100e_eval/stm32100e_eval.h"
-#else 
- #error "Please select first the STM32 EVAL board to be used (in stm32_eval.h)"
-#endif                      
-
-
-/** 
-  * @brief  STM32 Button Defines Legacy  
-  */ 
-#define Button_WAKEUP        BUTTON_WAKEUP
-#define Button_TAMPER        BUTTON_TAMPER
-#define Button_KEY           BUTTON_KEY
-#define Button_RIGHT         BUTTON_RIGHT
-#define Button_LEFT          BUTTON_LEFT
-#define Button_UP            BUTTON_UP
-#define Button_DOWN          BUTTON_DOWN
-#define Button_SEL           BUTTON_SEL
-#define Mode_GPIO            BUTTON_MODE_GPIO
-#define Mode_EXTI            BUTTON_MODE_EXTI
-#define Button_Mode_TypeDef  ButtonMode_TypeDef
-#define JOY_CENTER           JOY_SEL
-#define JOY_State_TypeDef    JOYState_TypeDef 
-
-/** 
-  * @brief  LCD Defines Legacy  
-  */ 
-#define LCD_RSNWR_GPIO_CLK  LCD_NWR_GPIO_CLK
-#define LCD_SPI_GPIO_PORT   LCD_SPI_SCK_GPIO_PORT
-#define LCD_SPI_GPIO_CLK    LCD_SPI_SCK_GPIO_CLK
-#define R0                  LCD_REG_0
-#define R1                  LCD_REG_1
-#define R2                  LCD_REG_2
-#define R3                  LCD_REG_3
-#define R4                  LCD_REG_4
-#define R5                  LCD_REG_5
-#define R6                  LCD_REG_6
-#define R7                  LCD_REG_7
-#define R8                  LCD_REG_8
-#define R9                  LCD_REG_9
-#define R10                 LCD_REG_10
-#define R12                 LCD_REG_12
-#define R13                 LCD_REG_13
-#define R14                 LCD_REG_14
-#define R15                 LCD_REG_15
-#define R16                 LCD_REG_16
-#define R17                 LCD_REG_17
-#define R18                 LCD_REG_18
-#define R19                 LCD_REG_19
-#define R20                 LCD_REG_20
-#define R21                 LCD_REG_21
-#define R22                 LCD_REG_22
-#define R23                 LCD_REG_23
-#define R24                 LCD_REG_24
-#define R25                 LCD_REG_25
-#define R26                 LCD_REG_26
-#define R27                 LCD_REG_27
-#define R28                 LCD_REG_28
-#define R29                 LCD_REG_29
-#define R30                 LCD_REG_30
-#define R31                 LCD_REG_31
-#define R32                 LCD_REG_32
-#define R33                 LCD_REG_33
-#define R34                 LCD_REG_34
-#define R36                 LCD_REG_36
-#define R37                 LCD_REG_37
-#define R40                 LCD_REG_40
-#define R41                 LCD_REG_41
-#define R43                 LCD_REG_43
-#define R45                 LCD_REG_45
-#define R48                 LCD_REG_48
-#define R49                 LCD_REG_49
-#define R50                 LCD_REG_50
-#define R51                 LCD_REG_51
-#define R52                 LCD_REG_52
-#define R53                 LCD_REG_53
-#define R54                 LCD_REG_54
-#define R55                 LCD_REG_55
-#define R56                 LCD_REG_56
-#define R57                 LCD_REG_57
-#define R59                 LCD_REG_59
-#define R60                 LCD_REG_60
-#define R61                 LCD_REG_61
-#define R62                 LCD_REG_62
-#define R63                 LCD_REG_63
-#define R64                 LCD_REG_64
-#define R65                 LCD_REG_65
-#define R66                 LCD_REG_66
-#define R67                 LCD_REG_67
-#define R68                 LCD_REG_68
-#define R69                 LCD_REG_69
-#define R70                 LCD_REG_70
-#define R71                 LCD_REG_71
-#define R72                 LCD_REG_72
-#define R73                 LCD_REG_73
-#define R74                 LCD_REG_74
-#define R75                 LCD_REG_75
-#define R76                 LCD_REG_76
-#define R77                 LCD_REG_77
-#define R78                 LCD_REG_78
-#define R79                 LCD_REG_79
-#define R80                 LCD_REG_80
-#define R81                 LCD_REG_81
-#define R82                 LCD_REG_82
-#define R83                 LCD_REG_83
-#define R96                 LCD_REG_96
-#define R97                 LCD_REG_97
-#define R106                LCD_REG_106
-#define R118                LCD_REG_118
-#define R128                LCD_REG_128
-#define R129                LCD_REG_129
-#define R130                LCD_REG_130
-#define R131                LCD_REG_131
-#define R132                LCD_REG_132
-#define R133                LCD_REG_133
-#define R134                LCD_REG_134
-#define R135                LCD_REG_135
-#define R136                LCD_REG_136
-#define R137                LCD_REG_137
-#define R139                LCD_REG_139
-#define R140                LCD_REG_140
-#define R141                LCD_REG_141
-#define R143                LCD_REG_143
-#define R144                LCD_REG_144
-#define R145                LCD_REG_145
-#define R146                LCD_REG_146
-#define R147                LCD_REG_147
-#define R148                LCD_REG_148
-#define R149                LCD_REG_149
-#define R150                LCD_REG_150
-#define R151                LCD_REG_151
-#define R152                LCD_REG_152
-#define R153                LCD_REG_153
-#define R154                LCD_REG_154
-#define R157                LCD_REG_157
-#define R192                LCD_REG_192
-#define R193                LCD_REG_193
-#define R227                LCD_REG_227
-#define R229                LCD_REG_229
-#define R231                LCD_REG_231
-#define R239                LCD_REG_239
-#define White               LCD_COLOR_WHITE
-#define Black               LCD_COLOR_BLACK
-#define Grey                LCD_COLOR_GREY
-#define Blue                LCD_COLOR_BLUE
-#define Blue2               LCD_COLOR_BLUE2
-#define Red                 LCD_COLOR_RED
-#define Magenta             LCD_COLOR_MAGENTA
-#define Green               LCD_COLOR_GREEN
-#define Cyan                LCD_COLOR_CYAN
-#define Yellow              LCD_COLOR_YELLOW
-#define Line0               LCD_LINE_0
-#define Line1               LCD_LINE_1
-#define Line2               LCD_LINE_2
-#define Line3               LCD_LINE_3
-#define Line4               LCD_LINE_4
-#define Line5               LCD_LINE_5
-#define Line6               LCD_LINE_6
-#define Line7               LCD_LINE_7
-#define Line8               LCD_LINE_8
-#define Line9               LCD_LINE_9
-#define Horizontal          LCD_DIR_HORIZONTAL
-#define Vertical            LCD_DIR_VERTICAL
-
-
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32_EVAL_Exported_Macros
-  * @{
-  */ 
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32_EVAL_Exported_Functions
-  * @{
-  */ 
-/**
-  * @}
-  */ 
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* __STM32_EVAL_H */
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */   
-
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 201
stm32f1_02/inc/stm32_eval_i2c_ee.h

@@ -1,201 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32_eval_i2c_ee.h
-  * @author  MCD Application Team
-  * @version V4.5.0
-  * @date    07-March-2011
-  * @brief   This file contains all the functions prototypes for the stm32_eval_i2c_ee
-  *          firmware driver.
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE 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 FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
-  ******************************************************************************  
-  */ 
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __STM32_EVAL_I2C_EE_H
-#define __STM32_EVAL_I2C_EE_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32_eval.h"
-
-/** @addtogroup Utilities
-  * @{
-  */
-  
-/** @addtogroup STM32_EVAL
-  * @{
-  */ 
-
-/** @addtogroup Common
-  * @{
-  */
-  
-/** @addtogroup STM32_EVAL_I2C_EE
-  * @{
-  */  
-
-/** @defgroup STM32_EVAL_I2C_EE_Exported_Types
-  * @{
-  */ 
-
-/**
-  * @}
-  */
-  
-/** @defgroup STM32_EVAL_I2C_EE_Exported_Constants
-  * @{
-  */
-  
-/* Uncomment this line to use the default start and end of critical section 
-   callbacks (it disables then enabled all interrupts) */
-#define USE_DEFAULT_CRITICAL_CALLBACK 
-/* Start and End of critical section: these callbacks should be typically used
-   to disable interrupts when entering a critical section of I2C communication
-   You may use default callbacks provided into this driver by uncommenting the 
-   define USE_DEFAULT_CRITICAL_CALLBACK.
-   Or you can comment that line and implement these callbacks into your 
-   application */
-
-/* Uncomment the following line to use the default sEE_TIMEOUT_UserCallback() 
-   function implemented in stm32_evel_i2c_ee.c file.
-   sEE_TIMEOUT_UserCallback() function is called whenever a timeout condition 
-   occure during communication (waiting on an event that doesn't occur, bus 
-   errors, busy devices ...). */   
-/* #define USE_DEFAULT_TIMEOUT_CALLBACK */
-   
-#if !defined (sEE_M24C08) && !defined (sEE_M24C64_32)
-/* Use the defines below the choose the EEPROM type */
-/* #define sEE_M24C08*/  /* Support the device: M24C08. */
-/* note: Could support: M24C01, M24C02, M24C04 and M24C16 if the blocks and 
-   HW address are correctly defined*/
-#define sEE_M24C64_32  /* Support the devices: M24C32 and M24C64 */
-#endif
-
-#ifdef sEE_M24C64_32
-/* For M24C32 and M24C64 devices, E0,E1 and E2 pins are all used for device 
-  address selection (ne need for additional address lines). According to the 
-  Harware connection on the board (on STM3210C-EVAL board E0 = E1 = E2 = 0) */
-
- #define sEE_HW_ADDRESS         0xA0   /* E0 = E1 = E2 = 0 */ 
-
-#elif defined (sEE_M24C08)
-/* The M24C08W contains 4 blocks (128byte each) with the adresses below: E2 = 0 
-   EEPROM Addresses defines */
- #define sEE_Block0_ADDRESS     0xA0   /* E2 = 0 */ 
- /*#define sEE_Block1_ADDRESS     0xA2*/ /* E2 = 0 */  
- /*#define sEE_Block2_ADDRESS     0xA4*/ /* E2 = 0 */
- /*#define sEE_Block3_ADDRESS     0xA6*/ /* E2 = 0 */
-
-#endif /* sEE_M24C64_32 */
-
-#define I2C_SPEED               300000
-#define I2C_SLAVE_ADDRESS7      0xA0
-
-#if defined (sEE_M24C08)
- #define sEE_PAGESIZE           16
-#elif defined (sEE_M24C64_32)
- #define sEE_PAGESIZE           32
-#endif
-   
-/* Maximum Timeout values for flags and events waiting loops. These timeouts are
-   not based on accurate values, they just guarantee that the application will 
-   not remain stuck if the I2C communication is corrupted.
-   You may modify these timeout values depending on CPU frequency and application
-   conditions (interrupts routines ...). */   
-#define sEE_FLAG_TIMEOUT         ((uint32_t)0x1000)
-#define sEE_LONG_TIMEOUT         ((uint32_t)(10 * sEE_FLAG_TIMEOUT))
-
-/* Maximum number of trials for sEE_WaitEepromStandbyState() function */
-#define sEE_MAX_TRIALS_NUMBER     150
-   
-/* Defintions for the state of the DMA transfer */   
-#define sEE_STATE_READY           0
-#define sEE_STATE_BUSY            1
-#define sEE_STATE_ERROR           2
-   
-#define sEE_OK                    0
-#define sEE_FAIL                  1   
-
-/**
-  * @}
-  */ 
-  
-/** @defgroup STM32_EVAL_I2C_EE_Exported_Macros
-  * @{
-  */    
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32_EVAL_I2C_EE_Exported_Functions
-  * @{
-  */ 
-void     sEE_DeInit(void);
-void     sEE_Init(void);
-uint32_t sEE_ReadBuffer(uint8_t* pBuffer, uint16_t ReadAddr, uint16_t* NumByteToRead);
-uint32_t sEE_WritePage(uint8_t* pBuffer, uint16_t WriteAddr, uint8_t* NumByteToWrite);
-void     sEE_WriteBuffer(uint8_t* pBuffer, uint16_t WriteAddr, uint16_t NumByteToWrite);
-uint32_t sEE_WaitEepromStandbyState(void);
-
-/* USER Callbacks: These are functions for which prototypes only are declared in
-   EEPROM driver and that should be implemented into user applicaiton. */  
-/* sEE_TIMEOUT_UserCallback() function is called whenever a timeout condition 
-   occure during communication (waiting on an event that doesn't occur, bus 
-   errors, busy devices ...).
-   You can use the default timeout callback implementation by uncommenting the 
-   define USE_DEFAULT_TIMEOUT_CALLBACK in stm32_evel_i2c_ee.h file.
-   Typically the user implementation of this callback should reset I2C peripheral
-   and re-initialize communication or in worst case reset all the application. */
-uint32_t sEE_TIMEOUT_UserCallback(void);
-
-/* Start and End of critical section: these callbacks should be typically used
-   to disable interrupts when entering a critical section of I2C communication
-   You may use default callbacks provided into this driver by uncommenting the 
-   define USE_DEFAULT_CRITICAL_CALLBACK in stm32_evel_i2c_ee.h file..
-   Or you can comment that line and implement these callbacks into your 
-   application */
-void sEE_EnterCriticalSection_UserCallback(void);
-void sEE_ExitCriticalSection_UserCallback(void);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM32_EVAL_I2C_EE_H */
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */
-
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
-
-

+ 0 - 173
stm32f1_02/inc/stm32_eval_i2c_tsensor.h

@@ -1,173 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32_eval_i2c_tsensor.h
-  * @author  MCD Application Team
-  * @version V4.5.0
-  * @date    07-March-2011
-  * @brief   This file contains all the functions prototypes for the 
-  *          stm32_eval_i2c_tsensor firmware driver.
-  ******************************************************************************
-  * @attention
-  *
-  * THE PRESENT FIRMWARE 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 FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
-  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-  *
-  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
-  ******************************************************************************  
-  */
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __STM32_EVAL_I2C_TSENSOR_H
-#define __STM32_EVAL_I2C_TSENSOR_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32_eval.h"
-
-/** @addtogroup Utilities
-  * @{
-  */
-  
-/** @addtogroup STM32_EVAL
-  * @{
-  */ 
-
-/** @addtogroup Common
-  * @{
-  */
-  
-/** @addtogroup STM32_EVAL_I2C_TSENSOR
-  * @{
-  */  
-
-/** @defgroup STM32_EVAL_I2C_TSENSOR_Exported_Types
-  * @{
-  */
-   
- /** 
-  * @brief  IOE DMA Direction  
-  */ 
-typedef enum
-{
-  LM75_DMA_TX = 0,
-  LM75_DMA_RX = 1
-}LM75_DMADirection_TypeDef;
-
-/** 
-  * @brief  TSENSOR Status  
-  */ 
-typedef enum
-{
-  LM75_OK = 0,
-  LM75_FAIL
-}LM75_Status_TypDef;
-
-/**
-  * @}
-  */
-  
-/** @defgroup STM32_EVAL_I2C_TSENSOR_Exported_Constants
-  * @{
-  */ 
-    
-/* Uncomment the following line to use Timeout_User_Callback LM75_TimeoutUserCallback(). 
-   If This Callback is enabled, it should be implemented by user in main function .
-   LM75_TimeoutUserCallback() function is called whenever a timeout condition 
-   occure during communication (waiting on an event that doesn't occur, bus 
-   errors, busy devices ...). */   
-/* #define USE_TIMEOUT_USER_CALLBACK */    
-    
-/* Maximum Timeout values for flags and events waiting loops. These timeouts are
-   not based on accurate values, they just guarantee that the application will 
-   not remain stuck if the I2C communication is corrupted.
-   You may modify these timeout values depending on CPU frequency and application
-   conditions (interrupts routines ...). */   
-#define LM75_FLAG_TIMEOUT         ((uint32_t)0x1000)
-#define LM75_LONG_TIMEOUT         ((uint32_t)(10 * LM75_FLAG_TIMEOUT))    
-    
-
-/**
-  * @brief  Block Size
-  */
-#define LM75_REG_TEMP       0x00  /*!< Temperature Register of LM75 */
-#define LM75_REG_CONF       0x01  /*!< Configuration Register of LM75 */
-#define LM75_REG_THYS       0x02  /*!< Temperature Register of LM75 */
-#define LM75_REG_TOS        0x03  /*!< Over-temp Shutdown threshold Register of LM75 */
-#define I2C_TIMEOUT         ((uint32_t)0x3FFFF) /*!< I2C Time out */
-#define LM75_ADDR           0x90   /*!< LM75 address */
-#define LM75_I2C_SPEED      100000 /*!< I2C Speed */
-  
-   
-
-/**
-  * @}
-  */
-
-/** @defgroup STM32_EVAL_I2C_TSENSOR_Exported_Macros
-  * @{
-  */ 
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32_EVAL_I2C_TSENSOR_Exported_Functions
-  * @{
-  */ 
-void LM75_DeInit(void);
-void LM75_Init(void);
-ErrorStatus LM75_GetStatus(void);
-uint16_t LM75_ReadTemp(void);
-uint16_t LM75_ReadReg(uint8_t RegName);
-uint8_t LM75_WriteReg(uint8_t RegName, uint16_t RegValue);
-uint8_t LM75_ReadConfReg(void);
-uint8_t LM75_WriteConfReg(uint8_t RegValue);
-uint8_t LM75_ShutDown(FunctionalState NewState);
-
-/** 
-  * @brief  Timeout user callback function. This function is called when a timeout
-  *         condition occurs during communication with IO Expander. Only protoype
-  *         of this function is decalred in IO Expander driver. Its implementation
-  *         may be done into user application. This function may typically stop
-  *         current operations and reset the I2C peripheral and IO Expander.
-  *         To enable this function use uncomment the define USE_TIMEOUT_USER_CALLBACK
-  *         at the top of this file.          
-  */
-#ifdef USE_TIMEOUT_USER_CALLBACK 
- uint8_t LM75_TIMEOUT_UserCallback(void);
-#else
- #define LM75_TIMEOUT_UserCallback()  LM75_FAIL
-#endif /* USE_TIMEOUT_USER_CALLBACK */
- 
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM32_EVAL_I2C_TSENSOR_H */
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */
-
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

+ 0 - 397
stm32f1_02/inc/stm32_eval_sdio_sd.h

@@ -1,397 +0,0 @@
-/**