Explorar o código

Firmware/SPI: move status register bit constants to spi.h

Maximilian Rehkopf %!s(int64=12) %!d(string=hai) anos
pai
achega
d0e349a145
Modificáronse 2 ficheiros con 6 adicións e 6 borrados
  1. 0 6
      src/spi.c
  2. 6 0
      src/spi.h

+ 0 - 6
src/spi.c

@@ -30,12 +30,6 @@
 #include "spi.h"
 #include "uart.h"
 
-#define SSP_TFE 0   // Transmit FIFO empty
-#define SSP_TNF 1   // Transmit FIFO not full
-#define SSP_RNE 2   // Receive FIFO not empty
-#define SSP_RFF 3   // Receive FIFO full
-#define SSP_BSY 4   // Busy
-
 void spi_preinit() {
 
   /* Set clock prescaler to 1:1 */

+ 6 - 0
src/spi.h

@@ -29,6 +29,12 @@
 #ifndef SPI_H
 #define SPI_H
 
+#define SSP_TFE 0   // Transmit FIFO empty
+#define SSP_TNF 1   // Transmit FIFO not full
+#define SSP_RNE 2   // Receive FIFO not empty
+#define SSP_RFF 3   // Receive FIFO full
+#define SSP_BSY 4   // Busy
+
 /* Low speed 400kHz for init, fast speed <=20MHz (MMC limit) */
 typedef enum { SPI_SPEED_FAST, SPI_SPEED_SLOW, SPI_SPEED_FPGA_FAST, SPI_SPEED_FPGA_SLOW } spi_speed_t;