Abstract

Last Updated: February 23, 2014

The document describes the EPD waveforms, types of waveforms, implementation examplesand scheduled display of images rules.The document is intended for third–party developers of back screen applications.

Waveforms

Example below represents typical method of drawing an image on the Back Screen:

getBSDrawer().drawBitmap(bitmap, Waveform.WAVEFORM_GC_FULL);

The second argument here is a waveform.Waveform is the set of instructions for EPD controller about how to draw the bitmap on theelectronic paper display.There are four basic waveforms. Also, mixed waveforms (combination of waveforms) can beapplied.

GC_FULL Waveform

GC_FULL waveform is used for total screen update. Existing image will be replaced with thenew one. This is the most frequently used update mode for most applications, with a high image quality:

  • 4-bit, 16 gray levels.
  • ~600ms
  • updating all pixels on the screen
  • blinking while update
  • Low ghosting

GC_PARTIAL Waveform

GC_PARTIAL waveform shall be applied when fragmentary update of existing image is needed. This waveform will update only those fragments of existing bitmap which differ from the new one.GC_PARTIAL update mode is free from screen blinking. Some ghosting should appear aftermultiple updates.

  • 4-bit, 16 gray levels.
  • ~600ms
  • non-flash, update only changes
  • ghosting

DU Waveform

DU Waveform (Direct Update) is a very fast, non-flash update mode. This mode supportschanging of current degree of gray to black or white state only. It cannot modify degree of gray from one to another. Low update time makes this mode useful for menu selection indicators.

  • 1-bit, 2 gray levels.
  • ~250ms
  • non-flash, update only changes

A2 Waveform

The A2 mode is a fast, non-flash update mode designed for fast leaf over pages or simpleblack/white animation. This mode supports transitions from any degree of gray to black or white only.

  • fast animation mode
  • 1-bit, 2 gray levels.
  • ~120ms
  • non-flash, update only changes
  • ghosting

Mixed Waveforms

Mixed waveforms allow achievement of various goals.For example, the following method will update a given screen area:

drawBitmap(int left, int top, int right, int bottom, View view, Waveform waveform)

Figure below illustrates how to update the status bar area and decrease display flashingand increase update speed at the same time by calling this method three times with different waveform parameter: 1. Draw the image with GC_FULL 2. Draw status bar with DU. 3. Draw updated status bar area with DU

Mixed WaveformsMixed WaveformsMixed Waveforms

Scheduled Display of Images on the Back Screen.

As BSActivity is based on android service, all operations with back screen will beperformed in background. For example, if scheduled display of images on back screen isrequired, the standard android mechanism using WakefulBroadcastReceiver is recommended.Example below represents how to display Hello world string on the back screen with 15minutes delay.Android activity with alarm schedule shall be created. Therefore we haveSimpleWakeFulReceiver class, like in WakefulBroadcastReceiver. It will run after 15 minutes and launch BSActivity, which draws the text on the back screen.

public class MyBSActivity extends BSActivity {
    private TextView mTextView;

    @Override
    public void onBSCreate() {
        mTextView = new TextView(getApplicationContext());
        mTextView.setGravity(Gravity.CENTER);
        mTextView.setBackgroundColor(Color.WHITE);
        mTextView.setTextColor(Color.BLACK);
        mTextView.setTextSize(25);
        mTextView.setLayoutParams(new
        ViewGroup.LayoutParams(LayoutParams.WRAP_CONTENT,
        LayoutParams.WRAP_CONTENT));
    }

    @Override
    protected void onHandleIntent(Intent intent) {
        super.onHandleIntent(intent);
        drawText();
        // releases wakelock
        SimpleWakeFulReceiver.completeWakefulIntent(intent);
    }

    private void drawText() {
        mTextView.setText("Hello world!");
        getBSDrawer().drawBitmap(mTextView, Waveform.WAVEFORM_GC_PARTIAL);
    }
}

As result we have BSActivity, which will draw on back screen on a schedule. More information can be found in WakefulBroadcastReceiver.