7

Dependencies:   mbed

Committer:
codebreaker7
Date:
Thu Oct 26 19:20:47 2017 +0000
Revision:
0:02841331478b
Child:
1:cdeae0693b01
Start revision

Who changed what in which revision?

UserRevisionLine numberNew contents of line
codebreaker7 0:02841331478b 1 #include "mbed.h"
codebreaker7 0:02841331478b 2 #include "ILI9341_Defines.h"
codebreaker7 0:02841331478b 3
codebreaker7 0:02841331478b 4 SPI spi_dev(PB_15, PB_14, PB_13);
codebreaker7 0:02841331478b 5 DigitalOut cs(PC_4);
codebreaker7 0:02841331478b 6 DigitalOut ao(PB_3);
codebreaker7 0:02841331478b 7
codebreaker7 0:02841331478b 8 void writecommand(uint8_t command) {
codebreaker7 0:02841331478b 9 cs = 0;
codebreaker7 0:02841331478b 10 ao = 0;
codebreaker7 0:02841331478b 11 spi_dev.write(command);
codebreaker7 0:02841331478b 12 cs = 1;
codebreaker7 0:02841331478b 13 }
codebreaker7 0:02841331478b 14
codebreaker7 0:02841331478b 15 void writedata(uint8_t data) {
codebreaker7 0:02841331478b 16 cs = 0;
codebreaker7 0:02841331478b 17 ao = 1;
codebreaker7 0:02841331478b 18 spi_dev.write(data);
codebreaker7 0:02841331478b 19 cs = 1;
codebreaker7 0:02841331478b 20 }
codebreaker7 0:02841331478b 21
codebreaker7 0:02841331478b 22 int main() {
codebreaker7 0:02841331478b 23 #include "ILI9341_Init.h"
codebreaker7 0:02841331478b 24 while(1) {
codebreaker7 0:02841331478b 25 }
codebreaker7 0:02841331478b 26 }