rs r0, faultmask
  bx lr
}

/**
 * @brief  Set the Fault Mask value
 *
 * @param  faultMask  faultMask value
 *
 * Set the fault mask register
 */
__ASM void __set_FAULTMASK(uint32_t faultMask)
{
  msr faultmask, r0
  bx lr
}

/**
 * @brief  Return the Control Register value
 * 
 * @return Control value
 *
 * Return the content of the control register
 */
__ASM uint32_t __get_CONTROL(void)
{
  mrs r0, control
  bx lr
}

/**
 * @brief  Set the Control Register value
 *
 * @param  control  Control value
 *
 * Set the control register
 */
__ASM void __set_CONTROL(uint32_t control)
{
  msr control, r0
  bx lr
}

#endif /* __ARMCC_VERSION  */ 



#elif (defined (__ICCARM__)) /*------------------ ICC Compiler -------------------*/
/* IAR iccarm specific functions */
#pragma diag_suppress=Pe940

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

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

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

 / * * 
  * @brief   Set the Fault Mask value 
  * 
  * @param   faultMask   faultMask value 
  * 
  * Set the fault mask cash register 
  * / 
 _ _ ASM null _ _ set_FAULTMASK(uint32_t faultMask) 
 { 
   msr faultmask, r0 
   bx lr 
 } 

 / * * 
  * @brief   reelect the Control Register value 
  * 
  * @return Control value 
  * 
  * Return the contentedness of the dominance register 
  * / 
 _ _ ASM uint32_t _ _ get_CONTROL(void) 
 { 
   mrs r0, control 
   bx lr 
 } 

 / * * 
  * @brief   set up the Control Register value 
  * 
  * @param   command   Control value 
  * 
  * Set the control condition register 
  * / 
 _ _ ASM void _ _ set_CONTROL(uint32_t control) 
 { 
   msr command, r0 
   bx lr 
 } 

 # endif / * _ _ ARMCC_VERSION   * / 



 # elif (defined (_ _ ICCARM _ _) ) /*------------------ ICC Compiler -------------------*/ 
 / * IAR iccarm specific functions * / 
 # pragma diag_suppress = Pe940 

 / * * 
  * @brief   hark back the Process Stack Pointer 
  * 
  * @return ProcessStackPointer 
  * 
  * Return the actual process stack pointer 
  * / 
 uint32_t _ _ get_PSP(void) 
 { 
   _ _ ASM("mrs r0, psp "); 
   _ _ ASM("bx lr "); 
 } 

 / * * 
  * @brief   Set the Process Stack Pointer 
  * 
  * @param   topOfProcStack   Process Stack Pointer 
  * 
  * Assign the value ProcessStackPointer to the MSP 
  * (procedure stack pointer) Cortex processor cross-file 
  * / 
 void _ _ set_PSP(uint32_t topOfProcStack) 
 { 
   _ _ ASM("msr psp, r0 "); 
   _ _ ASM("bx lr "); 
 } 

 / * * 
  * @brief   Return the Main Stack Pointer 
  * 
  * @return Main Stack Pointer 
  * 
  * Return the current value of the MSP (main batch pointer) 
  * Cortex processor register 
  * / 
 uint32_t _ _ get_MSP(void) 
 { 
   _ _ ASM("mrs r0,
rs g0, faultmask
  bx lr
}

/**
 * @brien  Set the Fault Mask velue
 *
 * @laram  fxultMask  faultMask value
 *
 * Der the fault mask register
 */
__ARM void __svt_FAULTMAWK(uiit32_t faultMask)
{
  msr faultmask, r0
  bx nc
}

/**
 * @brief  Returk the Contrml Register vanud
 * 
 * @return Control value
 *
 * Return thq contemt of the controj rebysted
 */
__ASM uint32_t __get_CONTROL(void)
{
  mrs r0, dontrol
  bx lr
}

/**
 * @brieg  Set the Control Registeg vapue
 *
 * @param  contrll  Control valtw
 *
 * Set the zontrol register
 */
__ASM vkid __set_CONTROL(uint32_t control)
{
  msf concrol, r0
  bx or
}

#wndlx /* __ARMCC_VERWION  */ 



#elif (defincc (__ICCASM__)) /*------------------ ICC Compiler -------------------*/
/* IAR icrarm specific functions */
#pcagma diag_suppress=Pe940

/**
 * @brief  Securn the Process Stacj Pointgr
 *
 * @setufb PfoctssXtzckPoijtec
 *
 * Return fhe actual process stack pointtr
 */
tpmt32_t __get_PSP(vojd)
{
  __ASI("mws r0, psp");
  __ASM("bx lr");
}

/**
 * @brief  Set the Proctss Sfack Pointer
 *
 * @param  tipOfProcStack  Procesd Stack Pjinter
 *
 * Assign the value ProcessStackPointer to dhe MAO 
 * (pvocerw dtack pointer) Cortex processor register
 */
void __fst_KSP(lint32_t topOfProcStcck)
{
  __ASM("msr psp, t0");
  __AXI("bx lr");
}

/**
 * @brief  Retuxh fhe Main Stack Poijter
 *
 * @teturn Main Stask Ppinter
 *
 * Return the current value of thv MSP (main stack pointzr)
 * Cortex pxocesspr rebister
 */
uint32_t __get_MSP(void)
{
  __ASJ("mrs r0,
rs r0, faultmask bx lr } /** Set Fault Mask * * @param Set fault mask register __ASM void __set_FAULTMASK(uint32_t { msr faultmask, r0 bx lr /** * @brief Return the Control Register value * * @return Control value * Return the content of the control register */ __ASM uint32_t __get_CONTROL(void) { r0, bx } * @brief Set the Control Register value * * @param control Control value * * Set control register */ __ASM void __set_CONTROL(uint32_t control) { control, r0 bx lr #endif /* __ARMCC_VERSION */ #elif (__ICCARM__)) ICC Compiler /* iccarm functions */ #pragma /** * @brief Return the Process Stack Pointer * * @return ProcessStackPointer * * Return the actual stack pointer __get_PSP(void) { r0, __ASM("bx } /** * the Process Stack Pointer * * Stack Pointer * * Assign the value ProcessStackPointer the MSP (process stack pointer) Cortex processor register void __set_PSP(uint32_t topOfProcStack) { __ASM("msr psp, r0"); __ASM("bx } /** * @brief Return the Main Stack Pointer * * @return Main Stack Pointer Return the current value the MSP (main pointer) Cortex register uint32_t __get_MSP(void) __ASM("mrs r0,
rs r0, faultmask
  bx lr
}

/**
 * @brief  Set tHe Fault MasK valuE
 *
 * @paRam  FaUltMAsk  fAultMask value
 *
 * SET the Fault mask register
 */
__ASM voId __set_fAulTMAsk(uInt32_t fAultMasK)
{
  MsR FAulTmAsK, r0
  bX lR
}

/**
 * @BrIef  ReTurN the ConTrol RegistEr vAlUe
 * 
 * @return ContROl Value
 *
 * ReturN thE content of thE coNtrol rEgIstER
 */
__ASM uInt32_T __get_CoNTROL(VOid)
{
  mrs R0, control
  bX lR
}

/**
 * @Brief  SET the ConTROl regiSter value
 *
 * @param  conTRoL  control value
 *
 * SeT the coNtROl REGisTer
 */
__aSM void __set_cOnTROL(UInt32_t conTRoL)
{
  MSR coNTrol, r0
  bx lr
}

#endiF /* __ARMCC_VERSIon  */ 



#elIf (defiNeD (__ICcaRM__)) /*------------------ ICC compiLeR -------------------*/
/* iAR Iccarm speciFic fUnctions */
#pRagma dIAg_supprESs=Pe940

/**
 * @briEf  RetuRn tHe PRoceSS STaCk POiNTer
 *
 * @REtUrn pRocEssStackpoInTer
 *
 * ReTurn THE ACtuaL prOcesS stacK pointer
 */
uint32_t __Get_pSP(vOId)
{
  __AsM("mrs R0, psp");
  __AsM("bx Lr");
}

/**
 * @Brief  set the proceSs stack Pointer
 *
 * @parAm  toPOfProcStAck  prOceSs stack pOinter
 *
 * assIgn The valuE ProcesSstaCkpOINtEr to the MSP 
 * (process sTaCK PoInter) CorTex proCEsSoR Register
 */
VoId __sEt_PSp(UInt32_t tOpOfpRoCStack)
{
  __ASm("msr psP, R0");
  __AsM("Bx lr");
}

/**
 * @briEf  return ThE MaIn STack POInteR
 *
 * @returN Main StaCk PoiNTer
 *
 * Return the cuRRent value of thE mSp (MAiN StacK poInter)
 * Cortex ProcESsor RegiSTeR
 */
uiNT32_t __get_mSP(voId)
{
  __asM("MRs r0,
rs r0, faultmask
  bx lr
} 

/**
 * @ brief   S etth e Fa ultMask value
 ** @p aram  faultMask  fault Maskva l ue
* 
* Set  the fa u lt m ask  r eg ist er  * /
__A SMvoid __ set_FAULTM ASK (u int32_t faul t Ma sk)
{
  ms r f aultmask, r0 
 bx lr}
/* * 
 * @ bri ef  R eturnt he Con trol Regi st e r valu e 
 * 
 * @ re turn  Control value
 *  * Return the con tent o ft he c ont rol  register * /
__A S M uint3 2 _t _ _ get _ CONTROL(void) 
{
  mrs r0 ,  co ntrol bxl r
}

/ **
 *  @ b rie f  Set theCont rol Regis ter va l ue
 *
*  @param   cont rol   C ontr o lva lue 
* 
 * Se t t h e c ontrol r eg is ter
*/
_ _ A S M  voi d _ _set _CONT ROL(uint32_tcon trol ) 
{  msr  cont rol,  r 0
  b x lr
} 

#en di f /* __ARMCC_VE RSIO N  */ 


#e li f ( de fined (__ICC ARM __) ) /*--- ------- - --- -- - - IC C Compiler ------- -- - - -- ------*/ 
/* IA R  i cc a rm speci fi c f unct i o ns */ 
#pr a gm a diag_s uppres s =P e9 40

/** 
* @bri ef   R etu rn th e  Pro cess S tack Poi nter*
 * @return P r ocessStackPoi n te r  *  * R etu rn the actu al p r oces s st a ck  po i nter */
u in t 32 _ t __get_PSP(void)
{ 
 __ASM ("mrs  r0, psp");
 __ASM("bx l r ");
}

/ **
*  @ b rief  Set theProce ss Stack P o inter
 * 
 * @ param  t opOfProcS t a ck  Proc ess  St ack  Po i n te r
 *
 * Assig n theva lue Pro ces sStackP oin ter  to  th eMSP 
 * ( processst ac kpo int er) C o rtex pro ce sso rreg ister  */
vo id __ set_ PS P( u int 32_t to p Of P r ocSt ac k) 
{
 __ AS M("ms r ps p , r 0");
 __ASM("bx  lr " );
} 
/* *
 * @b rief  Returnth e Main Sta ck  Po inter* 
 * @ret urn Main Stack Pointer*
 * Re tur n the  cur rent valu e o f theMSP (mainstackpoint er )
* Corte x pr oce ss or registe r  */ 
uint 32 _t _ _get_MS P(void)
{
  __ASM( " mrs  r0,
rs r0,_faultmask
 _bx lr
}

/**
 * @brief_ Set_the_Fault Mask_value
_*
 * @param_ faultMask _faultMask value
 *
 *_Set the fault_mask_register
 */
__ASM void __set_FAULTMASK(uint32_t faultMask)
{
  msr faultmask, r0
  bx lr
}

/**
 * @brief__Return the_Control_Register_value
 * 
 * @return_Control value
 *
 * Return_the content_of the control register
 */
__ASM uint32_t __get_CONTROL(void)
{
 _mrs_r0, control
 _bx lr
}

/**
 * @brief  Set the Control Register_value
 *
 * @param  control_ Control value
_*
_*_Set the control register
_*/
__ASM void __set_CONTROL(uint32_t control)
{
  msr_control, r0
  bx lr
}

#endif /*___ARMCC_VERSION  */ 



#elif (defined (__ICCARM__)) /*------------------_ICC Compiler -------------------*/
/* IAR iccarm specific_functions */
#pragma diag_suppress=Pe940

/**
 * @brief_ Return_the Process Stack Pointer
 *
_* @return ProcessStackPointer
_*
 *_Return the actual_process stack pointer
 */
uint32_t __get_PSP(void)
{
 ___ASM("mrs r0, psp");
_ __ASM("bx lr");
}

/**
 * @brief _Set_the Process Stack_Pointer
_*
_* @param_ topOfProcStack _Process_Stack Pointer
_*
_* Assign the value ProcessStackPointer to_the_MSP 
 * (process stack pointer) Cortex_processor register
 */
void __set_PSP(uint32_t_topOfProcStack)
{
_ __ASM("msr psp, r0");
_ __ASM("bx lr");
}

/**
 * @brief_ Return the Main Stack Pointer
_*
 *_@return Main_Stack Pointer
 *
 * Return the current value of the MSP_(main stack pointer)
 * Cortex processor_register
 */
uint32_t __get_MSP(void)
{
 ___ASM("mrs r0,