Add application skeleton for st7789_lcd app
This commit is contained in:
30
src/application/st7789_lcd/main.c
Normal file
30
src/application/st7789_lcd/main.c
Normal 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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user