Microchip
直播中

陈炜

8年用户 213经验值
私信 关注
[问答]

Microchip Harmony中静态和动态驱动器的区别是什么?

静态和动态驱动器在微芯片和谐中有什么区别?

以上来自于百度翻译


      以下为原文

    What is Difference between Static and Dynamic Driver in Microchip HARMony.?

回帖(6)

李兆峰

2019-4-3 15:00:43
从我所学到的(没有直接经验的图片),它被称为“静态驱动器”的东西,解决了一个“旧风格”的开放/使用/关闭操作的外设:每一个,即OpenTime1,OpenSART1或OpenSART2 ETCWORD是某种驱动器,被称为使用相同的功能。集合,但返回请求资源的句柄(如果可用):这样可以很容易地在任务之间共享,使用用于报告状态的回调函数等。

以上来自于百度翻译


      以下为原文

    From what I learnt (no direct experience on PICs)
it's called a "static driver" something that resolves to an "old-style" Open/Use/Close modus operandi for the peripherals: each of them, i.e. OpenTimer1, OpenUSART1 or OpenUSART2 etc
 
Dynamic are some kind of drivers that are called using the same function set, but return a Handle to the requested resource (if available): this way it can be easily shared between tasks, using callbacks functions for reporting state, etc
举报

陈晨

2019-4-3 15:10:26
静态驱动程序将代码复制到像MCC这样的项目中。它们需要每个实例的母代码集。动态的调用和谐库共享代码。

以上来自于百度翻译


      以下为原文

    The static drivers copy code to the project like MCC. They require a mother set of code for each instance. The dynamic ones call harmony library shared code.
举报

刘静焱

2019-4-3 15:18:16
动态的协调驱动程序要求你想把哪个外设作为一个参数。如果你需要一个USAT的外围动态init的不止一个实例,那么使用更少的内存:静态驱动程序的硬件实例号是硬编码的,所以不需要参数。RMONY的配置程序将动态驱动程序保存在框架文件夹中。配置器将静态驱动程序的副本放在应用程序文件夹中。如果您对动态驱动程序进行更改,则对整个框架进行更改,如果您对STA进行更改,那么对于我来说,这是不太好的。TIC驱动程序在您的应用程序中是本地的,不会破坏其他项目的框架。-IC

以上来自于百度翻译


      以下为原文

    Dynamic drivers in Harmony ask for which peripheral you want to talk to as an argument.
Less memory is used if you require more than one instance of a peripheral
 
Dynamic init of a USART:
SYS_MODULE_OBJ DRV_USART_Initialize
(
const SYS_MODULE_INDEX index,
const SYS_MODULE_INIT * const init
);
 
Static drivers have the hardware instance numbers hard coded so don't require an argument.
 
Static init of a USART:
SYS_MODULE_OBJ DRV_USART0_Initialize(void); // USART instance selected by MHC combo box
 
Harmony's configurator keeps the Dynamic drivers inside a framework folder.
The configurator puts copies of Static drivers in your application folder.
 
If you make changes to a Dynamic driver, you are making changes to the entire framework, which for me has been not so good, if you make changes to a Static driver it is local to your application and won't wreck the framework for other projects.
 
-IC
 
举报

曾艳

2019-4-3 15:24:27
和声帮助:第三卷:MPLAB和谐发展&关键概念&关键一对多关系&静态与动态

以上来自于百度翻译


      以下为原文

    In the Harmony Help:
 
Volume III: MPLAB Harmony Development > Key Concepts > Key One-to-Many Relationships > Static vs. Dynamic
举报

更多回帖

发帖
×
20
完善资料,
赚取积分