mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-11-08 14:43:04 +08:00
remove stm32 and stm32_lib3.1.0 bsp.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@202 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
1 parent
fe92b1daed
commit
1b48b064dd
151 files changed
-84175
No files matched your search
@@ -1,82 +0,0 @@
|
||||
/*
|
||||
* File : application.c
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2006, RT-Thread Development Team
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rt-thread.org/license/LICENSE
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2009-01-05 Bernard the first version
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup STM32
|
||||
*/
|
||||
/*@{*/
|
||||
|
||||
#include <rtthread.h>
|
||||
#include <finsh.h>
|
||||
|
||||
#ifdef RT_USING_DFS
|
||||
/* dfs init */
|
||||
#include <dfs_init.h>
|
||||
/* dfs filesystem:FAT filesystem init */
|
||||
#include <dfs_fat.h>
|
||||
/* dfs filesystem:EFS filesystem init */
|
||||
#include <dfs_efs.h>
|
||||
/* dfs Filesystem APIs */
|
||||
#include <dfs_fs.h>
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_LWIP
|
||||
#include <lwip/sys.h>
|
||||
#include <lwip/api.h>
|
||||
#endif
|
||||
|
||||
/* thread phase init */
|
||||
void rt_init_thread_entry(void *parameter)
|
||||
{
|
||||
/* Filesystem Initialization */
|
||||
#ifdef RT_USING_DFS
|
||||
{
|
||||
/* init the device filesystem */
|
||||
dfs_init();
|
||||
/* init the efsl filesystam*/
|
||||
efsl_init();
|
||||
|
||||
/* mount sd card fat partition 1 as root directory */
|
||||
if (dfs_mount("sd0", "/", "efs", 0, 0) == 0)
|
||||
rt_kprintf("File System initialized!\n");
|
||||
else
|
||||
rt_kprintf("File System init failed!\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
/* LwIP Initialization */
|
||||
#ifdef RT_USING_LWIP
|
||||
{
|
||||
extern void lwip_sys_init(void);
|
||||
|
||||
/* init lwip system */
|
||||
lwip_sys_init();
|
||||
rt_kprintf("TCP/IP initialized!\n");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
int rt_application_init()
|
||||
{
|
||||
rt_thread_t init_thread;
|
||||
|
||||
init_thread = rt_thread_create("init",
|
||||
rt_init_thread_entry, RT_NULL,
|
||||
2048, 80, 20);
|
||||
rt_thread_startup(init_thread);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*@}*/
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,25 +0,0 @@
|
||||
/*
|
||||
* File : board.h
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2006, RT-Thread Develop Team
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://openlab.rt-thread.com/license/LICENSE
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2006-10-08 Bernard add board.h to this bsp
|
||||
*/
|
||||
|
||||
#ifndef __BOARD_H__
|
||||
#define __BOARD_H__
|
||||
|
||||
void rt_hw_board_led_on(int n);
|
||||
void rt_hw_board_led_off(int n);
|
||||
void rt_hw_board_init(void);
|
||||
|
||||
void rt_hw_usart_init(void);
|
||||
void rt_hw_sdcard_init(void);
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,91 +0,0 @@
|
||||
#include "kbd.h"
|
||||
#include "stm32f10x_lib.h"
|
||||
|
||||
#define GPIO_Pin_KB1 GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3
|
||||
#define GPIO_Pin_KB2 GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_9
|
||||
#define GPIO_KB1 GPIOA
|
||||
#define GPIO_KB2 GPIOB
|
||||
|
||||
#define RCC_APB2Periph_GPIO_KB1 RCC_APB2Periph_GPIOA
|
||||
#define RCC_APB2Periph_GPIO_KB2 RCC_APB2Periph_GPIOB
|
||||
|
||||
#define EXTI_LINE_KB1 EXTI_Line0 | EXTI_Line1 | EXTI_Line2 | EXTI_Line3
|
||||
#define GPIO_PORT_SOURCE_KB1 GPIO_PortSourceGPIOA
|
||||
#define EXTI_LINE_KB2 EXTI_Line0 | EXTI_Line1 | EXTI_Line9
|
||||
#define GPIO_PORT_SOURCE_KB2 GPIO_PortSourceGPIOB
|
||||
|
||||
void rt_hw_kbd_init()
|
||||
{
|
||||
GPIO_InitTypeDef GPIO_InitStructure;
|
||||
NVIC_InitTypeDef NVIC_InitStructure;
|
||||
EXTI_InitTypeDef EXTI_InitStructure;
|
||||
|
||||
/* Configure Key Button 1 GPIO Pin as input floating (Key Button EXTI Line) */
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_KB1;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
|
||||
GPIO_Init(GPIO_KB1, &GPIO_InitStructure);
|
||||
|
||||
/* Configure Key Button 2 GPIO Pin as input floating (Key Button EXTI Line) */
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_KB2;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
|
||||
GPIO_Init(GPIO_KB2, &GPIO_InitStructure);
|
||||
|
||||
/* Enable Key Button GPIO Port clock */
|
||||
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIO_KB1 | RCC_APB2Periph_GPIO_KB2 |
|
||||
RCC_APB2Periph_AFIO, ENABLE);
|
||||
|
||||
/* Configure one bit for preemption priority */
|
||||
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_1);
|
||||
|
||||
/* Enable the EXTI9_5 Interrupt */
|
||||
NVIC_InitStructure.NVIC_IRQChannel = EXTI0_IRQChannel;
|
||||
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
|
||||
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
|
||||
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
|
||||
NVIC_Init(&NVIC_InitStructure);
|
||||
NVIC_InitStructure.NVIC_IRQChannel = EXTI1_IRQChannel;
|
||||
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
|
||||
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
|
||||
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
|
||||
NVIC_Init(&NVIC_InitStructure);
|
||||
NVIC_InitStructure.NVIC_IRQChannel = EXTI2_IRQChannel;
|
||||
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
|
||||
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
|
||||
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
|
||||
NVIC_Init(&NVIC_InitStructure);
|
||||
NVIC_InitStructure.NVIC_IRQChannel = EXTI3_IRQChannel;
|
||||
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
|
||||
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
|
||||
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
|
||||
NVIC_Init(&NVIC_InitStructure);
|
||||
NVIC_InitStructure.NVIC_IRQChannel = EXTI9_5_IRQChannel;
|
||||
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
|
||||
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
|
||||
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
|
||||
NVIC_Init(&NVIC_InitStructure);
|
||||
|
||||
/* Connect Key Button EXTI Line to Key Button GPIO Pin */
|
||||
GPIO_EXTILineConfig(GPIO_PORT_SOURCE_KB1, GPIO_PinSource0);
|
||||
GPIO_EXTILineConfig(GPIO_PORT_SOURCE_KB1, GPIO_PinSource1);
|
||||
GPIO_EXTILineConfig(GPIO_PORT_SOURCE_KB1, GPIO_PinSource2);
|
||||
GPIO_EXTILineConfig(GPIO_PORT_SOURCE_KB1, GPIO_PinSource3);
|
||||
GPIO_EXTILineConfig(GPIO_PORT_SOURCE_KB2, GPIO_PinSource0);
|
||||
GPIO_EXTILineConfig(GPIO_PORT_SOURCE_KB2, GPIO_PinSource1);
|
||||
GPIO_EXTILineConfig(GPIO_PORT_SOURCE_KB2, GPIO_PinSource9);
|
||||
|
||||
/* Configure Key Button EXTI Line to generate an interrupt on falling edge */
|
||||
EXTI_InitStructure.EXTI_Line = EXTI_LINE_KB1 | EXTI_LINE_KB2;
|
||||
EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
|
||||
EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling;
|
||||
EXTI_InitStructure.EXTI_LineCmd = ENABLE;
|
||||
EXTI_Init(&EXTI_InitStructure);
|
||||
}
|
||||
|
||||
void rt_hw_kbd_scan()
|
||||
{
|
||||
/* KBD1 */
|
||||
|
||||
/* KBD2 */
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
#ifndef __KBD_H__
|
||||
#define __KBD_H__
|
||||
|
||||
#include <rthw.h>
|
||||
#include <rtthread.h>
|
||||
|
||||
#endif
|
||||
-487
File diff suppressed because it is too large.
Load diff
-148
@@ -1,148 +0,0 @@
|
||||
#ifndef __LCD_H__
|
||||
#define __LCD_H__
|
||||
|
||||
#include <rthw.h>
|
||||
#include <rtthread.h>
|
||||
|
||||
/* LCD Registers */
|
||||
#define R0 0x00
|
||||
#define R1 0x01
|
||||
#define R2 0x02
|
||||
#define R3 0x03
|
||||
#define R4 0x04
|
||||
#define R5 0x05
|
||||
#define R6 0x06
|
||||
#define R7 0x07
|
||||
#define R8 0x08
|
||||
#define R9 0x09
|
||||
#define R10 0x0A
|
||||
#define R12 0x0C
|
||||
#define R13 0x0D
|
||||
#define R14 0x0E
|
||||
#define R15 0x0F
|
||||
#define R16 0x10
|
||||
#define R17 0x11
|
||||
#define R18 0x12
|
||||
#define R19 0x13
|
||||
#define R20 0x14
|
||||
#define R21 0x15
|
||||
#define R22 0x16
|
||||
#define R23 0x17
|
||||
#define R24 0x18
|
||||
#define R25 0x19
|
||||
#define R26 0x1A
|
||||
#define R27 0x1B
|
||||
#define R28 0x1C
|
||||
#define R29 0x1D
|
||||
#define R30 0x1E
|
||||
#define R31 0x1F
|
||||
#define R32 0x20
|
||||
#define R33 0x21
|
||||
#define R34 0x22
|
||||
#define R36 0x24
|
||||
#define R37 0x25
|
||||
#define R40 0x28
|
||||
#define R41 0x29
|
||||
#define R43 0x2B
|
||||
#define R45 0x2D
|
||||
#define R48 0x30
|
||||
#define R49 0x31
|
||||
#define R50 0x32
|
||||
#define R51 0x33
|
||||
#define R52 0x34
|
||||
#define R53 0x35
|
||||
#define R54 0x36
|
||||
#define R55 0x37
|
||||
#define R56 0x38
|
||||
#define R57 0x39
|
||||
#define R59 0x3B
|
||||
#define R60 0x3C
|
||||
#define R61 0x3D
|
||||
#define R62 0x3E
|
||||
#define R63 0x3F
|
||||
#define R64 0x40
|
||||
#define R65 0x41
|
||||
#define R66 0x42
|
||||
#define R67 0x43
|
||||
#define R68 0x44
|
||||
#define R69 0x45
|
||||
#define R70 0x46
|
||||
#define R71 0x47
|
||||
#define R72 0x48
|
||||
#define R73 0x49
|
||||
#define R74 0x4A
|
||||
#define R75 0x4B
|
||||
#define R76 0x4C
|
||||
#define R77 0x4D
|
||||
#define R78 0x4E
|
||||
#define R79 0x4F
|
||||
#define R80 0x50
|
||||
#define R81 0x51
|
||||
#define R82 0x52
|
||||
#define R83 0x53
|
||||
#define R96 0x60
|
||||
#define R97 0x61
|
||||
#define R106 0x6A
|
||||
#define R118 0x76
|
||||
#define R128 0x80
|
||||
#define R129 0x81
|
||||
#define R130 0x82
|
||||
#define R131 0x83
|
||||
#define R132 0x84
|
||||
#define R133 0x85
|
||||
#define R134 0x86
|
||||
#define R135 0x87
|
||||
#define R136 0x88
|
||||
#define R137 0x89
|
||||
#define R139 0x8B
|
||||
#define R140 0x8C
|
||||
#define R141 0x8D
|
||||
#define R143 0x8F
|
||||
#define R144 0x90
|
||||
#define R145 0x91
|
||||
#define R146 0x92
|
||||
#define R147 0x93
|
||||
#define R148 0x94
|
||||
#define R149 0x95
|
||||
#define R150 0x96
|
||||
#define R151 0x97
|
||||
#define R152 0x98
|
||||
#define R153 0x99
|
||||
#define R154 0x9A
|
||||
#define R157 0x9D
|
||||
#define R192 0xC0
|
||||
#define R193 0xC1
|
||||
#define R229 0xE5
|
||||
|
||||
/* LCD Control pins */
|
||||
#define CtrlPin_NCS GPIO_Pin_2 /* PB.02 */
|
||||
#define CtrlPin_RS GPIO_Pin_7 /* PD.07 */
|
||||
#define CtrlPin_NWR GPIO_Pin_15 /* PD.15 */
|
||||
|
||||
/* LCD color */
|
||||
#define White 0xFFFF
|
||||
#define Black 0x0000
|
||||
#define Grey 0xF7DE
|
||||
#define Blue 0x001F
|
||||
#define Blue2 0x051F
|
||||
#define Red 0xF800
|
||||
#define Magenta 0xF81F
|
||||
#define Green 0x07E0
|
||||
#define Cyan 0x7FFF
|
||||
#define Yellow 0xFFE0
|
||||
|
||||
#define Line0 0
|
||||
#define Line1 24
|
||||
#define Line2 48
|
||||
#define Line3 72
|
||||
#define Line4 96
|
||||
#define Line5 120
|
||||
#define Line6 144
|
||||
#define Line7 168
|
||||
#define Line8 192
|
||||
#define Line9 216
|
||||
|
||||
#define Horizontal 0x00
|
||||
#define Vertical 0x01
|
||||
|
||||
#endif
|
||||
@@ -1,53 +0,0 @@
|
||||
/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
|
||||
* File Name : cortexm3_macro.h
|
||||
* Author : MCD Application Team
|
||||
* Version : V2.0.3
|
||||
* Date : 09/22/2008
|
||||
* Description : Header file for cortexm3_macro.s.
|
||||
********************************************************************************
|
||||
* 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.
|
||||
*******************************************************************************/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __CORTEXM3_MACRO_H
|
||||
#define __CORTEXM3_MACRO_H
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f10x_type.h"
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
void __WFI(void);
|
||||
void __WFE(void);
|
||||
void __SEV(void);
|
||||
void __ISB(void);
|
||||
void __DSB(void);
|
||||
void __DMB(void);
|
||||
void __SVC(void);
|
||||
u32 __MRS_CONTROL(void);
|
||||
void __MSR_CONTROL(u32 Control);
|
||||
u32 __MRS_PSP(void);
|
||||
void __MSR_PSP(u32 TopOfProcessStack);
|
||||
u32 __MRS_MSP(void);
|
||||
void __MSR_MSP(u32 TopOfMainStack);
|
||||
void __RESETPRIMASK(void);
|
||||
void __SETPRIMASK(void);
|
||||
u32 __READ_PRIMASK(void);
|
||||
void __RESETFAULTMASK(void);
|
||||
void __SETFAULTMASK(void);
|
||||
u32 __READ_FAULTMASK(void);
|
||||
void __BASEPRICONFIG(u32 NewPriority);
|
||||
u32 __GetBASEPRI(void);
|
||||
u16 __REV_HalfWord(u16 Data);
|
||||
u32 __REV_Word(u32 Data);
|
||||
|
||||
#endif /* __CORTEXM3_MACRO_H */
|
||||
|
||||
/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,122 +0,0 @@
|
||||
/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
|
||||
* File Name : stm32f10x_bkp.h
|
||||
* Author : MCD Application Team
|
||||
* Version : V2.0.3
|
||||
* Date : 09/22/2008
|
||||
* Description : This file contains all the functions prototypes for the
|
||||
* BKP firmware library.
|
||||
********************************************************************************
|
||||
* 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.
|
||||
*******************************************************************************/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __STM32F10x_BKP_H
|
||||
#define __STM32F10x_BKP_H
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f10x_map.h"
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
/* Tamper Pin active level */
|
||||
#define BKP_TamperPinLevel_High ((u16)0x0000)
|
||||
#define BKP_TamperPinLevel_Low ((u16)0x0001)
|
||||
|
||||
#define IS_BKP_TAMPER_PIN_LEVEL(LEVEL) (((LEVEL) == BKP_TamperPinLevel_High) || \
|
||||
((LEVEL) == BKP_TamperPinLevel_Low))
|
||||
|
||||
/* RTC output source to output on the Tamper pin */
|
||||
#define BKP_RTCOutputSource_None ((u16)0x0000)
|
||||
#define BKP_RTCOutputSource_CalibClock ((u16)0x0080)
|
||||
#define BKP_RTCOutputSource_Alarm ((u16)0x0100)
|
||||
#define BKP_RTCOutputSource_Second ((u16)0x0300)
|
||||
|
||||
#define IS_BKP_RTC_OUTPUT_SOURCE(SOURCE) (((SOURCE) == BKP_RTCOutputSource_None) || \
|
||||
((SOURCE) == BKP_RTCOutputSource_CalibClock) || \
|
||||
((SOURCE) == BKP_RTCOutputSource_Alarm) || \
|
||||
((SOURCE) == BKP_RTCOutputSource_Second))
|
||||
|
||||
/* Data Backup Register */
|
||||
#define BKP_DR1 ((u16)0x0004)
|
||||
#define BKP_DR2 ((u16)0x0008)
|
||||
#define BKP_DR3 ((u16)0x000C)
|
||||
#define BKP_DR4 ((u16)0x0010)
|
||||
#define BKP_DR5 ((u16)0x0014)
|
||||
#define BKP_DR6 ((u16)0x0018)
|
||||
#define BKP_DR7 ((u16)0x001C)
|
||||
#define BKP_DR8 ((u16)0x0020)
|
||||
#define BKP_DR9 ((u16)0x0024)
|
||||
#define BKP_DR10 ((u16)0x0028)
|
||||
#define BKP_DR11 ((u16)0x0040)
|
||||
#define BKP_DR12 ((u16)0x0044)
|
||||
#define BKP_DR13 ((u16)0x0048)
|
||||
#define BKP_DR14 ((u16)0x004C)
|
||||
#define BKP_DR15 ((u16)0x0050)
|
||||
#define BKP_DR16 ((u16)0x0054)
|
||||
#define BKP_DR17 ((u16)0x0058)
|
||||
#define BKP_DR18 ((u16)0x005C)
|
||||
#define BKP_DR19 ((u16)0x0060)
|
||||
#define BKP_DR20 ((u16)0x0064)
|
||||
#define BKP_DR21 ((u16)0x0068)
|
||||
#define BKP_DR22 ((u16)0x006C)
|
||||
#define BKP_DR23 ((u16)0x0070)
|
||||
#define BKP_DR24 ((u16)0x0074)
|
||||
#define BKP_DR25 ((u16)0x0078)
|
||||
#define BKP_DR26 ((u16)0x007C)
|
||||
#define BKP_DR27 ((u16)0x0080)
|
||||
#define BKP_DR28 ((u16)0x0084)
|
||||
#define BKP_DR29 ((u16)0x0088)
|
||||
#define BKP_DR30 ((u16)0x008C)
|
||||
#define BKP_DR31 ((u16)0x0090)
|
||||
#define BKP_DR32 ((u16)0x0094)
|
||||
#define BKP_DR33 ((u16)0x0098)
|
||||
#define BKP_DR34 ((u16)0x009C)
|
||||
#define BKP_DR35 ((u16)0x00A0)
|
||||
#define BKP_DR36 ((u16)0x00A4)
|
||||
#define BKP_DR37 ((u16)0x00A8)
|
||||
#define BKP_DR38 ((u16)0x00AC)
|
||||
#define BKP_DR39 ((u16)0x00B0)
|
||||
#define BKP_DR40 ((u16)0x00B4)
|
||||
#define BKP_DR41 ((u16)0x00B8)
|
||||
#define BKP_DR42 ((u16)0x00BC)
|
||||
|
||||
#define IS_BKP_DR(DR) (((DR) == BKP_DR1) || ((DR) == BKP_DR2) || ((DR) == BKP_DR3) || \
|
||||
((DR) == BKP_DR4) || ((DR) == BKP_DR5) || ((DR) == BKP_DR6) || \
|
||||
((DR) == BKP_DR7) || ((DR) == BKP_DR8) || ((DR) == BKP_DR9) || \
|
||||
((DR) == BKP_DR10) || ((DR) == BKP_DR11) || ((DR) == BKP_DR12) || \
|
||||
((DR) == BKP_DR13) || ((DR) == BKP_DR14) || ((DR) == BKP_DR15) || \
|
||||
((DR) == BKP_DR16) || ((DR) == BKP_DR17) || ((DR) == BKP_DR18) || \
|
||||
((DR) == BKP_DR19) || ((DR) == BKP_DR20) || ((DR) == BKP_DR21) || \
|
||||
((DR) == BKP_DR22) || ((DR) == BKP_DR23) || ((DR) == BKP_DR24) || \
|
||||
((DR) == BKP_DR25) || ((DR) == BKP_DR26) || ((DR) == BKP_DR27) || \
|
||||
((DR) == BKP_DR28) || ((DR) == BKP_DR29) || ((DR) == BKP_DR30) || \
|
||||
((DR) == BKP_DR31) || ((DR) == BKP_DR32) || ((DR) == BKP_DR33) || \
|
||||
((DR) == BKP_DR34) || ((DR) == BKP_DR35) || ((DR) == BKP_DR36) || \
|
||||
((DR) == BKP_DR37) || ((DR) == BKP_DR38) || ((DR) == BKP_DR39) || \
|
||||
((DR) == BKP_DR40) || ((DR) == BKP_DR41) || ((DR) == BKP_DR42))
|
||||
|
||||
#define IS_BKP_CALIBRATION_VALUE(VALUE) ((VALUE) <= 0x7F)
|
||||
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
void BKP_DeInit(void);
|
||||
void BKP_TamperPinLevelConfig(u16 BKP_TamperPinLevel);
|
||||
void BKP_TamperPinCmd(FunctionalState NewState);
|
||||
void BKP_ITConfig(FunctionalState NewState);
|
||||
void BKP_RTCOutputConfig(u16 BKP_RTCOutputSource);
|
||||
void BKP_SetRTCCalibrationValue(u8 CalibrationValue);
|
||||
void BKP_WriteBackupRegister(u16 BKP_DR, u16 Data);
|
||||
u16 BKP_ReadBackupRegister(u16 BKP_DR);
|
||||
FlagStatus BKP_GetFlagStatus(void);
|
||||
void BKP_ClearFlag(void);
|
||||
ITStatus BKP_GetITStatus(void);
|
||||
void BKP_ClearITPendingBit(void);
|
||||
|
||||
#endif /* __STM32F10x_BKP_H */
|
||||
|
||||
/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,37 +0,0 @@
|
||||
/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
|
||||
* File Name : stm32f10x_crc.h
|
||||
* Author : MCD Application Team
|
||||
* Version : V2.0.3
|
||||
* Date : 09/22/2008
|
||||
* Description : This file contains all the functions prototypes for the
|
||||
* CRC firmware library.
|
||||
********************************************************************************
|
||||
* 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.
|
||||
*******************************************************************************/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __STM32F10x_CRC_H
|
||||
#define __STM32F10x_CRC_H
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f10x_map.h"
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
void CRC_ResetDR(void);
|
||||
u32 CRC_CalcCRC(u32 Data);
|
||||
u32 CRC_CalcBlockCRC(u32 pBuffer[], u32 BufferLength);
|
||||
u32 CRC_GetCRC(void);
|
||||
void CRC_SetIDRegister(u8 IDValue);
|
||||
u8 CRC_GetIDRegister(void);
|
||||
|
||||
#endif /* __STM32F10x_CRC_H */
|
||||
|
||||
/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/
|
||||
@@ -1,167 +0,0 @@
|
||||
/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
|
||||
* File Name : stm32f10x_dac.h
|
||||
* Author : MCD Application Team
|
||||
* Version : V2.0.3
|
||||
* Date : 09/22/2008
|
||||
* Description : This file contains all the functions prototypes for the
|
||||
* DAC firmware library.
|
||||
********************************************************************************
|
||||
* 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.
|
||||
*******************************************************************************/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __STM32F10x_DAC_H
|
||||
#define __STM32F10x_DAC_H
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f10x_map.h"
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* DAC Init structure definition */
|
||||
typedef struct
|
||||
{
|
||||
u32 DAC_Trigger;
|
||||
u32 DAC_WaveGeneration;
|
||||
u32 DAC_LFSRUnmask_TriangleAmplitude;
|
||||
u32 DAC_OutputBuffer;
|
||||
}DAC_InitTypeDef;
|
||||
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
/* DAC trigger selection */
|
||||
#define DAC_Trigger_None ((u32)0x00000000)
|
||||
#define DAC_Trigger_T6_TRGO ((u32)0x00000004)
|
||||
#define DAC_Trigger_T8_TRGO ((u32)0x0000000C)
|
||||
#define DAC_Trigger_T7_TRGO ((u32)0x00000014)
|
||||
#define DAC_Trigger_T5_TRGO ((u32)0x0000001C)
|
||||
#define DAC_Trigger_T2_TRGO ((u32)0x00000024)
|
||||
#define DAC_Trigger_T4_TRGO ((u32)0x0000002C)
|
||||
#define DAC_Trigger_Ext_IT9 ((u32)0x00000034)
|
||||
#define DAC_Trigger_Software ((u32)0x0000003C)
|
||||
|
||||
#define IS_DAC_TRIGGER(TRIGGER) (((TRIGGER) == DAC_Trigger_None) || \
|
||||
((TRIGGER) == DAC_Trigger_T6_TRGO) || \
|
||||
((TRIGGER) == DAC_Trigger_T8_TRGO) || \
|
||||
((TRIGGER) == DAC_Trigger_T7_TRGO) || \
|
||||
((TRIGGER) == DAC_Trigger_T5_TRGO) || \
|
||||
((TRIGGER) == DAC_Trigger_T2_TRGO) || \
|
||||
((TRIGGER) == DAC_Trigger_T4_TRGO) || \
|
||||
((TRIGGER) == DAC_Trigger_Ext_IT9) || \
|
||||
((TRIGGER) == DAC_Trigger_Software))
|
||||
|
||||
/* DAC wave generation */
|
||||
#define DAC_WaveGeneration_None ((u32)0x00000000)
|
||||
#define DAC_WaveGeneration_Noise ((u32)0x00000040)
|
||||
#define DAC_WaveGeneration_Triangle ((u32)0x00000080)
|
||||
|
||||
#define IS_DAC_GENERATE_WAVE(WAVE) (((WAVE) == DAC_WaveGeneration_None) || \
|
||||
((WAVE) == DAC_WaveGeneration_Noise) || \
|
||||
((WAVE) == DAC_WaveGeneration_Triangle))
|
||||
|
||||
/* DAC noise wave generation mask / triangle wave generation max amplitude */
|
||||
#define DAC_LFSRUnmask_Bit0 ((u32)0x00000000)
|
||||
#define DAC_LFSRUnmask_Bits1_0 ((u32)0x00000100)
|
||||
#define DAC_LFSRUnmask_Bits2_0 ((u32)0x00000200)
|
||||
#define DAC_LFSRUnmask_Bits3_0 ((u32)0x00000300)
|
||||
#define DAC_LFSRUnmask_Bits4_0 ((u32)0x00000400)
|
||||
#define DAC_LFSRUnmask_Bits5_0 ((u32)0x00000500)
|
||||
#define DAC_LFSRUnmask_Bits6_0 ((u32)0x00000600)
|
||||
#define DAC_LFSRUnmask_Bits7_0 ((u32)0x00000700)
|
||||
#define DAC_LFSRUnmask_Bits8_0 ((u32)0x00000800)
|
||||
#define DAC_LFSRUnmask_Bits9_0 ((u32)0x00000900)
|
||||
#define DAC_LFSRUnmask_Bits10_0 ((u32)0x00000A00)
|
||||
#define DAC_LFSRUnmask_Bits11_0 ((u32)0x00000B00)
|
||||
|
||||
#define DAC_TriangleAmplitude_1 ((u32)0x00000000)
|
||||
#define DAC_TriangleAmplitude_3 ((u32)0x00000100)
|
||||
#define DAC_TriangleAmplitude_7 ((u32)0x00000200)
|
||||
#define DAC_TriangleAmplitude_15 ((u32)0x00000300)
|
||||
#define DAC_TriangleAmplitude_31 ((u32)0x00000400)
|
||||
#define DAC_TriangleAmplitude_63 ((u32)0x00000500)
|
||||
#define DAC_TriangleAmplitude_127 ((u32)0x00000600)
|
||||
#define DAC_TriangleAmplitude_255 ((u32)0x00000700)
|
||||
#define DAC_TriangleAmplitude_511 ((u32)0x00000800)
|
||||
#define DAC_TriangleAmplitude_1023 ((u32)0x00000900)
|
||||
#define DAC_TriangleAmplitude_2047 ((u32)0x00000A00)
|
||||
#define DAC_TriangleAmplitude_4095 ((u32)0x00000B00)
|
||||
|
||||
#define IS_DAC_LFSR_UNMASK_TRIANGLE_AMPLITUDE(VALUE) (((VALUE) == DAC_LFSRUnmask_Bit0) || \
|
||||
((VALUE) == DAC_LFSRUnmask_Bits1_0) || \
|
||||
((VALUE) == DAC_LFSRUnmask_Bits2_0) || \
|
||||
((VALUE) == DAC_LFSRUnmask_Bits3_0) || \
|
||||
((VALUE) == DAC_LFSRUnmask_Bits4_0) || \
|
||||
((VALUE) == DAC_LFSRUnmask_Bits5_0) || \
|
||||
((VALUE) == DAC_LFSRUnmask_Bits6_0) || \
|
||||
((VALUE) == DAC_LFSRUnmask_Bits7_0) || \
|
||||
((VALUE) == DAC_LFSRUnmask_Bits8_0) || \
|
||||
((VALUE) == DAC_LFSRUnmask_Bits9_0) || \
|
||||
((VALUE) == DAC_LFSRUnmask_Bits10_0) || \
|
||||
((VALUE) == DAC_LFSRUnmask_Bits11_0) || \
|
||||
((VALUE) == DAC_TriangleAmplitude_1) || \
|
||||
((VALUE) == DAC_TriangleAmplitude_3) || \
|
||||
((VALUE) == DAC_TriangleAmplitude_7) || \
|
||||
((VALUE) == DAC_TriangleAmplitude_15) || \
|
||||
((VALUE) == DAC_TriangleAmplitude_31) || \
|
||||
((VALUE) == DAC_TriangleAmplitude_63) || \
|
||||
((VALUE) == DAC_TriangleAmplitude_127) || \
|
||||
((VALUE) == DAC_TriangleAmplitude_255) || \
|
||||
((VALUE) == DAC_TriangleAmplitude_511) || \
|
||||
((VALUE) == DAC_TriangleAmplitude_1023) || \
|
||||
((VALUE) == DAC_TriangleAmplitude_2047) || \
|
||||
((VALUE) == DAC_TriangleAmplitude_4095))
|
||||
|
||||
/* DAC output buffer */
|
||||
#define DAC_OutputBuffer_Enable ((u32)0x00000000)
|
||||
#define DAC_OutputBuffer_Disable ((u32)0x00000002)
|
||||
|
||||
#define IS_DAC_OUTPUT_BUFFER_STATE(STATE) (((STATE) == DAC_OutputBuffer_Enable) || \
|
||||
((STATE) == DAC_OutputBuffer_Disable))
|
||||
|
||||
/* DAC Channel selection */
|
||||
#define DAC_Channel_1 ((u32)0x00000000)
|
||||
#define DAC_Channel_2 ((u32)0x00000010)
|
||||
|
||||
#define IS_DAC_CHANNEL(CHANNEL) (((CHANNEL) == DAC_Channel_1) || \
|
||||
((CHANNEL) == DAC_Channel_2))
|
||||
|
||||
/* DAC data alignement */
|
||||
#define DAC_Align_12b_R ((u32)0x00000000)
|
||||
#define DAC_Align_12b_L ((u32)0x00000004)
|
||||
#define DAC_Align_8b_R ((u32)0x00000008)
|
||||
|
||||
#define IS_DAC_ALIGN(ALIGN) (((ALIGN) == DAC_Align_12b_R) || \
|
||||
((ALIGN) == DAC_Align_12b_L) || \
|
||||
((ALIGN) == DAC_Align_8b_R))
|
||||
|
||||
/* DAC wave generation */
|
||||
#define DAC_Wave_Noise ((u32)0x00000040)
|
||||
#define DAC_Wave_Triangle ((u32)0x00000080)
|
||||
|
||||
#define IS_DAC_WAVE(WAVE) (((WAVE) == DAC_Wave_Noise) || \
|
||||
((WAVE) == DAC_Wave_Triangle))
|
||||
|
||||
/* DAC data ------------------------------------------------------------------*/
|
||||
#define IS_DAC_DATA(DATA) ((DATA) <= 0xFFF0)
|
||||
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
/* Exported functions --------------------------------------------------------*/
|
||||
void DAC_DeInit(void);
|
||||
void DAC_Init(u32 DAC_Channel, DAC_InitTypeDef* DAC_InitStruct);
|
||||
void DAC_StructInit(DAC_InitTypeDef* DAC_InitStruct);
|
||||
void DAC_Cmd(u32 DAC_Channel, FunctionalState NewState);
|
||||
void DAC_DMACmd(u32 DAC_Channel, FunctionalState NewState);
|
||||
void DAC_SoftwareTriggerCmd(u32 DAC_Channel, FunctionalState NewState);
|
||||
void DAC_DualSoftwareTriggerCmd(FunctionalState NewState);
|
||||
void DAC_WaveGenerationCmd(u32 DAC_Channel, u32 DAC_Wave, FunctionalState NewState);
|
||||
void DAC_SetChannel1Data(u32 DAC_Align, u16 Data);
|
||||
void DAC_SetChannel2Data(u32 DAC_Align, u16 Data);
|
||||
void DAC_SetDualChannelData(u32 DAC_Align, u16 Data2, u16 Data1);
|
||||
u16 DAC_GetDataOutputValue(u32 DAC_Channel);
|
||||
|
||||
#endif /*__STM32F10x_DAC_H */
|
||||
|
||||
/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/
|
||||
@@ -1,55 +0,0 @@
|
||||
/******************** (C) COPYRIGHT 2009 STMicroelectronics ********************
|
||||
* File Name : stm32f10x_dbgmcu.h
|
||||
* Author : MCD Application Team
|
||||
* Version : V2.0.3Patch1
|
||||
* Date : 04/06/2009
|
||||
* Description : This file contains all the functions prototypes for the
|
||||
* DBGMCU firmware library.
|
||||
********************************************************************************
|
||||
* 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.
|
||||
*******************************************************************************/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __STM32F10x_DBGMCU_H
|
||||
#define __STM32F10x_DBGMCU_H
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f10x_map.h"
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
#define DBGMCU_SLEEP ((u32)0x00000001)
|
||||
#define DBGMCU_STOP ((u32)0x00000002)
|
||||
#define DBGMCU_STANDBY ((u32)0x00000004)
|
||||
#define DBGMCU_IWDG_STOP ((u32)0x00000100)
|
||||
#define DBGMCU_WWDG_STOP ((u32)0x00000200)
|
||||
#define DBGMCU_TIM1_STOP ((u32)0x00000400)
|
||||
#define DBGMCU_TIM2_STOP ((u32)0x00000800)
|
||||
#define DBGMCU_TIM3_STOP ((u32)0x00001000)
|
||||
#define DBGMCU_TIM4_STOP ((u32)0x00002000)
|
||||
#define DBGMCU_CAN_STOP ((u32)0x00004000)
|
||||
#define DBGMCU_I2C1_SMBUS_TIMEOUT ((u32)0x00008000)
|
||||
#define DBGMCU_I2C2_SMBUS_TIMEOUT ((u32)0x00010000)
|
||||
#define DBGMCU_TIM8_STOP ((u32)0x00020000)
|
||||
#define DBGMCU_TIM5_STOP ((u32)0x00040000)
|
||||
#define DBGMCU_TIM6_STOP ((u32)0x00080000)
|
||||
#define DBGMCU_TIM7_STOP ((u32)0x00100000)
|
||||
|
||||
#define IS_DBGMCU_PERIPH(PERIPH) ((((PERIPH) & 0xFFE000F8) == 0x00) && ((PERIPH) != 0x00))
|
||||
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
u32 DBGMCU_GetREVID(void);
|
||||
u32 DBGMCU_GetDEVID(void);
|
||||
void DBGMCU_Config(u32 DBGMCU_Periph, FunctionalState NewState);
|
||||
|
||||
#endif /* __STM32F10x_DBGMCU_H */
|
||||
|
||||
/******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,107 +0,0 @@
|
||||
/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
|
||||
* File Name : stm32f10x_exti.h
|
||||
* Author : MCD Application Team
|
||||
* Version : V2.0.3
|
||||
* Date : 09/22/2008
|
||||
* Description : This file contains all the functions prototypes for the
|
||||
* EXTI firmware library.
|
||||
********************************************************************************
|
||||
* 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.
|
||||
*******************************************************************************/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __STM32F10x_EXTI_H
|
||||
#define __STM32F10x_EXTI_H
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f10x_map.h"
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* EXTI mode enumeration -----------------------------------------------------*/
|
||||
typedef enum
|
||||
{
|
||||
EXTI_Mode_Interrupt = 0x00,
|
||||
EXTI_Mode_Event = 0x04
|
||||
}EXTIMode_TypeDef;
|
||||
|
||||
#define IS_EXTI_MODE(MODE) (((MODE) == EXTI_Mode_Interrupt) || ((MODE) == EXTI_Mode_Event))
|
||||
|
||||
/* EXTI Trigger enumeration --------------------------------------------------*/
|
||||
typedef enum
|
||||
{
|
||||
EXTI_Trigger_Rising = 0x08,
|
||||
EXTI_Trigger_Falling = 0x0C,
|
||||
EXTI_Trigger_Rising_Falling = 0x10
|
||||
}EXTITrigger_TypeDef;
|
||||
|
||||
#define IS_EXTI_TRIGGER(TRIGGER) (((TRIGGER) == EXTI_Trigger_Rising) || \
|
||||
((TRIGGER) == EXTI_Trigger_Falling) || \
|
||||
((TRIGGER) == EXTI_Trigger_Rising_Falling))
|
||||
|
||||
/* EXTI Init Structure definition --------------------------------------------*/
|
||||
typedef struct
|
||||
{
|
||||
u32 EXTI_Line;
|
||||
EXTIMode_TypeDef EXTI_Mode;
|
||||
EXTITrigger_TypeDef EXTI_Trigger;
|
||||
FunctionalState EXTI_LineCmd;
|
||||
}EXTI_InitTypeDef;
|
||||
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
/* EXTI Lines ----------------------------------------------------------------*/
|
||||
#define EXTI_Line0 ((u32)0x00001) /* External interrupt line 0 */
|
||||
#define EXTI_Line1 ((u32)0x00002) /* External interrupt line 1 */
|
||||
#define EXTI_Line2 ((u32)0x00004) /* External interrupt line 2 */
|
||||
#define EXTI_Line3 ((u32)0x00008) /* External interrupt line 3 */
|
||||
#define EXTI_Line4 ((u32)0x00010) /* External interrupt line 4 */
|
||||
#define EXTI_Line5 ((u32)0x00020) /* External interrupt line 5 */
|
||||
#define EXTI_Line6 ((u32)0x00040) /* External interrupt line 6 */
|
||||
#define EXTI_Line7 ((u32)0x00080) /* External interrupt line 7 */
|
||||
#define EXTI_Line8 ((u32)0x00100) /* External interrupt line 8 */
|
||||
#define EXTI_Line9 ((u32)0x00200) /* External interrupt line 9 */
|
||||
#define EXTI_Line10 ((u32)0x00400) /* External interrupt line 10 */
|
||||
#define EXTI_Line11 ((u32)0x00800) /* External interrupt line 11 */
|
||||
#define EXTI_Line12 ((u32)0x01000) /* External interrupt line 12 */
|
||||
#define EXTI_Line13 ((u32)0x02000) /* External interrupt line 13 */
|
||||
#define EXTI_Line14 ((u32)0x04000) /* External interrupt line 14 */
|
||||
#define EXTI_Line15 ((u32)0x08000) /* External interrupt line 15 */
|
||||
#define EXTI_Line16 ((u32)0x10000) /* External interrupt line 16
|
||||
Connected to the PVD Output */
|
||||
#define EXTI_Line17 ((u32)0x20000) /* External interrupt line 17
|
||||
Connected to the RTC Alarm event */
|
||||
#define EXTI_Line18 ((u32)0x40000) /* External interrupt line 18
|
||||
Connected to the USB Wakeup from
|
||||
suspend event */
|
||||
|
||||
#define IS_EXTI_LINE(LINE) ((((LINE) & (u32)0xFFF80000) == 0x00) && ((LINE) != (u16)0x00))
|
||||
|
||||
#define IS_GET_EXTI_LINE(LINE) (((LINE) == EXTI_Line0) || ((LINE) == EXTI_Line1) || \
|
||||
((LINE) == EXTI_Line2) || ((LINE) == EXTI_Line3) || \
|
||||
((LINE) == EXTI_Line4) || ((LINE) == EXTI_Line5) || \
|
||||
((LINE) == EXTI_Line6) || ((LINE) == EXTI_Line7) || \
|
||||
((LINE) == EXTI_Line8) || ((LINE) == EXTI_Line9) || \
|
||||
((LINE) == EXTI_Line10) || ((LINE) == EXTI_Line11) || \
|
||||
((LINE) == EXTI_Line12) || ((LINE) == EXTI_Line13) || \
|
||||
((LINE) == EXTI_Line14) || ((LINE) == EXTI_Line15) || \
|
||||
((LINE) == EXTI_Line16) || ((LINE) == EXTI_Line17) || \
|
||||
((LINE) == EXTI_Line18))
|
||||
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
void EXTI_DeInit(void);
|
||||
void EXTI_Init(EXTI_InitTypeDef* EXTI_InitStruct);
|
||||
void EXTI_StructInit(EXTI_InitTypeDef* EXTI_InitStruct);
|
||||
void EXTI_GenerateSWInterrupt(u32 EXTI_Line);
|
||||
FlagStatus EXTI_GetFlagStatus(u32 EXTI_Line);
|
||||
void EXTI_ClearFlag(u32 EXTI_Line);
|
||||
ITStatus EXTI_GetITStatus(u32 EXTI_Line);
|
||||
void EXTI_ClearITPendingBit(u32 EXTI_Line);
|
||||
|
||||
#endif /* __STM32F10x_EXTI_H */
|
||||
|
||||
/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,69 +0,0 @@
|
||||
/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
|
||||
* File Name : stm32f10x_iwdg.h
|
||||
* Author : MCD Application Team
|
||||
* Version : V2.0.3
|
||||
* Date : 09/22/2008
|
||||
* Description : This file contains all the functions prototypes for the
|
||||
* IWDG firmware library.
|
||||
********************************************************************************
|
||||
* 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.
|
||||
*******************************************************************************/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __STM32F10x_IWDG_H
|
||||
#define __STM32F10x_IWDG_H
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f10x_map.h"
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
/* Write access to IWDG_PR and IWDG_RLR registers */
|
||||
#define IWDG_WriteAccess_Enable ((u16)0x5555)
|
||||
#define IWDG_WriteAccess_Disable ((u16)0x0000)
|
||||
|
||||
#define IS_IWDG_WRITE_ACCESS(ACCESS) (((ACCESS) == IWDG_WriteAccess_Enable) || \
|
||||
((ACCESS) == IWDG_WriteAccess_Disable))
|
||||
|
||||
/* IWDG prescaler */
|
||||
#define IWDG_Prescaler_4 ((u8)0x00)
|
||||
#define IWDG_Prescaler_8 ((u8)0x01)
|
||||
#define IWDG_Prescaler_16 ((u8)0x02)
|
||||
#define IWDG_Prescaler_32 ((u8)0x03)
|
||||
#define IWDG_Prescaler_64 ((u8)0x04)
|
||||
#define IWDG_Prescaler_128 ((u8)0x05)
|
||||
#define IWDG_Prescaler_256 ((u8)0x06)
|
||||
|
||||
#define IS_IWDG_PRESCALER(PRESCALER) (((PRESCALER) == IWDG_Prescaler_4) || \
|
||||
((PRESCALER) == IWDG_Prescaler_8) || \
|
||||
((PRESCALER) == IWDG_Prescaler_16) || \
|
||||
((PRESCALER) == IWDG_Prescaler_32) || \
|
||||
((PRESCALER) == IWDG_Prescaler_64) || \
|
||||
((PRESCALER) == IWDG_Prescaler_128)|| \
|
||||
((PRESCALER) == IWDG_Prescaler_256))
|
||||
|
||||
/* IWDG Flag */
|
||||
#define IWDG_FLAG_PVU ((u16)0x0001)
|
||||
#define IWDG_FLAG_RVU ((u16)0x0002)
|
||||
|
||||
#define IS_IWDG_FLAG(FLAG) (((FLAG) == IWDG_FLAG_PVU) || ((FLAG) == IWDG_FLAG_RVU))
|
||||
|
||||
#define IS_IWDG_RELOAD(RELOAD) ((RELOAD) <= 0xFFF)
|
||||
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
void IWDG_WriteAccessCmd(u16 IWDG_WriteAccess);
|
||||
void IWDG_SetPrescaler(u8 IWDG_Prescaler);
|
||||
void IWDG_SetReload(u16 Reload);
|
||||
void IWDG_ReloadCounter(void);
|
||||
void IWDG_Enable(void);
|
||||
FlagStatus IWDG_GetFlagStatus(u16 IWDG_FLAG);
|
||||
|
||||
#endif /* __STM32F10x_IWDG_H */
|
||||
|
||||
/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/
|
||||
@@ -1,124 +0,0 @@
|
||||
/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
|
||||
* File Name : stm32f10x_lib.h
|
||||
* Author : MCD Application Team
|
||||
* Version : V2.0.3
|
||||
* Date : 09/22/2008
|
||||
* Description : This file includes the peripherals header files in the
|
||||
* user application.
|
||||
********************************************************************************
|
||||
* 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.
|
||||
*******************************************************************************/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __STM32F10x_LIB_H
|
||||
#define __STM32F10x_LIB_H
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f10x_map.h"
|
||||
|
||||
#ifdef _ADC
|
||||
#include "stm32f10x_adc.h"
|
||||
#endif /*_ADC */
|
||||
|
||||
#ifdef _BKP
|
||||
#include "stm32f10x_bkp.h"
|
||||
#endif /*_BKP */
|
||||
|
||||
#ifdef _CAN
|
||||
#include "stm32f10x_can.h"
|
||||
#endif /*_CAN */
|
||||
|
||||
#ifdef _CRC
|
||||
#include "stm32f10x_crc.h"
|
||||
#endif /*_CRC */
|
||||
|
||||
#ifdef _DAC
|
||||
#include "stm32f10x_dac.h"
|
||||
#endif /*_DAC */
|
||||
|
||||
#ifdef _DBGMCU
|
||||
#include "stm32f10x_dbgmcu.h"
|
||||
#endif /*_DBGMCU */
|
||||
|
||||
#ifdef _DMA
|
||||
#include "stm32f10x_dma.h"
|
||||
#endif /*_DMA */
|
||||
|
||||
#ifdef _EXTI
|
||||
#include "stm32f10x_exti.h"
|
||||
#endif /*_EXTI */
|
||||
|
||||
#ifdef _FLASH
|
||||
#include "stm32f10x_flash.h"
|
||||
#endif /*_FLASH */
|
||||
|
||||
#ifdef _FSMC
|
||||
#include "stm32f10x_fsmc.h"
|
||||
#endif /*_FSMC */
|
||||
|
||||
#ifdef _GPIO
|
||||
#include "stm32f10x_gpio.h"
|
||||
#endif /*_GPIO */
|
||||
|
||||
#ifdef _I2C
|
||||
#include "stm32f10x_i2c.h"
|
||||
#endif /*_I2C */
|
||||
|
||||
#ifdef _IWDG
|
||||
#include "stm32f10x_iwdg.h"
|
||||
#endif /*_IWDG */
|
||||
|
||||
#ifdef _NVIC
|
||||
#include "stm32f10x_nvic.h"
|
||||
#endif /*_NVIC */
|
||||
|
||||
#ifdef _PWR
|
||||
#include "stm32f10x_pwr.h"
|
||||
#endif /*_PWR */
|
||||
|
||||
#ifdef _RCC
|
||||
#include "stm32f10x_rcc.h"
|
||||
#endif /*_RCC */
|
||||
|
||||
#ifdef _RTC
|
||||
#include "stm32f10x_rtc.h"
|
||||
#endif /*_RTC */
|
||||
|
||||
#ifdef _SDIO
|
||||
#include "stm32f10x_sdio.h"
|
||||
#endif /*_SDIO */
|
||||
|
||||
#ifdef _SPI
|
||||
#include "stm32f10x_spi.h"
|
||||
#endif /*_SPI */
|
||||
|
||||
#ifdef _SysTick
|
||||
#include "stm32f10x_systick.h"
|
||||
#endif /*_SysTick */
|
||||
|
||||
#ifdef _TIM
|
||||
#include "stm32f10x_tim.h"
|
||||
#endif /*_TIM */
|
||||
|
||||
#ifdef _USART
|
||||
#include "stm32f10x_usart.h"
|
||||
#endif /*_USART */
|
||||
|
||||
#ifdef _WWDG
|
||||
#include "stm32f10x_wwdg.h"
|
||||
#endif /*_WWDG */
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
void debug(void);
|
||||
|
||||
#endif /* __STM32F10x_LIB_H */
|
||||
|
||||
/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,77 +0,0 @@
|
||||
/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
|
||||
* File Name : stm32f10x_pwr.h
|
||||
* Author : MCD Application Team
|
||||
* Version : V2.0.3
|
||||
* Date : 09/22/2008
|
||||
* Description : This file contains all the functions prototypes for the
|
||||
* PWR firmware library.
|
||||
********************************************************************************
|
||||
* 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.
|
||||
*******************************************************************************/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __STM32F10x_PWR_H
|
||||
#define __STM32F10x_PWR_H
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f10x_map.h"
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
/* PVD detection level */
|
||||
#define PWR_PVDLevel_2V2 ((u32)0x00000000)
|
||||
#define PWR_PVDLevel_2V3 ((u32)0x00000020)
|
||||
#define PWR_PVDLevel_2V4 ((u32)0x00000040)
|
||||
#define PWR_PVDLevel_2V5 ((u32)0x00000060)
|
||||
#define PWR_PVDLevel_2V6 ((u32)0x00000080)
|
||||
#define PWR_PVDLevel_2V7 ((u32)0x000000A0)
|
||||
#define PWR_PVDLevel_2V8 ((u32)0x000000C0)
|
||||
#define PWR_PVDLevel_2V9 ((u32)0x000000E0)
|
||||
|
||||
#define IS_PWR_PVD_LEVEL(LEVEL) (((LEVEL) == PWR_PVDLevel_2V2) || ((LEVEL) == PWR_PVDLevel_2V3)|| \
|
||||
((LEVEL) == PWR_PVDLevel_2V4) || ((LEVEL) == PWR_PVDLevel_2V5)|| \
|
||||
((LEVEL) == PWR_PVDLevel_2V6) || ((LEVEL) == PWR_PVDLevel_2V7)|| \
|
||||
((LEVEL) == PWR_PVDLevel_2V8) || ((LEVEL) == PWR_PVDLevel_2V9))
|
||||
|
||||
/* Regulator state is STOP mode */
|
||||
#define PWR_Regulator_ON ((u32)0x00000000)
|
||||
#define PWR_Regulator_LowPower ((u32)0x00000001)
|
||||
|
||||
#define IS_PWR_REGULATOR(REGULATOR) (((REGULATOR) == PWR_Regulator_ON) || \
|
||||
((REGULATOR) == PWR_Regulator_LowPower))
|
||||
|
||||
/* STOP mode entry */
|
||||
#define PWR_STOPEntry_WFI ((u8)0x01)
|
||||
#define PWR_STOPEntry_WFE ((u8)0x02)
|
||||
|
||||
#define IS_PWR_STOP_ENTRY(ENTRY) (((ENTRY) == PWR_STOPEntry_WFI) || ((ENTRY) == PWR_STOPEntry_WFE))
|
||||
|
||||
/* PWR Flag */
|
||||
#define PWR_FLAG_WU ((u32)0x00000001)
|
||||
#define PWR_FLAG_SB ((u32)0x00000002)
|
||||
#define PWR_FLAG_PVDO ((u32)0x00000004)
|
||||
|
||||
#define IS_PWR_GET_FLAG(FLAG) (((FLAG) == PWR_FLAG_WU) || ((FLAG) == PWR_FLAG_SB) || \
|
||||
((FLAG) == PWR_FLAG_PVDO))
|
||||
#define IS_PWR_CLEAR_FLAG(FLAG) (((FLAG) == PWR_FLAG_WU) || ((FLAG) == PWR_FLAG_SB))
|
||||
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
void PWR_DeInit(void);
|
||||
void PWR_BackupAccessCmd(FunctionalState NewState);
|
||||
void PWR_PVDCmd(FunctionalState NewState);
|
||||
void PWR_PVDLevelConfig(u32 PWR_PVDLevel);
|
||||
void PWR_WakeUpPinCmd(FunctionalState NewState);
|
||||
void PWR_EnterSTOPMode(u32 PWR_Regulator, u8 PWR_STOPEntry);
|
||||
void PWR_EnterSTANDBYMode(void);
|
||||
FlagStatus PWR_GetFlagStatus(u32 PWR_FLAG);
|
||||
void PWR_ClearFlag(u32 PWR_FLAG);
|
||||
|
||||
#endif /* __STM32F10x_PWR_H */
|
||||
|
||||
/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,70 +0,0 @@
|
||||
/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
|
||||
* File Name : stm32f10x_rtc.h
|
||||
* Author : MCD Application Team
|
||||
* Version : V2.0.3
|
||||
* Date : 09/22/2008
|
||||
* Description : This file contains all the functions prototypes for the
|
||||
* RTC firmware library.
|
||||
********************************************************************************
|
||||
* 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.
|
||||
*******************************************************************************/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __STM32F10x_RTC_H
|
||||
#define __STM32F10x_RTC_H
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f10x_map.h"
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
/* RTC interrupts define -----------------------------------------------------*/
|
||||
#define RTC_IT_OW ((u16)0x0004) /* Overflow interrupt */
|
||||
#define RTC_IT_ALR ((u16)0x0002) /* Alarm interrupt */
|
||||
#define RTC_IT_SEC ((u16)0x0001) /* Second interrupt */
|
||||
|
||||
#define IS_RTC_IT(IT) ((((IT) & (u16)0xFFF8) == 0x00) && ((IT) != 0x00))
|
||||
|
||||
#define IS_RTC_GET_IT(IT) (((IT) == RTC_IT_OW) || ((IT) == RTC_IT_ALR) || \
|
||||
((IT) == RTC_IT_SEC))
|
||||
|
||||
/* RTC interrupts flags ------------------------------------------------------*/
|
||||
#define RTC_FLAG_RTOFF ((u16)0x0020) /* RTC Operation OFF flag */
|
||||
#define RTC_FLAG_RSF ((u16)0x0008) /* Registers Synchronized flag */
|
||||
#define RTC_FLAG_OW ((u16)0x0004) /* Overflow flag */
|
||||
#define RTC_FLAG_ALR ((u16)0x0002) /* Alarm flag */
|
||||
#define RTC_FLAG_SEC ((u16)0x0001) /* Second flag */
|
||||
|
||||
#define IS_RTC_CLEAR_FLAG(FLAG) ((((FLAG) & (u16)0xFFF0) == 0x00) && ((FLAG) != 0x00))
|
||||
|
||||
#define IS_RTC_GET_FLAG(FLAG) (((FLAG) == RTC_FLAG_RTOFF) || ((FLAG) == RTC_FLAG_RSF) || \
|
||||
((FLAG) == RTC_FLAG_OW) || ((FLAG) == RTC_FLAG_ALR) || \
|
||||
((FLAG) == RTC_FLAG_SEC))
|
||||
|
||||
#define IS_RTC_PRESCALER(PRESCALER) ((PRESCALER) <= 0xFFFFF)
|
||||
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
void RTC_ITConfig(u16 RTC_IT, FunctionalState NewState);
|
||||
void RTC_EnterConfigMode(void);
|
||||
void RTC_ExitConfigMode(void);
|
||||
u32 RTC_GetCounter(void);
|
||||
void RTC_SetCounter(u32 CounterValue);
|
||||
void RTC_SetPrescaler(u32 PrescalerValue);
|
||||
void RTC_SetAlarm(u32 AlarmValue);
|
||||
u32 RTC_GetDivider(void);
|
||||
void RTC_WaitForLastTask(void);
|
||||
void RTC_WaitForSynchro(void);
|
||||
FlagStatus RTC_GetFlagStatus(u16 RTC_FLAG);
|
||||
void RTC_ClearFlag(u16 RTC_FLAG);
|
||||
ITStatus RTC_GetITStatus(u16 RTC_IT);
|
||||
void RTC_ClearITPendingBit(u16 RTC_IT);
|
||||
|
||||
#endif /* __STM32F10x_RTC_H */
|
||||
|
||||
/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,64 +0,0 @@
|
||||
/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
|
||||
* File Name : stm32f10x_systick.h
|
||||
* Author : MCD Application Team
|
||||
* Version : V2.0.3
|
||||
* Date : 09/22/2008
|
||||
* Description : This file contains all the functions prototypes for the
|
||||
* SysTick firmware library.
|
||||
********************************************************************************
|
||||
* 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.
|
||||
*******************************************************************************/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __STM32F10x_SYSTICK_H
|
||||
#define __STM32F10x_SYSTICK_H
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f10x_map.h"
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
/* SysTick clock source */
|
||||
#define SysTick_CLKSource_HCLK_Div8 ((u32)0xFFFFFFFB)
|
||||
#define SysTick_CLKSource_HCLK ((u32)0x00000004)
|
||||
|
||||
#define IS_SYSTICK_CLK_SOURCE(SOURCE) (((SOURCE) == SysTick_CLKSource_HCLK) || \
|
||||
((SOURCE) == SysTick_CLKSource_HCLK_Div8))
|
||||
|
||||
/* SysTick counter state */
|
||||
#define SysTick_Counter_Disable ((u32)0xFFFFFFFE)
|
||||
#define SysTick_Counter_Enable ((u32)0x00000001)
|
||||
#define SysTick_Counter_Clear ((u32)0x00000000)
|
||||
|
||||
#define IS_SYSTICK_COUNTER(COUNTER) (((COUNTER) == SysTick_Counter_Disable) || \
|
||||
((COUNTER) == SysTick_Counter_Enable) || \
|
||||
((COUNTER) == SysTick_Counter_Clear))
|
||||
|
||||
/* SysTick Flag */
|
||||
#define SysTick_FLAG_COUNT ((u32)0x00000010)
|
||||
#define SysTick_FLAG_SKEW ((u32)0x0000001E)
|
||||
#define SysTick_FLAG_NOREF ((u32)0x0000001F)
|
||||
|
||||
#define IS_SYSTICK_FLAG(FLAG) (((FLAG) == SysTick_FLAG_COUNT) || \
|
||||
((FLAG) == SysTick_FLAG_SKEW) || \
|
||||
((FLAG) == SysTick_FLAG_NOREF))
|
||||
|
||||
#define IS_SYSTICK_RELOAD(RELOAD) (((RELOAD) > 0) && ((RELOAD) <= 0xFFFFFF))
|
||||
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
void SysTick_CLKSourceConfig(u32 SysTick_CLKSource);
|
||||
void SysTick_SetReload(u32 Reload);
|
||||
void SysTick_CounterCmd(u32 SysTick_Counter);
|
||||
void SysTick_ITConfig(FunctionalState NewState);
|
||||
u32 SysTick_GetCounter(void);
|
||||
FlagStatus SysTick_GetFlagStatus(u8 SysTick_FLAG);
|
||||
|
||||
#endif /* __STM32F10x_SYSTICK_H */
|
||||
|
||||
/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,80 +0,0 @@
|
||||
/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
|
||||
* File Name : stm32f10x_type.h
|
||||
* Author : MCD Application Team
|
||||
* Version : V2.0.3
|
||||
* Date : 09/22/2008
|
||||
* Description : This file contains all the common data types used for the
|
||||
* STM32F10x firmware library.
|
||||
********************************************************************************
|
||||
* 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.
|
||||
*******************************************************************************/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __STM32F10x_TYPE_H
|
||||
#define __STM32F10x_TYPE_H
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
typedef signed long s32;
|
||||
typedef signed short s16;
|
||||
typedef signed char s8;
|
||||
|
||||
typedef signed long const sc32; /* Read Only */
|
||||
typedef signed short const sc16; /* Read Only */
|
||||
typedef signed char const sc8; /* Read Only */
|
||||
|
||||
typedef volatile signed long vs32;
|
||||
typedef volatile signed short vs16;
|
||||
typedef volatile signed char vs8;
|
||||
|
||||
typedef volatile signed long const vsc32; /* Read Only */
|
||||
typedef volatile signed short const vsc16; /* Read Only */
|
||||
typedef volatile signed char const vsc8; /* Read Only */
|
||||
|
||||
typedef unsigned long u32;
|
||||
typedef unsigned short u16;
|
||||
typedef unsigned char u8;
|
||||
|
||||
typedef unsigned long const uc32; /* Read Only */
|
||||
typedef unsigned short const uc16; /* Read Only */
|
||||
typedef unsigned char const uc8; /* Read Only */
|
||||
|
||||
typedef volatile unsigned long vu32;
|
||||
typedef volatile unsigned short vu16;
|
||||
typedef volatile unsigned char vu8;
|
||||
|
||||
typedef volatile unsigned long const vuc32; /* Read Only */
|
||||
typedef volatile unsigned short const vuc16; /* Read Only */
|
||||
typedef volatile unsigned char const vuc8; /* Read Only */
|
||||
|
||||
typedef enum {FALSE = 0, TRUE = !FALSE} bool;
|
||||
|
||||
typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
|
||||
|
||||
typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
|
||||
#define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE))
|
||||
|
||||
typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
|
||||
|
||||
#define U8_MAX ((u8)255)
|
||||
#define S8_MAX ((s8)127)
|
||||
#define S8_MIN ((s8)-128)
|
||||
#define U16_MAX ((u16)65535u)
|
||||
#define S16_MAX ((s16)32767)
|
||||
#define S16_MIN ((s16)-32768)
|
||||
#define U32_MAX ((u32)4294967295uL)
|
||||
#define S32_MAX ((s32)2147483647)
|
||||
#define S32_MIN ((s32)-2147483648)
|
||||
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
|
||||
#endif /* __STM32F10x_TYPE_H */
|
||||
|
||||
/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,54 +0,0 @@
|
||||
/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
|
||||
* File Name : stm32f10x_wwdg.h
|
||||
* Author : MCD Application Team
|
||||
* Version : V2.0.3
|
||||
* Date : 09/22/2008
|
||||
* Description : This file contains all the functions prototypes for the
|
||||
* WWDG firmware library.
|
||||
********************************************************************************
|
||||
* 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.
|
||||
*******************************************************************************/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __STM32F10x_WWDG_H
|
||||
#define __STM32F10x_WWDG_H
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f10x_map.h"
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
/* WWDG Prescaler */
|
||||
#define WWDG_Prescaler_1 ((u32)0x00000000)
|
||||
#define WWDG_Prescaler_2 ((u32)0x00000080)
|
||||
#define WWDG_Prescaler_4 ((u32)0x00000100)
|
||||
#define WWDG_Prescaler_8 ((u32)0x00000180)
|
||||
|
||||
#define IS_WWDG_PRESCALER(PRESCALER) (((PRESCALER) == WWDG_Prescaler_1) || \
|
||||
((PRESCALER) == WWDG_Prescaler_2) || \
|
||||
((PRESCALER) == WWDG_Prescaler_4) || \
|
||||
((PRESCALER) == WWDG_Prescaler_8))
|
||||
|
||||
#define IS_WWDG_WINDOW_VALUE(VALUE) ((VALUE) <= 0x7F)
|
||||
|
||||
#define IS_WWDG_COUNTER(COUNTER) (((COUNTER) >= 0x40) && ((COUNTER) <= 0x7F))
|
||||
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
void WWDG_DeInit(void);
|
||||
void WWDG_SetPrescaler(u32 WWDG_Prescaler);
|
||||
void WWDG_SetWindowValue(u8 WindowValue);
|
||||
void WWDG_EnableIT(void);
|
||||
void WWDG_SetCounter(u8 Counter);
|
||||
void WWDG_Enable(u8 Counter);
|
||||
FlagStatus WWDG_GetFlagStatus(void);
|
||||
void WWDG_ClearFlag(void);
|
||||
|
||||
#endif /* __STM32F10x_WWDG_H */
|
||||
|
||||
/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,114 +0,0 @@
|
||||
/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
|
||||
* File Name : stm32f10x_crc.c
|
||||
* Author : MCD Application Team
|
||||
* Version : V2.0.3
|
||||
* Date : 09/22/2008
|
||||
* Description : This file provides all the CRC firmware functions.
|
||||
********************************************************************************
|
||||
* 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.
|
||||
*******************************************************************************/
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f10x_crc.h"
|
||||
|
||||
/* Private typedef -----------------------------------------------------------*/
|
||||
/* Private define ------------------------------------------------------------*/
|
||||
|
||||
/* CR register bit mask */
|
||||
#define CR_RESET_Set ((u32)0x00000001)
|
||||
|
||||
/* Private macro -------------------------------------------------------------*/
|
||||
/* Private variables ---------------------------------------------------------*/
|
||||
/* Private function prototypes -----------------------------------------------*/
|
||||
/* Private functions ---------------------------------------------------------*/
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : CRC_ResetDR
|
||||
* Description : Resets the CRC Data register (DR).
|
||||
* Input : None
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void CRC_ResetDR(void)
|
||||
{
|
||||
/* Reset CRC generator */
|
||||
CRC->CR = CR_RESET_Set;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : CRC_CalcCRC
|
||||
* Description : Computes the 32-bit CRC of a given data word(32-bit).
|
||||
* Input : - Data: data word(32-bit) to compute its CRC
|
||||
* Output : None
|
||||
* Return : 32-bit CRC
|
||||
*******************************************************************************/
|
||||
u32 CRC_CalcCRC(u32 Data)
|
||||
{
|
||||
CRC->DR = Data;
|
||||
|
||||
return (CRC->DR);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : CRC_CalcBlockCRC
|
||||
* Description : Computes the 32-bit CRC of a given buffer of data word(32-bit).
|
||||
* Input : - pBuffer: pointer to the buffer containing the data to be
|
||||
* computed
|
||||
* - BufferLength: length of the buffer to be computed
|
||||
* Output : None
|
||||
* Return : 32-bit CRC
|
||||
*******************************************************************************/
|
||||
u32 CRC_CalcBlockCRC(u32 pBuffer[], u32 BufferLength)
|
||||
{
|
||||
u32 index = 0;
|
||||
|
||||
for(index = 0; index < BufferLength; index++)
|
||||
{
|
||||
CRC->DR = pBuffer[index];
|
||||
}
|
||||
|
||||
return (CRC->DR);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : CRC_GetCRC
|
||||
* Description : Returns the current CRC value.
|
||||
* Input : None
|
||||
* Output : None
|
||||
* Return : 32-bit CRC
|
||||
*******************************************************************************/
|
||||
u32 CRC_GetCRC(void)
|
||||
{
|
||||
return (CRC->DR);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : CRC_SetIDRegister
|
||||
* Description : Stores a 8-bit data in the Independent Data(ID) register.
|
||||
* Input : - IDValue: 8-bit value to be stored in the ID register
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void CRC_SetIDRegister(u8 IDValue)
|
||||
{
|
||||
CRC->IDR = IDValue;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : CRC_GetIDRegister
|
||||
* Description : Returns the 8-bit data stored in the Independent Data(ID) register
|
||||
* Input : None
|
||||
* Output : None
|
||||
* Return : 8-bit value of the ID register
|
||||
*******************************************************************************/
|
||||
u8 CRC_GetIDRegister(void)
|
||||
{
|
||||
return (CRC->IDR);
|
||||
}
|
||||
|
||||
/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,97 +0,0 @@
|
||||
/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
|
||||
* File Name : stm32f10x_dbgmcu.c
|
||||
* Author : MCD Application Team
|
||||
* Version : V2.0.3
|
||||
* Date : 09/22/2008
|
||||
* Description : This file provides all the DBGMCU firmware functions.
|
||||
********************************************************************************
|
||||
* 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.
|
||||
*******************************************************************************/
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f10x_dbgmcu.h"
|
||||
|
||||
/* Private typedef -----------------------------------------------------------*/
|
||||
/* Private define ------------------------------------------------------------*/
|
||||
#define IDCODE_DEVID_Mask ((u32)0x00000FFF)
|
||||
|
||||
/* Private macro -------------------------------------------------------------*/
|
||||
/* Private variables ---------------------------------------------------------*/
|
||||
/* Private function prototypes -----------------------------------------------*/
|
||||
/* Private functions ---------------------------------------------------------*/
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : DBGMCU_GetREVID
|
||||
* Description : Returns the device revision identifier.
|
||||
* Input : None
|
||||
* Output : None
|
||||
* Return : Device revision identifier
|
||||
*******************************************************************************/
|
||||
u32 DBGMCU_GetREVID(void)
|
||||
{
|
||||
return(DBGMCU->IDCODE >> 16);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : DBGMCU_GetDEVID
|
||||
* Description : Returns the device identifier.
|
||||
* Input : None
|
||||
* Output : None
|
||||
* Return : Device identifier
|
||||
*******************************************************************************/
|
||||
u32 DBGMCU_GetDEVID(void)
|
||||
{
|
||||
return(DBGMCU->IDCODE & IDCODE_DEVID_Mask);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : DBGMCU_Config
|
||||
* Description : Configures the specified peripheral and low power mode behavior
|
||||
* when the MCU under Debug mode.
|
||||
* Input : - DBGMCU_Periph: specifies the peripheral and low power mode.
|
||||
* This parameter can be any combination of the following values:
|
||||
* - DBGMCU_SLEEP: Keep debugger connection during SLEEP mode
|
||||
* - DBGMCU_STOP: Keep debugger connection during STOP mode
|
||||
* - DBGMCU_STANDBY: Keep debugger connection during STANDBY mode
|
||||
* - DBGMCU_IWDG_STOP: Debug IWDG stopped when Core is halted
|
||||
* - DBGMCU_WWDG_STOP: Debug WWDG stopped when Core is halted
|
||||
* - DBGMCU_TIM1_STOP: TIM1 counter stopped when Core is halted
|
||||
* - DBGMCU_TIM2_STOP: TIM2 counter stopped when Core is halted
|
||||
* - DBGMCU_TIM3_STOP: TIM3 counter stopped when Core is halted
|
||||
* - DBGMCU_TIM4_STOP: TIM4 counter stopped when Core is halted
|
||||
* - DBGMCU_CAN_STOP: Debug CAN stopped when Core is halted
|
||||
* - DBGMCU_I2C1_SMBUS_TIMEOUT: I2C1 SMBUS timeout mode stopped
|
||||
* when Core is halted
|
||||
* - DBGMCU_I2C2_SMBUS_TIMEOUT: I2C2 SMBUS timeout mode stopped
|
||||
* when Core is halted
|
||||
* - DBGMCU_TIM5_STOP: TIM5 counter stopped when Core is halted
|
||||
* - DBGMCU_TIM6_STOP: TIM6 counter stopped when Core is halted
|
||||
* - DBGMCU_TIM7_STOP: TIM7 counter stopped when Core is halted
|
||||
* - DBGMCU_TIM8_STOP: TIM8 counter stopped when Core is halted
|
||||
* - NewState: new state of the specified peripheral in Debug mode.
|
||||
* This parameter can be: ENABLE or DISABLE.
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void DBGMCU_Config(u32 DBGMCU_Periph, FunctionalState NewState)
|
||||
{
|
||||
/* Check the parameters */
|
||||
assert_param(IS_DBGMCU_PERIPH(DBGMCU_Periph));
|
||||
assert_param(IS_FUNCTIONAL_STATE(NewState));
|
||||
|
||||
if (NewState != DISABLE)
|
||||
{
|
||||
DBGMCU->CR |= DBGMCU_Periph;
|
||||
}
|
||||
else
|
||||
{
|
||||
DBGMCU->CR &= ~DBGMCU_Periph;
|
||||
}
|
||||
}
|
||||
|
||||
/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,148 +0,0 @@
|
||||
/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
|
||||
* File Name : stm32f10x_iwdg.c
|
||||
* Author : MCD Application Team
|
||||
* Version : V2.0.3
|
||||
* Date : 09/22/2008
|
||||
* Description : This file provides all the IWDG firmware functions.
|
||||
********************************************************************************
|
||||
* 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.
|
||||
*******************************************************************************/
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f10x_iwdg.h"
|
||||
|
||||
/* Private typedef -----------------------------------------------------------*/
|
||||
/* Private define ------------------------------------------------------------*/
|
||||
/* ---------------------- IWDG registers bit mask ------------------------ */
|
||||
/* KR register bit mask */
|
||||
#define KR_KEY_Reload ((u16)0xAAAA)
|
||||
#define KR_KEY_Enable ((u16)0xCCCC)
|
||||
|
||||
/* Private macro -------------------------------------------------------------*/
|
||||
/* Private variables ---------------------------------------------------------*/
|
||||
/* Private function prototypes -----------------------------------------------*/
|
||||
/* Private functions ---------------------------------------------------------*/
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : IWDG_WriteAccessCmd
|
||||
* Description : Enables or disables write access to IWDG_PR and IWDG_RLR
|
||||
* registers.
|
||||
* Input : - IWDG_WriteAccess: new state of write access to IWDG_PR and
|
||||
* IWDG_RLR registers.
|
||||
* This parameter can be one of the following values:
|
||||
* - IWDG_WriteAccess_Enable: Enable write access to
|
||||
* IWDG_PR and IWDG_RLR registers
|
||||
* - IWDG_WriteAccess_Disable: Disable write access to
|
||||
* IWDG_PR and IWDG_RLR registers
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void IWDG_WriteAccessCmd(u16 IWDG_WriteAccess)
|
||||
{
|
||||
/* Check the parameters */
|
||||
assert_param(IS_IWDG_WRITE_ACCESS(IWDG_WriteAccess));
|
||||
|
||||
IWDG->KR = IWDG_WriteAccess;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : IWDG_SetPrescaler
|
||||
* Description : Sets IWDG Prescaler value.
|
||||
* Input : - IWDG_Prescaler: specifies the IWDG Prescaler value.
|
||||
* This parameter can be one of the following values:
|
||||
* - IWDG_Prescaler_4: IWDG prescaler set to 4
|
||||
* - IWDG_Prescaler_8: IWDG prescaler set to 8
|
||||
* - IWDG_Prescaler_16: IWDG prescaler set to 16
|
||||
* - IWDG_Prescaler_32: IWDG prescaler set to 32
|
||||
* - IWDG_Prescaler_64: IWDG prescaler set to 64
|
||||
* - IWDG_Prescaler_128: IWDG prescaler set to 128
|
||||
* - IWDG_Prescaler_256: IWDG prescaler set to 256
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void IWDG_SetPrescaler(u8 IWDG_Prescaler)
|
||||
{
|
||||
/* Check the parameters */
|
||||
assert_param(IS_IWDG_PRESCALER(IWDG_Prescaler));
|
||||
|
||||
IWDG->PR = IWDG_Prescaler;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : IWDG_SetReload
|
||||
* Description : Sets IWDG Reload value.
|
||||
* Input : - Reload: specifies the IWDG Reload value.
|
||||
* This parameter must be a number between 0 and 0x0FFF.
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void IWDG_SetReload(u16 Reload)
|
||||
{
|
||||
/* Check the parameters */
|
||||
assert_param(IS_IWDG_RELOAD(Reload));
|
||||
|
||||
IWDG->RLR = Reload;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : IWDG_ReloadCounter
|
||||
* Description : Reloads IWDG counter with value defined in the reload register
|
||||
* (write access to IWDG_PR and IWDG_RLR registers disabled).
|
||||
* Input : None
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void IWDG_ReloadCounter(void)
|
||||
{
|
||||
IWDG->KR = KR_KEY_Reload;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : IWDG_Enable
|
||||
* Description : Enables IWDG (write access to IWDG_PR and IWDG_RLR registers
|
||||
* disabled).
|
||||
* Input : None
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void IWDG_Enable(void)
|
||||
{
|
||||
IWDG->KR = KR_KEY_Enable;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : IWDG_GetFlagStatus
|
||||
* Description : Checks whether the specified IWDG flag is set or not.
|
||||
* Input : - IWDG_FLAG: specifies the flag to check.
|
||||
* This parameter can be one of the following values:
|
||||
* - IWDG_FLAG_PVU: Prescaler Value Update on going
|
||||
* - IWDG_FLAG_RVU: Reload Value Update on going
|
||||
* Output : None
|
||||
* Return : The new state of IWDG_FLAG (SET or RESET).
|
||||
*******************************************************************************/
|
||||
FlagStatus IWDG_GetFlagStatus(u16 IWDG_FLAG)
|
||||
{
|
||||
FlagStatus bitstatus = RESET;
|
||||
|
||||
/* Check the parameters */
|
||||
assert_param(IS_IWDG_FLAG(IWDG_FLAG));
|
||||
|
||||
if ((IWDG->SR & IWDG_FLAG) != (u32)RESET)
|
||||
{
|
||||
bitstatus = SET;
|
||||
}
|
||||
else
|
||||
{
|
||||
bitstatus = RESET;
|
||||
}
|
||||
|
||||
/* Return the flag status */
|
||||
return bitstatus;
|
||||
}
|
||||
|
||||
/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,181 +0,0 @@
|
||||
/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
|
||||
* File Name : stm32f10x_systick.c
|
||||
* Author : MCD Application Team
|
||||
* Version : V2.0.3
|
||||
* Date : 09/22/2008
|
||||
* Description : This file provides all the SysTick firmware functions.
|
||||
********************************************************************************
|
||||
* 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.
|
||||
*******************************************************************************/
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f10x_systick.h"
|
||||
|
||||
/* Private typedef -----------------------------------------------------------*/
|
||||
/* Private define ------------------------------------------------------------*/
|
||||
/* ---------------------- SysTick registers bit mask -------------------- */
|
||||
/* CTRL TICKINT Mask */
|
||||
#define CTRL_TICKINT_Set ((u32)0x00000002)
|
||||
#define CTRL_TICKINT_Reset ((u32)0xFFFFFFFD)
|
||||
|
||||
/* Private macro -------------------------------------------------------------*/
|
||||
/* Private variables ---------------------------------------------------------*/
|
||||
/* Private function prototypes -----------------------------------------------*/
|
||||
/* Private functions ---------------------------------------------------------*/
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : SysTick_CLKSourceConfig
|
||||
* Description : Configures the SysTick clock source.
|
||||
* Input : - SysTick_CLKSource: specifies the SysTick clock source.
|
||||
* This parameter can be one of the following values:
|
||||
* - SysTick_CLKSource_HCLK_Div8: AHB clock divided by 8
|
||||
* selected as SysTick clock source.
|
||||
* - SysTick_CLKSource_HCLK: AHB clock selected as
|
||||
* SysTick clock source.
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void SysTick_CLKSourceConfig(u32 SysTick_CLKSource)
|
||||
{
|
||||
/* Check the parameters */
|
||||
assert_param(IS_SYSTICK_CLK_SOURCE(SysTick_CLKSource));
|
||||
|
||||
if (SysTick_CLKSource == SysTick_CLKSource_HCLK)
|
||||
{
|
||||
SysTick->CTRL |= SysTick_CLKSource_HCLK;
|
||||
}
|
||||
else
|
||||
{
|
||||
SysTick->CTRL &= SysTick_CLKSource_HCLK_Div8;
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : SysTick_SetReload
|
||||
* Description : Sets SysTick Reload value.
|
||||
* Input : - Reload: SysTick Reload new value.
|
||||
* This parameter must be a number between 1 and 0xFFFFFF.
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void SysTick_SetReload(u32 Reload)
|
||||
{
|
||||
/* Check the parameters */
|
||||
assert_param(IS_SYSTICK_RELOAD(Reload));
|
||||
|
||||
SysTick->LOAD = Reload;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : SysTick_CounterCmd
|
||||
* Description : Enables or disables the SysTick counter.
|
||||
* Input : - SysTick_Counter: new state of the SysTick counter.
|
||||
* This parameter can be one of the following values:
|
||||
* - SysTick_Counter_Disable: Disable counter
|
||||
* - SysTick_Counter_Enable: Enable counter
|
||||
* - SysTick_Counter_Clear: Clear counter value to 0
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void SysTick_CounterCmd(u32 SysTick_Counter)
|
||||
{
|
||||
/* Check the parameters */
|
||||
assert_param(IS_SYSTICK_COUNTER(SysTick_Counter));
|
||||
|
||||
if (SysTick_Counter == SysTick_Counter_Enable)
|
||||
{
|
||||
SysTick->CTRL |= SysTick_Counter_Enable;
|
||||
}
|
||||
else if (SysTick_Counter == SysTick_Counter_Disable)
|
||||
{
|
||||
SysTick->CTRL &= SysTick_Counter_Disable;
|
||||
}
|
||||
else /* SysTick_Counter == SysTick_Counter_Clear */
|
||||
{
|
||||
SysTick->VAL = SysTick_Counter_Clear;
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : SysTick_ITConfig
|
||||
* Description : Enables or disables the SysTick Interrupt.
|
||||
* Input : - NewState: new state of the SysTick Interrupt.
|
||||
* This parameter can be: ENABLE or DISABLE.
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void SysTick_ITConfig(FunctionalState NewState)
|
||||
{
|
||||
/* Check the parameters */
|
||||
assert_param(IS_FUNCTIONAL_STATE(NewState));
|
||||
|
||||
if (NewState != DISABLE)
|
||||
{
|
||||
SysTick->CTRL |= CTRL_TICKINT_Set;
|
||||
}
|
||||
else
|
||||
{
|
||||
SysTick->CTRL &= CTRL_TICKINT_Reset;
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : SysTick_GetCounter
|
||||
* Description : Gets SysTick counter value.
|
||||
* Input : None
|
||||
* Output : None
|
||||
* Return : SysTick current value
|
||||
*******************************************************************************/
|
||||
u32 SysTick_GetCounter(void)
|
||||
{
|
||||
return(SysTick->VAL);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : SysTick_GetFlagStatus
|
||||
* Description : Checks whether the specified SysTick flag is set or not.
|
||||
* Input : - SysTick_FLAG: specifies the flag to check.
|
||||
* This parameter can be one of the following values:
|
||||
* - SysTick_FLAG_COUNT
|
||||
* - SysTick_FLAG_SKEW
|
||||
* - SysTick_FLAG_NOREF
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
FlagStatus SysTick_GetFlagStatus(u8 SysTick_FLAG)
|
||||
{
|
||||
u32 statusreg = 0, tmp = 0 ;
|
||||
FlagStatus bitstatus = RESET;
|
||||
|
||||
/* Check the parameters */
|
||||
assert_param(IS_SYSTICK_FLAG(SysTick_FLAG));
|
||||
|
||||
/* Get the SysTick register index */
|
||||
tmp = SysTick_FLAG >> 3;
|
||||
|
||||
if (tmp == 2) /* The flag to check is in CTRL register */
|
||||
{
|
||||
statusreg = SysTick->CTRL;
|
||||
}
|
||||
else /* The flag to check is in CALIB register */
|
||||
{
|
||||
statusreg = SysTick->CALIB;
|
||||
}
|
||||
|
||||
if ((statusreg & ((u32)1 << SysTick_FLAG)) != (u32)RESET)
|
||||
{
|
||||
bitstatus = SET;
|
||||
}
|
||||
else
|
||||
{
|
||||
bitstatus = RESET;
|
||||
}
|
||||
return bitstatus;
|
||||
}
|
||||
|
||||
/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,185 +0,0 @@
|
||||
/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
|
||||
* File Name : stm32f10x_wwdg.c
|
||||
* Author : MCD Application Team
|
||||
* Version : V2.0.3
|
||||
* Date : 09/22/2008
|
||||
* Description : This file provides all the WWDG firmware functions.
|
||||
********************************************************************************
|
||||
* 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.
|
||||
*******************************************************************************/
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f10x_wwdg.h"
|
||||
#include "stm32f10x_rcc.h"
|
||||
|
||||
/* Private typedef -----------------------------------------------------------*/
|
||||
/* Private define ------------------------------------------------------------*/
|
||||
/* ----------- WWDG registers bit address in the alias region ----------- */
|
||||
#define WWDG_OFFSET (WWDG_BASE - PERIPH_BASE)
|
||||
|
||||
/* Alias word address of EWI bit */
|
||||
#define CFR_OFFSET (WWDG_OFFSET + 0x04)
|
||||
#define EWI_BitNumber 0x09
|
||||
#define CFR_EWI_BB (PERIPH_BB_BASE + (CFR_OFFSET * 32) + (EWI_BitNumber * 4))
|
||||
|
||||
/* --------------------- WWDG registers bit mask ------------------------ */
|
||||
/* CR register bit mask */
|
||||
#define CR_WDGA_Set ((u32)0x00000080)
|
||||
|
||||
/* CFR register bit mask */
|
||||
#define CFR_WDGTB_Mask ((u32)0xFFFFFE7F)
|
||||
#define CFR_W_Mask ((u32)0xFFFFFF80)
|
||||
|
||||
#define BIT_Mask ((u8)0x7F)
|
||||
|
||||
/* Private macro -------------------------------------------------------------*/
|
||||
/* Private variables ---------------------------------------------------------*/
|
||||
/* Private function prototypes -----------------------------------------------*/
|
||||
/* Private functions ---------------------------------------------------------*/
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : WWDG_DeInit
|
||||
* Description : Deinitializes the WWDG peripheral registers to their default
|
||||
* reset values.
|
||||
* Input : None
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void WWDG_DeInit(void)
|
||||
{
|
||||
RCC_APB1PeriphResetCmd(RCC_APB1Periph_WWDG, ENABLE);
|
||||
RCC_APB1PeriphResetCmd(RCC_APB1Periph_WWDG, DISABLE);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : WWDG_SetPrescaler
|
||||
* Description : Sets the WWDG Prescaler.
|
||||
* Input : - WWDG_Prescaler: specifies the WWDG Prescaler.
|
||||
* This parameter can be one of the following values:
|
||||
* - WWDG_Prescaler_1: WWDG counter clock = (PCLK1/4096)/1
|
||||
* - WWDG_Prescaler_2: WWDG counter clock = (PCLK1/4096)/2
|
||||
* - WWDG_Prescaler_4: WWDG counter clock = (PCLK1/4096)/4
|
||||
* - WWDG_Prescaler_8: WWDG counter clock = (PCLK1/4096)/8
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void WWDG_SetPrescaler(u32 WWDG_Prescaler)
|
||||
{
|
||||
u32 tmpreg = 0;
|
||||
|
||||
/* Check the parameters */
|
||||
assert_param(IS_WWDG_PRESCALER(WWDG_Prescaler));
|
||||
|
||||
/* Clear WDGTB[1:0] bits */
|
||||
tmpreg = WWDG->CFR & CFR_WDGTB_Mask;
|
||||
|
||||
/* Set WDGTB[1:0] bits according to WWDG_Prescaler value */
|
||||
tmpreg |= WWDG_Prescaler;
|
||||
|
||||
/* Store the new value */
|
||||
WWDG->CFR = tmpreg;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : WWDG_SetWindowValue
|
||||
* Description : Sets the WWDG window value.
|
||||
* Input : - WindowValue: specifies the window value to be compared to
|
||||
* the downcounter.
|
||||
* This parameter value must be lower than 0x80.
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void WWDG_SetWindowValue(u8 WindowValue)
|
||||
{
|
||||
u32 tmpreg = 0;
|
||||
|
||||
/* Check the parameters */
|
||||
assert_param(IS_WWDG_WINDOW_VALUE(WindowValue));
|
||||
|
||||
/* Clear W[6:0] bits */
|
||||
tmpreg = WWDG->CFR & CFR_W_Mask;
|
||||
|
||||
/* Set W[6:0] bits according to WindowValue value */
|
||||
tmpreg |= WindowValue & BIT_Mask;
|
||||
|
||||
/* Store the new value */
|
||||
WWDG->CFR = tmpreg;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : WWDG_EnableIT
|
||||
* Description : Enables the WWDG Early Wakeup interrupt(EWI).
|
||||
* Input : None
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void WWDG_EnableIT(void)
|
||||
{
|
||||
*(vu32 *) CFR_EWI_BB = (u32)ENABLE;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : WWDG_SetCounter
|
||||
* Description : Sets the WWDG counter value.
|
||||
* Input : - Counter: specifies the watchdog counter value.
|
||||
* This parameter must be a number between 0x40 and 0x7F.
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void WWDG_SetCounter(u8 Counter)
|
||||
{
|
||||
/* Check the parameters */
|
||||
assert_param(IS_WWDG_COUNTER(Counter));
|
||||
|
||||
/* Write to T[6:0] bits to configure the counter value, no need to do
|
||||
a read-modify-write; writing a 0 to WDGA bit does nothing */
|
||||
WWDG->CR = Counter & BIT_Mask;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : WWDG_Enable
|
||||
* Description : Enables WWDG and load the counter value.
|
||||
* - Counter: specifies the watchdog counter value.
|
||||
* This parameter must be a number between 0x40 and 0x7F.
|
||||
* Input : None
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void WWDG_Enable(u8 Counter)
|
||||
{
|
||||
/* Check the parameters */
|
||||
assert_param(IS_WWDG_COUNTER(Counter));
|
||||
|
||||
WWDG->CR = CR_WDGA_Set | Counter;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : WWDG_GetFlagStatus
|
||||
* Description : Checks whether the Early Wakeup interrupt flag is set or not.
|
||||
* Input : None
|
||||
* Output : None
|
||||
* Return : The new state of the Early Wakeup interrupt flag (SET or RESET)
|
||||
*******************************************************************************/
|
||||
FlagStatus WWDG_GetFlagStatus(void)
|
||||
{
|
||||
return (FlagStatus)(WWDG->SR);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : WWDG_ClearFlag
|
||||
* Description : Clears Early Wakeup interrupt flag.
|
||||
* Input : None
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void WWDG_ClearFlag(void)
|
||||
{
|
||||
WWDG->SR = (u32)RESET;
|
||||
}
|
||||
|
||||
/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/
|
||||
@@ -1,169 +0,0 @@
|
||||
### uVision2 Project, (C) Keil Software
|
||||
### Do not modify !
|
||||
|
||||
cExt (*.c)
|
||||
aExt (*.s*; *.src; *.a*)
|
||||
oExt (*.obj)
|
||||
lExt (*.lib)
|
||||
tExt (*.txt; *.h; *.inc)
|
||||
pExt (*.plm)
|
||||
CppX (*.cpp)
|
||||
DaveTm { 0,0,0,0,0,0,0,0 }
|
||||
|
||||
Target (RT-Thread/STM32), 0x0004 // Tools: 'ARM-ADS'
|
||||
GRPOPT 1,(Startup),0,0,0
|
||||
GRPOPT 2,(Library),0,0,0
|
||||
GRPOPT 3,(Kernel),0,0,0
|
||||
GRPOPT 4,(STM32),0,0,0
|
||||
GRPOPT 5,(finsh),0,0,0
|
||||
GRPOPT 6,(Filesystem),0,0,0
|
||||
GRPOPT 7,(LwIP),0,0,0
|
||||
|
||||
OPTFFF 1,1,1,1,0,0,0,0,<.\application.c><application.c>
|
||||
OPTFFF 1,2,1,0,0,0,0,0,<.\board.c><board.c>
|
||||
OPTFFF 1,3,1,0,0,0,0,0,<.\startup.c><startup.c>
|
||||
OPTFFF 1,4,2,0,0,0,0,0,<.\cortexm3_macro.s><cortexm3_macro.s>
|
||||
OPTFFF 1,5,1,184549376,0,0,0,0,<.\stm32f10x_it.c><stm32f10x_it.c>
|
||||
OPTFFF 1,6,5,0,0,0,0,0,<.\stm32f10x_conf.h><stm32f10x_conf.h>
|
||||
OPTFFF 1,7,5,268435456,0,0,0,0,<.\rtconfig.h><rtconfig.h>
|
||||
OPTFFF 1,8,1,0,0,0,0,0,<.\usart.c><usart.c>
|
||||
OPTFFF 1,9,1,0,0,0,0,0,<.\sdcard.c><sdcard.c>
|
||||
OPTFFF 1,10,1,0,0,0,0,0,<.\enc28j60.c><enc28j60.c>
|
||||
OPTFFF 1,11,1,0,0,0,0,0,<.\rtc.c><rtc.c>
|
||||
OPTFFF 2,12,1,0,0,0,0,0,<.\library\src\stm32f10x_adc.c><stm32f10x_adc.c>
|
||||
OPTFFF 2,13,1,0,0,0,0,0,<.\library\src\stm32f10x_bkp.c><stm32f10x_bkp.c>
|
||||
OPTFFF 2,14,1,0,0,0,0,0,<.\library\src\stm32f10x_can.c><stm32f10x_can.c>
|
||||
OPTFFF 2,15,1,0,0,0,0,0,<.\library\src\stm32f10x_crc.c><stm32f10x_crc.c>
|
||||
OPTFFF 2,16,1,0,0,0,0,0,<.\library\src\stm32f10x_dac.c><stm32f10x_dac.c>
|
||||
OPTFFF 2,17,1,0,0,0,0,0,<.\library\src\stm32f10x_dbgmcu.c><stm32f10x_dbgmcu.c>
|
||||
OPTFFF 2,18,1,0,0,0,0,0,<.\library\src\stm32f10x_dma.c><stm32f10x_dma.c>
|
||||
OPTFFF 2,19,1,0,0,0,0,0,<.\library\src\stm32f10x_exti.c><stm32f10x_exti.c>
|
||||
OPTFFF 2,20,1,0,0,0,0,0,<.\library\src\stm32f10x_flash.c><stm32f10x_flash.c>
|
||||
OPTFFF 2,21,1,0,0,0,0,0,<.\library\src\stm32f10x_fsmc.c><stm32f10x_fsmc.c>
|
||||
OPTFFF 2,22,1,0,0,0,0,0,<.\library\src\stm32f10x_gpio.c><stm32f10x_gpio.c>
|
||||
OPTFFF 2,23,1,0,0,0,0,0,<.\library\src\stm32f10x_i2c.c><stm32f10x_i2c.c>
|
||||
OPTFFF 2,24,1,0,0,0,0,0,<.\library\src\stm32f10x_iwdg.c><stm32f10x_iwdg.c>
|
||||
OPTFFF 2,25,1,0,0,0,0,0,<.\library\src\stm32f10x_lib.c><stm32f10x_lib.c>
|
||||
OPTFFF 2,26,1,0,0,0,0,0,<.\library\src\stm32f10x_nvic.c><stm32f10x_nvic.c>
|
||||
OPTFFF 2,27,1,0,0,0,0,0,<.\library\src\stm32f10x_pwr.c><stm32f10x_pwr.c>
|
||||
OPTFFF 2,28,1,0,0,0,0,0,<.\library\src\stm32f10x_rcc.c><stm32f10x_rcc.c>
|
||||
OPTFFF 2,29,1,0,0,0,0,0,<.\library\src\stm32f10x_rtc.c><stm32f10x_rtc.c>
|
||||
OPTFFF 2,30,1,0,0,0,0,0,<.\library\src\stm32f10x_sdio.c><stm32f10x_sdio.c>
|
||||
OPTFFF 2,31,1,0,0,0,0,0,<.\library\src\stm32f10x_spi.c><stm32f10x_spi.c>
|
||||
OPTFFF 2,32,1,0,0,0,0,0,<.\library\src\stm32f10x_systick.c><stm32f10x_systick.c>
|
||||
OPTFFF 2,33,1,0,0,0,0,0,<.\library\src\stm32f10x_tim.c><stm32f10x_tim.c>
|
||||
OPTFFF 2,34,1,0,0,0,0,0,<.\library\src\stm32f10x_usart.c><stm32f10x_usart.c>
|
||||
OPTFFF 2,35,1,0,0,0,0,0,<.\library\src\stm32f10x_wwdg.c><stm32f10x_wwdg.c>
|
||||
OPTFFF 3,36,1,0,0,0,0,0,<..\..\src\clock.c><clock.c>
|
||||
OPTFFF 3,37,1,0,0,0,0,0,<..\..\src\idle.c><idle.c>
|
||||
OPTFFF 3,38,1,0,0,0,0,0,<..\..\src\ipc.c><ipc.c>
|
||||
OPTFFF 3,39,1,16777216,0,0,0,0,<..\..\src\mem.c><mem.c>
|
||||
OPTFFF 3,40,1,0,0,0,0,0,<..\..\src\mempool.c><mempool.c>
|
||||
OPTFFF 3,41,1,0,0,0,0,0,<..\..\src\object.c><object.c>
|
||||
OPTFFF 3,42,1,0,0,0,0,0,<..\..\src\scheduler.c><scheduler.c>
|
||||
OPTFFF 3,43,1,0,0,0,0,0,<..\..\src\thread.c><thread.c>
|
||||
OPTFFF 3,44,1,0,0,0,0,0,<..\..\src\timer.c><timer.c>
|
||||
OPTFFF 3,45,1,0,0,0,0,0,<..\..\src\irq.c><irq.c>
|
||||
OPTFFF 3,46,1,33554432,0,0,0,0,<..\..\src\kservice.c><kservice.c>
|
||||
OPTFFF 3,47,1,0,0,0,0,0,<..\..\src\device.c><device.c>
|
||||
OPTFFF 3,48,1,0,0,0,0,0,<..\..\src\slab.c><slab.c>
|
||||
OPTFFF 4,49,1,0,0,0,0,0,<..\..\libcpu\arm\stm32\stack.c><stack.c>
|
||||
OPTFFF 4,50,1,0,0,0,0,0,<..\..\libcpu\arm\stm32\interrupt.c><interrupt.c>
|
||||
OPTFFF 4,51,1,0,0,0,0,0,<..\..\libcpu\arm\stm32\cpu.c><cpu.c>
|
||||
OPTFFF 4,52,1,0,0,0,0,0,<..\..\libcpu\arm\stm32\serial.c><serial.c>
|
||||
OPTFFF 4,53,2,0,0,0,0,0,<..\..\libcpu\arm\stm32\context_rvds.S><context_rvds.S>
|
||||
OPTFFF 4,54,2,0,0,0,0,0,<..\..\libcpu\arm\stm32\start_rvds.s><start_rvds.s>
|
||||
OPTFFF 4,55,1,0,0,0,0,0,<..\..\libcpu\arm\stm32\fault.c><fault.c>
|
||||
OPTFFF 4,56,2,0,0,0,0,0,<..\..\libcpu\arm\stm32\fault_rvds.S><fault_rvds.S>
|
||||
OPTFFF 5,57,1,0,0,0,0,0,<..\..\finsh\finsh_compiler.c><finsh_compiler.c>
|
||||
OPTFFF 5,58,1,0,0,0,0,0,<..\..\finsh\finsh_error.c><finsh_error.c>
|
||||
OPTFFF 5,59,1,0,0,0,0,0,<..\..\finsh\finsh_heap.c><finsh_heap.c>
|
||||
OPTFFF 5,60,1,0,0,0,0,0,<..\..\finsh\finsh_init.c><finsh_init.c>
|
||||
OPTFFF 5,61,1,0,0,0,0,0,<..\..\finsh\finsh_node.c><finsh_node.c>
|
||||
OPTFFF 5,62,1,0,0,0,0,0,<..\..\finsh\finsh_ops.c><finsh_ops.c>
|
||||
OPTFFF 5,63,1,0,0,0,0,0,<..\..\finsh\finsh_parser.c><finsh_parser.c>
|
||||
OPTFFF 5,64,1,0,0,0,0,0,<..\..\finsh\finsh_token.c><finsh_token.c>
|
||||
OPTFFF 5,65,1,0,0,0,0,0,<..\..\finsh\finsh_var.c><finsh_var.c>
|
||||
OPTFFF 5,66,1,0,0,0,0,0,<..\..\finsh\finsh_vm.c><finsh_vm.c>
|
||||
OPTFFF 5,67,1,0,0,0,0,0,<..\..\finsh\shell.c><shell.c>
|
||||
OPTFFF 5,68,1,0,0,0,0,0,<..\..\finsh\symbol.c><symbol.c>
|
||||
OPTFFF 5,69,1,0,0,0,0,0,<..\..\finsh\cmd.c><cmd.c>
|
||||
OPTFFF 6,70,1,0,0,0,0,0,<..\..\filesystem\dfs\src\dfs_init.c><dfs_init.c>
|
||||
OPTFFF 6,71,1,0,0,0,0,0,<..\..\filesystem\dfs\src\dfs_fs.c><dfs_fs.c>
|
||||
OPTFFF 6,72,1,0,0,0,0,0,<..\..\filesystem\dfs\src\dfs_raw.c><dfs_raw.c>
|
||||
OPTFFF 6,73,1,0,0,0,0,0,<..\..\filesystem\dfs\src\dfs_util.c><dfs_util.c>
|
||||
OPTFFF 6,74,1,0,0,0,0,0,<..\..\filesystem\dfs\src\dfs_cache.c><dfs_cache.c>
|
||||
OPTFFF 6,75,1,268435456,0,0,0,0,<..\..\filesystem\dfs\src\dfs_posix.c><dfs_posix.c>
|
||||
OPTFFF 6,76,1,0,0,0,0,0,<..\..\filesystem\dfs\filesystems\efsl\src\base\efs.c><efs.c>
|
||||
OPTFFF 6,77,1,0,0,0,0,0,<..\..\filesystem\dfs\filesystems\efsl\src\base\extract.c><extract.c>
|
||||
OPTFFF 6,78,1,0,0,0,0,0,<..\..\filesystem\dfs\filesystems\efsl\src\base\partition.c><partition.c>
|
||||
OPTFFF 6,79,1,0,0,0,0,0,<..\..\filesystem\dfs\filesystems\efsl\src\base\plibc.c><plibc.c>
|
||||
OPTFFF 6,80,1,0,0,0,0,0,<..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\dir.c><dir.c>
|
||||
OPTFFF 6,81,1,0,0,0,0,0,<..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\fat.c><fat.c>
|
||||
OPTFFF 6,82,1,0,0,0,0,0,<..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\file.c><file.c>
|
||||
OPTFFF 6,83,1,0,0,0,0,0,<..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\fs.c><fs.c>
|
||||
OPTFFF 6,84,1,0,0,0,0,0,<..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\ls.c><ls.c>
|
||||
OPTFFF 6,85,1,0,0,0,0,0,<..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\time.c><time.c>
|
||||
OPTFFF 6,86,1,0,0,0,0,0,<..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\ui.c><ui.c>
|
||||
OPTFFF 7,87,1,0,0,0,0,0,<..\..\net\lwip\src\core\dhcp.c><dhcp.c>
|
||||
OPTFFF 7,88,1,0,0,0,0,0,<..\..\net\lwip\src\core\dns.c><dns.c>
|
||||
OPTFFF 7,89,1,0,0,0,0,0,<..\..\net\lwip\src\core\init.c><init.c>
|
||||
OPTFFF 7,90,1,0,0,0,0,0,<..\..\net\lwip\src\core\netif.c><netif.c>
|
||||
OPTFFF 7,91,1,0,0,0,0,0,<..\..\net\lwip\src\core\pbuf.c><pbuf.c>
|
||||
OPTFFF 7,92,1,0,0,0,0,0,<..\..\net\lwip\src\core\raw.c><raw.c>
|
||||
OPTFFF 7,93,1,0,0,0,0,0,<..\..\net\lwip\src\core\stats.c><stats.c>
|
||||
OPTFFF 7,94,1,0,0,0,0,0,<..\..\net\lwip\src\core\sys.c><sys.c>
|
||||
OPTFFF 7,95,1,301989888,0,0,0,0,<..\..\net\lwip\src\core\tcp.c><tcp.c>
|
||||
OPTFFF 7,96,1,352321536,0,0,0,0,<..\..\net\lwip\src\core\tcp_in.c><tcp_in.c>
|
||||
OPTFFF 7,97,1,0,0,0,0,0,<..\..\net\lwip\src\core\tcp_out.c><tcp_out.c>
|
||||
OPTFFF 7,98,1,0,0,0,0,0,<..\..\net\lwip\src\core\udp.c><udp.c>
|
||||
OPTFFF 7,99,1,0,0,0,0,0,<..\..\net\lwip\src\core\ipv4\autoip.c><autoip.c>
|
||||
OPTFFF 7,100,1,0,0,0,0,0,<..\..\net\lwip\src\core\ipv4\icmp.c><icmp.c>
|
||||
OPTFFF 7,101,1,0,0,0,0,0,<..\..\net\lwip\src\core\ipv4\igmp.c><igmp.c>
|
||||
OPTFFF 7,102,1,0,0,0,0,0,<..\..\net\lwip\src\core\ipv4\inet.c><inet.c>
|
||||
OPTFFF 7,103,1,0,0,0,0,0,<..\..\net\lwip\src\core\ipv4\inet_chksum.c><inet_chksum.c>
|
||||
OPTFFF 7,104,1,0,0,0,0,0,<..\..\net\lwip\src\core\ipv4\ip.c><ip.c>
|
||||
OPTFFF 7,105,1,0,0,0,0,0,<..\..\net\lwip\src\core\ipv4\ip_addr.c><ip_addr.c>
|
||||
OPTFFF 7,106,1,0,0,0,0,0,<..\..\net\lwip\src\core\ipv4\ip_frag.c><ip_frag.c>
|
||||
OPTFFF 7,107,1,0,0,0,0,0,<..\..\net\lwip\src\core\snmp\msg_in.c><msg_in.c>
|
||||
OPTFFF 7,108,1,0,0,0,0,0,<..\..\net\lwip\src\core\snmp\msg_out.c><msg_out.c>
|
||||
OPTFFF 7,109,1,0,0,0,0,0,<..\..\net\lwip\src\api\api_lib.c><api_lib.c>
|
||||
OPTFFF 7,110,1,0,0,0,0,0,<..\..\net\lwip\src\api\api_msg.c><api_msg.c>
|
||||
OPTFFF 7,111,1,0,0,0,0,0,<..\..\net\lwip\src\api\err.c><err.c>
|
||||
OPTFFF 7,112,1,0,0,0,0,0,<..\..\net\lwip\src\api\netbuf.c><netbuf.c>
|
||||
OPTFFF 7,113,1,0,0,0,0,0,<..\..\net\lwip\src\api\netdb.c><netdb.c>
|
||||
OPTFFF 7,114,1,0,0,0,0,0,<..\..\net\lwip\src\api\netifapi.c><netifapi.c>
|
||||
OPTFFF 7,115,1,0,0,0,0,0,<..\..\net\lwip\src\api\tcpip.c><tcpip.c>
|
||||
OPTFFF 7,116,1,0,0,0,0,0,<..\..\net\lwip\src\netif\etharp.c><etharp.c>
|
||||
OPTFFF 7,117,1,0,0,0,0,0,<..\..\net\lwip\src\netif\ethernetif.c><ethernetif.c>
|
||||
OPTFFF 7,118,1,0,0,0,0,0,<..\..\net\lwip\src\netif\loopif.c><loopif.c>
|
||||
OPTFFF 7,119,1,0,0,0,0,0,<..\..\net\lwip\src\arch\sys_arch_init.c><sys_arch_init.c>
|
||||
OPTFFF 7,120,1,0,0,0,0,0,<..\..\net\lwip\src\arch\sys_arch.c><sys_arch.c>
|
||||
OPTFFF 7,121,1,0,0,0,0,0,<..\..\net\lwip\src\api\sockets.c><sockets.c>
|
||||
OPTFFF 7,122,1,0,0,0,0,0,<..\..\net\lwip\src\core\memp_tiny.c><memp_tiny.c>
|
||||
|
||||
|
||||
TARGOPT 1, (RT-Thread/STM32)
|
||||
ADSCLK=8000000
|
||||
OPTTT 1,1,1,0
|
||||
OPTHX 1,65535,0,0,0
|
||||
OPTLX 79,66,8,<.\obj\>
|
||||
OPTOX 16
|
||||
OPTLT 1,1,1,0,1,1,0,1,0,0,0,0
|
||||
OPTXL 1,1,1,1,1,1,1,0,0
|
||||
OPTFL 1,0,1
|
||||
OPTAX 0
|
||||
OPTDL (SARMCM3.DLL)()(DARMSTM.DLL)(-pSTM32F103ZE)(SARMCM3.DLL)()(TARMSTM.DLL)(-pSTM32F103ZE)
|
||||
OPTDBG 48118,7,()()()()()()()()()() (Segger\JL2CM3.dll)()()()
|
||||
OPTKEY 0,(DLGUARM)((105=-1,-1,-1,-1,0)(106=-1,-1,-1,-1,0)(107=-1,-1,-1,-1,0))
|
||||
OPTKEY 0,(JL2CM3)(-U20090110 -O206 -S0 -C0 -JU1 -JI127.0.0.1 -JP0 -N00("ARM CoreSight SW-DP") -D00(3BA00477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F10x_512 -FS08000000 -FL080000)
|
||||
OPTKEY 0,(DLGTARM)((1010=477,119,843,669,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(1011=-1,-1,-1,-1,0)(180=-1,-1,-1,-1,0)(120=-1,-1,-1,-1,0)(121=75,107,486,505,0)(122=-1,-1,-1,-1,0)(123=-1,-1,-1,-1,0)(124=-1,-1,-1,-1,0)(125=-1,-1,-1,-1,0)(126=-1,-1,-1,-1,0)(140=-1,-1,-1,-1,0)(240=-1,-1,-1,-1,0)(190=-1,-1,-1,-1,0)(200=-1,-1,-1,-1,0)(170=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(132=-1,-1,-1,-1,0)(133=-1,-1,-1,-1,0)(160=-1,-1,-1,-1,0)(161=-1,-1,-1,-1,0)(162=-1,-1,-1,-1,0)(210=-1,-1,-1,-1,0)(211=180,221,497,575,0)(220=-1,-1,-1,-1,0)(221=-1,-1,-1,-1,0)(230=-1,-1,-1,-1,0)(231=-1,-1,-1,-1,0)(232=-1,-1,-1,-1,0)(233=-1,-1,-1,-1,0)(150=-1,-1,-1,-1,0)(151=-1,-1,-1,-1,0))
|
||||
OPTKEY 0,(ARMDBGFLAGS)()
|
||||
OPTKEY 0,(JLTAgdi)(-O1070 -J1 -Y1000 -Z1 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F10x_512 -FS08000000 -FL080000)
|
||||
OPTKEY 0,(JLTDLG)()
|
||||
OPTMM 1,2,(0x2000629c)
|
||||
OPTDF 0x84
|
||||
OPTLE <>
|
||||
OPTLC <>
|
||||
EndOpt
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<workspace>
|
||||
<project>
|
||||
<path>$WS_DIR$\project.ewp</path>
|
||||
</project>
|
||||
<batchBuild/>
|
||||
</workspace>
|
||||
|
||||
|
||||
-217
File diff suppressed because it is too large.
Load diff
@@ -1,6 +0,0 @@
|
||||
#ifndef __RTC_H__
|
||||
#define __RTC_H__
|
||||
|
||||
void rt_hw_rtc_init(void);
|
||||
|
||||
#endif
|
||||
@@ -1,157 +0,0 @@
|
||||
/* RT-Thread config file */
|
||||
#ifndef __RTTHREAD_CFG_H__
|
||||
#define __RTTHREAD_CFG_H__
|
||||
|
||||
/* RT_NAME_MAX*/
|
||||
#define RT_NAME_MAX 8
|
||||
|
||||
/* RT_ALIGN_SIZE*/
|
||||
#define RT_ALIGN_SIZE 4
|
||||
|
||||
/* PRIORITY_MAX*/
|
||||
#define RT_THREAD_PRIORITY_MAX 256
|
||||
|
||||
/* Tick per Second*/
|
||||
#define RT_TICK_PER_SECOND 100
|
||||
|
||||
/* SECTION: RT_DEBUG */
|
||||
/* Thread Debug*/
|
||||
#define RT_DEBUG
|
||||
#define RT_THREAD_DEBUG
|
||||
|
||||
#define RT_USING_OVERFLOW_CHECK
|
||||
|
||||
/* Using Hook*/
|
||||
#define RT_USING_HOOK
|
||||
|
||||
/* SECTION: IPC */
|
||||
/* Using Semaphore*/
|
||||
#define RT_USING_SEMAPHORE
|
||||
|
||||
/* Using Mutex*/
|
||||
#define RT_USING_MUTEX
|
||||
|
||||
/* Using Event*/
|
||||
#define RT_USING_EVENT
|
||||
|
||||
/* Using Faset Event*/
|
||||
/* #define RT_USING_FASTEVENT */
|
||||
|
||||
/* Using MailBox*/
|
||||
#define RT_USING_MAILBOX
|
||||
|
||||
/* Using Message Queue*/
|
||||
#define RT_USING_MESSAGEQUEUE
|
||||
|
||||
/* SECTION: Memory Management */
|
||||
/* Using Memory Pool Management*/
|
||||
#define RT_USING_MEMPOOL
|
||||
|
||||
/* Using Dynamic Heap Management*/
|
||||
#define RT_USING_HEAP
|
||||
|
||||
/* Using Small MM*/
|
||||
#define RT_USING_SMALL_MEM
|
||||
|
||||
/* Using SLAB Allocator*/
|
||||
/* #define RT_USING_SLAB */
|
||||
|
||||
/* SECTION: Device System */
|
||||
/* Using Device System*/
|
||||
#define RT_USING_DEVICE
|
||||
#define RT_USING_UART1
|
||||
// #define RT_USING_UART2
|
||||
// #define RT_USING_UART3
|
||||
|
||||
/* SECTION: Console options */
|
||||
/* the buffer size of console*/
|
||||
#define RT_CONSOLEBUF_SIZE 128
|
||||
|
||||
/* SECTION: FinSH shell options */
|
||||
/* Using FinSH as Shell*/
|
||||
#define RT_USING_FINSH
|
||||
/* Using symbol table */
|
||||
#define FINSH_USING_SYMTAB
|
||||
#define FINSH_USING_DESCRIPTION
|
||||
|
||||
/* SECTION: a mini libc */
|
||||
/* Using mini libc library*/
|
||||
/* #define RT_USING_MINILIBC */
|
||||
|
||||
/* SECTION: C++ support */
|
||||
/* Using C++ support*/
|
||||
/* #define RT_USING_CPLUSPLUS */
|
||||
|
||||
/* #define RT_USING_RTGUI */
|
||||
|
||||
#define RT_USING_DFS
|
||||
/* SECTION: DFS options */
|
||||
/* the max number of mounted filesystem */
|
||||
#define DFS_FILESYSTEMS_MAX 2
|
||||
/* the max number of opened files */
|
||||
#define DFS_FD_MAX 8
|
||||
/* the max number of cached sector */
|
||||
#define DFS_CACHE_MAX_NUM 8
|
||||
|
||||
/* SECTION: lwip, a lighwight TCP/IP protocol stack */
|
||||
/* Using lighweight TCP/IP protocol stack*/
|
||||
#define RT_USING_LWIP
|
||||
|
||||
/* Trace LwIP protocol*/
|
||||
/* #define RT_LWIP_DEBUG */
|
||||
|
||||
/* Enable ICMP protocol*/
|
||||
#define RT_LWIP_ICMP
|
||||
|
||||
/* Enable IGMP protocol*/
|
||||
/* #define RT_LWIP_IGMP */
|
||||
|
||||
/* Enable UDP protocol*/
|
||||
#define RT_LWIP_UDP
|
||||
|
||||
/* Enable TCP protocol*/
|
||||
#define RT_LWIP_TCP
|
||||
|
||||
/* the number of simulatenously active TCP connections*/
|
||||
#define RT_LWIP_TCP_PCB_NUM 5
|
||||
|
||||
/* TCP sender buffer space*/
|
||||
#define RT_LWIP_TCP_SND_BUF 1500
|
||||
|
||||
/* Enable SNMP protocol*/
|
||||
/* #define RT_LWIP_SNMP */
|
||||
|
||||
/* Using DHCP*/
|
||||
/* #define RT_LWIP_DHCP */
|
||||
|
||||
#define RT_LWIP_DNS
|
||||
|
||||
/* ip address of target*/
|
||||
#define RT_LWIP_IPADDR0 192
|
||||
#define RT_LWIP_IPADDR1 168
|
||||
#define RT_LWIP_IPADDR2 1
|
||||
#define RT_LWIP_IPADDR3 30
|
||||
|
||||
/* gateway address of target*/
|
||||
#define RT_LWIP_GWADDR0 192
|
||||
#define RT_LWIP_GWADDR1 168
|
||||
#define RT_LWIP_GWADDR2 1
|
||||
#define RT_LWIP_GWADDR3 1
|
||||
|
||||
/* mask address of target*/
|
||||
#define RT_LWIP_MSKADDR0 255
|
||||
#define RT_LWIP_MSKADDR1 255
|
||||
#define RT_LWIP_MSKADDR2 255
|
||||
#define RT_LWIP_MSKADDR3 0
|
||||
|
||||
/* tcp thread options */
|
||||
#define RT_LWIP_TCPTHREAD_PRIORITY 120
|
||||
#define RT_LWIP_TCPTHREAD_MBOX_SIZE 4
|
||||
#define RT_LWIP_TCPTHREAD_STACKSIZE 1024
|
||||
|
||||
/* ethernet if thread options */
|
||||
#define RT_LWIP_ETHTHREAD_PRIORITY 128
|
||||
#define RT_LWIP_ETHTHREAD_MBOX_SIZE 4
|
||||
#define RT_LWIP_ETHTHREAD_STACKSIZE 512
|
||||
|
||||
#endif
|
||||
-3108
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,150 +0,0 @@
|
||||
/*
|
||||
* File : startup.c
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2006, RT-Thread Develop Team
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://openlab.rt-thread.com/license/LICENSE
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2006-08-31 Bernard first implementation
|
||||
*/
|
||||
|
||||
#include <rthw.h>
|
||||
#include <rtthread.h>
|
||||
|
||||
#include "board.h"
|
||||
#include "rtc.h"
|
||||
|
||||
#ifdef RT_USING_LWIP
|
||||
#include <netif/ethernetif.h>
|
||||
#include "enc28j60.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @addtogroup STM32
|
||||
*/
|
||||
|
||||
/*@{*/
|
||||
#ifdef RT_USING_FINSH
|
||||
extern void finsh_system_init(void);
|
||||
extern void finsh_set_device(char* device);
|
||||
#endif
|
||||
|
||||
extern int rt_application_init(void);
|
||||
|
||||
#ifdef __CC_ARM
|
||||
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
||||
#elif __ICCARM__
|
||||
#pragma section="HEAP"
|
||||
#else
|
||||
extern int __bss_end;
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
/*******************************************************************************
|
||||
* Function Name : assert_failed
|
||||
* Description : Reports the name of the source file and the source line number
|
||||
* where the assert error has occurred.
|
||||
* Input : - file: pointer to the source file name
|
||||
* - line: assert error line source number
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void assert_failed(u8* file, u32 line)
|
||||
{
|
||||
rt_kprintf("\n\r Wrong parameter value detected on\r\n");
|
||||
rt_kprintf(" file %s\r\n", file);
|
||||
rt_kprintf(" line %d\r\n", line);
|
||||
|
||||
while (1) ;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* This function will startup RT-Thread RTOS.
|
||||
*/
|
||||
void rtthread_startup(void)
|
||||
{
|
||||
/* init board */
|
||||
rt_hw_board_init();
|
||||
|
||||
/* show version */
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
#ifdef RT_USING_HEAP
|
||||
#ifdef __CC_ARM
|
||||
rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)0x20010000);
|
||||
#elif __ICCARM__
|
||||
rt_system_heap_init(__segment_end("HEAP"), (void*)0x20010000);
|
||||
#else
|
||||
/* init memory system */
|
||||
rt_system_heap_init((void*)&__bss_end, (void*)0x20010000);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* init scheduler system */
|
||||
rt_system_scheduler_init();
|
||||
|
||||
#ifdef RT_USING_LWIP
|
||||
eth_system_device_init();
|
||||
|
||||
/* register ethernetif device */
|
||||
rt_hw_enc28j60_init();
|
||||
#endif
|
||||
|
||||
rt_hw_rtc_init();
|
||||
|
||||
/* init hardware serial device */
|
||||
rt_hw_usart_init();
|
||||
#ifdef RT_USING_DFS
|
||||
rt_hw_sdcard_init();
|
||||
#endif
|
||||
|
||||
/* init all device */
|
||||
rt_device_init_all();
|
||||
|
||||
/* init application */
|
||||
rt_application_init();
|
||||
|
||||
#ifdef RT_USING_FINSH
|
||||
/* init finsh */
|
||||
finsh_system_init();
|
||||
#ifdef RT_USING_DEVICE
|
||||
finsh_set_device("uart1");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* init idle thread */
|
||||
rt_thread_idle_init();
|
||||
|
||||
/* start scheduler */
|
||||
rt_system_scheduler_start();
|
||||
|
||||
/* never reach here */
|
||||
return ;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
rt_uint32_t UNUSED level;
|
||||
|
||||
/* disable interrupt first */
|
||||
level = rt_hw_interrupt_disable();
|
||||
rtthread_startup();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*@}*/
|
||||
@@ -1,6 +0,0 @@
|
||||
#ifndef __STM32F10X_H__
|
||||
#define __STM32F10X_H__
|
||||
|
||||
#include <stm32f10x_lib.h>
|
||||
|
||||
#endif
|
||||
@@ -1,174 +0,0 @@
|
||||
/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
|
||||
* File Name : stm32f10x_conf.h
|
||||
* Author : MCD Application Team
|
||||
* Version : V1.1.2
|
||||
* Date : 09/22/2008
|
||||
* Description : Library configuration file.
|
||||
********************************************************************************
|
||||
* 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.
|
||||
*******************************************************************************/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __STM32F10x_CONF_H
|
||||
#define __STM32F10x_CONF_H
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f10x_type.h"
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
/* Uncomment the line below to compile the library in DEBUG mode, this will expanse
|
||||
the "assert_param" macro in the firmware library code (see "Exported macro"
|
||||
section below) */
|
||||
/* #define DEBUG 1*/
|
||||
|
||||
/* Comment the line below to disable the specific peripheral inclusion */
|
||||
/************************************* ADC ************************************/
|
||||
#define _ADC
|
||||
#define _ADC1
|
||||
#define _ADC2
|
||||
#define _ADC3
|
||||
|
||||
/************************************* BKP ************************************/
|
||||
#define _BKP
|
||||
|
||||
/************************************* CAN ************************************/
|
||||
#define _CAN
|
||||
|
||||
/************************************* CRC ************************************/
|
||||
#define _CRC
|
||||
|
||||
/************************************* DAC ************************************/
|
||||
#define _DAC
|
||||
|
||||
/************************************* DBGMCU *********************************/
|
||||
#define _DBGMCU
|
||||
|
||||
/************************************* DMA ************************************/
|
||||
#define _DMA
|
||||
#define _DMA1_Channel1
|
||||
#define _DMA1_Channel2
|
||||
#define _DMA1_Channel3
|
||||
#define _DMA1_Channel4
|
||||
#define _DMA1_Channel5
|
||||
#define _DMA1_Channel6
|
||||
#define _DMA1_Channel7
|
||||
#define _DMA2_Channel1
|
||||
#define _DMA2_Channel2
|
||||
#define _DMA2_Channel3
|
||||
#define _DMA2_Channel4
|
||||
#define _DMA2_Channel5
|
||||
|
||||
/************************************* EXTI ***********************************/
|
||||
#define _EXTI
|
||||
|
||||
/************************************* FLASH and Option Bytes *****************/
|
||||
#define _FLASH
|
||||
/* Uncomment the line below to enable FLASH program/erase/protections functions,
|
||||
otherwise only FLASH configuration (latency, prefetch, half cycle) functions
|
||||
are enabled */
|
||||
/* #define _FLASH_PROG */
|
||||
|
||||
/************************************* FSMC ***********************************/
|
||||
#define _FSMC
|
||||
|
||||
/************************************* GPIO ***********************************/
|
||||
#define _GPIO
|
||||
#define _GPIOA
|
||||
#define _GPIOB
|
||||
#define _GPIOC
|
||||
#define _GPIOD
|
||||
#define _GPIOE
|
||||
#define _GPIOF
|
||||
#define _GPIOG
|
||||
#define _AFIO
|
||||
|
||||
/************************************* I2C ************************************/
|
||||
#define _I2C
|
||||
#define _I2C1
|
||||
#define _I2C2
|
||||
|
||||
/************************************* IWDG ***********************************/
|
||||
#define _IWDG
|
||||
|
||||
/************************************* NVIC ***********************************/
|
||||
#define _NVIC
|
||||
|
||||
/************************************* PWR ************************************/
|
||||
#define _PWR
|
||||
|
||||
/************************************* RCC ************************************/
|
||||
#define _RCC
|
||||
|
||||
/************************************* RTC ************************************/
|
||||
#define _RTC
|
||||
|
||||
/************************************* SDIO ***********************************/
|
||||
#define _SDIO
|
||||
|
||||
/************************************* SPI ************************************/
|
||||
#define _SPI
|
||||
#define _SPI1
|
||||
#define _SPI2
|
||||
#define _SPI3
|
||||
|
||||
/************************************* SysTick ********************************/
|
||||
#define _SysTick
|
||||
|
||||
/************************************* TIM ************************************/
|
||||
#define _TIM
|
||||
#define _TIM1
|
||||
#define _TIM2
|
||||
#define _TIM3
|
||||
#define _TIM4
|
||||
#define _TIM5
|
||||
#define _TIM6
|
||||
#define _TIM7
|
||||
#define _TIM8
|
||||
|
||||
/************************************* USART **********************************/
|
||||
#define _USART
|
||||
#define _USART1
|
||||
#define _USART2
|
||||
#define _USART3
|
||||
#define _UART4
|
||||
#define _UART5
|
||||
|
||||
/************************************* WWDG ***********************************/
|
||||
#define _WWDG
|
||||
|
||||
/* In the following line adjust the value of External High Speed oscillator (HSE)
|
||||
used in your application */
|
||||
#define HSE_Value ((u32)8000000) /* Value of the External oscillator in Hz*/
|
||||
|
||||
/* In the following line adjust the External High Speed oscillator (HSE) Startup
|
||||
Timeout value */
|
||||
#define HSEStartUp_TimeOut ((u16)0x0500) /* Time out for HSE start up */
|
||||
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
#ifdef DEBUG
|
||||
/*******************************************************************************
|
||||
* Macro Name : assert_param
|
||||
* Description : The assert_param macro is used for function's parameters check.
|
||||
* It is used only if the library is compiled in DEBUG mode.
|
||||
* Input : - 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.
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
#define assert_param(expr) ((expr) ? (void)0 : assert_failed((u8 *)__FILE__, __LINE__))
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
void assert_failed(u8* file, u32 line);
|
||||
#else
|
||||
#define assert_param(expr) ((void)0)
|
||||
#endif /* DEBUG */
|
||||
|
||||
#endif /* __STM32F10x_CONF_H */
|
||||
|
||||
/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/
|
||||
@@ -1,32 +0,0 @@
|
||||
/*###ICF### Section handled by ICF editor, don't touch! ****/
|
||||
/*-Editor annotation file-*/
|
||||
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
|
||||
/*-Specials-*/
|
||||
define symbol __ICFEDIT_intvec_start__ = 0x08000000;
|
||||
/*-Memory Regions-*/
|
||||
define symbol __ICFEDIT_region_ROM_start__ = 0x08000000;
|
||||
define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF;
|
||||
define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
|
||||
define symbol __ICFEDIT_region_RAM_end__ = 0x2000FFFF;
|
||||
/*-Sizes-*/
|
||||
define symbol __ICFEDIT_size_cstack__ = 0x200;
|
||||
define symbol __ICFEDIT_size_heap__ = 0x000;
|
||||
/**** End of ICF editor section. ###ICF###*/
|
||||
|
||||
|
||||
define memory mem with size = 4G;
|
||||
define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
|
||||
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
|
||||
|
||||
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
|
||||
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
|
||||
|
||||
initialize by copy { readwrite };
|
||||
do not initialize { section .noinit };
|
||||
|
||||
keep { section FSymTab };
|
||||
keep { section VSymTab };
|
||||
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
|
||||
|
||||
place in ROM_region { readonly };
|
||||
place in RAM_region { readwrite, block CSTACK, last block HEAP};
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,110 +0,0 @@
|
||||
/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
|
||||
* File Name : stm32f10x_it.h
|
||||
* Author : MCD Application Team
|
||||
* Version : V2.0.3
|
||||
* Date : 09/22/2008
|
||||
* Description : This file contains the headers of the interrupt handlers.
|
||||
********************************************************************************
|
||||
* 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.
|
||||
*******************************************************************************/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __STM32F10x_IT_H
|
||||
#define __STM32F10x_IT_H
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f10x_lib.h"
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
|
||||
void NMIException(void);
|
||||
void HardFaultException(void);
|
||||
void MemManageException(void);
|
||||
void BusFaultException(void);
|
||||
void UsageFaultException(void);
|
||||
void DebugMonitor(void);
|
||||
void SVCHandler(void);
|
||||
void rt_hw_pend_sv(void);
|
||||
void SysTickHandler(void);
|
||||
void WWDG_IRQHandler(void);
|
||||
void PVD_IRQHandler(void);
|
||||
void TAMPER_IRQHandler(void);
|
||||
void RTC_IRQHandler(void);
|
||||
void FLASH_IRQHandler(void);
|
||||
void RCC_IRQHandler(void);
|
||||
void EXTI0_IRQHandler(void);
|
||||
void EXTI1_IRQHandler(void);
|
||||
void EXTI2_IRQHandler(void);
|
||||
void EXTI3_IRQHandler(void);
|
||||
void EXTI4_IRQHandler(void);
|
||||
void DMA1_Channel1_IRQHandler(void);
|
||||
void DMA1_Channel2_IRQHandler(void);
|
||||
void DMA1_Channel3_IRQHandler(void);
|
||||
void DMA1_Channel4_IRQHandler(void);
|
||||
void DMA1_Channel5_IRQHandler(void);
|
||||
void DMA1_Channel6_IRQHandler(void);
|
||||
void DMA1_Channel7_IRQHandler(void);
|
||||
void ADC1_2_IRQHandler(void);
|
||||
void USB_HP_CAN1_TX_IRQHandler(void);
|
||||
void USB_LP_CAN1_RX0_IRQHandler(void);
|
||||
void CAN1_RX1_IRQHandler(void);
|
||||
void CAN1_SCE_IRQHandler(void);
|
||||
void EXTI9_5_IRQHandler(void);
|
||||
void TIM1_BRK_IRQHandler(void);
|
||||
void TIM1_UP_IRQHandler(void);
|
||||
void TIM1_TRG_COM_IRQHandler(void);
|
||||
void TIM1_CC_IRQHandler(void);
|
||||
void TIM2_IRQHandler(void);
|
||||
void TIM3_IRQHandler(void);
|
||||
void TIM4_IRQHandler(void);
|
||||
void I2C1_EV_IRQHandler(void);
|
||||
void I2C1_ER_IRQHandler(void);
|
||||
void I2C2_EV_IRQHandler(void);
|
||||
void I2C2_ER_IRQHandler(void);
|
||||
void SPI1_IRQHandler(void);
|
||||
void SPI2_IRQHandler(void);
|
||||
void USART1_IRQHandler(void);
|
||||
void USART2_IRQHandler(void);
|
||||
void USART3_IRQHandler(void);
|
||||
void EXTI15_10_IRQHandler(void);
|
||||
void RTCAlarm_IRQHandler(void);
|
||||
void USBWakeUp_IRQHandler(void);
|
||||
/****** HD ******/
|
||||
void TIM8_BRK_IRQHandler(void);
|
||||
void TIM8_UP_IRQHandler(void);
|
||||
void TIM8_TRG_COM_IRQHandler(void);
|
||||
void TIM8_CC_IRQHandler(void);
|
||||
void ADC3_IRQHandler(void);
|
||||
void FSMC_IRQHandler(void);
|
||||
void SDIO_IRQHandler(void);
|
||||
void TIM5_IRQHandler(void);
|
||||
void SPI3_IRQHandler(void);
|
||||
void UART4_IRQHandler(void);
|
||||
void UART5_IRQHandler(void);
|
||||
void TIM6_IRQHandler(void);
|
||||
void TIM7_IRQHandler(void);
|
||||
void DMA2_Channel1_IRQHandler(void);
|
||||
void DMA2_Channel2_IRQHandler(void);
|
||||
void DMA2_Channel3_IRQHandler(void);
|
||||
void DMA2_Channel4_5_IRQHandler(void);
|
||||
/********* CL **********/
|
||||
void DMA2_Channel5_IRQHandler(void);
|
||||
void ETH_IRQHandler(void);
|
||||
void ETH_WKUP_IRQHandler(void);
|
||||
void CAN2_TX_IRQHandler(void);
|
||||
void CAN2_RX0_IRQHandler(void);
|
||||
void CAN2_RX1_IRQHandler(void);
|
||||
void CAN2_SCE_IRQHandler(void);
|
||||
void OTG_FS_IRQHandler(void);
|
||||
|
||||
#endif /* __STM32F10x_IT_H */
|
||||
|
||||
/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,9 +0,0 @@
|
||||
#ifndef __USART_H__
|
||||
#define __USART_H__
|
||||
|
||||
#include <rthw.h>
|
||||
#include <rtthread.h>
|
||||
|
||||
void rt_hw_usart_init(void);
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,100 +0,0 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file system_stm32f10x.h
|
||||
* @author MCD Application Team
|
||||
* @version V3.1.0
|
||||
* @date 06/19/2009
|
||||
* @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Header File.
|
||||
******************************************************************************
|
||||
*
|
||||
* 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>© COPYRIGHT 2009 STMicroelectronics</center></h2>
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/** @addtogroup CMSIS
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup stm32f10x_system
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Define to prevent recursive inclusion
|
||||
*/
|
||||
#ifndef __SYSTEM_STM32F10X_H
|
||||
#define __SYSTEM_STM32F10X_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** @addtogroup STM32F10x_System_Includes
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
/** @addtogroup STM32F10x_System_Exported_types
|
||||
* @{
|
||||
*/
|
||||
|
||||
extern const uint32_t SystemFrequency; /*!< System Clock Frequency (Core Clock) */
|
||||
extern const uint32_t SystemFrequency_SysClk; /*!< System clock */
|
||||
extern const uint32_t SystemFrequency_AHBClk; /*!< AHB System bus speed */
|
||||
extern const uint32_t SystemFrequency_APB1Clk; /*!< APB Peripheral Bus 1 (low) speed */
|
||||
extern const uint32_t SystemFrequency_APB2Clk; /*!< APB Peripheral Bus 2 (high) speed */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @addtogroup STM32F10x_System_Exported_Constants
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @addtogroup STM32F10x_System_Exported_Macros
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @addtogroup STM32F10x_System_Exported_Functions
|
||||
* @{
|
||||
*/
|
||||
|
||||
extern void SystemInit(void);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*__SYSTEM_STM32F10X_H */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
/******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/
|
||||
File diff suppressed because it is too large.
Load diff
Binary file not shown.
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
Loaded 100 of 151 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user