From bda5904d876a895f438e200f31f29c2a8765cb82 Mon Sep 17 00:00:00 2001 From: Joshua Drake Date: Mon, 11 Mar 2024 01:00:18 -0500 Subject: Functional I2C bus. MPLAB autogenerated code is cringe and nonfunctional. --- SPI.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'SPI.c') diff --git a/SPI.c b/SPI.c index 5ab0a2f..d4471ce 100644 --- a/SPI.c +++ b/SPI.c @@ -34,7 +34,7 @@ WriteBuffer[0] = WriteBuffer[2] = WriteBuffer[4] = 0b10000000; WriteBuffer[1] = (0xFF << Ohm_150) ^ (0xFF); WriteBuffer[3] = (0xFF << (Ohm_150 - 8)) ^ (0xFF); - WriteBuffer[5] = (0xFF << (Ohm_68 - 4)) ^ (0xFF) | (testLED << 8); + WriteBuffer[5] = (0xFF << (Ohm_68 - 4)) ^ (0xFF) | testLED; //if (Ohm_68 == 5) WriteBuffer[3]|= 0b10000000; readData = MSSP1_SPI_Exchange8bitBuffer(WriteBuffer, 6, ReadBuffer); } -- cgit v1.2.3