Library to control the EM027BS013 ePaper display from Pervasive Display.

Dependencies:   LM75B

Dependents:   app_epaper_EM027BS013_LPC1549 lpc4088_ebb_epaper EaEpaper_EM027BS013 app_epaper_EM027BS013 ... more

Committer:
embeddedartists
Date:
Tue Jul 22 11:59:06 2014 +0000
Revision:
0:9297e33f50cf
First version of library for the EM027BS013 ePaper display.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
embeddedartists 0:9297e33f50cf 1 /**
embeddedartists 0:9297e33f50cf 2 * \file
embeddedartists 0:9297e33f50cf 3 *
embeddedartists 0:9297e33f50cf 4 * \brief The EPD configurations
embeddedartists 0:9297e33f50cf 5 *
embeddedartists 0:9297e33f50cf 6 * Copyright (c) 2012-2014 Pervasive Displays Inc. All rights reserved.
embeddedartists 0:9297e33f50cf 7 *
embeddedartists 0:9297e33f50cf 8 * Authors: Pervasive Displays Inc.
embeddedartists 0:9297e33f50cf 9 *
embeddedartists 0:9297e33f50cf 10 * Redistribution and use in source and binary forms, with or without
embeddedartists 0:9297e33f50cf 11 * modification, are permitted provided that the following conditions
embeddedartists 0:9297e33f50cf 12 * are met:
embeddedartists 0:9297e33f50cf 13 *
embeddedartists 0:9297e33f50cf 14 * 1. Redistributions of source code must retain the above copyright
embeddedartists 0:9297e33f50cf 15 * notice, this list of conditions and the following disclaimer.
embeddedartists 0:9297e33f50cf 16 * 2. Redistributions in binary form must reproduce the above copyright
embeddedartists 0:9297e33f50cf 17 * notice, this list of conditions and the following disclaimer in
embeddedartists 0:9297e33f50cf 18 * the documentation and/or other materials provided with the
embeddedartists 0:9297e33f50cf 19 * distribution.
embeddedartists 0:9297e33f50cf 20 *
embeddedartists 0:9297e33f50cf 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
embeddedartists 0:9297e33f50cf 22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
embeddedartists 0:9297e33f50cf 23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
embeddedartists 0:9297e33f50cf 24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
embeddedartists 0:9297e33f50cf 25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
embeddedartists 0:9297e33f50cf 26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
embeddedartists 0:9297e33f50cf 27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
embeddedartists 0:9297e33f50cf 28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
embeddedartists 0:9297e33f50cf 29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
embeddedartists 0:9297e33f50cf 30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
embeddedartists 0:9297e33f50cf 31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
embeddedartists 0:9297e33f50cf 32 */
embeddedartists 0:9297e33f50cf 33
embeddedartists 0:9297e33f50cf 34 #ifndef CONF_EPD_H_INCLUDED
embeddedartists 0:9297e33f50cf 35 #define CONF_EPD_H_INCLUDED
embeddedartists 0:9297e33f50cf 36
embeddedartists 0:9297e33f50cf 37 /** Define EPD_KIT_TOOL_FUNCTIONS if the code will work with EPD Kit Tool.
embeddedartists 0:9297e33f50cf 38 * \note Comment out the #define below if you won't work with EPD Kit tool and
embeddedartists 0:9297e33f50cf 39 * just want to show two images change alternately by predefined image array.
embeddedartists 0:9297e33f50cf 40 */
embeddedartists 0:9297e33f50cf 41 //#define EPD_KIT_TOOL_FUNCTIONS
embeddedartists 0:9297e33f50cf 42
embeddedartists 0:9297e33f50cf 43 /** \brief Supported COG version
embeddedartists 0:9297e33f50cf 44 *
embeddedartists 0:9297e33f50cf 45 * \note
embeddedartists 0:9297e33f50cf 46 * - place the value here to assign which COG driving waveform will be used.
embeddedartists 0:9297e33f50cf 47 * - Options are COG_V110_G1 and COG_V230_G2 */
embeddedartists 0:9297e33f50cf 48 //#define COG_V110_G1
embeddedartists 0:9297e33f50cf 49 #define COG_V230_G2
embeddedartists 0:9297e33f50cf 50
embeddedartists 0:9297e33f50cf 51 /** The SPI frequency of this kit (8MHz) */
embeddedartists 0:9297e33f50cf 52 #define COG_SPI_baudrate 8000000
embeddedartists 0:9297e33f50cf 53
embeddedartists 0:9297e33f50cf 54 /** Define the number of ram buffer for system packet used interchangeably*/
embeddedartists 0:9297e33f50cf 55 #define BUFFER_SIZE 1
embeddedartists 0:9297e33f50cf 56
embeddedartists 0:9297e33f50cf 57 /** System Packet length=6~64, maximum=64.
embeddedartists 0:9297e33f50cf 58 * The payload length of MSP430 LaunchPad is 32 bytes only.
embeddedartists 0:9297e33f50cf 59 * ========================
embeddedartists 0:9297e33f50cf 60 * | Byte | Name |
embeddedartists 0:9297e33f50cf 61 * |------|---------------|
embeddedartists 0:9297e33f50cf 62 * | 0 | Packet Header |
embeddedartists 0:9297e33f50cf 63 * | 1 | Packet Length |
embeddedartists 0:9297e33f50cf 64 * | 2-3 | Kit ID |
embeddedartists 0:9297e33f50cf 65 * | 4 | Command Type |
embeddedartists 0:9297e33f50cf 66 * | 5-62 | Data |
embeddedartists 0:9297e33f50cf 67 * | 63 | CRC |
embeddedartists 0:9297e33f50cf 68 */
embeddedartists 0:9297e33f50cf 69 #define PAYLOAD_SIZE 32
embeddedartists 0:9297e33f50cf 70
embeddedartists 0:9297e33f50cf 71 /** Firmware version to display on EPD Kit Tool */
embeddedartists 0:9297e33f50cf 72 #define EPD_KIT_TOOL_VERSION "1.11 "
embeddedartists 0:9297e33f50cf 73
embeddedartists 0:9297e33f50cf 74 /** \brief Kit ID for recognizing by EPD Kit Tool
embeddedartists 0:9297e33f50cf 75 *
embeddedartists 0:9297e33f50cf 76 * \note
embeddedartists 0:9297e33f50cf 77 * - High byte is IC vendor, low byte is the name of supported development kit
embeddedartists 0:9297e33f50cf 78 * - Texas Instruments=01, MSP430 LaunchPad=01 */
embeddedartists 0:9297e33f50cf 79 #define EPD_KIT_TOOL_ID (uint16_t)0x0101
embeddedartists 0:9297e33f50cf 80
embeddedartists 0:9297e33f50cf 81 #endif /* CONF_EPD_H_INCLUDED */
embeddedartists 0:9297e33f50cf 82
embeddedartists 0:9297e33f50cf 83
embeddedartists 0:9297e33f50cf 84