Serial Port State
A central part of implementing the IOSerialDriverSync
interface is managing the serial port's state. The serial port state is a bitfield of 32-bits that is used to report events, such as the arrival of data on the serial port, as well as to save the overall state of the port, such as whether it has been opened by a user space process or not. Although there are methods that are directly involved in manipulating the state bitmask, ultimately every method that the serial port implements from IOSerialDriverSync
will need to access the serial port's state, even if for no other reason than to verify that the serial port has been opened before attempting to perform an operation.
The state bits are defined in the header file IOSerialStreamSync.h ...
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.