#include "chip_lpc175x_6x.h"
#include "ssp_17xx_40xx.h"
#include "FreeRTOS.h"
#include "task.h"
Go to the source code of this file.
|
#define | MAX_SSP_INTERFACES 2 |
| SSP Interfaces count in LPC17xx.
|
|
#define | SSP(n) LPC_SSP##n |
| Macro to retrieve the pointer to LPC_SSP registers based on id number.
|
|
#define | SSP_SLAVE 0 |
|
#define | SSP_MASTER 1 |
|
#define | SSP_INTERRUPT 0 |
|
#define | SSP_POLLING 1 |
|
#define | ssp_chip_init(id) Chip_SSP_Init(SSP(id)) |
|
#define | ssp_chip_deinit(id) Chip_SSP_DeInit(SSP(id)) |
|
#define | ssp_flush_rx(id) Chip_SSP_Int_FlushData(SSP(id)) |
|
#define | ssp_set_bitrate(id, bitrate) Chip_SSP_SetBitRate(SSP(id), bitrate) |
|
#define | ssp_write(id, buffer, buffer_len) ssp_write_read(id, buffer, buffer_len, NULL, 0, 0) |
|
#define | ssp_read(id, buffer, buffer_len, timeout) ssp_write_read(id, NULL, 0, buffer, buffer_len, timeout) |
|
|
void | ssp_init (uint8_t id, uint32_t bitrate, uint8_t frame_sz, bool master_mode, bool poll) |
|
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 internal SSP driver resets the SSEL pin every 8 bits that are transfered.
|
|
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) |
|
◆ MAX_SSP_INTERFACES
#define MAX_SSP_INTERFACES 2 |
SSP Interfaces count in LPC17xx.
◆ SSP
#define SSP |
( |
| n | ) |
LPC_SSP##n |
Macro to retrieve the pointer to LPC_SSP registers based on id number.
◆ ssp_chip_deinit
#define ssp_chip_deinit |
( |
| id | ) |
Chip_SSP_DeInit(SSP(id)) |
◆ ssp_chip_init
#define ssp_chip_init |
( |
| id | ) |
Chip_SSP_Init(SSP(id)) |
◆ ssp_flush_rx
#define ssp_flush_rx |
( |
| id | ) |
Chip_SSP_Int_FlushData(SSP(id)) |
◆ SSP_INTERRUPT
◆ SSP_MASTER
◆ SSP_POLLING
◆ ssp_read
#define ssp_read |
( |
| id, |
|
|
| buffer, |
|
|
| buffer_len, |
|
|
| timeout ) ssp_write_read(id, NULL, 0, buffer, buffer_len, timeout) |
◆ ssp_set_bitrate
#define ssp_set_bitrate |
( |
| id, |
|
|
| bitrate ) Chip_SSP_SetBitRate(SSP(id), bitrate) |
◆ SSP_SLAVE
◆ ssp_write
#define ssp_write |
( |
| id, |
|
|
| buffer, |
|
|
| buffer_len ) ssp_write_read(id, buffer, buffer_len, NULL, 0, 0) |
◆ ssp_config_t
SSP Interface config struct.
◆ ssel_state
Slave select states.
Enumerator |
---|
ASSERT | |
DEASSERT | |
◆ ssp_init()
void ssp_init |
( |
uint8_t | id, |
|
|
uint32_t | bitrate, |
|
|
uint8_t | frame_sz, |
|
|
bool | master_mode, |
|
|
bool | poll ) |
◆ ssp_ssel_control()
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 internal SSP driver resets the SSEL pin every 8 bits that are transfered.
◆ ssp_write_read()
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 ) |