??? 10/07/06 10:41 Read: times |
#125954 - Hardware knowledge Responding to: ???'s previous message |
The library should offer an abstraction to the application developer, so he doesn't have to go deep to the HW knowledge. I don't agree with this approach. Coding for MCUs requires hardware knowledge, more or less, even for application developers. As you can see in commercial libraries, such as TCP/IP stack, Bluetooth stack and FAT file system support, the part of the implementation which depends on hardware is extracted to a module, and source code examples for this part are attached to the libraries. Code Architect generates source code, with which users can easily modify it for their requirement. Therefore, if you supply only a library without source code for hardware dependent modules, the library is not so useful. I think you don't need to worry about to split the source code. Supply the whole source code directly to them. Linker will warn them that some subroutines are not used. Abstraction should be applied not to the module, but to the source code itself, using the definitions such as #define, typedef etc. Tsuneo |