30#include "chip_lpc175x_6x.h"
31#include "ssp_17xx_40xx.h"
38#define MAX_SSP_INTERFACES 2
43#define SSP(n) LPC_SSP##n
47#define SSP_INTERRUPT 0
71void ssp_init( uint8_t
id, uint32_t bitrate, uint8_t frame_sz,
bool master_mode,
bool poll );
73void ssp_write_read( uint8_t
id, uint8_t *tx_buf, uint32_t tx_len, uint8_t *rx_buf, uint32_t rx_len, uint32_t timeout );
75#define ssp_chip_init(id) Chip_SSP_Init(SSP(id))
76#define ssp_chip_deinit(id) Chip_SSP_DeInit(SSP(id))
77#define ssp_flush_rx(id) Chip_SSP_Int_FlushData(SSP(id))
78#define ssp_set_bitrate(id, bitrate) Chip_SSP_SetBitRate(SSP(id), bitrate)
79#define ssp_write(id, buffer, buffer_len) ssp_write_read(id, buffer, buffer_len, NULL, 0, 0)
80#define ssp_read(id, buffer, buffer_len, timeout) ssp_write_read(id, NULL, 0, buffer, buffer_len, timeout)
IRQn_Type
Definition LPC176x5x.h:56
void ssp_init(uint8_t id, uint32_t bitrate, uint8_t frame_sz, bool master_mode, bool poll)
Definition lpc17_ssp.c:99
void ssp_ssel_control(uint8_t id, uint8_t state)
Function that controls the Slave Select (SSEL) signal This pin is controlled manually because the int...
Definition lpc17_ssp.c:94
ssel_state
Slave select states.
Definition lpc17_ssp.h:53
@ DEASSERT
Definition lpc17_ssp.h:55
@ ASSERT
Definition lpc17_ssp.h:54
struct ssp_config ssp_config_t
SSP Interface config struct.
void ssp_write_read(uint8_t id, uint8_t *tx_buf, uint32_t tx_len, uint8_t *rx_buf, uint32_t rx_len, uint32_t timeout)
Definition lpc17_ssp.c:124
SSP Interface config struct.
Definition lpc17_ssp.h:61
uint8_t polling
Definition lpc17_ssp.h:65
uint8_t frame_size
Definition lpc17_ssp.h:66
TaskHandle_t caller_task
Definition lpc17_ssp.h:68
LPC_SSP_T * lpc_id
Definition lpc17_ssp.h:62
IRQn_Type irq
Definition lpc17_ssp.h:63
Chip_SSP_DATA_SETUP_T xf_setup
Definition lpc17_ssp.h:67
uint32_t ssel_pin
Definition lpc17_ssp.h:64