![]() |
LPCOpen Platform
v1.03
LPCOpen Platform for NXP LPC Microcontrollers
|
#include "board.h"#include "stdio.h"Go to the source code of this file.
Macros | |
| #define | LPC_SSP LPC_SSP1 |
| #define | SSP_IRQ SSP1_IRQn |
| #define | LPC_GPDMA_SSP_TX GPDMA_CONN_SSP1_Tx |
| #define | LPC_GPDMA_SSP_RX GPDMA_CONN_SSP1_Rx |
| #define | SSPIRQHANDLER SSP1_IRQHandler |
| #define | BUFFER_SIZE (0x100) |
| #define | SSP_DATA_BITS (SSP_BITS_8) |
| #define | SSP_DATA_BIT_NUM(databits) (databits + 1) |
| #define | SSP_DATA_BYTES(databits) (((databits) > SSP_BITS_8) ? 2 : 1) |
| #define | SSP_LO_BYTE_MSK(databits) |
| #define | SSP_HI_BYTE_MSK(databits) |
| #define | SSP_MODE_SEL (0x31) |
| #define | SSP_TRANSFER_MODE_SEL (0x32) |
| #define | SSP_MASTER_MODE_SEL (0x31) |
| #define | SSP_SLAVE_MODE_SEL (0x32) |
| #define | SSP_POLLING_SEL (0x31) |
| #define | SSP_INTERRUPT_SEL (0x32) |
| #define | SSP_DMA_SEL (0x33) |
Functions | |
| static void | Buffer_Init (void) |
| static uint8_t | Buffer_Verify (void) |
| static void | appSSPTest (void) |
| static void | appSSPSelectModeMenu (void) |
| static void | appSSPMainMenu (void) |
| void | SSPIRQHANDLER (void) |
| SSP interrupt handler sub-routine. | |
| void | DMA_IRQHandler (void) |
| DMA interrupt handler sub-routine. Set the waiting flag when transfer is successful. | |
| int | main (void) |
| Main routine for SSP example. | |
Variables | |
| static uint8_t | Tx_Buf [BUFFER_SIZE] |
| static uint8_t | Rx_Buf [BUFFER_SIZE] |
| static SSP_ConfigFormat | ssp_format |
| static Chip_SSP_DATA_SETUP_T | xf_setup |
| static volatile uint8_t | isXferCompleted = 0 |
| static uint8_t | dmaChSSPTx |
| static uint8_t | dmaChSSPRx |
| static volatile uint8_t | isDmaTxfCompleted = 0 |
| static volatile uint8_t | isDmaRxfCompleted = 0 |