• 大小: 5.57MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-11-07
  • 语言: 其他
  • 标签:

资源简介

采用HAL库生成的工程文件实现STM32L051C8T6的USART1控制,实现简单的数据收发过程代码。

资源截图

代码片段和文件信息

/**
  ******************************************************************************
  * @file    stm32l0xx_hal.c
  * @author  MCD Application Team
  * @brief   HAL module driver.
  *          This is the common part of the HAL initialization
  *
  @verbatim
  ==============================================================================
                     ##### How to use this driver #####
  ==============================================================================
    [..]
    The common HAL driver contains a set of generic and common APIs that can be
    used by the PPP peripheral drivers and the user to start using the HAL.
    [..]
    The HAL contains two APIs categories:
         (+) Common HAL APIs
         (+) Services HAL APIs

  @endverbatim
  ******************************************************************************
  * @attention
  *
  * 

© Copyright (c) 2016 STMicroelectronics.
  * All rights reserved.


  *
  * This software component is licensed by ST under BSD 3-Clause license
  * the “License“; You may not use this file except in compliance with the
  * License. You may obtain a copy of the License at:
  *                        opensource.org/licenses/BSD-3-Clause
  *
  ******************************************************************************
  */

/* Includes ------------------------------------------------------------------*/
#include “stm32l0xx_hal.h“

/** @addtogroup STM32L0xx_HAL_Driver
  * @{
  */

#ifdef HAL_MODULE_ENABLED

/** @addtogroup HAL
  * @brief HAL module driver.
  * @{
  */

/** @addtogroup HAL_Exported_Constants
  * @{
  */

/** @defgroup HAL_Version HAL Version
  * @{
  */

/**
 * @brief STM32L0xx HAL Driver version number
 */
#define __STM32L0xx_HAL_VERSION_MAIN   (0x01U) /*!< [31:24] main version */
#define __STM32L0xx_HAL_VERSION_SUB1   (0x0AU) /*!< [23:16] sub1 version */
#define __STM32L0xx_HAL_VERSION_SUB2   (0x02U) /*!< [15:8]  sub2 version */
#define __STM32L0xx_HAL_VERSION_RC     (0x00U) /*!< [7:0]  release candidate */
#define __STM32L0xx_HAL_VERSION         ((__STM32L0xx_HAL_VERSION_MAIN << 24U)\
                                        |(__STM32L0xx_HAL_VERSION_SUB1 << 16U)\
                                        |(__STM32L0xx_HAL_VERSION_SUB2 << 8U )\
                                        |(__STM32L0xx_HAL_VERSION_RC))

#define IDCODE_DEVID_MASK    ((uint32_t)0x00000FFFU)

/**
  * @}
  */

/**
  * @}
  */

/* Exported variables --------------------------------------------------------*/
/** @addtogroup HAL_Exported_Variables
  * @{
  */
__IO uint32_t uwTick;
/**
  * @}
  */

/* Exported functions --------------------------------------------------------*/
/** @addtogroup HAL_Exported_Functions
  * @{
  */

/** @addtogroup HAL_Exported_Functions_Group1
 *  @brief    Initialization and de-initialization functions
 *
@verbatim
 =================================

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2020-04-16 10:36  STM32L051C8T6_USART1\
     文件        6846  2020-04-16 10:36  STM32L051C8T6_USART1\.mxproject
     目录           0  2020-04-15 12:49  STM32L051C8T6_USART1\Drivers\
     目录           0  2020-04-16 10:36  STM32L051C8T6_USART1\Drivers\CMSIS\
     目录           0  2020-04-15 12:49  STM32L051C8T6_USART1\Drivers\CMSIS\Device\
     目录           0  2020-04-15 12:49  STM32L051C8T6_USART1\Drivers\CMSIS\Device\ST\
     目录           0  2020-04-16 10:36  STM32L051C8T6_USART1\Drivers\CMSIS\Device\ST\STM32L0xx\
     目录           0  2020-04-16 10:36  STM32L051C8T6_USART1\Drivers\CMSIS\Device\ST\STM32L0xx\Include\
     文件      481091  2020-03-11 14:40  STM32L051C8T6_USART1\Drivers\CMSIS\Device\ST\STM32L0xx\Include\stm32l051xx.h
     文件        9963  2020-03-11 14:40  STM32L051C8T6_USART1\Drivers\CMSIS\Device\ST\STM32L0xx\Include\stm32l0xx.h
     文件        2610  2020-03-11 14:40  STM32L051C8T6_USART1\Drivers\CMSIS\Device\ST\STM32L0xx\Include\system_stm32l0xx.h
     目录           0  2020-04-16 10:36  STM32L051C8T6_USART1\Drivers\CMSIS\Device\ST\STM32L0xx\Source\
     目录           0  2020-04-16 12:05  STM32L051C8T6_USART1\Drivers\CMSIS\Device\ST\STM32L0xx\Source\Templates\
     目录           0  2020-04-16 10:36  STM32L051C8T6_USART1\Drivers\CMSIS\Include\
     文件        7265  2020-03-11 14:40  STM32L051C8T6_USART1\Drivers\CMSIS\Include\arm_common_tables.h
     文件        3942  2020-03-11 14:40  STM32L051C8T6_USART1\Drivers\CMSIS\Include\arm_const_structs.h
     文件      252339  2020-03-11 14:40  STM32L051C8T6_USART1\Drivers\CMSIS\Include\arm_math.h
     文件       24423  2020-03-11 14:40  STM32L051C8T6_USART1\Drivers\CMSIS\Include\cmsis_armcc.h
     文件       55083  2020-03-11 14:40  STM32L051C8T6_USART1\Drivers\CMSIS\Include\cmsis_armcc_V6.h
     文件       41435  2020-03-11 14:40  STM32L051C8T6_USART1\Drivers\CMSIS\Include\cmsis_gcc.h
     文件       37218  2020-03-11 14:40  STM32L051C8T6_USART1\Drivers\CMSIS\Include\core_cm0.h
     文件       44796  2020-03-11 14:40  STM32L051C8T6_USART1\Drivers\CMSIS\Include\core_cm0plus.h
     文件      103909  2020-03-11 14:40  STM32L051C8T6_USART1\Drivers\CMSIS\Include\core_cm3.h
     文件      114498  2020-03-11 14:40  STM32L051C8T6_USART1\Drivers\CMSIS\Include\core_cm4.h
     文件      139660  2020-03-11 14:40  STM32L051C8T6_USART1\Drivers\CMSIS\Include\core_cm7.h
     文件        3620  2020-03-11 14:40  STM32L051C8T6_USART1\Drivers\CMSIS\Include\core_cmFunc.h
     文件        3636  2020-03-11 14:40  STM32L051C8T6_USART1\Drivers\CMSIS\Include\core_cmInstr.h
     文件        3662  2020-03-11 14:40  STM32L051C8T6_USART1\Drivers\CMSIS\Include\core_cmSimd.h
     文件       45262  2020-03-11 14:40  STM32L051C8T6_USART1\Drivers\CMSIS\Include\core_sc000.h
     文件      102809  2020-03-11 14:40  STM32L051C8T6_USART1\Drivers\CMSIS\Include\core_sc300.h
     目录           0  2020-04-16 10:36  STM32L051C8T6_USART1\Drivers\STM32L0xx_HAL_Driver\
............此处省略145个文件信息

评论

共有 条评论