NRF52840 Eval Kit User Manual
Vision: V1.0.1 Date: 2019.01.19 31 / 72
3. The most basic function of OLED driver is written and read functions as below:
void Single_Command(unsigned char cmd)
{
nrf_gpio_pin_clear(DC);
//if SPI is busy Frequently,delay here
//nrf_delay_us(30);
spi_write(&cmd, sizeof(cmd));
}
void Single_Data(unsigned char dt)
{
nrf_gpio_pin_set(DC);
//if SPI is busy Frequently,delay here
//nrf_delay_us(30);
spi_write(&dt, sizeof(dt));
}
HARDWARE
In hardware, the SPI interface of NRF52840 are pinout to Arduino compatible
interface.