資源簡介
在STM32 上調試的DP83848網絡芯片的源碼,使用內部分頻50M實現(xiàn)的
代碼片段和文件信息
/******************************************************************************
?*?@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???????????/*!??#define?__INLINE?????????__inline????????/*!
#elif?defined?(?__ICCARM__?)
??#define?__ASM???????????__asm????????????/*!??#define?__INLINE????????inline???????????/*!
#elif?defined?(??__GNUC__??)
??#define?__ASM?????????????__asm??????????/*!??#define?__INLINE??????????inline?????????/*!
#elif?defined???(??__TASKING__??)
??#define?__ASM????????????__asm???????????/*!??#define?__INLINE?????????inline??????????/*!
#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
?*
?*?
評論
共有 條評論