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 | /****************************************************************************** |
paul@0 | 16 | * Includes |
paul@0 | 17 | *****************************************************************************/ |
paul@0 | 18 | //#include "driver_config.h" |
paul@0 | 19 | //#include "type.h" |
paul@0 | 20 | //#include "gpio.h" |
paul@0 | 21 | #include "Display_Controller.h" |
paul@0 | 22 | |
paul@0 | 23 | /****************************************************************************** |
paul@0 | 24 | * Global Functions |
paul@0 | 25 | *****************************************************************************/ |
paul@0 | 26 | |
paul@0 | 27 | void epd_DisplayImg(EPDType_t EPDType, uint8_t *pNewImg, uint8_t *pPrevImg) |
paul@0 | 28 | { |
paul@0 | 29 | //always initialize display (has been powered off before) |
paul@0 | 30 | epd_HwInit(); |
paul@0 | 31 | epd_PowerOn(); |
paul@0 | 32 | epd_InitializeDriver(EPDType); |
paul@0 | 33 | |
paul@0 | 34 | //display new picture, but first remove old one |
paul@0 | 35 | epd_Display(pNewImg, pPrevImg); |
paul@0 | 36 | |
paul@0 | 37 | //power down display - picture still displayed |
paul@0 | 38 | epd_PowerOff(); |
paul@0 | 39 | } |
paul@0 | 40 | |