Syntax
typedef struct {
  VMUINT16 clock_number;
  VM_DCL_GPIO_CLOCK_DIVIDE division;
} vm_dcl_gpio_control_set_clock_division_t;
ContentsIndex
PreviousUpNext
vm_dcl_gpio_control_set_clock_division_t
Example
Syntax
typedef struct {
  VMUINT16 clock_number;
  VM_DCL_GPIO_CLOCK_DIVIDE division;
} vm_dcl_gpio_control_set_clock_division_t;
Description

Input parameter for command VM_DCL_GPIO_COMMAND_SET_CLOCK_DIVIDE. Certain GPIO pins can generate different clock waves by request. There are several clock numbers and divison values supported. Refer to the chipset datasheet for the available combinations of clock and division number.

Example
#include "vm_dcl.h"
VM_DCL_HANDLE gpio_handle; // Declare a VM_DCL_HANDLE variable.
vm_dcl_gpio_control_set_clock_division_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 = 3;// More details, please refer to the GPIO datasheet.
clock_data.division = 2; //More details, please refer to the GPIO datasheet.
vm_dcl_control(gpio_handle,GPIO_COMMAND_SET_CLOCK_DIV,(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_DIVIDE division; 
The division value in datasheet.Please get more details in datasheet. 
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.