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: ePD_2R13inch_test_program
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 /* 00029 * Modified by Kenji Arai / JH1PJL 00030 * 00031 * http://www.page.sannet.ne.jp/kenjia/index.html 00032 * http://mbed.org/users/kenjiArai/ 00033 * Created: April 27th, 2019 00034 * Revised: April 30th, 2019 00035 * 00036 * Refrence software 00037 * https://github.com/waveshare/e-Paper 00038 * https://os.mbed.com/users/imachooon/code/epd1in54/ 00039 * 00040 * Technical documents 00041 * https://www.waveshare.com/wiki/2.13inch_e-Paper_HAT_(B) 00042 * 00043 * Product 00044 * http://akizukidenshi.com/catalog/g/gP-13757/ 00045 * https://www.waveshare.com/2.13inch-e-paper-hat-b.htm 00046 * 00047 */ 00048 00049 #ifndef EPDIF_H 00050 #define EPDIF_H 00051 00052 #include "mbed.h" 00053 00054 class EpdIf 00055 { 00056 public: 00057 EpdIf(void); 00058 EpdIf(PinName mosi, 00059 PinName miso, 00060 PinName sclk, 00061 PinName cs, 00062 PinName dc, 00063 PinName rst, 00064 PinName busy, 00065 PinName pwr); 00066 ~EpdIf(void) 00067 { 00068 ; 00069 } 00070 00071 int IfInit(void); 00072 void DigitalWrite(DigitalOut* pin, int value); 00073 int DigitalRead(DigitalIn* pin); 00074 void DelayMs(unsigned int delaytime); 00075 void SpiTransfer(unsigned char data); 00076 00077 SPI* m_spi; 00078 DigitalOut* m_cs; 00079 DigitalOut* m_dc; 00080 DigitalOut* m_rst; 00081 DigitalIn* m_busy; 00082 DigitalOut* m_pwr; 00083 }; 00084 00085 #endif
Generated on Sat Jul 16 2022 10:11:16 by
1.7.2