58
FWA8708-C / FWA8708-H User Manual
2. The file MAIN.CPP
//---------------------------------------------------------------------------
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR
// PURPOSE.
//---------------------------------------------------------------------------
#include <dos.h>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include "NCT5523D.H"
//---------------------------------------------------------------------------
int main (void);
void Dio5Initial(void);
void Dio5SetOutput(unsigned char);
unsigned char Dio5GetInput(void);
void Dio5SetDirection(unsigned char);
unsigned char Dio5GetDirection(void);
//---------------------------------------------------------------------------
int main (void)
{
char SIO;
SIO = Init_NCT5523D();
if (SIO == 0)
{
printf("Can not detect Nuvoton NCT5523D, program abort.\n");
return(1);
}
Dio5Initial();
//for GPIO20..27
Dio5SetDirection(0x0F);
//GP20..23 = input, GP24..27=output
printf("Current DIO direction = 0x%X\n", Dio5GetDirection());
printf("Current DIO status = 0x%X\n", Dio5GetInput());
printf("Set DIO output to high\n");
Dio5SetOutput(0x0F);
printf("Set DIO output to low\n");
Dio5SetOutput(0x00);
return 0;
}
//---------------------------------------------------------------------------
Содержание FWA8708-C
Страница 1: ...FWA8708 C FWA8708 H 1U Rackmount Network Appliance User s Manual Version 1 0 Dec 2018...
Страница 16: ...General Information FWA8708 C FWA8708 H User Manual 9 1 1 7 Dimensions Unit mm...
Страница 26: ...Hardware Configuration FWA8708 C FWA8708 H User Manual 19 2 Motherboard for FWA8708 H MBN805H...