Home arrow Support arrow Forums

Luminary Micro Forums

totenhose

Senior Boarder

2008/10/12 05:24

Bug and improvement in DriverLib

Dear LMI,

Quite a long time ago i made a suggestion to add extern "c" to all DriverLib header files:
http://www.luminarymicro.com/component/option,com_joomlaboard/Itemid,92/func,view/id,2326/catid,7/

And there seems to be bug in USBLib. In usblib/host/usbhostenum.c file macro "EP_PIPE_HANDLE" is misused in function "USBHostCheckPipes" and "USBHostIntHandlerInternal". The macro is written for OUT pipes but it is used with IN pipes also. I wrote about it here:
http://www.luminarymicro.com/component/option,com_joomlaboard/Itemid,/func,view/catid,5/id,2410/ #2410

I really think you should fix these things.

login or register to reply

LMI Paul

Senior Boarder

2008/10/12 17:14

Re:Bug and improvement in DriverLib

I will bring up the suggestion on the extern "c" in header files to help out people who are using C++ compilers with DriverLib. I don't think we were quite thinking of people using C++ with our micro controllers, but I guess with open tools anything is possible.

The second issue is definitely a bug in our USB host code and I will open an issue against this on our USB library. That is a good very good catch!

login or register to reply

awneil

Gold Boarder

2008/10/27 06:00

Re:Bug and improvement in DriverLib

A similar request recently appeared on the STM32 forum:

http://www.st.com/mcu/forums-cat-7501-23.html

So who will be first to get their Library C++ compatible? The race is on...

In the meantime, the above post gives a link to a site with useful tips for C++ programmers wanting to use C code:

http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html#faq-32.4

login or register to reply