microsoft / DMF

Driver Module Framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DMF_GENERIC_xxx callbacks might not be needed

hansmbakker opened this issue · comments

In

// TEMPLATE: Replace "_Template_" with "_GENERIC_" for all callbacks that are not implemented
// in this Module.

there is written that you need to set all unused callbacks to a generic callback, but in the other module implementations it looks like you can just remove those lines of code that use a generic implementation?

Hi, Hans,

What that text means is: Use "Search/Replace" to replace the string "Template" with the name of the new Module you are writing for all the callbacks you will use. You do not need to use all the callbacks...In most cases you will use just a few callbacks.

"GENERIC" is probably not a good name for the example. It just means the name of your new Module.

Recently we uploaded a PowerPoint presentation that discusses many aspects of DMF. Please see slide #81 which describes the steps to Create a Module. They are probably better than the steps described in the text you are using. I am going to update the comments in the Dmf_Template.c file to make the steps more clear. I will try to do so this week with the next merge.

You can look at many of the Modules and see that most Modules use just a few callbacks.

If this response does not answer your question, let me know.

You can look at many of the Modules and see that most Modules use just a few callbacks.

Yes, I understood that, it was just that I wanted to give feedback on the comment in Dmf_Template.c.

Hi, Hans,
In LKG 1.1.37 (updated just now) I have updated Dmf_Template.c's comments to accurately reflect the current best practices. Thank you for indicating that issue. The new comments are much better and contain a reference to the PowerPoint slides.