![WDT EmETXe-i92U0 User Manual Download Page 62](http://html.mh-extra.com/html/wdt/emetxe-i92u0/emetxe-i92u0_user-manual_878999062.webp)
- 54 -
Appendix
Appendix B: DIO Sample Code
/*---------------------------------------------------------------------------*/
#include “math.h”
#include “stdio.h”
#include “dos.h”
void GPIOMode(int iMode);
void GPIOData(int iData);
int GPIOStatus();
int main(void)
{
int iInput;
GPIOMode(0xF);
delay(10000);
GPIOData(0x0A);
delay(30000);
iInput = GPIOStatus();
printf(“ Data : %2x \n”,iInput);
GPIOData(0x05);
delay(30000);
iInput = GPIOStatus();
printf(“ Data : %2x \n”,iInput);
return 0;
}
void GPIOMode(int iMode)
{
outportb(0x66,0xEB);
/* Select DIO pin to output or input */
delay(2000);
outportb(0x62,iMode);
}
void GPIOData(int iData)
{
outportb(0x66,0xEA);
/* Set DIO output pin status */
delay(2000);
outportb(0x62,iData);
}
int GPIOStatus()
{
int iStatus;
outportb(0x66,0xEC);
/* Get DIO pin status */
delay(2000);
iStatus = inportb(0x62);
return iStatus;
}
Summary of Contents for EmETXe-i92U0
Page 1: ...EmETXe i92U0 COM Express Compact Type 6 CPU Module User s Manual Version 1 0 2022 07 ...
Page 2: ...Revision History Version Date Description 1 0 2022 07 Initial release ...
Page 9: ... 1 Introduction 1 Chapter 1 Introduction ...
Page 14: ... 6 This page is intentionally left blank ...
Page 15: ... 7 Board Overview 2 Chapter 2 Board Overview ...
Page 23: ... 15 Installation Maintenance 3 Chapter 3 Installation Maintenance ...
Page 26: ... 18 This page is intentionally left blank ...
Page 27: ... 19 BIOS 4 Chapter 4 BIOS ...
Page 36: ... 28 BIOS 4 2 6 Hardware Monitor Access this submenu to monitor the hardware status ...
Page 58: ... 50 This page is intentionally left blank ...
Page 59: ... 51 Appendix Appendix ...