From 99be520563834d51eb3ddd32b757a3dcd2486632 Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Thu, 2 Oct 2025 14:45:56 -0400 Subject: spi systest --- fw/spi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'fw/spi.c') diff --git a/fw/spi.c b/fw/spi.c index 1793c4d..9198ab1 100644 --- a/fw/spi.c +++ b/fw/spi.c @@ -2,7 +2,7 @@ #include -#include "sys.h" +#include "system.h" #include "types.h" #include "spi.h" @@ -16,8 +16,7 @@ spiInit(void) { TRISBbits.TRISB6 = OUT; // SCK SSPSTAT = 0x00; - SSPCON1 = 0x01; // FOSC/16 => 3MHz SPI clock - SSPCON1bits.SSPEN = 1; // enable + SSPCON1 = 0x22; // FOSC/64 => 750kHz SPI clock junk = SSPBUF; // dummy read to clear BF (void)junk; } -- cgit v1.2.3