Microchip® Advanced Software Framework

EPD_COG_process.h File Reference

The definition of COG driving data and process.

Copyright (c) 2012-2014 Pervasive Displays Inc. All rights reserved.

Data Structures

union  COG_line_data_packet_type
 Packet structure of a line data. More...
 
struct  COG_parameters_t
 Define the COG driver's parameters. More...
 

Macros

#define ALL_BLACK   (uint8_t)(0xFF)
 
#define ALL_WHITE   (uint8_t)(0xAA)
 
#define BLACK0   (uint8_t)(0x03)
 The definition for driving stage to compare with for getting Odd and Even data. More...
 
#define BLACK1   (uint8_t)(0x0C)
 getting bit3 or bit2 as black color(11) More...
 
#define BLACK2   (uint8_t)(0x30)
 getting bit5 or bit4 as black color(11) More...
 
#define BLACK3   (uint8_t)(0xC0)
 getting bit7 or bit6 as black color(11) More...
 
#define BORDER_BYTE_B   (uint8_t)(0xFF)
 
#define BORDER_BYTE_W   (uint8_t)(0xAA)
 
#define COUNT_OF_EPD_TYPE   3
 Support 1.44", 2" and 2.7" three type EPD currently. More...
 
#define ERROR_BREAKAGE   (uint8_t)(0xF2)
 
#define ERROR_BUSY   (uint8_t)(0xF0)
 
#define ERROR_CHARGEPUMP   (uint8_t)(0xF4)
 
#define ERROR_COG_ID   (uint8_t)(0xF1)
 
#define ERROR_DC   (uint8_t)(0xF3)
 
#define LINE_BUFFER_DATA_SIZE   111
 The COG Driver uses a buffer to update the EPD line by line. More...
 
#define NOTHING   (uint8_t)(0x00)
 sending Nothing frame, 01=Nothing, 0101=0x5 More...
 
#define NOTHING0   (uint8_t)(0x01)
 getting bit1 or bit0 as nothing input(01) More...
 
#define NOTHING1   (uint8_t)(0x04)
 getting bit3 or bit2 as nothing input(01) More...
 
#define NOTHING2   (uint8_t)(0x10)
 getting bit5 or bit4 as nothing input(01) More...
 
#define NOTHING3   (uint8_t)(0x40)
 getting bit7 or bit6 as nothing input(01) More...
 
#define RES_OK   (uint8_t)(0x00)
 
#define WHITE0   (uint8_t)(0x02)
 getting bit1 or bit0 as white color(10) More...
 
#define WHITE1   (uint8_t)(0x08)
 getting bit3 or bit2 as white color(10) More...
 
#define WHITE2   (uint8_t)(0x20)
 getting bit5 or bit4 as white color(10) More...
 
#define WHITE3   (uint8_t)(0x80)
 getting bit7 or bit6 as white color(10) More...
 

Enumerations

enum  Stage {
  Stage1,
  Stage2,
  Stage3,
  Stage4
}
 Four driving stages. More...
 

Functions

void COG_driver_EPDtype_select (uint8_t EPD_type_index)
 
void EPD_display_from_array_prt (uint8_t EPD_type_index, uint8_t *previous_image_ptr, uint8_t *new_image_ptr)
 
void EPD_display_from_flash_prt (uint8_t EPD_type_index, long previous_image_flash_address, long new_image_flash_address, EPD_read_flash_handler On_EPD_read_flash)
 
void EPD_init (void)
 
uint8_t EPD_initialize_driver (uint8_t EPD_type_index)
 
uint8_t EPD_power_off (uint8_t EPD_type_index)
 
void EPD_power_on (void)
 
void EPD_timer_handler (void)
 Set up EPD Timer interrupts handler. More...
 
void nothing_line (uint8_t EPD_type_index)
 
void read_line_data_handle (uint8_t EPD_type_index, uint8_t *image_prt, uint8_t stage_no)
 
void stage_init (uint8_t EPD_type_index, struct EPD_V230_G2_Struct *S_epd_v230, uint8_t block_size, uint8_t step_size, uint8_t frame_cycle)
 

Variables

struct COG_parameters_t COG_parameters [COUNT_OF_EPD_TYPE]
 
const uint8_t SCAN_TABLE [4]
 

#define ALL_BLACK   (uint8_t)(0xFF)
#define ALL_WHITE   (uint8_t)(0xAA)
#define BLACK0   (uint8_t)(0x03)

The definition for driving stage to compare with for getting Odd and Even data.

getting bit1 or bit0 as black color(11)

#define BLACK1   (uint8_t)(0x0C)

getting bit3 or bit2 as black color(11)

#define BLACK2   (uint8_t)(0x30)

getting bit5 or bit4 as black color(11)

#define BLACK3   (uint8_t)(0xC0)

getting bit7 or bit6 as black color(11)

#define BORDER_BYTE_B   (uint8_t)(0xFF)
#define BORDER_BYTE_W   (uint8_t)(0xAA)
#define COUNT_OF_EPD_TYPE   3

Support 1.44", 2" and 2.7" three type EPD currently.

#define ERROR_BREAKAGE   (uint8_t)(0xF2)
#define ERROR_BUSY   (uint8_t)(0xF0)
#define ERROR_CHARGEPUMP   (uint8_t)(0xF4)
#define ERROR_COG_ID   (uint8_t)(0xF1)
#define ERROR_DC   (uint8_t)(0xF3)
#define LINE_BUFFER_DATA_SIZE   111

The COG Driver uses a buffer to update the EPD line by line.

Note
Use the 2.7" maximum data(66)+scan(44)+dummy(1) bytes as line buffer size=111.
#define NOTHING   (uint8_t)(0x00)

sending Nothing frame, 01=Nothing, 0101=0x5

#define NOTHING0   (uint8_t)(0x01)

getting bit1 or bit0 as nothing input(01)

#define NOTHING1   (uint8_t)(0x04)

getting bit3 or bit2 as nothing input(01)

#define NOTHING2   (uint8_t)(0x10)

getting bit5 or bit4 as nothing input(01)

#define NOTHING3   (uint8_t)(0x40)

getting bit7 or bit6 as nothing input(01)

#define RES_OK   (uint8_t)(0x00)
#define WHITE0   (uint8_t)(0x02)

getting bit1 or bit0 as white color(10)

#define WHITE1   (uint8_t)(0x08)

getting bit3 or bit2 as white color(10)

#define WHITE2   (uint8_t)(0x20)

getting bit5 or bit4 as white color(10)

#define WHITE3   (uint8_t)(0x80)

getting bit7 or bit6 as white color(10)

enum Stage

Four driving stages.

Enumerator
Stage1 

Inverse previous image.

Stage2 

White.

Stage3 

Inverse new image.

Stage4 

New image.

void COG_driver_EPDtype_select ( uint8_t  EPD_type_index)
void EPD_display_from_array_prt ( uint8_t  EPD_type_index,
uint8_t *  previous_image_ptr,
uint8_t *  new_image_ptr 
)
void EPD_display_from_flash_prt ( uint8_t  EPD_type_index,
long  previous_image_flash_address,
long  new_image_flash_address,
EPD_read_flash_handler  On_EPD_read_flash 
)
uint8_t EPD_initialize_driver ( uint8_t  EPD_type_index)
uint8_t EPD_power_off ( uint8_t  EPD_type_index)
void EPD_power_on ( void  )
void EPD_timer_handler ( void  )

Set up EPD Timer interrupts handler.

Note
desired value: 1mSec actual value: 1.000mSec

References EPD_Counter.

Referenced by initialize_EPD_timer().

void nothing_line ( uint8_t  EPD_type_index)
void read_line_data_handle ( uint8_t  EPD_type_index,
uint8_t *  image_prt,
uint8_t  stage_no 
)
void stage_init ( uint8_t  EPD_type_index,
struct EPD_V230_G2_Struct *  S_epd_v230,
uint8_t  block_size,
uint8_t  step_size,
uint8_t  frame_cycle 
)

struct COG_parameters_t COG_parameters[COUNT_OF_EPD_TYPE]
const uint8_t SCAN_TABLE[4]