34 #ifdef __BUILD_WITH_EXAMPLE__
35 #include "lpc17xx_libcfg.h"
59 uint32_t prescale, cr0_div, cmp_clk, ssp_clk;
79 while (cmp_clk > target_clock)
81 cmp_clk = ssp_clk / ((cr0_div + 1) * prescale);
82 if (cmp_clk > target_clock)
138 tmp = ((SSP_ConfigStruct->
CPHA) | (SSP_ConfigStruct->
CPOL) \
149 setSSPclock(SSPx, SSP_ConfigStruct->
ClockRate);
187 return (SSPx->
CR0 & (0xF));
344 uint16_t *rdata16 = 0;
345 uint16_t *wdata16 = 0;
369 rdata8 = (uint8_t *)dataCfg->
rx_data;
370 wdata8 = (uint8_t *)dataCfg->
tx_data;
372 rdata16 = (uint16_t *)dataCfg->
rx_data;
373 wdata16 = (uint16_t *)dataCfg->
tx_data;
415 *(rdata8) = (uint8_t) tmp;
418 *(rdata16) = (uint16_t) tmp;
482 *(uint8_t *)((uint32_t)dataCfg->
rx_data + dataCfg->
rx_cnt) = (uint8_t) tmp;
484 *(uint16_t *)((uint32_t)dataCfg->
rx_data + dataCfg->
rx_cnt) = (uint16_t) tmp;
554 SSPx->
IMSC |= IntType;
663 SSPx->
DMACR |= DMAMode;