37 regValue = LPC_SSP->MIS;
73 LPC_SYSCON->PRESETCTRL |= (0x1<<0);
74 LPC_SYSCON->SYSAHBCLKCTRL |= (1<<11);
75 LPC_SYSCON->SSPCLKDIV = 0x0f;
76 LPC_IOCON->PIO0_8 &= ~0x07;
77 LPC_IOCON->PIO0_8 |= 0x01;
78 LPC_IOCON->PIO0_9 &= ~0x07;
79 LPC_IOCON->PIO0_9 |= 0x01;
80 #ifdef __JTAG_DISABLED
81 LPC_IOCON->SCKLOC = 0x00;
82 LPC_IOCON->JTAG_TCK_PIO0_10 &= ~0x07;
83 LPC_IOCON->JTAG_TCK_PIO0_10 |= 0x02;
89 LPC_IOCON->SCKLOC = 0x01;
90 LPC_IOCON->PIO2_11 = 0x01;
93 LPC_IOCON->SCKLOC = 0x02;
94 LPC_IOCON->PIO0_6 = 0x02;
99 LPC_IOCON->PIO0_2 &= ~0x07;
100 LPC_IOCON->PIO0_2 |= 0x01;
102 LPC_IOCON->PIO0_2 &= ~0x07;
104 LPC_GPIO0->DIR |= (0x1<<2);
105 LPC_GPIO0->DATA |= (0x1<<2);
110 LPC_SSP->CR0 = 0x0707;
126 NVIC_EnableIRQ(SSP_IRQn);
168 for ( i = 0; i < Length; i++ )
201 for ( i = 0; i < Length; i++ )
237 LPC_GPIO0->DATA &= ~(0x1<<2);
242 LPC_GPIO0->DATA |= (0x1<<2);
244 myPrintfUSB(
"whoAmI %d %d %d \n",receive_data[0],receive_data[1],receive_data[2] );
void SSPSend(uint8_t *buf, uint32_t Length)
volatile uint32_t interruptRxTimeoutStat
void SSPReceive(uint8_t *buf, uint32_t Length)
volatile uint32_t interruptOverRunStat
void SSP_IRQHandler(void)
volatile uint32_t interruptRxStat
int myPrintfUSB(const char *fmt,...)