aboutsummaryrefslogtreecommitdiff
path: root/include/libopencm3/lpc43xx/ssp.h
diff options
context:
space:
mode:
authorMichael Ossmann2012-06-05 20:04:15 -0700
committerMichael Ossmann2012-06-05 20:04:15 -0700
commit4de126f6e02f7e5e1f7042f6dc48a34b9542da25 (patch)
tree0006fc458fc9cfc887ba129501da2f667722f92a /include/libopencm3/lpc43xx/ssp.h
parent416f633dbb5bdf8a7ef99e52f9de1142d126c8e5 (diff)
parent8adc873e843ea8599e7e658d00b66bebe86c2f62 (diff)
Merge pull request #4 from TitanMKD/master
LPC43xx SSP driver fixed (tested with Write)
Diffstat (limited to 'include/libopencm3/lpc43xx/ssp.h')
-rw-r--r--include/libopencm3/lpc43xx/ssp.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/libopencm3/lpc43xx/ssp.h b/include/libopencm3/lpc43xx/ssp.h
index 338fd88..ed69668 100644
--- a/include/libopencm3/lpc43xx/ssp.h
+++ b/include/libopencm3/lpc43xx/ssp.h
@@ -159,11 +159,17 @@ typedef enum {
void ssp_disable(ssp_num_t ssp_num);
+/*
+ * SSP Init
+ * clk_prescale shall be in range 2 to 254 (even number only).
+ * Clock computation: PCLK / (CPSDVSR * [SCR+1]) => CPSDVSR=clk_prescale, SCR=serial_clock_rate
+ */
void ssp_init(ssp_num_t ssp_num,
ssp_datasize_t data_size,
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);