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