Datasheet
2
The Physical Layer:
The physical layer consists of the actual pins that toggle voltages for each segment of the EInk display.
This is done using the function SetOutput in the file rEInkDrive.c . The user should add more statements
to this function in the already present format to extend functionality for the actual number of segments
present. The initEInkHardware is another such function where user intervention is required to ensure that
all pins connected to the EInk display segments are configured as output.
The Hardware Abstraction Layer:
The hardware abstraction layer is a simple set of preprocessor definitions that exist in the file
rEInkHardwareAbstraction.h. This file is included in rEInkDrive.c and contains the names of each
microcontroller port pin that maps to each segment of the EInk display. These definitions are replaced in
the setOutput function when preprocessing of the source file occurs.
The Driver Layer:
The driver layer consists of the einkDriver function which is called periodically by either the timer
interrupt or from the main loop. When not updating the screen, the driver is in the IDLE state checking if
an update request is made to physically update the screen. When an update request is made, the state
transitions to WAIT state. In the WAIT state, a call is made to UpdateScreen. The updateScreen function
selects the voltage for each segment depending upon the user's choice of waveform and the previously
applied voltage. There is also a delay between switching voltages. The selected voltage for each pin is
applied using the setOutput function.
The Presentation Layer:
The presentation layeris useful when dealing with EInk displays that may have a lot of segments, digits,
icons or combinations of the same. The einkDriver function reads the nextDisplay array to determine
which segments need transitions. This task of setting the elements of nextDisplay array can be difficult
when there are a lot of segments in a display or if the segments are not grouped together in the standard 8,
9, 14 or 16 segment format. This issue can be resolved by filling out information for the structure
einkScreenDef which contains all the parameters to logically define the screen. The displayInZone uses
the information passed through these parameters and a hexadecimal encoding to select set the elements in
nextDisplay to "1".
Important Variables and definitions:
Some of the important variables to look at are: