#include <asf.h>
#include "spiTouINS.h"
#include "board_opt.h"
#include "drivers/d_dma.h"
#include "../../../hw-libs/misc/rtos.h"
Go to the source code of this file.
Macros | |
#define | DMA_LLD_COUNT 32 |
#define | DMA_LLD_MASK (DMA_LLD_COUNT - 1) |
#define | READ_ADDITIONAL_SIZE 20 |
#define | READ_SIZE 100 |
#define | RX_BUFFER_SIZE 2048 |
#define | RX_INT_BUFFER_SIZE 1024 |
#define | SPI_DLYBCT 0x03 |
#define | SPI_DLYBS 0x10 |
#define | SPI_INS_BASE SPI0 |
#define | SPI_INS_BAUDRATE 10000000UL |
#define | SPI_INS_CHIP_SEL 2 |
#define | SPI_INS_CLK_PHASE 0 |
#define | SPI_INS_CLK_POLARITY 1 |
#define | SPI_IRQn SPI0_IRQn |
#define | SPI_spiTouINS_Handler SPI0_Handler |
#define | SPI_XDMAC_RX_CH_NUM 2 |
#define | SPI_XDMAC_TX_CH_NUM 1 |
#define | TASK_SPI_TO_UINS_PERIOD_MS 1 |
#define | TASK_SPI_TO_UINS_PRIORITY (configMAX_PRIORITIES - 2) |
#define | TASK_SPI_TO_UINS_STACK_SIZE (512/sizeof(portSTACK_TYPE)) |
#define | TX_BUFFER_SIZE 512 |
Functions | |
__attribute__ ((optimize("O0"))) | |
COMPILER_ALIGNED (32) | |
static uint32_t | getTxFree (void) |
static void | PIO_DataReady_Handler (uint32_t id, uint32_t mask) |
static void | sendMoreData (int len) |
void | SPI_spiTouINS_Handler (void) |
int | spiTouINS_dataReady (void) |
int | spiTouINS_serRead (unsigned char *buf, int size) |
int | spiTouINS_serWrite (const unsigned char *buf, int size) |
static void | spiTouINS_task (void *pvParameters) |
void | test_spiTouINS (void) |
#define DMA_LLD_COUNT 32 |
#define DMA_LLD_MASK (DMA_LLD_COUNT - 1) |
#define READ_ADDITIONAL_SIZE 20 |
Definition at line 44 of file spiTouINS.c.
#define READ_SIZE 100 |
Definition at line 43 of file spiTouINS.c.
#define RX_BUFFER_SIZE 2048 |
Definition at line 40 of file spiTouINS.c.
#define RX_INT_BUFFER_SIZE 1024 |
Definition at line 41 of file spiTouINS.c.
#define SPI_DLYBCT 0x03 |
Definition at line 37 of file spiTouINS.c.
#define SPI_DLYBS 0x10 |
Definition at line 34 of file spiTouINS.c.
#define SPI_INS_BASE SPI0 |
Definition at line 22 of file spiTouINS.c.
#define SPI_INS_BAUDRATE 10000000UL |
Definition at line 19 of file spiTouINS.c.
#define SPI_INS_CHIP_SEL 2 |
Definition at line 23 of file spiTouINS.c.
#define SPI_INS_CLK_PHASE 0 |
Definition at line 31 of file spiTouINS.c.
#define SPI_INS_CLK_POLARITY 1 |
Definition at line 30 of file spiTouINS.c.
#define SPI_IRQn SPI0_IRQn |
Definition at line 25 of file spiTouINS.c.
#define SPI_spiTouINS_Handler SPI0_Handler |
Definition at line 24 of file spiTouINS.c.
#define SPI_XDMAC_RX_CH_NUM 2 |
Definition at line 27 of file spiTouINS.c.
#define SPI_XDMAC_TX_CH_NUM 1 |
Definition at line 26 of file spiTouINS.c.
#define TASK_SPI_TO_UINS_PERIOD_MS 1 |
#define TASK_SPI_TO_UINS_PRIORITY (configMAX_PRIORITIES - 2) |
#define TASK_SPI_TO_UINS_STACK_SIZE (512/sizeof(portSTACK_TYPE)) |
#define TX_BUFFER_SIZE 512 |
Definition at line 39 of file spiTouINS.c.
__attribute__ | ( | (optimize("O0")) | ) |
Definition at line 224 of file spiTouINS.c.
COMPILER_ALIGNED | ( | 32 | ) |
Definition at line 46 of file spiTouINS.c.
|
static |
Definition at line 380 of file spiTouINS.c.
|
static |
Definition at line 147 of file spiTouINS.c.
|
static |
Definition at line 333 of file spiTouINS.c.
void SPI_spiTouINS_Handler | ( | void | ) |
Definition at line 115 of file spiTouINS.c.
int spiTouINS_dataReady | ( | void | ) |
Definition at line 508 of file spiTouINS.c.
int spiTouINS_serRead | ( | unsigned char * | buf, |
int | size | ||
) |
Definition at line 517 of file spiTouINS.c.
int spiTouINS_serWrite | ( | const unsigned char * | buf, |
int | size | ||
) |
Definition at line 393 of file spiTouINS.c.
|
static |
Definition at line 161 of file spiTouINS.c.
void test_spiTouINS | ( | void | ) |
Definition at line 558 of file spiTouINS.c.