阅读背景:

通过优化,使用C,gcc,C99和宏改进微控制器的简约OOP

来源:互联网 

Often I have to program microcontrollers in C, because C++ compilers are often not available, or can not make extremely small code because of various bugs. But often, OOP "syntactic sugar", is very convenient when it comes to making programs for hardware more clearly encapsulated for easy maintenance; so I wanted to find out if there was a way to do OOP syntax in C where as much as possible the OOP overhead (when not needed) could be made to optimize out in a way that is portable. eg: That will optimize with gcc targeted for different microcontrollers, or perhaps by using gcc's preprocessor and a generic ANSI-C compiler if gcc is not available for that microcontroller.Often I have to program microcontrollers in C,




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: