- 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;
}
Содержание EmETXe-i92U0
Страница 1: ...EmETXe i92U0 COM Express Compact Type 6 CPU Module User s Manual Version 1 0 2022 07 ...
Страница 2: ...Revision History Version Date Description 1 0 2022 07 Initial release ...
Страница 9: ... 1 Introduction 1 Chapter 1 Introduction ...
Страница 14: ... 6 This page is intentionally left blank ...
Страница 15: ... 7 Board Overview 2 Chapter 2 Board Overview ...
Страница 23: ... 15 Installation Maintenance 3 Chapter 3 Installation Maintenance ...
Страница 26: ... 18 This page is intentionally left blank ...
Страница 27: ... 19 BIOS 4 Chapter 4 BIOS ...
Страница 36: ... 28 BIOS 4 2 6 Hardware Monitor Access this submenu to monitor the hardware status ...
Страница 47: ... 39 BIOS 4 2 12 NVMe Configuration Access this submenu to view the NVMe controller and driver information ...
Страница 58: ... 50 This page is intentionally left blank ...
Страница 59: ... 51 Appendix Appendix ...