资源简介
STM32L151芯片串口和引脚的输入输出例程。代码里面的引脚需要根据实际情况更改,串口1发送,注意波特率。
代码片段和文件信息
/**
******************************************************************************
* @file discover_functions.c
* @author Microcontroller Division
* @version V1.0.2
* @date September-2011
* @brief Discover demo functions
******************************************************************************
* @copy
*
* 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 ------------------------------------------------------------------*/
/* stm32l1xxx std peripheral drivers headers*/
#include “stm32l1xx_exti.h“
#include “misc.h“
/* touch sensing library headers*/
#include “stm32_tsl_api.h“
#include “stm32l15x_tsl_ct_acquisition.h“
/* discover application headers*/
#include “discover_board.h“
#include “discover_functions.h“
#include “stm32l_discovery_lcd.h“
#include “icc_measure.h“
/*Variables placed in DataFlash */
/* ADC converter value for Bias current value*/
#if (defined ( __CC_ARM ))
uint8_t Bias_Current __attribute__((at(0x08080000)));
#elif (defined (__ICCARM__))
uint8_t Bias_Current @ “.DataFlash“ ;
#elif (defined (__GNUC__))
/* ADC converter value for Bias current value*/
uint8_t Bias_Current __attribute__((section(“.DataFlash“)));
#endif
/* Flag for autotest placed in Data Flash for return from RESET after STANDBY */
#if (defined ( __CC_ARM ))
bool Auto_test __attribute__((at(0x08080004)));
#elif (defined (__ICCARM__))
bool Auto_test @ “.DataFlash“ ;
#elif (defined (__GNUC__))
/* Flag for autotest placed in Data Flash for return from RESET after STANDBY */
bool Auto_test __attribute__((section(“.DataFlash“)));
#endif
extern float Current_STBY;
extern uint8_t t_bar[2];
extern uint16_t Int_CurrentSTBY;
/* Used for indicate that the automatic test is ON (set in interrupt handler).*/
/* To indicate if user button function is actived*/
bool UserButton ;
/* Used for detect keypressed*/
extern volatile bool KeyPressed;
/**
* @brief Display touch sensing percent value
* @caller main
* @param None
* @retval None
*/
void Slider_value(void)
{
uint16_t Message[6];
uint32_t percent_value;
Message[0] = ‘ ‘;
Message[1] = ‘ ‘;
Message[2] = ‘ ‘;
/*if touch detected by TSLibrary */
if ((TSL_GlobalSetting.b.CHANGED) && (TSLState == TSL_IDLE_STATE))
/*reset TSL CHANGED FLag*/
TSL_GlobalSetting.b.CHANGED = 0;
/*check if SLIDER has been touched and display position*/
if ((SLIDER_D
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-03-21 17:49 STM32L151CBT6串口1\
目录 0 2019-03-21 17:49 STM32L151CBT6串口1\GPIO_LED\
目录 0 2019-03-21 17:49 STM32L151CBT6串口1\GPIO_LED\MDK_Project\
文件 339 2019-03-21 17:08 STM32L151CBT6串口1\GPIO_LED\MDK_Project\EventRecorderStub.scvd
文件 19 2019-03-21 17:09 STM32L151CBT6串口1\GPIO_LED\MDK_Project\ExtDll.iex
文件 1211203 2014-08-27 15:45 STM32L151CBT6串口1\GPIO_LED\MDK_Project\Jli
文件 573 2012-10-23 14:43 STM32L151CBT6串口1\GPIO_LED\MDK_Project\Jli
文件 215996 2019-03-21 17:48 STM32L151CBT6串口1\GPIO_LED\MDK_Project\MDK_Project.axf
文件 1818 2019-03-21 17:48 STM32L151CBT6串口1\GPIO_LED\MDK_Project\MDK_Project.build_log.htm
文件 12516 2019-03-21 17:48 STM32L151CBT6串口1\GPIO_LED\MDK_Project\MDK_Project.hex
文件 44942 2019-03-21 17:48 STM32L151CBT6串口1\GPIO_LED\MDK_Project\MDK_Project.htm
文件 2491036 2012-10-23 14:43 STM32L151CBT6串口1\GPIO_LED\MDK_Project\MDK_Project.lib
文件 573 2019-03-21 17:48 STM32L151CBT6串口1\GPIO_LED\MDK_Project\MDK_Project.lnp
文件 37831 2019-03-21 17:48 STM32L151CBT6串口1\GPIO_LED\MDK_Project\MDK_Project.map
文件 243 2013-07-22 17:34 STM32L151CBT6串口1\GPIO_LED\MDK_Project\MDK_Project.plg
文件 479 2014-08-13 14:03 STM32L151CBT6串口1\GPIO_LED\MDK_Project\MDK_Project.sct
文件 1785 2014-08-27 15:45 STM32L151CBT6串口1\GPIO_LED\MDK_Project\MDK_Project.tra
文件 69277 2013-07-22 17:34 STM32L151CBT6串口1\GPIO_LED\MDK_Project\MDK_Project.uvgui.08573
文件 141326 2014-08-27 15:45 STM32L151CBT6串口1\GPIO_LED\MDK_Project\MDK_Project.uvgui.Administrator
文件 68931 2013-06-19 16:17 STM32L151CBT6串口1\GPIO_LED\MDK_Project\MDK_Project.uvgui_08573.bak
文件 141225 2014-08-27 15:44 STM32L151CBT6串口1\GPIO_LED\MDK_Project\MDK_Project.uvgui_Administrator.bak
文件 179317 2019-03-21 17:49 STM32L151CBT6串口1\GPIO_LED\MDK_Project\MDK_Project.uvguix.yf_s_PC
文件 15623 2014-08-27 15:45 STM32L151CBT6串口1\GPIO_LED\MDK_Project\MDK_Project.uvopt
文件 13147 2019-03-21 17:11 STM32L151CBT6串口1\GPIO_LED\MDK_Project\MDK_Project.uvoptx
文件 17686 2019-03-21 17:11 STM32L151CBT6串口1\GPIO_LED\MDK_Project\MDK_Project.uvprojx
文件 35083 2019-03-21 17:48 STM32L151CBT6串口1\GPIO_LED\MDK_Project\MDK_Project_Open152V-D.dep
文件 479 2014-08-13 13:39 STM32L151CBT6串口1\GPIO_LED\MDK_Project\MDK_Project_sct.Bak
文件 16159 2014-08-27 15:44 STM32L151CBT6串口1\GPIO_LED\MDK_Project\MDK_Project_uvopt.bak
文件 18561 2014-08-27 15:42 STM32L151CBT6串口1\GPIO_LED\MDK_Project\MDK_Project_uvproj.bak
文件 3971 2019-03-21 17:11 STM32L151CBT6串口1\GPIO_LED\MDK_Project\core_cm3.crf
文件 123 2019-03-21 17:11 STM32L151CBT6串口1\GPIO_LED\MDK_Project\core_cm3.d
............此处省略156个文件信息
相关资源
- 电子-GravityI2C3.7V锂电池电量计stm32L1
- stm32l0系列HAL库
- STM32L476 FreeRTOS系统移植项目
- STM32L433硬件手册
- Keil.STM32L0xx_DFP.2.0.0.pack
- STM32L152 RTC 读取时间和日期
- STM32L152数据手册_中文.pdf
- STM32L476资料
- STM32L051C8T6_USART1.zip
- STM32L1系列的LoRa驱动
- 低功耗STM32L476的原理图和电路板图
- STM32L系列标准库工程模板
- STM32L431RC裸机移植RTT完整工程代码.r
- lora_pingpong
- STM32L151_IAP_Bootloader.rar
- STM32L系列直驱段式LCD、待机模式、A
- stm32LED显示
- NB-iot(bc28模组程序)
- stm32lcd显示矩阵键盘
- STM32L0中文参考手册新版
- STM32L0XX 低功耗程序源码
- STM32L152程序模板
- STM32L0x1参考手册.pdf
- stm32L431的寄存器手册AN4312 Application
- STM32串口中断接收HAL库
- STM32L15**手册和寄存器说明
- STM32L4/L4+ HAL库英文完整版
- Keil.STM32L1xx_DFP.1.3.0.rar
- STM32l0XX
- stm32L051 IAP程序升级,希望大家有用
评论
共有 条评论