From 8adc873e843ea8599e7e658d00b66bebe86c2f62 Mon Sep 17 00:00:00 2001 From: TitanMKD Date: Wed, 6 Jun 2012 00:30:25 +0200 Subject: Fixed SSP, tested with Oscilloscope Write work fine (tested SPI Mode). For more details on tests see ssp/README. --- lib/lpc43xx/ssp.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') diff --git a/lib/lpc43xx/ssp.c b/lib/lpc43xx/ssp.c index ba7026e..592b5d8 100644 --- a/lib/lpc43xx/ssp.c +++ b/lib/lpc43xx/ssp.c @@ -62,6 +62,7 @@ void ssp_init(ssp_num_t ssp_num, ssp_frame_format_t frame_format, ssp_cpol_cpha_t cpol_cpha_format, u8 serial_clock_rate, + u8 clk_prescale, ssp_mode_t mode, ssp_master_slave_t master_slave, ssp_slave_option_t slave_option) @@ -85,6 +86,7 @@ void ssp_init(ssp_num_t ssp_num, /* Configure SSP */ clock = serial_clock_rate; + SSP_CPSR(ssp_port) = clk_prescale; SSP_CR0(ssp_port) = (data_size | frame_format | cpol_cpha_format | (clock<<8) ); /* Enable SSP */ -- cgit v1.2.3