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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.