EPD display library.

Dependents:   acd52832_ePaper acd52832_SAADC_Differential_input_2 acd52832_SAADC_Differential_input_EPD acd52832_Car_battery_ch ... more

Fork of GDEP015OC1 by aconno dev team

Committer:
Anunnaki
Date:
Wed Sep 14 14:57:23 2016 +0000
Revision:
1:4fff95e316c9
Child:
2:1c8f73aa2a16
Added function prototypes and started working on the declarations.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Anunnaki 1:4fff95e316c9 1 #include "mbed.h"
Anunnaki 1:4fff95e316c9 2
Anunnaki 1:4fff95e316c9 3 #include "GDEP015OC1.h"
Anunnaki 1:4fff95e316c9 4
Anunnaki 1:4fff95e316c9 5 GDEP015OC1::GDEP015OC1(spi& spi, PinName cs=p5, PinName dc=p6, PinName rst=p7, PinName busy=p8) : _spi(spi), _cs(cs), _dc(dc), _rst(rst), _busy(busy){
Anunnaki 1:4fff95e316c9 6 _init();
Anunnaki 1:4fff95e316c9 7 }
Anunnaki 1:4fff95e316c9 8
Anunnaki 1:4fff95e316c9 9 void GDEP015OC1::_spiCallback(int event){
Anunnaki 1:4fff95e316c9 10 if(event = SPI_EVENT_COMPLETE)
Anunnaki 1:4fff95e316c9 11 cs = 1;
Anunnaki 1:4fff95e316c9 12 }
Anunnaki 1:4fff95e316c9 13
Anunnaki 1:4fff95e316c9 14 bool GDEP015OC1::_spiCommand(unsigned char command){
Anunnaki 1:4fff95e316c9 15 unsigned char _package = command;
Anunnaki 1:4fff95e316c9 16 cs = dc = 0;
Anunnaki 1:4fff95e316c9 17 wait_us(1);
Anunnaki 1:4fff95e316c9 18
Anunnaki 1:4fff95e316c9 19 while(transfer(&_package, 1, NULL, 0, NULL)!= 0);
Anunnaki 1:4fff95e316c9 20 }
Anunnaki 1:4fff95e316c9 21