public class BrickletEPaper296x128 extends Device
Modifier and Type | Class and Description |
---|---|
static interface |
BrickletEPaper296x128.DrawStatusListener
Listener for the current draw status.
|
class |
BrickletEPaper296x128.ReadBlackWhiteLowLevel |
class |
BrickletEPaper296x128.ReadColorLowLevel |
class |
BrickletEPaper296x128.SPITFPErrorCount |
Device.Identity
Constructor and Description |
---|
BrickletEPaper296x128(String uid,
IPConnection ipcon)
Creates an object with the unique device ID \c uid.
|
Modifier and Type | Method and Description |
---|---|
void |
addDrawStatusListener(BrickletEPaper296x128.DrawStatusListener listener)
Adds a DrawStatus listener.
|
void |
draw()
Draws the current black/white and red or gray buffer to the e-paper display.
|
void |
drawBox(int positionXStart,
int positionYStart,
int positionXEnd,
int positionYEnd,
boolean fill,
int color)
Draws a box from (x, y)-start to (x, y)-end in the given color.
|
void |
drawLine(int positionXStart,
int positionYStart,
int positionXEnd,
int positionYEnd,
int color)
Draws a line from (x, y)-start to (x, y)-end in the given color.
|
void |
drawText(int positionX,
int positionY,
int font,
int color,
int orientation,
String text)
Draws a text with up to 50 characters at the pixel position (x, y).
|
void |
fillDisplay(int color)
Fills the complete content of the display with the given color.
|
int |
getBootloaderMode()
Returns the current bootloader mode, see
setBootloaderMode(int) . |
int |
getChipTemperature()
Returns the temperature as measured inside the microcontroller.
|
int |
getDisplayDriver()
Returns the e-paper display driver.
|
int |
getDisplayType()
Returns the type of the e-paper display.
|
int |
getDrawStatus()
Returns one of three draw statuses:
* Idle
* Copying: Data is being copied from the buffer of the Bricklet to the buffer of the display.
|
Device.Identity |
getIdentity()
Returns the UID, the UID where the Bricklet is connected to,
the position, the hardware and firmware version as well as the
device identifier.
|
BrickletEPaper296x128.SPITFPErrorCount |
getSPITFPErrorCount()
Returns the error count for the communication between Brick and Bricklet.
|
int |
getStatusLEDConfig()
Returns the configuration as set by
setStatusLEDConfig(int) |
int |
getUpdateMode()
Returns the update mode as set by
setUpdateMode(int) . |
boolean[] |
readBlackWhite(int xStart,
int yStart,
int xEnd,
int yEnd)
Returns the current content of the black/white pixel buffer for the specified window.
|
BrickletEPaper296x128.ReadBlackWhiteLowLevel |
readBlackWhiteLowLevel(int xStart,
int yStart,
int xEnd,
int yEnd)
Returns the current content of the black/white pixel buffer for the specified window.
|
boolean[] |
readColor(int xStart,
int yStart,
int xEnd,
int yEnd)
Returns the current content of the red or gray pixel buffer for the specified window.
|
BrickletEPaper296x128.ReadColorLowLevel |
readColorLowLevel(int xStart,
int yStart,
int xEnd,
int yEnd)
Returns the current content of the red or gray pixel buffer for the specified window.
|
long |
readUID()
Returns the current UID as an integer.
|
void |
removeDrawStatusListener(BrickletEPaper296x128.DrawStatusListener listener)
Removes a DrawStatus listener.
|
void |
reset()
Calling this function will reset the Bricklet.
|
int |
setBootloaderMode(int mode)
Sets the bootloader mode and returns the status after the requested
mode change was instigated.
|
void |
setDisplayDriver(int displayDriver)
Sets the type of display driver.
|
void |
setDisplayType(int displayType)
Sets the type of the display.
|
void |
setStatusLEDConfig(int config)
Sets the status LED configuration.
|
void |
setUpdateMode(int updateMode)
\note
The default update mode corresponds to the default e-paper display
manufacturer settings.
|
void |
setWriteFirmwarePointer(long pointer)
Sets the firmware pointer for
writeFirmware(int[]) . |
void |
writeBlackWhite(int xStart,
int yStart,
int xEnd,
int yEnd,
boolean[] pixels)
Writes black/white pixels to the specified window into the buffer.
|
void |
writeBlackWhiteLowLevel(int xStart,
int yStart,
int xEnd,
int yEnd,
int pixelsLength,
int pixelsChunkOffset,
boolean[] pixelsChunkData)
Writes black/white pixels to the specified window into the buffer.
|
void |
writeColor(int xStart,
int yStart,
int xEnd,
int yEnd,
boolean[] pixels)
The E-Paper 296x128 Bricklet is available with the colors black/white/red and
black/white/gray.
|
void |
writeColorLowLevel(int xStart,
int yStart,
int xEnd,
int yEnd,
int pixelsLength,
int pixelsChunkOffset,
boolean[] pixelsChunkData)
The E-Paper 296x128 Bricklet is available with the colors black/white/red and
black/white/gray.
|
int |
writeFirmware(int[] data)
Writes 64 Bytes of firmware at the position as written by
setWriteFirmwarePointer(long) before. |
void |
writeUID(long uid)
Writes a new UID into flash.
|
getAPIVersion, getResponseExpected, setResponseExpected, setResponseExpectedAll
public static final int DEVICE_IDENTIFIER
public static final String DEVICE_DISPLAY_NAME
public static final byte FUNCTION_DRAW
public static final byte FUNCTION_GET_DRAW_STATUS
public static final byte FUNCTION_WRITE_BLACK_WHITE_LOW_LEVEL
public static final byte FUNCTION_READ_BLACK_WHITE_LOW_LEVEL
public static final byte FUNCTION_WRITE_COLOR_LOW_LEVEL
public static final byte FUNCTION_READ_COLOR_LOW_LEVEL
public static final byte FUNCTION_FILL_DISPLAY
public static final byte FUNCTION_DRAW_TEXT
public static final byte FUNCTION_DRAW_LINE
public static final byte FUNCTION_DRAW_BOX
public static final byte FUNCTION_SET_UPDATE_MODE
public static final byte FUNCTION_GET_UPDATE_MODE
public static final byte FUNCTION_SET_DISPLAY_TYPE
public static final byte FUNCTION_GET_DISPLAY_TYPE
public static final byte FUNCTION_SET_DISPLAY_DRIVER
public static final byte FUNCTION_GET_DISPLAY_DRIVER
public static final byte FUNCTION_GET_SPITFP_ERROR_COUNT
public static final byte FUNCTION_SET_BOOTLOADER_MODE
public static final byte FUNCTION_GET_BOOTLOADER_MODE
public static final byte FUNCTION_SET_WRITE_FIRMWARE_POINTER
public static final byte FUNCTION_WRITE_FIRMWARE
public static final byte FUNCTION_SET_STATUS_LED_CONFIG
public static final byte FUNCTION_GET_STATUS_LED_CONFIG
public static final byte FUNCTION_GET_CHIP_TEMPERATURE
public static final byte FUNCTION_RESET
public static final byte FUNCTION_WRITE_UID
public static final byte FUNCTION_READ_UID
public static final byte FUNCTION_GET_IDENTITY
public static final int DRAW_STATUS_IDLE
public static final int DRAW_STATUS_COPYING
public static final int DRAW_STATUS_DRAWING
public static final int COLOR_BLACK
public static final int COLOR_WHITE
public static final int COLOR_RED
public static final int COLOR_GRAY
public static final int FONT_6X8
public static final int FONT_6X16
public static final int FONT_6X24
public static final int FONT_6X32
public static final int FONT_12X16
public static final int FONT_12X24
public static final int FONT_12X32
public static final int FONT_18X24
public static final int FONT_18X32
public static final int FONT_24X32
public static final int ORIENTATION_HORIZONTAL
public static final int ORIENTATION_VERTICAL
public static final int UPDATE_MODE_DEFAULT
public static final int UPDATE_MODE_BLACK_WHITE
public static final int UPDATE_MODE_DELTA
public static final int DISPLAY_TYPE_BLACK_WHITE_RED
public static final int DISPLAY_TYPE_BLACK_WHITE_GRAY
public static final int DISPLAY_DRIVER_SSD1675A
public static final int DISPLAY_DRIVER_SSD1680
public static final int BOOTLOADER_MODE_BOOTLOADER
public static final int BOOTLOADER_MODE_FIRMWARE
public static final int BOOTLOADER_MODE_BOOTLOADER_WAIT_FOR_REBOOT
public static final int BOOTLOADER_MODE_FIRMWARE_WAIT_FOR_REBOOT
public static final int BOOTLOADER_MODE_FIRMWARE_WAIT_FOR_ERASE_AND_REBOOT
public static final int BOOTLOADER_STATUS_OK
public static final int BOOTLOADER_STATUS_INVALID_MODE
public static final int BOOTLOADER_STATUS_NO_CHANGE
public static final int BOOTLOADER_STATUS_ENTRY_FUNCTION_NOT_PRESENT
public static final int BOOTLOADER_STATUS_DEVICE_IDENTIFIER_INCORRECT
public static final int BOOTLOADER_STATUS_CRC_MISMATCH
public static final int STATUS_LED_CONFIG_OFF
public static final int STATUS_LED_CONFIG_ON
public static final int STATUS_LED_CONFIG_SHOW_HEARTBEAT
public static final int STATUS_LED_CONFIG_SHOW_STATUS
public BrickletEPaper296x128(String uid, IPConnection ipcon)
public void draw() throws TinkerforgeException
getDrawStatus()
.TinkerforgeException
public int getDrawStatus() throws TinkerforgeException
TinkerforgeException
public void writeBlackWhiteLowLevel(int xStart, int yStart, int xEnd, int yEnd, int pixelsLength, int pixelsChunkOffset, boolean[] pixelsChunkData) throws TinkerforgeException
draw()
.
Use writeColor(int, int, int, int, boolean[])
to write red or gray pixels.TinkerforgeException
public BrickletEPaper296x128.ReadBlackWhiteLowLevel readBlackWhiteLowLevel(int xStart, int yStart, int xEnd, int yEnd) throws TinkerforgeException
TinkerforgeException
public void writeColorLowLevel(int xStart, int yStart, int xEnd, int yEnd, int pixelsLength, int pixelsChunkOffset, boolean[] pixelsChunkData) throws TinkerforgeException
writeBlackWhite(int, int, int, int, boolean[])
). The value 1 (true) corresponds to a red or gray
pixel, depending on the Bricklet model.
This function writes the pixels into the red or gray pixel buffer, to draw the buffer
to the display use draw()
.
Use writeBlackWhite(int, int, int, int, boolean[])
to write black/white pixels.TinkerforgeException
public BrickletEPaper296x128.ReadColorLowLevel readColorLowLevel(int xStart, int yStart, int xEnd, int yEnd) throws TinkerforgeException
TinkerforgeException
public void fillDisplay(int color) throws TinkerforgeException
draw()
.TinkerforgeException
public void drawText(int positionX, int positionY, int font, int color, int orientation, String text) throws TinkerforgeException
draw()
.
The font conforms to code page 437.TinkerforgeException
public void drawLine(int positionXStart, int positionYStart, int positionXEnd, int positionYEnd, int color) throws TinkerforgeException
draw()
.TinkerforgeException
public void drawBox(int positionXStart, int positionYStart, int positionXEnd, int positionYEnd, boolean fill, int color) throws TinkerforgeException
draw()
.TinkerforgeException
public void setUpdateMode(int updateMode) throws TinkerforgeException
TinkerforgeException
public int getUpdateMode() throws TinkerforgeException
setUpdateMode(int)
.TinkerforgeException
public void setDisplayType(int displayType) throws TinkerforgeException
TinkerforgeException
public int getDisplayType() throws TinkerforgeException
TinkerforgeException
public void setDisplayDriver(int displayDriver) throws TinkerforgeException
TinkerforgeException
public int getDisplayDriver() throws TinkerforgeException
TinkerforgeException
public BrickletEPaper296x128.SPITFPErrorCount getSPITFPErrorCount() throws TinkerforgeException
TinkerforgeException
public int setBootloaderMode(int mode) throws TinkerforgeException
TinkerforgeException
public int getBootloaderMode() throws TinkerforgeException
setBootloaderMode(int)
.TinkerforgeException
public void setWriteFirmwarePointer(long pointer) throws TinkerforgeException
writeFirmware(int[])
. The pointer has
to be increased by chunks of size 64. The data is written to flash
every 4 chunks (which equals to one page of size 256).
This function is used by Brick Viewer during flashing. It should not be
necessary to call it in a normal user program.TinkerforgeException
public int writeFirmware(int[] data) throws TinkerforgeException
setWriteFirmwarePointer(long)
before. The firmware is written
to flash every 4 chunks.
You can only write firmware in bootloader mode.
This function is used by Brick Viewer during flashing. It should not be
necessary to call it in a normal user program.TinkerforgeException
public void setStatusLEDConfig(int config) throws TinkerforgeException
TinkerforgeException
public int getStatusLEDConfig() throws TinkerforgeException
setStatusLEDConfig(int)
TinkerforgeException
public int getChipTemperature() throws TinkerforgeException
TinkerforgeException
public void reset() throws TinkerforgeException
TinkerforgeException
public void writeUID(long uid) throws TinkerforgeException
TinkerforgeException
public long readUID() throws TinkerforgeException
TinkerforgeException
public Device.Identity getIdentity() throws TinkerforgeException
getIdentity
in class Device
TinkerforgeException
public void writeBlackWhite(int xStart, int yStart, int xEnd, int yEnd, boolean[] pixels) throws TinkerforgeException
draw()
.
Use writeColor(int, int, int, int, boolean[])
to write red or gray pixels.TinkerforgeException
public boolean[] readBlackWhite(int xStart, int yStart, int xEnd, int yEnd) throws TinkerforgeException
TinkerforgeException
public void writeColor(int xStart, int yStart, int xEnd, int yEnd, boolean[] pixels) throws TinkerforgeException
writeBlackWhite(int, int, int, int, boolean[])
). The value 1 (true) corresponds to a red or gray
pixel, depending on the Bricklet model.
This function writes the pixels into the red or gray pixel buffer, to draw the buffer
to the display use draw()
.
Use writeBlackWhite(int, int, int, int, boolean[])
to write black/white pixels.TinkerforgeException
public boolean[] readColor(int xStart, int yStart, int xEnd, int yEnd) throws TinkerforgeException
TinkerforgeException
public void addDrawStatusListener(BrickletEPaper296x128.DrawStatusListener listener)
public void removeDrawStatusListener(BrickletEPaper296x128.DrawStatusListener listener)
Copyright © 2022 Tinkerforge GmbH. All rights reserved.