Syntax
typedef struct {
  VM_DCL_SPI_MODE mode;
  VMBOOL is_enabled;
  VMUINT32 parameter;
} vm_dcl_spi_mode_t;
ContentsIndex
PreviousUpNext
vm_dcl_spi_mode_t
Example
Syntax
typedef struct {
  VM_DCL_SPI_MODE mode;
  VMBOOL is_enabled;
  VMUINT32 parameter;
} vm_dcl_spi_mode_t;
Description

vm_dcl_spi_mode_t exposes if the SPI's mode can be set and or get. This structure is used as the parameter of VM_DCL_SPI_CONTROL_SET_MODE and VM_DCL_SPI_CONTROL_GET_MODE.

Example
 VM_DCL_HANDLE spi_handle;
 vm_dcl_spi_mode_t spi_data;
spi_handle = vm_dcl_open(VM_DCL_SPI_PORT1,0);
if(VM_DCL_HANDLE_INVALID==spi_handle) return;
 spi_data.mode = SPI_MODE_DEASSERT;
 spi_data.is_enable = KAL_TRUE;
 vm_dcl_control(spi_handle,VM_DCL_SPI_CONTROL_SET_MODE,(void *)&spi_data);
 //To do something.
File

vmdcl_spi.h

Members
Members 
Description 
VM_DCL_SPI_MODE mode; 
[IN]- Specifies the SPI mode. 
VMBOOL is_enabled; 
[IN/OUT]- Specifies whether the mode is enabled. For VM_DCL_SPI_CONTROL_SET_MODE, it is an input parameter. For VM_DCL_SPI_CONTROL_GET_MODE, it is an output parameter. 
VMUINT32 parameter; 
[IN/OUT]- The parameter for the specific mode. The meaning of this parameter depends on the mode to be set and or get. 
Group
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.