Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
epdif.h
00001 /** 00002 * @filename : epdif.h 00003 * @brief : Header file of epdif.cpp providing EPD interface functions 00004 * Users have to implement all the functions in epdif.cpp 00005 * @author : Yehui from Waveshare 00006 * 00007 * Copyright (C) Waveshare August 10 2017 00008 * 00009 * Permission is hereby granted, free of charge, to any person obtaining a copy 00010 * of this software and associated documnetation files (the "Software"), to deal 00011 * in the Software without restriction, including without limitation the rights 00012 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 00013 * copies of the Software, and to permit persons to whom the Software is 00014 * furished to do so, subject to the following conditions: 00015 * 00016 * The above copyright notice and this permission notice shall be included in 00017 * all copies or substantial portions of the Software. 00018 * 00019 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00020 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00021 * FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 00022 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00023 * LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 00024 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 00025 * THE SOFTWARE. 00026 */ 00027 00028 #ifndef EPDIF_H_ 00029 #define EPDIF_H_ 00030 00031 00032 // Pin definition 00033 #define RST_PIN 0 00034 #define DC_PIN 1 00035 #define CS_PIN 2 00036 #define BUSY_PIN 0 00037 00038 #define HIGH 1 00039 #define LOW 0 00040 00041 #include "mbed.h" 00042 00043 class EpdIf { 00044 public: 00045 EpdIf(void); 00046 ~EpdIf(void); 00047 00048 static int IfInit(void); 00049 static void DigitalWrite(int pin, int value); 00050 static int DigitalRead(int pin); 00051 static void DelayMs(unsigned int delaytime); 00052 static void SpiTransfer(unsigned char data); 00053 }; 00054 00055 #endif 00056
Generated on Thu Jul 14 2022 13:24:40 by
1.7.2