1 // Copyright 2013 Pervasive Displays, Inc. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at: 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, 10 // software distributed under the License is distributed on an 11 // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 // express or implied. See the License for the specific language 13 // governing permissions and limitations under the License. 14 15 #ifndef __DISPLAY_HARDWARE_DRIVER_H_ 16 #define __DISPLAY_HARDWARE_DRIVER_H_ 17 18 /****************************************************************************** 19 * Includes 20 *****************************************************************************/ 21 22 #include "bsp.h" 23 24 25 /****************************************************************************** 26 * Defines and typedefs 27 *****************************************************************************/ 28 29 //Pin 12 on Serial Expansion Connector 30 // #define RST_DIR_OUT SEC14_PIN12_SET_OUTP 31 // #define RST_SET_HIGH SEC14_PIN12_SET_HIGH 32 // #define RST_SET_LOW SEC14_PIN12_SET_LOW 33 34 //Pin 14 on Serial Expansion Connector 35 // #define DISCHARGE_DIR_OUT SEC14_PIN14_SET_OUTP 36 // #define DISCHARGE_SET_HIGH SEC14_PIN14_SET_HIGH 37 // #define DISCHARGE_SET_LOW SEC14_PIN14_SET_LOW 38 39 //Pin 6 on Serial Expansion Connector 40 // #define CS_DIR_OUT SEC14_PIN6_SET_OUTP 41 // #define CS_SET_HIGH SEC14_PIN6_SET_HIGH 42 // #define CS_SET_LOW SEC14_PIN6_SET_LOW 43 44 //Pin 13 on Serial Expansion Connector 45 // #define PANELON_DIR_OUT SEC14_PIN13_SET_OUTP 46 // #define PANELON_SET_HIGH SEC14_PIN13_SET_HIGH 47 // #define PANELON_SET_LOW SEC14_PIN13_SET_LOW 48 49 //Pin 7 on Serial Expansion Connector 50 // #define DRIVERBUSY_DIR_IN SEC14_PIN7_SET_INP 51 // #define DRIVERBUSY_GET SEC14_PIN7_INP 52 53 //Not implemented 54 // #define BORDER_DIR_OUT 55 // #define BORDER_SET_HIGH 56 // #define BORDER_SET_LOW 57 58 //Pin 11 on Serial Expansion Connector 59 // #define PWM_DIR_OUT SEC14_PIN11_SET_OUTP 60 // #define PWM_SET_HIGH SEC14_PIN11_SET_HIGH 61 // #define PWM_SET_LOW SEC14_PIN11_SET_LOW 62 63 64 /****************************************************************************** 65 * Prototypes 66 *****************************************************************************/ 67 void epd_cs_high(void); 68 void epd_cs_low(void); 69 void epd_rst_high(void); 70 void epd_rst_low(void); 71 72 void epd_pwm_active(uint16_t delayInMs); 73 74 void epd_TestPinLow(void); 75 void epd_TestPinHigh(void); 76 void epd_TestPinTrigger(void); 77 78 void epd_TestPin2Low(void); 79 void epd_TestPin2High(void); 80 void epd_TestPin2Trigger(void); 81 82 void epd_delay_ms(uint32_t Time); 83 int16_t epd_get_temperature(void); 84 uint32_t epd_GetCurrentTimeTick(void); 85 86 /***************************************************************************/ 87 void epd_spi_detach(void); 88 void epd_spi_init (void); 89 void epd_SPI_Send (unsigned char Register, unsigned char *Data, unsigned Length); 90 void epd_SPI_Send_Byte (uint8_t Register, uint8_t Data); 91 void epd_InitDisplayHardware (void); 92 93 /****************************************************************************/ 94 95 #endif //__DISPLAY_HARDWARE_DRIVER_H_