STM32二维写字机,解析G码,有注解


这个代码的系统性非常强,在看这个代码的过程中有不一样的感悟。适合大家学习,同时还有许多的注释,适合学习。
资源截图
代码片段和文件信息
/******************************************************************************
 * @file:    core_cm3.c
 * @purpose: CMSIS Cortex-M3 Core Peripheral Access layer Source File
 * @version: V1.10
 * @date:    24. Feb. 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! */
  #define __nop           __no_operation   /*!< no operation intrinsic in iarcc */

#elif defined (  __GNUC__  )
  #define __ASM             asm            /*!< asm keyword for gcc            */
  #define __INLINE          inline         /*!< inline keyword for gcc         */
#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
 *
 * Assign the value mainStackPointer to the MSP 
 * (main stack pointer) Cortex processor register
 */
__ASM void __set_MSP(uint32_t mainStackPointer)
{
  msr msp r0
  bx lr
}

/**
 * @brief  Reverse byte order in unsigned short value
 *
 *

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

    .......        84  2015-12-16 20:38  STM32-GRBL-masterdesktop.ini

    .......       465  2015-12-16 20:38  STM32-GRBL-masterJlink Regs CM3.txt

    .......       268  2015-12-16 20:38  STM32-GRBL-masterJlinkSettings.ini

    .......       372  2015-12-16 20:38  STM32-GRBL-masterkeilkilll.bat

    .......      4785  2015-12-16 20:38  STM32-GRBL-masterlibmisc.h

    .......     19079  2015-12-16 20:38  STM32-GRBL-masterlibstm32f10x_adc.h

    .......      7187  2015-12-16 20:38  STM32-GRBL-masterlibstm32f10x_bkp.h

    .......     13839  2015-12-16 20:38  STM32-GRBL-masterlibstm32f10x_can.h

    .......      1895  2015-12-16 20:38  STM32-GRBL-masterlibstm32f10x_crc.h

    .......     10010  2015-12-16 20:38  STM32-GRBL-masterlibstm32f10x_dac.h

    .......      2880  2015-12-16 20:38  STM32-GRBL-masterlibstm32f10x_dbgmcu.h

    .......     18366  2015-12-16 20:38  STM32-GRBL-masterlibstm32f10x_dma.h

    .......      5663  2015-12-16 20:38  STM32-GRBL-masterlibstm32f10x_exti.h

    .......     14141  2015-12-16 20:38  STM32-GRBL-masterlibstm32f10x_flash.h

    .......     26283  2015-12-16 20:38  STM32-GRBL-masterlibstm32f10x_fsmc.h

    .......     14727  2015-12-16 20:38  STM32-GRBL-masterlibstm32f10x_gpio.h

    .......     16470  2015-12-16 20:38  STM32-GRBL-masterlibstm32f10x_i2c.h

    .......      3610  2015-12-16 20:38  STM32-GRBL-masterlibstm32f10x_iwdg.h

    .......      4054  2015-12-16 20:38  STM32-GRBL-masterlibstm32f10x_pwr.h

    .......     15838  2015-12-16 20:38  STM32-GRBL-masterlibstm32f10x_rcc.h

    .......      3533  2015-12-16 20:38  STM32-GRBL-masterlibstm32f10x_rtc.h

    .......     18112  2015-12-16 20:38  STM32-GRBL-masterlibstm32f10x_sdio.h

    .......     14453  2015-12-16 20:38  STM32-GRBL-masterlibstm32f10x_spi.h

    .......     47728  2015-12-16 20:38  STM32-GRBL-masterlibstm32f10x_tim.h

    .......     14105  2015-12-16 20:38  STM32-GRBL-masterlibstm32f10x_usart.h

    .......      2679  2015-12-16 20:38  STM32-GRBL-masterlibstm32f10x_wwdg.h

    .......   8281344  2015-12-16 20:38  STM32-GRBL-masterlibSTM32_lib_3.0.lib

    .......     18047  2015-12-16 20:38  STM32-GRBL-masterLICENSE

    .......     71725  2015-12-16 20:38  STM32-GRBL-mastermain.uvgui.rhyme

    .......     77565  2018-10-15 16:48  STM32-GRBL-mastermain.uvguix.dell

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

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

发表评论

评论列表(条)