I2C Devices Classes
This article is a stub. You can help the wiki by expanding it. |
I2C Devices Classes |
---|
MCP23017 |
HT16K33 |
Navigation |
I2C devices are hardware drivers on which all cockpit stuff are connected. Switch, Segments Display, Rotary Encoder ... etc are manage by a device. Each device type has it own driver (library).
Devices included in the interface package will be describe from here. For each of them, you will find an example of configuration and informations about the device class and methods(class function).
In a standard configuration, the driver functions should not be called directly. As usual, there are exceptions.
Each driver encapsulates the DeviceI2C Comunication class which it will handle frames on the I2C bus with low level calls
There are however some calls that will be made directly on the device.
To understand, these chips contain oscillators that manage the internal operation.
These hardware drivers are managed by positioning 8-bit binary words in various registers conditioning the operation of the chip. It is that that the classes of the drivers realizes, bringing a simpler use. Rather than having low-level methods like WriteBuffer() or ReadBit(), which are actually methods of the Comunication class DeviceI2C and take hex-decimal type arguments, with driver class you have access to methods like setBrightness() or getInput() that are much clearer and understandable about their function.