完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好,我正在努力开始使用和声,我正在尝试理解一些概念。我找不到一些参数的初始化代码在哪里,我的意思是,例如,我把输出引脚设置为LeDIAH,并且最初设置为高和低,但是我不定义定义T的代码。他的初始状态。例如,我加载了一个CueNeoTurnTebug示例,但是在提供的代码中找不到任何这些初始化函数的引用:
以上来自于百度翻译 以下为原文 Hi everyone, I am struggling to start getting use to HARMony and I am trying to understand some concepts. I can't find where is the initialization code of some parameters, I mean, for instance: I set output pins as LED_AH, and initially set to High and some LOW, but I don't fin the code that defines this initial state. Also for example, I load a CHANgeNotification example, but I can't find any reference to any of these initialitation functions in the provided code: PLIB_PORTS_ChangeNoticeEnable(MY_PORTS_INSTANCE); // Enabling weak pull-ups for the change notification PIN 10 PLIB_PORTS_ChangeNoticePullUpEnable(MY_PORTS_INSTANCE, PORTS_CHANGE_NOTICE_PIN_10); // Enabling change notification on PIN 10 PLIB_PORTS_PinChangeNoticeEnable(MY_PORTS_INSTANCE, PORTS_CHANGE_NOTICE_PIN_10); By the way, how can I write normally once I have pasted text from other editor, I can't make this sentence look normally |
|
相关推荐
7个回答
|
|
将“[/COD]”标记移到想要再次放置正常文本的点之前。
以上来自于百度翻译 以下为原文 Move the "[/code]" tag to BEFORE the point where you want to put normal text again. |
|
|
|
|
|
|
|
当我想找到我想要跟随的东西时(这是哪里?)我按住“CTRL”键,然后左键点击符号上的鼠标按钮,然后取(通常)到定义。
以上来自于百度翻译 以下为原文 When I want to find something I want to follow (where is this?) I hold down the 'ctrl' key and left click the mouse button on the symbol and I am taken (usually) to the definition. |
|
|
|
我不知道他们在例子中是怎么做的,但是在Meal.C中,函数主体()调用了SysIsPrimalIZE()。在Syt.init .c中,函数SysSimulalIsIZE()调用了SysSpReStIpIrimalIZE()。在SysPosisSty.c中,这个函数使用StulyOffice配置文件的定义。两个文件系统.init .c和StulyOffice。通常你不会触摸这些自动生成的文件除非你有一些非常特殊的需要。相反,你可以通过使用MPLA-和谐配置器(MHC)来改变一切。看看PIN设置选项卡。
以上来自于百度翻译 以下为原文 I don't know how they do it in the example, but: In main.c the function main() calls SYS_Initialize(). In system.init.c the function SYS_Initialize() is calling SYS_PORTS_Initialize(). In sys_ports_static.c this function is using defines from system_config.h. Both files system.init.c and system_config.h should be located in the system_config subfolder for your project configuration. Usually you do not touch these auto-generated files unless you have some very special needs. Instead you can change everything by using MPLAB Harmony Configurator (MHC). Have a look at the Pin Settings tab. |
|
|
|
HI卡洛斯,遵循外围层函数调用的协调可能有点棘手。和声依赖大量的内联优化来操纵SFR寄存器。这些内联函数编码在框架/外围设备中的头文件中/…PrimToReStase:PiBiPosisPixEnEnoCeToEnabl(MyApple PosisSub实例,PosisSoxEngEnEngulePix10);位于……/V2Y03B/框架/外围设备/端口/处理器/Poxsx处理器中。为每个设备类型提供一个单独的文件,包含一个调用转换:和…/Orth/V2Y03B/Frase/PERielale/Posivs/PosisSpIxEnEnoCeTeE.Suff.Hy包含:CNESET是CNEN寄存器的SFR设置寄存器,如数据表和设备支持文件中定义的,并且可以在调试器中监视。对于更改通知功能,PIC32设备的家庭之间存在差异,使得某些功能对某些设备有效,以及其他设备的其他功能。外围层函数不区分CN编号、端口和寄存器之间的关系,可以调用函数来询问是否存在用于当前使用的设备中的特征。尽管文件的数量和大小,当优化1或更高编译时,ING被执行,并且没有太多的指令。当编译没有优化的调试时,这些函数从对象库存档中加载。不幸的是,MPLAB中的调试器瘫痪,并且不显示从库加载的函数的源代码。迈西尔
以上来自于百度翻译 以下为原文 Hi Carlos, Following peripheral layer function calls in Harmony may be a little tricky. Harmony rely a lot on inline optimization to manipulate SFR registers. Those inline functions are coded in include header files in framework/peripheral/... directories Example: PLIB_PORTS_PinChangeNoticeEnable(MY_PORTS_INSTANCE, PORTS_CHANGE_NOTICE_PIN_10); are located in: .../Harmony/v2_03b/framework/peripheral/ports/processor/ports_processor.h and a separate file for each device type, containing a call translation like: PLIB_INLINE_API void PLIB_PORTS_PinChangeNoticeEnable(PORTS_MODULE_ID index, PORTS_CHANGE_NOTICE_PIN pinNum) { PORTS_PinChangeNoticeEnable_Default(index, pinNum); } and: .../Harmony/v2_03b/framework/peripheral/ports/templates/ports_PinChangeNotice_Default.h containing: PLIB_TEMPLATE void PORTS_PinChangeNoticeEnable_Default( PORTS_MODULE_ID index , PORTS_CHANGE_NOTICE_PIN pinNum ) { *(&CNENSET) = 1< Where CNENSET is the SFR SET register for CNEN register, as defined in Datasheet and device support file, and may be watched in debugger. For Change Notice Functions, there are differences between families of PIC32 devices, making some functions valid for some devices, and other functions for other devices. Peripheral layer functions do not sort out the relation between CN-numbers, ports and registers, there are functions that may be called to ask if a feature exists to be used in the device that is currently used. Despite the number and size of files, when compiled with optimization 1 or higher, inlining is carried out, and there isn't many instructions needed. When compiled for debugging without optimization, these functions are loaded from object library archive. Unfortunately, debugger in MPLAB is crippled, and doesn't show source code for functions loaded from a library. Mysil |
|
|
|
这并不总是完美的,因为XIDE中的C解析器没有解析编译器与编译器完全相同的代码,这意味着它会被绊倒,并认为很多东西是未定义的或缺失的,而事实上它们不是。我在一个单独的编辑器中做所有的编辑,它有一个文件中的查找功能,我用目录递归来跳入代码。
以上来自于百度翻译 以下为原文 That doesn't always work perfectly because the C parser in XIDE does not parse your code exactly the same as the compiler does, which means that it gets tripped up and thinks many things are undefined or missing when in fact they're not. I do all my editing in a separate editor, which has a Find In Files feature, and I use that, with directory recursion, to dive into the code. |
|
|
|
您的LED的初始状态一般在项目目录中的“BSP.C”和“BSP.H”文件中定义。BSP文件是从FlimaRKER模板文件中生成的。和声初始化和任务代码(StaskIn.c,StulyTask.C等)是由FlimaMARK模板文件生成的。
以上来自于百度翻译 以下为原文 The initial state of your LEDs is generally defined in the "bsp.c" and "bsp.h" files in your project directory. BSP files are generated from Freemarker Template files in |
|
|
|
只有小组成员才能发言,加入小组>>
5162 浏览 9 评论
2000 浏览 8 评论
1928 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3172 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2226 浏览 5 评论
731浏览 1评论
613浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
503浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
629浏览 0评论
527浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-23 05:46 , Processed in 1.470310 second(s), Total 90, Slave 74 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号