Add application skeleton for st7789_lcd app

This commit is contained in:
Thomas Klaehn
2020-03-26 06:45:43 +01:00
parent 07301042f9
commit 7a5a5930aa
5 changed files with 4582 additions and 1 deletions

View File

@@ -0,0 +1,30 @@
#include <string.h>
#include "app_util_platform.h"
#include "board.h"
#include "app_error.h"
#include "driver.h"
#include "delay.h"
const char buffer[] = "Hello world!\r\n";
int main(void)
{
unsigned int i = 0;
drv_open(&led_1);
drv_write(&led_1, "1", 1);
drv_open(&spi_0);
// APP_ERROR_CHECK(NRF_LOG_INIT(NULL));
// NRF_LOG_DEFAULT_BACKENDS_INIT();
// NRF_LOG_INFO("SPI example started.");
while(1) {
drv_write(&spi_0, buffer, sizeof(buffer));
// NRF_LOG_FLUSH();
char c = (i++ % 2) + 0x30;
drv_write(&led_1, &c, 1);
delay_ms(200);
}
}