智能共享宠物寄养处系统设计_第1页
智能共享宠物寄养处系统设计_第2页
智能共享宠物寄养处系统设计_第3页
智能共享宠物寄养处系统设计_第4页
智能共享宠物寄养处系统设计_第5页
已阅读5页,还剩61页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

数据库显示卡号,姓名,剩余余额。图5-10数据库管理员模式下,可在上位机新建宠物主人信息、进行扣费。图5-11管理员添加信息图5-12管理员添加信息到数据库图5-13数据添加成功图5-14管理员进行扣费5.3.5温度检测功能测试测试温度检测功能。温度传感器用于监测宠物的体温,在上位机设置温度阈值,当测量的体温超过温度阈值,如使用手指捏住,蜂鸣器报警并在屏幕和上位机显示。图5-15温度检测模块实物图图5-16上位机设置温度阈值图5-17高于阈值蜂鸣器报警并在屏幕和上位机显示5.3.6继电器功能测试测试继电器功能。继电器模拟空气净化、喂食喂水设备、清理排泄物、闸机等设备工作情况。在上位机设置各继电器工作周期。若设置工作周期时继电器未完成当前工作周期,继电器将在完成当前工作周期后进入设置的工作周期。当模拟空气净化、喂食喂水和清理排泄物的继电器到达设定的时间就会打开,打开时相对应的指示灯亮起并在上位机显示,同时会有响声。图5-18设置净化、喂食、清理排泄物周期图5-19继电器打开

第6章总结与展望6.1总结在焊接电路的过程中由于技术的不熟练甚至不经意间焊接出现了短路,两个点焊接到了一起导致最后结果无法显示。系统软件的调试过程并不是一帆风顺,在调试过程中出現了一些错误。但在老师的辅导下,我总算发现了问题,并纠正了设计中的错误和不科学的地区。设计方案中的问题和解决方法主要包含下面一些层面:(1)在测试工程中,对刷卡功能记录一定要仔细,最高充值不可以超过三位数。(2)应用仿真软件,发现错误代码。然后调整,发现在启用程序流程时,单片机没有正常复位,在程序流程中添加复位程序流程后才获得准确的结果。6.2展望个性化服务:随着人们对宠物关爱的重视程度不断提高,宠物寄养处将更加注重提供个性化的服务。例如,为不同品种、年龄、健康状态的宠物提供专门的寄养计划,满足宠物主人对于宠物健康、安全和幸福的需求。此外,定制化的宠物饮食、运动和社交活动等也将成为宠物寄养处的关注点。科技应用:随着科技的不断发展,宠物寄养处将越来越多地应用各种先进技术。例如,智能监控系统可以实时监测宠物的活动、健康状况和情绪,提供及时的健康报告给宠物主人;虚拟现实技术可以为宠物提供丰富的娱乐和训练体验;无人机和自动化设备可以提供更加高效和便捷的宠物服务等。环保可持续:环保和可持续发展将成为未来宠物寄养处发展的重要方向。例如,宠物寄养处可以引入可再生能源、推行垃圾分类和资源回收,减少对环境的影响;采用环保材料和设备,提高宠物生活的可持续性;倡导宠物主人的责任意识,推广低碳环保的宠物护理方式等。社交互动:宠物寄养处不仅仅是宠物照顾的场所,还可以成为宠物主人社交互动的场所。未来的宠物寄养处可以设立社交区域,提供宠物主人之间互相交流、分享和学习的机会,举办宠物社交活动、培训课程和社区活动等,促进宠物主人之间的联系和社群的形成。

参考文献黄伟成,金亮,卢俊硕,霍文豪,刘德强.基于STM32单片机的智能宠物屋的设计与实现[J].信息与电脑(理论版),2022,34(10):162-164.田崇峰,赵中营,蒋其友,刘庆新,戴有华.基于WiFi的智能宠物笼监测系统的设计与试验[J].电脑与电信,2017,(04):28-30.徐晓春.基于RFID技术的档案信息化管理模式探究[J].海峡科技与产业,2022,35(10):79-81.王伸,常奇,程鹏,王紫薇,王炣萱.基于物联网的宠物智能饲喂系统设计[J].无线互联科技,2022,19(16):99-101.杨盈泉,宋东瑾,李斌.基于宠物健康关怀的智能产品设计——以面向海外市场的猫砂盆为例[J].设计,2022,35(14):43.李梦璇,徐莹,郭兰天,王勇.一种新型宠物猫智能自动饲养装置[J].科技创新与应用,2021,11(22):28-30.李玉婷,于国龙,谢书琴,吴恋.基于物联网技术的智能宠物屋系统设计与实现[J].无线互联科技,2021,18(14):58-60.王方良,陈思瑞,陈雅金,肖丹彤.基于共生理念的宠物犬服务系统设计研究[J].艺术教育,2020(08):268-271.谢泽健,唐艳芹,王玉兴.远程智能型宠物喂养系统开发[J].现代电子技术,2022,45(16):165-169.DOI:10.16652/j.issn.1004-373x.2022.16.031.张燕,屈海朋.宠物自动喂食控制系统设计[J].现代信息科技,2022,6(15):169-172.DOI:10.19850/ki.2096-4706.2022.15.043.朱赖红,张少怀.基于Qt的宠物照顾系统设计[J].电子制作,2022,30(11):23-26.DOI:10.16589/11-3571/tn.2022.11.004.方舟,王俊杰,朱海轩,吕洁,冯俊杰,董宇,张旭.基于STM32的宠物报警系统设计[J].物联网技术,2022,12(05):5-7.DOI:10.16667/j.issn.2095-1302.2022.05.001.邝华款.远程智能的宠物照料系统开发与应用[J].无线互联科技,2022,19(08):40-41.冯龙双,倪婧园,苏传琦.云模式下的智能宠物减压系统的设计[J].计算机时代,2021(11):122-124.DOI:10.16644/33-1094/tp.2021.11.034.张楠楠,盛赛男.基于单片机的宠物防走失系统设计[J].周口师范学院学报,2021,38(05):36-39.DOI:10.13450/ki.jzknu.2021.05.008.郭恒川.基于物联网技术的智能宠物饲养系统设计[J].信息与电脑(理论版),2021,33(17):187-190.冉建国,陈旭东,赖庆新,张宝凤,陈意见,黄雪萍.智慧型宠物饲养看护系统设计与实现[J].技术与市场,2021,28(06):23-25.吴进朝.

宠物航空服务系统设计研究[D].福建工程学院,2021.DOI:10.27865/ki.gfgxy.2021.000130.王亚文,赵翠.基于SSM框架的社区宠物信息管理系统设计与分析[J].电脑编程技巧与维护,2021(01):103-105.DOI:10.16184/prg.2021.01.036.PrataJC.MotivationofPortuguese-SpeakingPetOwnersSeekingOnlinePetHealthandHusbandryInformation[J].TopicsinCompanionAnimalMedicine,2022,51:100738CasellaG,BigliardiB,BottaniE.TheevolutionofRFIDtechnologyinthelogisticsfield:areview[J].ProcediaComputerScience,2022,200:1582-1592.HighlandAnimalHospitalHelpsSt.PaulFamilieswithEmergencyPetCareServices[J].M2Presswire,2022.

附录A电路图

附录B程序#include<stdint.h>/*definecompilerspecificsymbols*/#ifdefined(__CC_ARM)#define__ASM__asm/*!<asmkeywordforARMCompiler*/#define__INLINE__inline/*!<inlinekeywordforARMCompiler*/#elifdefined(__ICCARM__)#define__ASM__asm/*!<asmkeywordforIARCompiler*/#define__INLINEinline/*!<inlinekeywordforIARCompiler.OnlyavaiableinHighoptimizationmode!*/#elifdefined(__GNUC__)#define__ASM__asm/*!<asmkeywordforGNUCompiler*/#define__INLINEinline/*!<inlinekeywordforGNUCompiler*/#elifdefined(__TASKING__)#define__ASM__asm/*!<asmkeywordforTASKINGCompiler*/#define__INLINEinline/*!<inlinekeywordforTASKINGCompiler*/#endif#ifdefined(__CC_ARM)/*RealViewCompiler*//*ARMarmccspecificfunctions*//***@briefReturntheProcessStackPointer**@returnProcessStackPointer**Returntheactualprocessstackpointer*/__ASMuint32_t__get_PSP(void){mrsr0,pspbxlr}/***@briefSettheProcessStackPointer**@paramtopOfProcStackProcessStackPointer**AssignthevalueProcessStackPointertotheMSP*(processstackpointer)Cortexprocessorregister*/__ASMvoid__set_PSP(uint32_ttopOfProcStack){msrpsp,r0bxlr}/***@briefReturntheMainStackPointer**@returnMainStackPointer**ReturnthecurrentvalueoftheMSP(mainstackpointer)*Cortexprocessorregister*/__ASMuint32_t__get_MSP(void){mrsr0,mspbxlr}/***@briefSettheMainStackPointer**@paramtopOfMainStackMainStackPointer**AssignthevaluemainStackPointertotheMSP*(mainstackpointer)Cortexprocessorregister*/__ASMvoid__set_MSP(uint32_tmainStackPointer){msrmsp,r0bxlr}/***@briefReversebyteorderinunsignedshortvalue**@paramvaluevaluetoreverse*@returnreversedvalue**Reversebyteorderinunsignedshortvalue*/__ASMuint32_t__REV16(uint16_tvalue){rev16r0,r0bxlr}/***@briefReversebyteorderinsignedshortvaluewithsignextensiontointeger**@paramvaluevaluetoreverse*@returnreversedvalue**Reversebyteorderinsignedshortvaluewithsignextensiontointeger*/__ASMint32_t__REVSH(int16_tvalue){revshr0,r0bxlr}#if(__ARMCC_VERSION<400000)/***@briefRemovetheexclusivelockcreatedbyldrex**Removestheexclusivelockwhichiscreatedbyldrex.*/__ASMvoid__CLREX(void){clrex}/***@briefReturntheBasePriorityvalue**@returnBasePriority**Returnthecontentofthebasepriorityregister*/__ASMuint32_t__get_BASEPRI(void){mrsr0,basepribxlr}/***@briefSettheBasePriorityvalue**@parambasePriBasePriority**Setthebasepriorityregister*/__ASMvoid__set_BASEPRI(uint32_tbasePri){msrbasepri,r0bxlr}/***@briefReturnthePriorityMaskvalue**@returnPriMask**Returnstateoftheprioritymaskbitfromtheprioritymaskregister*/__ASMuint32_t__get_PRIMASK(void){mrsr0,primaskbxlr}/***@briefSetthePriorityMaskvalue**@parampriMaskPriMask**Settheprioritymaskbitintheprioritymaskregister*/__ASMvoid__set_PRIMASK(uint32_tpriMask){msrprimask,r0bxlr}/***@briefReturntheFaultMaskvalue**@returnFaultMask**Returnthecontentofthefaultmaskregister*/__ASMuint32_t__get_FAULTMASK(void){mrsr0,faultmaskbxlr}/***@briefSettheFaultMaskvalue**@paramfaultMaskfaultMaskvalue**Setthefaultmaskregister*/__ASMvoid__set_FAULTMASK(uint32_tfaultMask){msrfaultmask,r0bxlr}/***@briefReturntheControlRegistervalue**@returnControlvalue**Returnthecontentofthecontrolregister*/__ASMuint32_t__get_CONTROL(void){mrsr0,controlbxlr}/***@briefSettheControlRegistervalue**@paramcontrolControlvalue**Setthecontrolregister*/__ASMvoid__set_CONTROL(uint32_tcontrol){msrcontrol,r0bxlr}#endif/*__ARMCC_VERSION*/#elif(defined(__ICCARM__))/*ICCCompiler*//*IARiccarmspecificfunctions*/#pragmadiag_suppress=Pe940/***@briefReturntheProcessStackPointer**@returnProcessStackPointer**Returntheactualprocessstackpointer*/uint32_t__get_PSP(void){__ASM("mrsr0,psp");__ASM("bxlr");}/***@briefSettheProcessStackPointer**@paramtopOfProcStackProcessStackPointer**AssignthevalueProcessStackPointertotheMSP*(processstackpointer)Cortexprocessorregister*/void__set_PSP(uint32_ttopOfProcStack){__ASM("msrpsp,r0");__ASM("bxlr");}/***@briefReturntheMainStackPointer**@returnMainStackPointer**ReturnthecurrentvalueoftheMSP(mainstackpointer)*Cortexprocessorregister*/uint32_t__get_MSP(void){__ASM("mrsr0,msp");__ASM("bxlr");}/***@briefSettheMainStackPointer**@paramtopOfMainStackMainStackPointer**AssignthevaluemainStackPointertotheMSP*(mainstackpointer)Cortexprocessorregister*/void__set_MSP(uint32_ttopOfMainStack){__ASM("msrmsp,r0");__ASM("bxlr");}/***@briefReversebyteorderinunsignedshortvalue**@paramvaluevaluetoreverse*@returnreversedvalue**Reversebyteorderinunsignedshortvalue*/uint32_t__REV16(uint16_tvalue){__ASM("rev16r0,r0");__ASM("bxlr");}/***@briefReversebitorderofvalue**@paramvaluevaluetoreverse*@returnreversedvalue**Reversebitorderofvalue*/uint32_t__RBIT(uint32_tvalue){__ASM("rbitr0,r0");__ASM("bxlr");}/***@briefLDRExclusive(8bit)**@param*addraddresspointer*@returnvalueof(*address)**ExclusiveLDRcommandfor8bitvalues)*/uint8_t__LDREXB(uint8_t*addr){__ASM("ldrexbr0,[r0]");__ASM("bxlr");}/***@briefLDRExclusive(16bit)**@param*addraddresspointer*@returnvalueof(*address)**ExclusiveLDRcommandfor16bitvalues*/uint16_t__LDREXH(uint16_t*addr){__ASM("ldrexhr0,[r0]");__ASM("bxlr");}/***@briefLDRExclusive(32bit)**@param*addraddresspointer*@returnvalueof(*address)**ExclusiveLDRcommandfor32bitvalues*/uint32_t__LDREXW(uint32_t*addr){__ASM("ldrexr0,[r0]");__ASM("bxlr");}/***@briefSTRExclusive(8bit)**@paramvaluevaluetostore*@param*addraddresspointer*@returnsuccessful/failed**ExclusiveSTRcommandfor8bitvalues*/uint32_t__STREXB(uint8_tvalue,uint8_t*addr){__ASM("strexbr0,r0,[r1]");__ASM("bxlr");}/***@briefSTRExclusive(16bit)**@paramvaluevaluetostore*@param*addraddresspointer*@returnsuccessful/failed**ExclusiveSTRcommandfor16bitvalues*/uint32_t__STREXH(uint16_tvalue,uint16_t*addr){__ASM("strexhr0,r0,[r1]");__ASM("bxlr");}/***@briefSTRExclusive(32bit)**@paramvaluevaluetostore*@param*addraddresspointer*@returnsuccessful/failed**ExclusiveSTRcommandfor32bitvalues*/uint32_t__STREXW(uint32_tvalue,uint32_t*addr){__ASM("strexr0,r0,[r1]");__ASM("bxlr");}#pragmadiag_default=Pe940#elif(defined(__GNUC__))/*GNUCompiler*//*GNUgccspecificfunctions*//***@briefReturntheProcessStackPointer**@returnProcessStackPointer**Returntheactualprocessstackpointer*/uint32_t__get_PSP(void)__attribute__((naked));uint32_t__get_PSP(void){uint32_tresult=0;__ASMvolatile("MRS%0,psp\n\t""MOVr0,%0\n\t""BXlr\n\t":"=r"(result));return(result);}void__set_PSP(uint32_ttopOfProcStack)__attribute__((naked));void__set_PSP(uint32_ttopOfProcStack){__ASMvolatile("MSRpsp,%0\n\t""BXlr\n\t"::"r"(topOfProcStack));}uint32_t__get_MSP(void)__attribute__((naked));uint32_t__get_MSP(void){uint32_tresult=0;__ASMvolatile("MRS%0,msp\n\t""MOVr0,%0\n\t""BXlr\n\t":"=r"(result));return(result);}void__set_MSP(uint32_ttopOfMainStack)__attribute__((naked));void__set_MSP(uint32_ttopOfMainStack){__ASMvolatile("MSRmsp,%0\n\t""BXlr\n\t"::"r"(topOfMainStack));}uint32_t__get_BASEPRI(void){uint32_tresult=0;__ASMvolatile("MRS%0,basepri_max":"=r"(result));return(result);}void__set_BASEPRI(uint32_tvalue){__ASMvolatile("MSRbasepri,%0"::"r"(value));}uint32_t__get_PRIMASK(void){uint32_tresult=0;__ASMvolatile("MRS%0,primask":"=r"(result));return(result);}void__set_PRIMASK(uint32_tpriMask){__ASMvolatile("MSRprimask,%0"::"r"(priMask));}uint32_t__get_FAULTMASK(void){uint32_tresult=0;__ASMvolatile("MRS%0,faultmask":"=r"(result));return(result);}void__set_FAULTMASK(uint32_tfaultMask){__ASMvolatile("MSRfaultmask,%0"::"r"(faultMask));}uint32_t__get_CONTROL(void){uint32_tresult=0;__ASMvolatile("MRS%0,control":"=r"(result));return(result);}void__set_CONTROL(uint32_tcontrol){__ASMvolatile("MSRcontrol,%0"::"r"(control));}uint32_t__REV(uint32_tvalue){uint32_tresult=0;__ASMvolatile("rev%0,%1":"=r"(result):"r"(value));return(result);}uint32_t__REV16(uint16_tvalue){uint32_tresult=0;__ASMvolatile("rev16%0,%1":"=r"(result):"r"(value));return(result);}int32_t__REVSH(int16_tvalue){uint32_tresult=0;__ASMvolatile("revsh%0,%1":"=r"(result):"r"(value));return(result);}uint32_t__RBIT(uint32_tvalue){uint32_tresult=0;__ASMvolatile("rbit%0,%1":"=r"(result):"r"(value));return(result);}/***@briefLDRExclusive(8bit)**@param*addraddresspointer*@returnvalueof(*address)**ExclusiveLDRcommandfor8bitvalue*/uint8_t__LDREXB(uint8_t*addr){uint8_tresult=0;__ASMvolatile("ldrexb%0,[%1]":"=r"(result):"r"(addr));return(result);}/***@briefLDRExclusive(16bit)**@param*addraddresspointer*@returnvalueof(*address)**ExclusiveLDRcommandfor16bitvalues*/uint16_t__LDREXH(uint16_t*addr){uint16_tresult=0;__ASMvolatile("ldrexh%0,[%1]":"=r"(result):"r"(addr));return(result);}/***@briefLDRExclusive(32bit)**@param*addraddresspointer*@returnvalueof(*address)**ExclusiveLDRcommandfor32bitvalues*/uint32_t__LDREXW(uint32_t*addr){uint32_tresult=0;__ASMvolatile("ldrex%0,[%1]":"=r"(result):"r"(addr));return(result);}/***@briefSTRExclusive(8bit)**@paramvaluevaluetostore*@param*addraddresspointer*@returnsuccessful/failed**ExclusiveSTRcommandfor8bitvalues*/uint32_t__STREXB(uint8_tvalue,uint8_t*addr){uint32_tresult=0;__ASMvolatile("strexb%0,%2,[%1]":"=r"(result):"r"(addr),"r"(value));return(result);}/***@briefSTRExclusive(16bit)**@paramvaluevaluetostore*@param*addraddresspointer*@returnsuccessful/failed**ExclusiveSTRcommandfor16bitvalues*/uint32_t__STREXH(uint16_tvalue,uint16_t*addr){uint32_tresult=0;__ASMvolatile("strexh%0,%2,[%1]":"=r"(result):"r"(addr),"r"(value));return(result);}/***@briefSTRExclusive(32bit)**@paramvaluevaluetostore*@param*addraddresspointer*@returnsuccessful/failed**ExclusiveSTRcommandfor32bitvalues*/uint32_t__STREXW(uint32_tvalue,uint32_t*addr){uint32_tresult=0;__ASMvolatile("strex%0,%2,[%1]":"=r"(result):"r"(addr),"r"(value));return(result);}#elif(defined(__TASKING__))/*TASKINGCompiler*//*TASKINGcarmspecificfunctions*//**TheCMSISfunctionshavebeenimplementedasintrinsicsinthecompiler.*Pleaseuse"carm-?i"togetanuptodatelistofallinstrinsics,*IncludingtheCMSISones.*/#endif#include<stdint.h>/*definecompilerspecificsymbols*/#ifdefined(__CC_ARM)#define__ASM__asm/*!<asmkeywordforARMCompiler*/#define__INLINE__inline/*!<inlinekeywordforARMCompiler*/#elifdefined(__ICCARM__)#define__ASM__asm/*!<asmkeywordforIARCompiler*/#define__INLINEinline/*!<inlinekeywordforIARCompiler.OnlyavaiableinHighoptimizationmode!*/#elifdefined(__GNUC__)#define__ASM__asm/*!<asmkeywordforGNUCompiler*/#define__INLINEinline/*!<inlinekeywordforGNUCompiler*/#elifdefined(__TASKING__)#define__ASM__asm/*!<asmkeywordforTASKINGCompiler*/#define__INLINEinline/*!<inlinekeywordforTASKINGCompiler*/#endif/*###################CompilerspecificIntrinsics###########################*/#ifdefined(__CC_ARM)/*RealViewCompiler*//*ARMarmccspecificfunctions*//***@briefReturntheProcessStackPointer**@returnProcessStackPointer**Returntheactualprocessstackpointer*/__ASMuint32_t__get_PSP(void){mrsr0,pspbxlr}/***@briefSettheProcessStackPointer**@paramtopOfProcStackProcessStackPointer**AssignthevalueProcessStackPointertotheMSP*(processstackpointer)Cortexprocessorregister*/__ASMvoid__set_PSP(uint32_ttopOfProcStack){msrpsp,r0bxlr}/***@briefReturntheMainStackPointer**@returnMainStackPointer**ReturnthecurrentvalueoftheMSP(mainstackpointer)*Cortexprocessorregister*/__ASMuint32_t__get_MSP(void){mrsr0,mspbxlr}/***@briefSettheMainStackPointer**@paramtopOfMainStackMainStackPointer**AssignthevaluemainStackPointertotheMSP*(mainstackpointer)Cortexprocessorregister*/__ASMvoid__set_MSP(uint32_tmainStackPointer){msrmsp,r0bxlr}/***@briefReversebyteorderinunsignedshortvalue**@paramvaluevaluetoreverse*@returnreversedvalue**Reversebyteorderinunsignedshortvalue*/__ASMuint32_t__REV16(uint16_tvalue){rev16r0,r0bxlr}/***@briefReversebyteorderinsignedshortvaluewithsignextensiontointeger**@paramvaluevaluetoreverse*@returnreversedvalue**Reversebyteorderinsignedshortvaluewithsignextensiontointeger*/__ASMint32_t__REVSH(int16_tvalue){revshr0,r0bxlr}#if(__ARMCC_VERSION<400000)/***@briefRemovetheexclusivelockcreatedbyldrex**Removestheexclusivelockwhichiscreatedbyldrex.*/__ASMvoid__CLREX(void){clrex}/***@briefReturntheBasePriorityvalue**@returnBasePriority**Returnthecontentofthebasepriorityregister*/__ASMuint32_t__get_BASEPRI(void){mrsr0,basepribxlr}/***@briefSettheBasePriorityvalue**@parambasePriBasePriority**Setthebasepriorityregister*/__ASMvoid__set_BASEPRI(uint32_tbasePri){msrbasepri,r0bxlr}/***@briefReturnthePriorityMaskvalue**@returnPriMask**Returnstateoftheprioritymaskbitfromtheprioritymaskregister*/__ASMuint32_t__get_PRIMASK(void){mrsr0,primaskbxlr}/***@briefSetthePriorityMaskvalue**@parampriMaskPriMask**Settheprioritymaskbitintheprioritymaskregister*/__ASMvoid__set_PRIMASK(uint32_tpriMask){msrprimask,r0bxlr}/***@briefReturntheFaultMaskvalue**@returnFaultMask**Returnthecontentofthefaultmaskregister*/__ASMuint32_t__get_FAULTMASK(void){mrsr0,faultmaskbxlr}/***@briefSettheFaultMaskvalue**@paramfaultMaskfaultMaskvalue**Setthefaultmaskregister*/__ASMvoid__set_FAULTMASK(uint32_tfaultMask){msrfaultmask,r0bxlr}/***@briefReturntheControlRegistervalue**@returnControlvalue**Returnthecontentofthecontrolregister*/__ASMuint32_t__get_CONTROL(void){mrsr0,controlbxlr}/***@briefSettheControlRegistervalue**@paramcontrolControlvalue**Setthecontrolregister*/__ASMvoid__set_CONTROL(uint32_tcontrol){msrcontrol,r0bxlr}#endif/*__ARMCC_VERSION*/#elif(defined(__ICCARM__))/*ICCCompiler*//*IARiccarmspecificfunctions*/#pragmadiag_suppress=Pe940/***@briefReturntheProcessStackPointer**@returnProcessStackPointer**Returntheactualprocessstackpointer*/uint32_t__get_PSP(void){__ASM("mrsr0,psp");__ASM("bxlr");}/***@briefSettheProcessStackPointer**@paramtopOfProcStackProcessStackPointer**AssignthevalueProcessStackPointertotheMSP*(processstackpointer)Cortexprocessorregister*/void__set_PSP(uint32_ttopOfProcStack){__ASM("msrpsp,r0");__ASM("bxlr");}/***@briefReturntheMainStackPointer**@returnMainStackPointer**ReturnthecurrentvalueoftheMSP(mainstackpointer)*Cortexprocessorregister*/uint32_t__get_MSP(void){__ASM("mrsr0,msp");__ASM("bxlr");}/***@briefSettheMainStackPointer**@paramtopOfMainStackMainStackPointer**AssignthevaluemainStackPointertotheMSP*(mainstackpointer)Cortexprocessorregister*/void__set_MSP(uint32_ttopOfMainStack){__ASM("msrmsp,r0");__ASM("bxlr");}/***@briefReversebyteorderinunsignedshortvalue**@paramvaluevaluetoreverse*@returnreversedvalue**Reversebyteorderinunsignedshortvalue*/uint32_t__REV16(uint16_tvalue){__ASM("rev16r0,r0");__ASM("bxlr");}/***@briefReversebitorderofvalue**@paramvaluevaluetoreverse*@returnreversedvalue**Reversebitorderofvalue*/uint32_t__RBIT(uint32_tvalue){__ASM("rbitr0,r0");__ASM("bxlr");}/***@briefLDRExclusive(8bit)**@param*addraddresspointer*@returnvalueof(*address)**ExclusiveLDRcommandfor8bitvalues)*/uint8_t__LDREXB(uint8_t*addr){__ASM("ldrexbr0,[r0]");__ASM("bxlr");}/***@briefLDRExclusive(16bit)**@param*addraddresspointer*@returnvalueof(*address)**ExclusiveLDRcommandfor16bitvalues*/uint16_t__LDREXH(uint16_t*addr){__ASM("ldrexhr0,[r0]");__ASM("bxlr");}/***@briefLDRExclusive(32bit)**@param*addraddresspointer*@returnvalueof(*address)**ExclusiveLDRcommandfor32bitvalues*/uint32_t__LDREXW(uint32_t*addr){__ASM("ldrexr0,[r0]");__ASM("bxlr");}/***@briefSTRExclusive(8bit)**@paramvaluevaluetostore*@param*addraddresspointer*@returnsuccessful/failed**ExclusiveSTRcommandfor8bitvalues*/uint32_t__STREXB(uint8_tvalue,uint8_t*addr){__ASM("strexbr0,r0,[r1]");__ASM("bxlr");}/***@briefSTRExclusive(16bit)**@paramvaluevaluetostore*@param*addraddresspointer*@returnsuccessful/failed**ExclusiveSTRcommandfor16bitvalues*/uint32_t__STREXH(uint16_tvalue,uint16_t*addr){__ASM("strexhr0,r0,[r1]");__ASM("bxlr");}/***@briefSTRExclusive(32bit)**@paramvaluevaluetostore*@param*addraddresspointer*@returnsuccessful/failed**ExclusiveSTRcommandfor32bitvalues*/uint32_t__STREXW(uint32_tvalue,uint32_t*addr){__ASM("strexr0,r0,[r1]");__ASM("bxlr");}#pragmadiag_default=Pe940#elif(defined(__GNUC__))/*GNUCompiler*//*GNUgccspecificfunctions*//***@briefReturntheProcessStackPointer**@returnProcessStackPointer**Returntheactualprocessstackpointer*/uint32_t__get_PSP(void)__attribute__((naked));uint32_t__get_PSP(void){uint32_tresult=0;__ASMvolatile("MRS%0,psp\n\t""MOVr0,%0\n\t""BXlr\n\t":"=r"(result));return(result);}/***@briefSettheProcessStackPointer**@paramtopOfProcStackProcessStackPointer**AssignthevalueProcessStackPointertotheMSP*(processstackpointer)Cortexprocessorregister*/void__set_PSP(uint32_ttopOfProcStack)__attribute__((naked));void__set_PSP(uint32_ttopOfProcStack){__ASMvolatile("MSRpsp,%0\n\t""BXlr\n\t"::"r"(topOfProcStack));}/***@briefReturntheMainStackPointer**@returnMainStackPointer**ReturnthecurrentvalueoftheMSP(mainstackpointer)*Cortexprocessorregister*/uint32_t__get_MSP(void)__attribute__((naked));uint32_t__get_MSP(void){uint32_tresult=0;__ASMvolatile("MRS%0,msp\n\t""MOVr0,%0\n\t""BXlr\n\t":"=r"(result));return(result);}/***@briefSettheMainStackPointer**@paramtopOfMainStackMainStackPointer**AssignthevaluemainStackPointertotheMSP*(mainstackpointer)Cortexprocessorregister*/void__set_MSP(uint32_ttopOfMainStack)__attribute__((naked));void__set_MSP(uint32_ttopOfMainStack){__ASMvolatile("MSRmsp,%0\n\t""BXlr\n\t"::"r"(topOfMainStack));}/***@briefReturntheBasePriorityvalue**@returnBasePriority**Returnthecontentofthebasepriorityregister*/uint32_t__get_BASEPRI(void){uint32_tresult=0;__ASMvolatile("MRS%0,basepri_max":"=r"(result));return(result);}/***@briefSettheBasePriorityvalue**@parambasePriBasePriority**Setthebasepriorityregister*/void__set_BASEPRI(uint32_tvalue){__ASMvolatile("MSRbasepri,%0"::"r"(value));}/***@briefReturnthePriorityMaskvalue**@returnPriMask**Returnstateoftheprioritymaskbitfromtheprioritymaskregister*/uint32_t__get_PRIMASK(void){uint32_tresult=0;__ASMvolatile("MRS%0,primask":"=r"(result));return(result);}/***@briefSetthePriorityMaskvalue**@parampriMaskPriMask**Settheprioritymaskbitintheprioritymaskregister*/void__set_PRIMASK(uint32_tpriMask){__ASMvolatile("MSRprimask,%0"::"r"(priMask));}/***@briefReturntheFaultMaskvalue**@returnFaultMask**Returnthecontentofthefaultmaskregister*/uint32_t__get_FAULTMASK(void){uint32_tresult=0;__ASMvolatile("MRS%0,faultmask":"=r"(result));return(result);}/***@briefSettheFaultMaskvalue**@paramfaultMaskfaultMaskvalue**Setthefaultmaskregister*/void__set_FAULTMASK(uint32_tfaultMask){__ASMvolatile("MSRfaultmask,%0"::"r"(faultMask));}/***@briefReturntheControlRegistervalue**@returnControlvalue**Returnthecontentofthecontrolregister*/uint32_t__get_CONTROL(void){uint32_tresult=0;__ASMvolatile("MRS%0,control":"=r"(result));return(result);}/***@briefSettheControlRegistervalue**@paramcontrolControlvalue**Setthecontrolregister*/void__set_CONTROL(uint32_tcontrol){__ASMvolatile("MSRcontrol,%0"::"r"(control));}/***@briefReversebyteorderinintegervalue**@paramvaluevaluetoreverse*@returnreversedvalue**Reversebyteorderinintegervalue*/uint32_t__REV(uint32_tvalue){uint32_tresult=0;__ASMvolatile("rev%0,%1":"=r"(result):"r"(value));return(result);}/***@briefReversebyteorderinunsignedshortvalue**

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论