Syntax
typedef struct {
  VMUINT16 clock_number;
  VM_DCL_GPIO_CLOCK_MODE clock_mode;
} vm_dcl_gpio_control_set_clock_out_t;
ContentsIndex
PreviousUpNext
vm_dcl_gpio_control_set_clock_out_t
Example
Syntax
typedef struct {
  VMUINT16 clock_number;
  VM_DCL_GPIO_CLOCK_MODE clock_mode;
} vm_dcl_gpio_control_set_clock_out_t;
Description

Input parameter for command VM_DCL_GPIO_COMMAND_SET_CLOCK_OUT. Certain GPIO pins can generate different clock waves by request. There are several clock modes supported. Refer to the chipset datasheet for the available clock modes and numbers available to each pin.

Example
#include "vm_dcl.h"
VM_DCL_HANDLE gpio_handle; // Declare a VM_DCL_HANDLE variable.
vm_dcl_gpio_control_set_clock_out_t clock_data; //Declare a vm_dcl_gpio_control_set_clock_out_t variable.
gpio_handle = vm_dcl_open(VM_DCL_GPIO_CLOCK,55);// Step1, we call vm_dcl_open to get a handle. 55 means gpio55. Notice the device parameter is VM_DCL_GPIO_CLOCK.
clock_data.clock_number = 2;// More details, please refer to the GPIO datasheet.
clock_data.clock_mode = 4; //More details, please refer to the GPIO datasheet.
vm_dcl_control(gpio_handle,VM_DCL_GPIO_COMMAND_SET_CLOCK_OUT,(void *)&clock_data); // Step2, we call vm_dcl_control to set register status of gpio55 .
vm_dcl_close(gpio_handle); // Finally, we call vm_dcl_close
File

vmdcl_gpio.h

Members
Members 
Description 
VMUINT16 clock_number; 
The clock register number in datasheet. 
VM_DCL_GPIO_CLOCK_MODE clock_mode; 
The clock mode in datasheet, different mode means different source clock selected. 
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.