完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我们有一个使用PIC32 MX470的现有产品。代码最初是没有和谐的。现在我们想添加从USB闪存驱动器读写文件的能力。董事会是这样设计的,所以硬件就在那里——我们“只是”需要软件。我已经被告知,我可以使用和声来将USB功能添加到我们现有的代码中。然而,我的印象是,和谐是打算从一个项目的开始使用,这显然不是这里的情况。在这种情况下,我能使用和谐的USB库吗?我假设我会通过创建一个与这个板协调的项目来实现这一点,在这个板上,它所做的全部是将文件读写到闪存驱动器,然后将各种文件复制到现有代码中,并找出钩子。有更直接的方法吗?
以上来自于百度翻译 以下为原文 We have an existing product that uses a PIC32MX470. The code was originally written without HARMony. We would now like to add the ability to read and write files from/to a u*** flash drive. The board was designed with that in mind, so the hardware is there - we "just" need the software. I have been advised that I can use Harmony to add that u*** functionality to our existing code. However, my impression was that Harmony was intended to be used from the beginning of a project, which obviously would not be the case here. Would I be able to use the Harmony u*** libraries in this situation? I assume that I would do this by creating a project in Harmony for this board where all it does is read and write files to a flash drive, then copy the various files to the existing code, and figure out the hooks. Is there a more direct way? |
|
相关推荐
5个回答
|
|
无论谁给出这个建议,实际上都没有使用和声。你是对的,你必须从一个和声框架开始,然后添加你的自定义代码。你不能仅仅为现有项目添加和谐。
以上来自于百度翻译 以下为原文 Whoever gave that advise has not actually used Harmony. You are right, you have to start with a Harmony framework, then add your custom code to it. You can't just add Harmony to an existing project. |
|
|
|
将你的代码添加到一个基本的和声项目会更容易。只要你的代码不介意使用CPU时间的和谐,对于MX,你也可以使用MLA。
以上来自于百度翻译 以下为原文 It would be easier to add your code to a basic Harmony Project. As long as you code did not mind Harmony using up CPU time. For an MX you could also use MLA |
|
|
|
和声具有模块化结构,它的意思是你可以很容易地添加新的模块,如USB、TCPIP等在一个正在使用的项目中,比如说GFX,并且已经工作了。但是,工作项目应该是基于和谐的。
以上来自于百度翻译 以下为原文 Harmony has modular structure, what it means is you can easily add new modules like USB, TCPIP etc in a project which is using, say GFX, and already working. but for that, the working project should be Harmony based. |
|
|
|
搜索论坛。有几个人从和谐中提取USB栈,并且能够独立使用它。如果我没弄错的话,他们发布了他们的密码。你应该能够为你的项目使用它。你也可以编写你自己的USB代码:
以上来自于百度翻译 以下为原文 Search the forum. There were several people who extracted the USB stack from Harmony and were able to use it standalone. If I'm not mistaken, they posted their code. You should be able to use it for your project. Also, you can write your own USB code :) |
|
|
|
事实上,你可以为你的非协调项目添加一个和谐库作为独立的库。在这种情况下,您打算使用HONE USB主机与文件系统来读取和写入数据到笔驱动器。Youraim将创建一个预编译的库项目,您可以在这里包括我的建议1。打开应用程序/USB/主机/MSDYBASIC项目。该项目演示了USB闪存驱动器的访问。2。查看项目设置,以确保所创建的库将满足应用程序的需要。在这一点上,您要确保编译时配置常量是正确的。3。运行并测试项目。4。现在从SysInI.c文件中删除保险丝配置宏。删除函数调用到时钟系统服务初始化和设备控制系统服务初始化函数。5。将项目作为一个库来构建。6。包括非协调项目中的图书馆7.将USB中断服务例程添加到非协调项目中。USB ISR应该调用USB驱动中断任务例程。看看这是如何在Apps/USB/主机/MSDYBasic项目中完成的。8。在应用程序初始化时调用SysSimulalIsId()函数一次。注意,这将是一个库调用。9。定期调用SysStasks-()函数。注意,这将是一个库调用。您现在应该能够调用文件系统API来访问USB闪存驱动器。
以上来自于百度翻译 以下为原文 Indeed, it is possible for you to add a Harmony Library as a stand alone library to your non-Harmony project. In this case, you intend to use the Harmony USB Host with File System to read and write data to a pen drive. Your aim will be to create a pre-compiled library project that you can include in your Here is my recommendation 1. Open the apps/u***/host/msd_basic project. This project demonstrates USB flash drive access. 2. Review the project settings to make sure that the library that you will create will meet the application needs. In that, you want to make sure that compile time configuration constants are correct. 3. Run and test the project. 4. Now remove the fuse configuration macros from sys_init.c file. Remove the function call to the Clock System Service Initialize and the Device Control System Service Initialize functions. 5. Build the project as a library. 6. Include the library in the non-harmony project 7. Add the USB interrupt service routine to the non-harmony project. The USB ISR should call the USB Driver Interrupt Tasks routine. See how this is done in apps/u***/host/msd_basic project. 8. Call the SYS_Initialize() function once at the time of application initialization. Note that this will now be a library call. 9. Call the SYS_Tasks() function periodically. Note that this will now be a library call. You should now be able to call the file system API to access the USB Flash Drive. |
|
|
|
只有小组成员才能发言,加入小组>>
5170 浏览 9 评论
2001 浏览 8 评论
1931 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3176 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2228 浏览 5 评论
737浏览 1评论
622浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
509浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
635浏览 0评论
531浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-25 21:26 , Processed in 1.219842 second(s), Total 86, Slave 69 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号