Azure Sphere MT3620 M4 API Reference Manual
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Define

This section introduces the Macro definitions that are used to combine H2DMB and error return type. More...

Overview

This section introduces the Macro definitions that are used to combine H2DMB and error return type.

Macros

#define SET_TRANSFER_H2DMB(x, y, z)   ((0x1 << 6) | (x << 5) | (y << 4) | ((z) & 0xf))
 Users use this Macro to combine H2DMB, SPIS prepares the next transmisson by parsing H2DMB. More...
 
#define SPIS_EPTR   1
 Invalid argument, it means the pointer is NULL.
 
#define SPIS_ELENGTH   2
 Invalid argument, it means the transfer length is not supported.
 
#define SPIS_EMEM   3
 Invalid argument, it means the buffer is not 4Bytes align.
 
#define SPIS_EBUSY   4
 DMA resource is busy.
 
#define SPIS_EDMA   5
 DMA processing failed.
 
#define SPIS_EH2DMB   6
 Invalid argument, it means the H2DMB is invalid.
 

Macro Definition Documentation

#define SET_TRANSFER_H2DMB (   x,
  y,
 
)    ((0x1 << 6) | (x << 5) | (y << 4) | ((z) & 0xf))

Users use this Macro to combine H2DMB, SPIS prepares the next transmisson by parsing H2DMB.

This combined H2DMB will be sent to spi salve, with the following information:
x: Transmission direction (R/W), defined in spis_direction_cmd.
y: Use spis DMA or not (0: FIFO; 1: DMA).
z: Data length (unit: double word).