Implementing the IOSerialDriverSync Class

Serial drivers on Mac OS X must be derived from the IOSerialDriverSync class. The IOSerialDriverSync class is a pure abstract class that provides an interface that must be implemented by the serial driver. The methods that must be implemented by a serial driver are given in Listing 11-2.

Listing 11-2. The Interface of IOSerialDriverSync, Which Declares the Methods That Must Be Implemented by a Serial Port Driver

class IOSerialDriverSync : public IOService {        OSDeclareAbstractStructors(IOSerialDriverSync); public:        virtual IOReturn  acquirePort(bool sleep, void *refCon) = 0;        virtual IOReturn  releasePort(void *refCon) = 0;        virtual IOReturn  setState(UInt32 state, UInt32 mask, ...

Get OS X and iOS Kernel Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.