The Linux frame buffer device interface is documented in The Frame Buffer Device API found in the Ubuntu package called linux-doc (see /usr/share/doc/linux-doc/fb/api.txt.gz).
The EPDC frame buffer driver extensions are documented in the i.MX Linux Reference Manual available on the NXP website (registration required). On the NXP home page, click Products, ARM Processors, i.MX Application Processors, and then i.MX 6 Processors, for example. Select the i.MX6SLL Product in the chart; then click the Documentation tab. Look for a download with a label for Linux documents, like L4.1.15_2.1.0_LINUX_DOCS, under the Supporting Information section. After downloading and expanding the archive, the reference manual is found in the doc directory as the file i.MX_Linux_Reference_Manual.pdf.
| Modifier and Type | Field and Description |
|---|---|
| private static final int | BITS_TO_BYTES
The arithmetic right shift value to convert a bit depth to a byte depth. |
| private final int | |
| private final int | |
| private final int | |
| private final EPDSystem | |
| private static final int | ENOTTY
Linux system error: ENOTTY 25 Inappropriate ioctl for device. |
| private final long | |
| private int | |
| private final PlatformLogger | |
| private static final int | POWERDOWN_DELAY
The delay in milliseconds between the completion of all updates in the EPDC driver and when the driver powers down the EPDC and display power supplies. |
| private final EPDSettings | |
| private final EPDSystem. | |
| private final LinuxSystem | |
| private final EPDSystem. | |
| private int | |
| private final int | |
| private final int | |
| private final int | |
| private final int | |
| private final int | |
| private final int |
| Access | Constructor and Description |
|---|---|
| pack-priv | EPDFrameBuffer(String
the frame buffer device path, such as /dev/fb0 fbPath)Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| pack-priv void | |
| private EPDSystem. | Returns: the default update data with all fields set but the update markerthe width of the update region width, int the height of the update region height)Creates the default update data with values from the EPD system properties, setting all fields except for the update marker. |
| pack-priv int | Returns: the color depth in bits per pixelGets the frame buffer color depth in bits per pixel. |
| pack-priv int | Returns: the offset in bytesGets the number of bytes from the beginning of the frame buffer to the start of its visible resolution. |
| pack-priv int | |
| pack-priv ByteBuffer | Returns: a byte buffer containing the mapping of the Linux frame buffer device if successful; otherwisenullCreates a new mapping of the Linux frame buffer device into memory. |
| pack-priv long | Returns: the frame buffer device file descriptorGets the native handle to the Linux frame buffer device. |
| pack-priv ByteBuffer | Returns: a 32-bit pixel buffer matching the resolution of the frame bufferCreates an off-screen byte buffer equal in resolution to the virtual resolution of the frame buffer, but with 32 bits per pixel. |
| private int | Returns: the delay in millisecondsGets the current power-down delay from the EPDC driver. |
| private void | getScreenInfo(EPDSystem.
the object representing the variable screen information screenGets the variable screen information of the frame buffer. |
| pack-priv int | |
| pack-priv void | init()
Initializes the EPDC frame buffer device, setting the update scheme to
|
| private void | logScreenInfo(EPDSystem.
the object representing the variable screen information screenLogs the variable screen information of the frame buffer, depending on the logging level. |
| pack-priv void | releaseMappedBuffer(ByteBuffer
the byte buffer containing the mapping of the Linux frame
buffer device buffer)Deletes the mapping of the Linux frame buffer device. |
| private int | Returns: the marker to identify this update in a subsequence call towaitForUpdateCompletethe update mode, one of:
updateMode, int waveformMode, int a bit mask composed of the following flag values:
flags)Requests the entire visible region of the frame buffer to be updated to the display. |
| private int | Returns: the marker to identify this update in a subsequence call towaitForUpdateCompletethe data describing the update; the waveform mode and
update marker are overwritten update,the waveform mode for this update waveformMode)Requests an update to the display, allowing for the reuse of the update data object. |
| private void | setAutoUpdateMode(int
the automatic update mode, one of:
mode)Selects between automatic and region update mode. |
| private void | setPowerdownDelay(int
the delay in milliseconds delay)Sets the delay between the completion of all updates in the driver and when the driver should power down the EPDC and display power supplies. |
| private void | setScreenInfo(EPDSystem.
the object representing the variable screen information screenSets the variable screen information of the frame buffer. |
| private void | setTemperature(int
the temperature in degrees Celsius temp)Sets the temperature to be used by the EPDC driver in subsequent panel updates. |
| private void | setUpdateScheme(int
the update scheme, one of:
scheme)Selects a scheme for the flow of updates within the driver. |
| private void | setWaveformModes(int
the initialization mode for clearing the screen to all white init, int the direct update mode for changing any gray values to either
all black or all white du, int the mode for 4-level (2-bit) grayscale images and text gc4, int the mode for 8-level (3-bit) grayscale images and text gc8, int the mode for 16-level (4-bit) grayscale images and text gc16, int the mode for 32-level (5-bit) grayscale images and text gc32)Defines a mapping for common waveform modes. |
| pack-priv void | sync()
Sends the updated contents of the Linux frame buffer to the EPDC driver, optionally synchronizing with the driver by first waiting for the previous update to complete. |
| public String | |
| private void | waitForUpdateComplete(int
the marker to identify a particular update, returned by
marker)sendUpdate(MxcfbUpdateData, int)Blocks and waits for a previous update request to complete. |
| BITS_TO_BYTES | back to summary |
|---|---|
| private static final int BITS_TO_BYTES The arithmetic right shift value to convert a bit depth to a byte depth. | |
| bitsPerPixel | back to summary |
|---|---|
| private final int bitsPerPixel | |
| byteOffset | back to summary |
|---|---|
| private final int byteOffset | |
| bytesPerPixel | back to summary |
|---|---|
| private final int bytesPerPixel | |
| driver | back to summary |
|---|---|
| private final EPDSystem driver | |
| ENOTTY | back to summary |
|---|---|
| private static final int ENOTTY Linux system error: ENOTTY 25 Inappropriate ioctl for device. | |
| fd | back to summary |
|---|---|
| private final long fd | |
| lastMarker | back to summary |
|---|---|
| private int lastMarker | |
| logger | back to summary |
|---|---|
| private final PlatformLogger logger | |
| POWERDOWN_DELAY | back to summary |
|---|---|
| private static final int POWERDOWN_DELAY The delay in milliseconds between the completion of all updates in the EPDC driver and when the driver powers down the EPDC and display power supplies. | |
| settings | back to summary |
|---|---|
| private final EPDSettings settings | |
| syncUpdate | back to summary |
|---|---|
| private final EPDSystem. | |
| system | back to summary |
|---|---|
| private final LinuxSystem system | |
| updateData | back to summary |
|---|---|
| private final EPDSystem. | |
| updateMarker | back to summary |
|---|---|
| private int updateMarker | |
| xoffset | back to summary |
|---|---|
| private final int xoffset | |
| xres | back to summary |
|---|---|
| private final int xres | |
| xresVirtual | back to summary |
|---|---|
| private final int xresVirtual | |
| yoffset | back to summary |
|---|---|
| private final int yoffset | |
| yres | back to summary |
|---|---|
| private final int yres | |
| yresVirtual | back to summary |
|---|---|
| private final int yresVirtual | |
| EPDFrameBuffer | back to summary |
|---|---|
| pack-priv EPDFrameBuffer(String fbPath) throws IOException Creates a new
Implementation Note
| |
| clear | back to summary |
|---|---|
| pack-priv void clear() Clears the display panel. The visible frame buffer should be cleared with zeros when called. This method sends two direct updates (all black followed by all white) to refresh the screen and clear any ghosting effects, and returns when both updates are complete. This method is not thread safe, but it is invoked only once from the Event Thread during initialization. | |
| close | back to summary |
|---|---|
| pack-priv void close() Closes the Linux frame buffer device. | |
| createDefaultUpdate | back to summary |
|---|---|
| private EPDSystem. Creates the default update data with values from the EPD system properties, setting all fields except for the update marker. Reusing the update data object avoids creating a new one for each update request. Implementation Note An update mode of
| |
| getBitDepth | back to summary |
|---|---|
| pack-priv int getBitDepth() Gets the frame buffer color depth in bits per pixel.
| |
| getByteOffset | back to summary |
|---|---|
| pack-priv int getByteOffset() Gets the number of bytes from the beginning of the frame buffer to the start of its visible resolution.
| |
| getHeight | back to summary |
|---|---|
| pack-priv int getHeight() Gets the frame buffer height in pixels.
| |
| getMappedBuffer | back to summary |
|---|---|
| pack-priv ByteBuffer getMappedBuffer() Creates a new mapping of the Linux frame buffer device into memory. Implementation Note The virtual y-resolution reported by the device driver can be wrong, as shown by the following example on the Kobo Glo HD Model N437 which reports 2,304 pixels when the correct value is 1,152 pixels (6,782,976 / 5,888). Therefore, this method cannot use the frame buffer virtual resolution to calculate its size.
| |
| getNativeHandle | back to summary |
|---|---|
| pack-priv long getNativeHandle() Gets the native handle to the Linux frame buffer device.
| |
| getOffscreenBuffer | back to summary |
|---|---|
| pack-priv ByteBuffer getOffscreenBuffer() Creates an off-screen byte buffer equal in resolution to the virtual resolution of the frame buffer, but with 32 bits per pixel.
| |
| getPowerdownDelay | back to summary |
|---|---|
| private int getPowerdownDelay() Gets the current power-down delay from the EPDC driver.
| |
| getScreenInfo | back to summary |
|---|---|
| private void getScreenInfo(EPDSystem. Gets the variable screen information of the frame buffer. Run the fbset command as root to print the screen information.
| |
| getWidth | back to summary |
|---|---|
| pack-priv int getWidth() Gets the frame buffer width in pixels. See the notes for the constructor above. Implementation Note When using an 8-bit, unrotated, and uninverted frame buffer in
the Y8 pixel format, the Kobo Clara HD Model N249 works only when this
method returns the visible x-resolution (
| |
| init | back to summary |
|---|---|
| pack-priv void init() Initializes the EPDC frame buffer device, setting the update scheme to
| |
| logScreenInfo | back to summary |
|---|---|
| private void logScreenInfo(EPDSystem. Logs the variable screen information of the frame buffer, depending on the logging level.
| |
| releaseMappedBuffer | back to summary |
|---|---|
| pack-priv void releaseMappedBuffer(ByteBuffer buffer) Deletes the mapping of the Linux frame buffer device.
| |
| sendUpdate | back to summary |
|---|---|
| private int sendUpdate(int updateMode, int waveformMode, int flags) Requests the entire visible region of the frame buffer to be updated to the display.
| |
| sendUpdate | back to summary |
|---|---|
| private int sendUpdate(EPDSystem. Requests an update to the display, allowing for the reuse of the update data object. The waveform mode is reset because the update data could have been used in a previous update. In that case, the waveform mode may have been modified by the EPDC driver with the actual mode selected. The update marker is overwritten with the next sequential marker.
| |
| setAutoUpdateMode | back to summary |
|---|---|
| private void setAutoUpdateMode(int mode) Selects between automatic and region update mode. In region update mode,
updates must be submitted with an IOCTL call to
Automatic mode is available only when it has been enabled in the Linux kernel by the option CONFIG_FB_MXC_EINK_AUTO_UPDATE_MODE. You can find the configuration options used to build the kernel in a file under /proc or /boot, such as /proc/config.gz.
| |
| setPowerdownDelay | back to summary |
|---|---|
| private void setPowerdownDelay(int delay) Sets the delay between the completion of all updates in the driver and
when the driver should power down the EPDC and display power supplies. To
disable powering down entirely, use the delay value
| |
| setScreenInfo | back to summary |
|---|---|
| private void setScreenInfo(EPDSystem. Sets the variable screen information of the frame buffer.
"To ensure that the EPDC driver receives the initialization request, the
To request a change to 8-bit grayscale format, the bits per pixel must be
set to 8 and the grayscale value must be set to one of the two valid
grayscale format values:
| |
| setTemperature | back to summary |
|---|---|
| private void setTemperature(int temp) Sets the temperature to be used by the EPDC driver in subsequent panel
updates. Note that this temperature setting may be overridden by setting
the temperature in a specific update to anything other than
| |
| setUpdateScheme | back to summary |
|---|---|
| private void setUpdateScheme(int scheme) Selects a scheme for the flow of updates within the driver.
| |
| setWaveformModes | back to summary |
|---|---|
| private void setWaveformModes(int init, int du, int gc4, int gc8, int gc16, int gc32) Defines a mapping for common waveform modes. This mapping must be configured for the automatic waveform mode selection to function properly. Each of the parameters should be set to one of the following:
Implementation Note This method fails on the Kobo Glo HD Model N437 with the error ENOTTY (25), "Inappropriate ioctl for device." The driver on that device uses an extended structure with four additional integers, changing its size and its corresponding request code. This method could use the extended structure, but the driver on the Kobo Glo HD ignores it and returns immediately, anyway. Furthermore, newer devices support both the current structure and the extended one, but define the extra fields in a different order. Therefore, simply use the current structure and ignore an error of ENOTTY, picking up the default values for any extra fields.
| |
| sync | back to summary |
|---|---|
| pack-priv void sync() Sends the updated contents of the Linux frame buffer to the EPDC driver, optionally synchronizing with the driver by first waiting for the previous update to complete. This method is not thread safe, but it is invoked only from the JavaFX Application Thread. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| waitForUpdateComplete | back to summary |
|---|---|
| private void waitForUpdateComplete(int marker) Blocks and waits for a previous update request to complete.
| |