大理水控初始版本
diff --git a/lcd/spi.h b/lcd/spi.h
new file mode 100644
index 0000000..89a3c5b
--- /dev/null
+++ b/lcd/spi.h
@@ -0,0 +1,19 @@
+#ifndef __spi_h__
+#define __spi_h__
+
+#include "stm32f10x.h"
+
+#define SPI_SELECT_CH1() GPIO_ResetBits(GPIOB, GPIO_Pin_12)
+#define SPI_DESELECT_CH1() GPIO_SetBits(GPIOB, GPIO_Pin_12)
+
+#define SPI_SELECT_CH2() GPIO_ResetBits(GPIOA, GPIO_Pin_8)
+#define SPI_DESELECT_CH2() GPIO_SetBits(GPIOA, GPIO_Pin_8)
+
+
+#define SPI_SELECT_CH3() GPIO_ResetBits(GPIOC, GPIO_Pin_7)
+#define SPI_DESELECT_CH3() GPIO_SetBits(GPIOC, GPIO_Pin_7)
+
+extern void spi_init(void);
+extern uint8_t spi_transive(uint8_t byte, uint32_t timeout);
+
+#endif