资源简介
void USART3_IRQHandler(void) //串口数据处理
{
u8 temp; //定义接受数据变量
if(USART_GetITStatus(USART3,USART_IT_RXNE))
{
temp = USART_ReceiveData(USART3);
if (temp==0x55)GPIO_ResetBits(GPIOC,GPIO_Pin_11); //串口收到十六进制55,输出为0
if (temp==0xAA)GPIO_SetBits(GPIOC,GPIO_Pin_11); //串口收到十六进制AA,输出为1
if (temp==0x66)GPIO_ResetBits(GPIOC,GPIO_Pin_12); //串口收到十六进制66,输出为0
if (temp==0xBB)GPIO_SetBits(GPIOC,GPIO_Pin_12); //串口收到十六进制BB,输出为1
if (temp==0x77)GPIO_ResetBits(GPIOD,GPIO_Pin_2); //串口收到十六进制77,输出为0
if (temp==0xCC)GPIO_SetBits(GPIOD,GPIO_Pin_2); //串口收到十六进制CC,输出为1
}
}

代码片段和文件信息
/**
******************************************************************************
* @file misc.c
* @author MCD Application Team
* @version V3.5.0
* @date 11-March-2011
* @brief This file provides all the miscellaneous firmware functions (add-on
* to CMSIS functions).
******************************************************************************
* @attention
*
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
* TIME. AS A RESULT STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
* DIRECT INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
* FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*
* © COPYRIGHT 2011 STMicroelectronics
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include “misc.h“
/** @addtogroup STM32F10x_StdPeriph_Driver
* @{
*/
/** @defgroup MISC
* @brief MISC driver modules
* @{
*/
/** @defgroup MISC_Private_TypesDefinitions
* @{
*/
/**
* @}
*/
/** @defgroup MISC_Private_Defines
* @{
*/
#define AIRCR_VECTKEY_MASK ((uint32_t)0x05FA0000)
/**
* @}
*/
/** @defgroup MISC_Private_Macros
* @{
*/
/**
* @}
*/
/** @defgroup MISC_Private_Variables
* @{
*/
/**
* @}
*/
/** @defgroup MISC_Private_FunctionPrototypes
* @{
*/
/**
* @}
*/
/** @defgroup MISC_Private_Functions
* @{
*/
/**
* @brief Configures the priority grouping: pre-emption priority and subpriority.
* @param NVIC_PriorityGroup: specifies the priority grouping bits length.
* This parameter can be one of the following values:
* @arg NVIC_PriorityGroup_0: 0 bits for pre-emption priority
* 4 bits for subpriority
* @arg NVIC_PriorityGroup_1: 1 bits for pre-emption priority
* 3 bits for subpriority
* @arg NVIC_PriorityGroup_2: 2 bits for pre-emption priority
* 2 bits for subpriority
* @arg NVIC_PriorityGroup_3: 3 bits for pre-emption priority
* 1 bits for subpriority
* @arg NVIC_PriorityGroup_4: 4 bits for pre-emption priority
* 0 bits for subpriority
* @retval None
*/
void NVIC_PriorityGroupConfig(uint32_t NVIC_PriorityGroup)
{
/* Check the parameters */
assert_param(IS_NVIC_PRIORITY_GROUP(NVIC_PriorityGroup));
/* Set the PRIGROUP[10:8] bits according to NVIC_PriorityGroup value */
SCB->AIRCR = AIRCR_VECTKEY_MASK | NVIC_PriorityGroup;
}
/**
* @brief Initializes the NVIC p
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 260120 2018-06-06 19:56 stm32f10x_gpio.o
文件 273188 2018-06-06 19:56 stm32f10x_it.crf
文件 653 2018-06-06 19:56 stm32f10x_it.d
文件 289304 2018-06-06 19:56 stm32f10x_it.o
文件 245082 2018-06-06 19:56 stm32f10x_rcc.crf
文件 469 2018-06-06 19:56 stm32f10x_rcc.d
文件 264584 2018-06-06 19:56 stm32f10x_rcc.o
文件 282265 2018-06-06 19:56 stm32f10x_tim.crf
文件 469 2018-06-06 19:56 stm32f10x_tim.d
文件 310012 2018-06-06 19:56 stm32f10x_tim.o
文件 250443 2018-06-06 19:56 stm32f10x_usart.crf
文件 493 2018-06-06 19:56 stm32f10x_usart.d
文件 270984 2018-06-06 19:56 stm32f10x_usart.o
文件 239201 2018-06-06 19:56 system_stm32f10x.crf
文件 446 2018-06-06 19:56 system_stm32f10x.d
文件 254168 2018-06-06 19:56 system_stm32f10x.o
文件 10308 2008-09-21 13:21 ASM\cortexm3_macro.s
文件 15761 2010-04-23 10:40 ASM\startup_stm32f10x_cl.s
文件 15503 2011-03-10 10:52 ASM\startup_stm32f10x_hd.s
文件 12376 2011-03-10 10:52 ASM\startup_stm32f10x_ld.s
文件 13651 2010-04-23 10:40 ASM\startup_stm32f10x_ld_vl.s
文件 12765 2011-03-10 10:52 ASM\startup_stm32f10x_md.s
文件 14068 2010-04-23 10:40 ASM\startup_stm32f10x_md_vl.s
文件 15950 2010-04-23 10:40 ASM\startup_stm32f10x_xl.s
文件 9630 2009-11-21 17:22 ASM\stm32f10x_startup.s
文件 6956 2015-12-10 17:06 DebugConfig\RS-232_____STM32F103VE_1.0.0.dbgconf
文件 6956 2015-12-10 17:06 DebugConfig\RS-232_____STM32F103VF_1.0.0.dbgconf
文件 6956 2015-12-10 17:06 DebugConfig\RS-232_____STM32F103VG_1.0.0.dbgconf
文件 8982 2011-03-10 10:47 Lib\inc\misc.h
文件 21690 2011-03-10 10:47 Lib\inc\stm32f10x_adc.h
............此处省略96个文件信息
相关资源
- STM32F103RC+ADC+DMA多通道采样LCD显示
- I2C读写AT24C02 基于STM32F103 cube116540
- 基于stm32f103ve的程序——跑马灯实验
- 基于STM32RCT6的步进电机驱动程序
- stm32f407上的两个can发送和接收例程
- STM32 led 时钟
- STM32 2.4G通信例程
- 直流无刷电机方波驱动 stm32 例程代码
- STM32中文资料
- STM32蓝牙和串口程序
- STM32f103超声波模块例程
- stm32f103c8t6 4 oled.rar
- stm32f030 IAP Demo(原创)
- STM32基于rt_thread操作系统的SDHC卡文件
- NRF24L01实现51与STM32双向通讯
- STM32F103 串口程序(完整版)
- stm32 ds18b20 温度传感器 测试通过
- stm32官方例程
- STM32F103定时器中断程序
- [免费]基于stm32f103ze 的OLED驱动代码
- STM32F103RBT6驱动UC1698控制芯片的160160黑
- STM32F103 DS18B20 V3.5.0固件库驱动程序工
- STM32定时器使用入门。看了这个程序会
- SIM908 SDIO FSMC STM32 FIFO
- STM32F103 CC2500完整驱动(模拟SPI)
- AD7606采集程序
- stm32 用SPI 方式读写 SDHC
- 51多机通信(内附Proteus及.hex文件)
- stm32通过DMA方式采集ADC数据
- 意法半导体STM全系列微控制器STM32ST
评论
共有 条评论