Access to information is restricted depending on your login. Request login-information through our contact form.



The drvlib_app.dll contains two set of functions to control the pins of the SODIMM-module.
Functions which use the processor GPIO-number (GPIO_xxx) and functions which use the SODIMMM-pin-number (SPin_xxx).


The SPin_xxx-functions currently are not implemented on mature Trizeps-modules ( Trizeps I..VI).


The drvlib_app.dll contains function to control GPIO's.
GPIO = General Purpose Input Output.

Many pins of the Trizeps-module are GPIO's with multiple functionality; i.e. they may be configured as UART or LCD-interface pins etc.. The most simple function is to use these pins as input or output. If you want to know how to use a pin as interrupt-source see usinginterruptstrizeps4.

Usage of pins is made easy with the Keith & Koep drvlib_app.dll:

#include "windows.h"
#define  CPLUSPLUS 1
#include "drvlib_app.h"

int WINAPI WinMain( HINSTANCE hInstance,
                    HINSTANCE hPrevInstance,
                    LPTSTR    lpCmdLine,
                    int       nCmdShow)
   PGIO_REGS ptr;
   unsigned long arg_l = 0;
   BOOL state;

   ptr = GPIO_AllocSpace();
   state = GPIO_Get_Pin( ptr, (unsigned char)arg_l);
   GPIO_Init_Pin(ptr, (unsigned char)arg_l, TRUE, !state);
   GPIO_Set_Pin( ptr, (unsigned char) arg_l, state);
   return 0;

This is what the sample does

  1. Obtain gpio to use from commandline.
  2. GPIO_AllocSpace() is called to map GPIO-registers.
  3. GPIO_Get_Pin(..) gets the current pin-state (i.e. low (0V)).
  4. GPIO_Init_Pin(..) configured the pin to be an output and toggles the pin-state (i.e. high(3.3V)).
  5. Wait 3 seconds.
  6. GPIO_Set_Pin(..) sets the pin-state to its original value (i.e. low(0V)).
  7. GPIO_FreeSpace() will release ressources allocated with GPIO_AllocSpace().


Embedded Visual C++ Workspace for above example:

Application to set/get GPIO-level:

   gpio <gpio-number>                      Read GPIO-pin.
   gpio <gpio-number> <level>              Set GPIO-pin. You might need to configure a pin as 
                                           output with the below line first.
   gpio <gpio-number> <IsOutput> <level>   Configure pin as input or output. 

Special GPIOs on Trizeps VI

To ease the use of the CPLD'pins of the Trizeps VI ( see Trizeps6 CPLD), they are assigned to a GPIO-number. This can be used in all GPIO_xxx() functions.

SODIMM-Pin Description GPIO-number
104 CF_IOIS16 124
98 CF_REG 125
100 CPLD_C02 126
69 CPLD_C00 127
106 CPLD_CS4 128
93 RDnWR 130
Cookies helfen bei der Bereitstellung von Inhalten. Durch die Nutzung dieser Seiten erklären Sie sich damit einverstanden, dass Cookies auf Ihrem Rechner gespeichert werden. Weitere Information
service/wince/drvlib/gpio/gpio.txt · Zuletzt geändert: 2014/01/27 11:33 von