7

Dependencies:   mbed

main.cpp

Committer:
codebreaker7
Date:
2017-10-29
Revision:
1:cdeae0693b01
Parent:
0:02841331478b
Child:
2:82f5f57eac91

File content as of revision 1:cdeae0693b01:

#include "mbed.h"
#include "ILI9341_Defines.h"

SPI spi_dev(PB_15, PB_14, PB_13);
DigitalOut cs(PC_4);
DigitalOut ao(PB_3);

void writecommand(uint8_t command) {
    cs = 0;
    ao = 0;
    spi_dev.write(command);
    cs = 1;
}

void writedata(uint8_t data) {
    cs = 0;
    ao = 1;
    spi_dev.write(data);
    cs = 1;
}

int main() {
    HAL_Init();
    #include "ILI9341_Init.h"
    //cs = 0;
    //cs = 1;
    //cs = 0;
    while(1) {
    }
}