VSF Documented
Data Structures | Typedefs | Functions | Variables
spi_interface.h File Reference
#include "hal/vsf_hal_cfg.h"
#include "utilities/ooc_class.h"

Go to the source code of this file.

Data Structures

struct  vsf_i_spi_isr_t
 spi isr for interface More...
 
struct  i_spi_cfg_t
 spi configuration for interface More...
 

Typedefs

typedef struct vsf_i_spi_isr_t vsf_i_spi_isr_t
 spi isr for interface
 
typedef struct i_spi_cfg_t i_spi_cfg_t
 spi configuration for interface
 

Functions

 dcl_interface (i_spi_t) typedef void vsf_i_spi_isrhandler_t(void *target_ptr
 
 def_interface (i_spi_t) union
 class: spi_t
 

Variables

const i_spi_t * i_spi_ptr
 
const i_spi_t vsf_spi_irq_mask_t irq_mask
 
vsf_err_t(* Init )(i_spi_cfg_t *cfg_ptr)
 
struct { 
 
   void(*   Set )(uintalu_t tIndex) 
 
   void(*   Clear )(uintalu_t tIndex) 
 
CS 
 
struct { 
 
   void(*   Transfer )(void *pOutput, uint_fast32_t
      *pOutCount, void *pInput,
       uint_fast32_t *pInCount) 
 < read/write of fifo More...
 
   bool(*   Flush )(void) 
 
FIFO 
 
struct { 
 
   vsf_err_t(*   RequestTransfer )(void *pOutput, void *pInput,
       uint_fast32_t nCount) 
 request a block exchanging access ! More...
 
   vsf_err_t(*   Cancel )(void) 
 cancel on going communication More...
 
   int_fast32_t(*   GetTransferedCount )(void) 
 get transferred count More...
 
Block 
 
struct { 
 
   void(*   Enable )(vsf_spi_irq_mask_t mask) 
 
   void(*   Disable )(vsf_spi_irq_mask_t mask) 
 
IRQ 
 

Typedef Documentation

◆ vsf_i_spi_isr_t

spi isr for interface

◆ i_spi_cfg_t

typedef struct i_spi_cfg_t i_spi_cfg_t

spi configuration for interface

Function Documentation

◆ dcl_interface()

dcl_interface ( i_spi_t  )

◆ def_interface()

def_interface ( i_spi_t  )

class: spi_t

Variable Documentation

◆ i_spi_ptr

const i_spi_t* i_spi_ptr

◆ irq_mask

const i_spi_t vsf_spi_irq_mask_t irq_mask

◆ Init

vsf_err_t(* Init) (i_spi_cfg_t *cfg_ptr) ( i_spi_cfg_t cfg_ptr)

◆ Set

void(* Set) (uintalu_t tIndex) ( uintalu_t  tIndex)

◆ Clear

void(* Clear) (uintalu_t tIndex) ( uintalu_t  tIndex)

◆ [struct]

struct { ... } CS

◆ Transfer

void(* Transfer) (void *pOutput, uint_fast32_t *pOutCount, void *pInput, uint_fast32_t *pInCount) ( void *  pOutput,
uint_fast32_t pOutCount,
void *  pInput,
uint_fast32_t pInCount 
)

< read/write of fifo

flush fifo

◆ Flush

bool(* Flush) (void) ( void  )

◆ [struct]

struct { ... } FIFO

◆ RequestTransfer

vsf_err_t(* RequestTransfer) (void *pOutput, void *pInput, uint_fast32_t nCount) ( void *  pOutput,
void *  pInput,
uint_fast32_t  nCount 
)

request a block exchanging access !

Parameters
pOutputaddress of output buffer !
pInputaddress of input buffer !
nCountthe count of data in the two buffers !
Return values
fsm_rt_cplThe transaction is complete !
fsm_rt_asynThe transaction is handled asynchronousely, i.e. by ! DMA or by ISR or etc. !
fsm_rt_on_goingUser should poll this API until fsm_rt_cpl or err ! value is returned. !
vsf_err_tError value is returned.

◆ Cancel

vsf_err_t(* Cancel) (void) ( void  )

cancel on going communication

◆ GetTransferedCount

int_fast32_t(* GetTransferedCount) (void) ( void  )

get transferred count

◆ [struct]

struct { ... } Block

◆ Enable

void(* Enable) (vsf_spi_irq_mask_t mask) ( vsf_spi_irq_mask_t  mask)

◆ Disable

void(* Disable) (vsf_spi_irq_mask_t mask) ( vsf_spi_irq_mask_t  mask)

◆ [struct]

struct { ... } IRQ