1

I have designed a few HATs. Now about driving it, does this sounds like a good way doing it? The architecture described below is the driver layer designed for my custom kernel, but a stripped down version can be run as user land library under Linux.

The driver library includes two parts: standard interface classes and specific device classes. Standard interface classes, like MKGPIOPin, MKSDIOInterface (extends and implements MKBlockStorage) or MKSPIBus (extends MKStreamDevice) provides prototypes of standard operations of the bus it represents. Specific device classes derive from standard interface classes and implements the hardware interface itself, either by directly interfacing the hardware (like MKBCM2708System BSP class) or using another standard interface (like MKSDIOOverSPI that implements SD card interface using a SPI bus object).

When porting to Linux, a Linux-specific BSP class is used to translate access to hardware to Linux-style calls to file nodes in /dev and /sys

Does this class model sounds sane?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.