main: initialize rgb driver

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2019-04-02 18:10:56 +08:00
parent 85bdc7991c
commit 851e54e70c

View File

@ -5,6 +5,7 @@
#include <usb.h> #include <usb.h>
#include <time.h> #include <time.h>
#include <dfu.h> #include <dfu.h>
#include <rgb.h>
#include <spi.h> #include <spi.h>
#include <generated/csr.h> #include <generated/csr.h>
@ -48,6 +49,7 @@ static void init(void)
usb_init(); usb_init();
dfu_init(); dfu_init();
time_init(); time_init();
rgb_init();
spi = spiAlloc(); spi = spiAlloc();
spiSetPin(spi, SP_MOSI, 0); spiSetPin(spi, SP_MOSI, 0);
@ -89,11 +91,9 @@ int main(int argc, char **argv)
init(); init();
usb_connect(); usb_connect();
int i;
while (1) while (1)
{ {
usb_poll(NULL); usb_poll(NULL);
i++;
// if (i > 200) // if (i > 200)
// reboot_ctrl_write(0xac); // reboot_ctrl_write(0xac);