Macros | Functions
spiTouINS.c File Reference
#include <asf.h>
#include "spiTouINS.h"
#include "board_opt.h"
#include "drivers/d_dma.h"
#include "../../../hw-libs/misc/rtos.h"
Include dependency graph for spiTouINS.c:

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)
 

Macro Definition Documentation

◆ DMA_LLD_COUNT

#define DMA_LLD_COUNT   32

◆ DMA_LLD_MASK

#define DMA_LLD_MASK   (DMA_LLD_COUNT - 1)

◆ READ_ADDITIONAL_SIZE

#define READ_ADDITIONAL_SIZE   20

Definition at line 44 of file spiTouINS.c.

◆ READ_SIZE

#define READ_SIZE   100

Definition at line 43 of file spiTouINS.c.

◆ RX_BUFFER_SIZE

#define RX_BUFFER_SIZE   2048

Definition at line 40 of file spiTouINS.c.

◆ RX_INT_BUFFER_SIZE

#define RX_INT_BUFFER_SIZE   1024

Definition at line 41 of file spiTouINS.c.

◆ SPI_DLYBCT

#define SPI_DLYBCT   0x03

Definition at line 37 of file spiTouINS.c.

◆ SPI_DLYBS

#define SPI_DLYBS   0x10

Definition at line 34 of file spiTouINS.c.

◆ SPI_INS_BASE

#define SPI_INS_BASE   SPI0

Definition at line 22 of file spiTouINS.c.

◆ SPI_INS_BAUDRATE

#define SPI_INS_BAUDRATE   10000000UL

Definition at line 19 of file spiTouINS.c.

◆ SPI_INS_CHIP_SEL

#define SPI_INS_CHIP_SEL   2

Definition at line 23 of file spiTouINS.c.

◆ SPI_INS_CLK_PHASE

#define SPI_INS_CLK_PHASE   0

Definition at line 31 of file spiTouINS.c.

◆ SPI_INS_CLK_POLARITY

#define SPI_INS_CLK_POLARITY   1

Definition at line 30 of file spiTouINS.c.

◆ SPI_IRQn

#define SPI_IRQn   SPI0_IRQn

Definition at line 25 of file spiTouINS.c.

◆ SPI_spiTouINS_Handler

#define SPI_spiTouINS_Handler   SPI0_Handler

Definition at line 24 of file spiTouINS.c.

◆ SPI_XDMAC_RX_CH_NUM

#define SPI_XDMAC_RX_CH_NUM   2

Definition at line 27 of file spiTouINS.c.

◆ SPI_XDMAC_TX_CH_NUM

#define SPI_XDMAC_TX_CH_NUM   1

Definition at line 26 of file spiTouINS.c.

◆ TASK_SPI_TO_UINS_PERIOD_MS

#define TASK_SPI_TO_UINS_PERIOD_MS   1

◆ TASK_SPI_TO_UINS_PRIORITY

#define TASK_SPI_TO_UINS_PRIORITY   (configMAX_PRIORITIES - 2)

◆ TASK_SPI_TO_UINS_STACK_SIZE

#define TASK_SPI_TO_UINS_STACK_SIZE   (512/sizeof(portSTACK_TYPE))

◆ TX_BUFFER_SIZE

#define TX_BUFFER_SIZE   512

Definition at line 39 of file spiTouINS.c.

Function Documentation

◆ __attribute__()

__attribute__ ( (optimize("O0"))  )

Definition at line 224 of file spiTouINS.c.

◆ COMPILER_ALIGNED()

COMPILER_ALIGNED ( 32  )

Definition at line 46 of file spiTouINS.c.

◆ getTxFree()

static uint32_t getTxFree ( void  )
static

Definition at line 380 of file spiTouINS.c.

◆ PIO_DataReady_Handler()

static void PIO_DataReady_Handler ( uint32_t  id,
uint32_t  mask 
)
static

Definition at line 147 of file spiTouINS.c.

◆ sendMoreData()

static void sendMoreData ( int  len)
static

Definition at line 333 of file spiTouINS.c.

◆ SPI_spiTouINS_Handler()

void SPI_spiTouINS_Handler ( void  )

Definition at line 115 of file spiTouINS.c.

◆ spiTouINS_dataReady()

int spiTouINS_dataReady ( void  )

Definition at line 508 of file spiTouINS.c.

◆ spiTouINS_serRead()

int spiTouINS_serRead ( unsigned char *  buf,
int  size 
)

Definition at line 517 of file spiTouINS.c.

◆ spiTouINS_serWrite()

int spiTouINS_serWrite ( const unsigned char *  buf,
int  size 
)

Definition at line 393 of file spiTouINS.c.

◆ spiTouINS_task()

static void spiTouINS_task ( void *  pvParameters)
static

Definition at line 161 of file spiTouINS.c.

◆ test_spiTouINS()

void test_spiTouINS ( void  )

Definition at line 558 of file spiTouINS.c.



inertial_sense_ros
Author(s):
autogenerated on Sat Sep 19 2020 03:19:07