
#include "platform/cm4/InterruptHandler.h"
#include "platform/cm4/InterruptGuardian.h"

#include "platform/nrf52/gpio.h"
#include "platform/nrf52/spi.h"
#include "platform/nrf52/InterruptHandler.h"
#include "platform/nrf52/InterruptGuardian.h"

using namespace pinetime::platform;

uint8_t buf[] = "Test";

nrf52::Gpio led_1(17);
nrf52::Gpio lcd_chip_select(25);

cm4::InterruptGuardian cm4::InterruptGuardian::instance;
nrf52::InterruptGuardian nrf52::InterruptGuardian::instance;

int main(void)
{
    cm4::InterruptGuardian::enable_interrupts();
    nrf52::Spi spi_0(0, 2, 3, 4, lcd_chip_select);
    while(1) {
        spi_0.send(buf, sizeof(buf));
        led_1.toggle();
    }
}
