21 #define LOOPBACK_MODE 0
35 #define SSP_BUFSIZE 16
38 #define DELAY_COUNT 10
39 #define MAX_TIMEOUT 0xFF
42 #define SSP0_SEL (1 << 2)
45 #define SSPSR_TFE (1 << 0)
46 #define SSPSR_TNF (1 << 1)
47 #define SSPSR_RNE (1 << 2)
48 #define SSPSR_RFF (1 << 3)
49 #define SSPSR_BSY (1 << 4)
52 #define SSPCR0_DSS (1 << 0)
53 #define SSPCR0_FRF (1 << 4)
54 #define SSPCR0_SPO (1 << 6)
55 #define SSPCR0_SPH (1 << 7)
56 #define SSPCR0_SCR (1 << 8)
59 #define SSPCR1_LBM (1 << 0)
60 #define SSPCR1_SSE (1 << 1)
61 #define SSPCR1_MS (1 << 2)
62 #define SSPCR1_SOD (1 << 3)
65 #define SSPIMSC_RORIM (1 << 0)
66 #define SSPIMSC_RTIM (1 << 1)
67 #define SSPIMSC_RXIM (1 << 2)
68 #define SSPIMSC_TXIM (1 << 3)
71 #define SSPRIS_RORRIS (1 << 0)
72 #define SSPRIS_RTRIS (1 << 1)
73 #define SSPRIS_RXRIS (1 << 2)
74 #define SSPRIS_TXRIS (1 << 3)
77 #define SSPMIS_RORMIS (1 << 0)
78 #define SSPMIS_RTMIS (1 << 1)
79 #define SSPMIS_RXMIS (1 << 2)
80 #define SSPMIS_TXMIS (1 << 3)
83 #define SSPICR_RORIC (1 << 0)
84 #define SSPICR_RTIC (1 << 1)
void SSPReceive(uint8_t *buf, uint32_t Length)
void SSP_IRQHandler(void)
void SSPSend(uint8_t *Buf, uint32_t Length)