串口缓冲区 循环队列


从项目中剥离,通信类接收数据时采用循环队列的方式。此工程在STM32F103ZET6上运行。开发环境为Keil for ARM 5.10
资源截图
代码片段和文件信息
/******************************************************************************
 * @file:    core_cm3.c
 * @purpose: CMSIS Cortex-M3 Core Peripheral Access layer Source File
 * @version: V1.20
 * @date:    22. May 2009
 *----------------------------------------------------------------------------
 *
 * Copyright (C) 2009 ARM Limited. All rights reserved.
 *
 * ARM Limited (ARM) is supplying this software for use with Cortex-Mx 
 * processor based microcontrollers.  This file can be freely distributed 
 * within development tools that are supporting such ARM based processors. 
 *
 * THIS SOFTWARE IS PROVIDED “AS IS“.  NO WARRANTIES WHETHER EXPRESS IMPLIED
 * OR STATUTORY INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
 * ARM SHALL NOT IN ANY CIRCUMSTANCES BE LIABLE FOR SPECIAL INCIDENTAL OR
 * CONSEQUENTIAL DAMAGES FOR ANY REASON WHATSOEVER.
 *
 ******************************************************************************/



#include 


/* define compiler specific symbols */
#if defined   ( __CC_ARM   )
  #define __ASM            __asm           /*!< asm keyword for armcc           */
  #define __INLINE         __inline        /*!< inline keyword for armcc        */

#elif defined ( __ICCARM__ )
  #define __ASM           __asm            /*!< asm keyword for iarcc           */
  #define __INLINE        inline           /*!< inline keyword for iarcc. Only avaiable in High optimization mode! */

#elif defined (  __GNUC__  )
  #define __ASM             __asm          /*!< asm keyword for gcc            */
  #define __INLINE          inline         /*!< inline keyword for gcc         */

#elif defined   (  __TASKING__  )
  #define __ASM            __asm           /*!< asm keyword for TASKING Compiler          */
  #define __INLINE         inline          /*!< inline keyword for TASKING Compiler       */

#endif



#if defined ( __CC_ARM   ) /*------------------RealView Compiler -----------------*/

/**
 * @brief  Return the Process Stack Pointer
 *
 * @param  none
 * @return uint32_t ProcessStackPointer
 *
 * Return the actual process stack pointer
 */
__ASM uint32_t __get_PSP(void)
{
  mrs r0 psp
  bx lr
}

/**
 * @brief  Set the Process Stack Pointer
 *
 * @param  uint32_t Process Stack Pointer
 * @return none
 *
 * Assign the value ProcessStackPointer to the MSP 
 * (process stack pointer) Cortex processor register
 */
__ASM void __set_PSP(uint32_t topOfProcStack)
{
  msr psp r0
  bx lr
}

/**
 * @brief  Return the Main Stack Pointer
 *
 * @param  none
 * @return uint32_t Main Stack Pointer
 *
 * Return the current value of the MSP (main stack pointer)
 * Cortex processor register
 */
__ASM uint32_t __get_MSP(void)
{
  mrs r0 msp
  bx lr
}

/**
 * @brief  Set the Main Stack Pointer
 *
 * @param  uint32_t Main Stack Pointer
 * @return none
 *
 * 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        216  2014-09-01 17:37  Queue.gitconfig

     文件         73  2014-08-25 12:23  Queue.gitdescription

     文件         23  2014-08-25 12:23  Queue.gitHEAD

     文件        452  2014-08-25 12:23  Queue.githooksapplypatch-msg.sample

     文件        896  2014-08-25 12:23  Queue.githookscommit-msg.sample

     文件        189  2014-08-25 12:23  Queue.githookspost-update.sample

     文件        398  2014-08-25 12:23  Queue.githookspre-applypatch.sample

     文件       1642  2014-08-25 12:23  Queue.githookspre-commit.sample

     文件       1352  2014-08-25 12:23  Queue.githookspre-push.sample

     文件       4951  2014-08-25 12:23  Queue.githookspre-rebase.sample

     文件       1239  2014-08-25 12:23  Queue.githooksprepare-commit-msg.sample

     文件       3611  2014-08-25 12:23  Queue.githooksupdate.sample

     文件      24905  2014-09-01 17:37  Queue.gitindex

     文件        240  2014-08-25 12:23  Queue.gitinfoexclude

     文件         59  2014-08-28 17:31  Queue.gitinfo
efs

     文件        619  2014-09-01 17:37  Queue.gitlogsHEAD

     文件        619  2014-09-01 17:37  Queue.gitlogs
efsheadsmaster

     文件        129  2014-08-28 17:35  Queue.gitobjects0b749dd77f1643c6ffb8de9dad1d659614f108

     文件       1010  2014-08-28 17:31  Queue.gitobjects6a0805e409dd9e446bfd8bbd9df503e61f9da3

     文件      15162  2014-08-28 17:31  Queue.gitobjects105a7219a7acf94864fced5805efe1b828147c31

     文件       1618  2014-08-28 17:31  Queue.gitobjects1a2d614be9af4046a4ee2838be35f500e5d20d3d

     文件        147  2014-08-28 17:35  Queue.gitobjects1c776cb896c1ecb672a993e0b9d1a548b2bfbdf9

     文件        850  2014-08-28 17:31  Queue.gitobjects1d7f077a88a702560c70b7917f6509a61e07f6ca

     文件       1037  2014-09-01 17:36  Queue.gitobjects1ed4958e662b8276b98d911b6a3fa0805ace048e

     文件        700  2014-08-28 17:31  Queue.gitobjects309f1e58ea424c0ec38dbb559cb86431859f89a2

     文件       3520  2014-08-28 17:31  Queue.gitobjects39110ef8c1b951efd65d3ef136ac80697ccf2fc

     文件       1885  2014-08-28 17:35  Queue.gitobjects4063fab166c7078666daa7a2446c3f2dcdbdd502

     文件       3764  2014-08-28 17:31  Queue.gitobjects40fbe22de7c0962693b3a698a9b85db58ba016b5

     文件       3140  2014-08-28 17:31  Queue.gitobjects419e779ca27ffb4191cf96742736e4032cf2cc3

     文件       2465  2014-09-01 17:36  Queue.gitobjects419e0172bca388e76600f32e3ee2d56ca3dfbc26

............此处省略239个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)