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.
Dependents: Sample_program_Font72
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 #include "mbed.h" 00031 00032 00033 #define SPI_ 00034 class EpdIf { 00035 public: 00036 EpdIf(void); 00037 EpdIf(PinName mosi, 00038 PinName miso, 00039 PinName sclk, 00040 PinName cs, 00041 PinName dc, 00042 PinName rst, 00043 PinName busy); 00044 ~EpdIf(void); 00045 00046 int IfInit(void); 00047 static void DigitalWrite(DigitalOut* put, int value); 00048 static int DigitalRead(DigitalIn* pin); 00049 static void DelayMs(unsigned int delaytime); 00050 void SpiTransfer(unsigned char data); 00051 00052 SPI* m_spi; 00053 DigitalOut* m_cs; 00054 DigitalOut* m_dc; 00055 DigitalOut* m_rst; 00056 DigitalIn* m_busy; 00057 }; 00058 00059 #endif
Generated on Wed Jul 13 2022 16:49:34 by
