Wednesday, 10 March 2010
 
  Home  
Latest News
Popular
Main Menu
Home
Car PC
PIC
Electronics
Brewing
Links
FAQs
Forums
eXtplorer
Login Form





Lost Password?
No account yet? Register
Syndicate
RSS feed
Updated usb_interface class PDF Print E-mail
Written by Evan   
Thursday, 14 February 2008

I've finally gotten around to one project I've been meaning to do for quite a long time now - updating the usb_interface class used in my PIC USB interfacing code to implement marshalling so that there is no longer any 'unsafe' code.  While I'm at it, I'm also trying to clean up the code significantly, so that it's easier to read and follow, since its purpose is to be example code anyway.  And, I'm also now compiling the core code as a DLL file which can be used in other programs, rather than making a copy of the class each time, so that I can keep all of the core code standardized between all my projects.

I have already gotten the DLL finished, using all safe code, and have successfully tested it in the USB Demo application.  No code changes were required, except adding the DLL as a reference, adding a 'using' directive, and of course removing the old usb_interface.cs class file from the assembly.  So, the DLL should be a pretty painless upgrade for existing projects.

My next tasks are to implement the bootloader class and the asynchronous class with the new code.  Previously these were both built by starting with the core code and editing it for each task, but I would like to refactor it so that the base code DLL stays intact and these two special applications simply extend the base class.  This should make things a lot more modular and logical, and hopefully easier to follow.

I will update when I've made some more progress.  The basic USB Demo article should be the first to get revised.

 
< Prev   Next >
Who's Online
We have 19 guests online
Partner Site
Visit my friends over at Dream-Technology, producing radio controlled and switch adapted toys for children with physical disabilities.
Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License.
For usage outside the terms of this license, contact me by email to discuss.

© 2010 eegeek.net
Joomla! is Free Software released under the GNU/GPL License.

Get The Best Free Joomla Templates at www.joomla-templates.com