Appendix
IB918F User’s Manual
69
2.
Sample Code: 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 "NCT6116D.H"
//---------------------------------------------------------------------------
int main (void);
void WDTInitial(void);
void WDTEnable(unsigned char);
void WDTDisable(void);
//---------------------------------------------------------------------------
int main (void)
{
char SIO;
SIO = Init_NCT6116D();
if (SIO == 0)
{
printf("Can not detect Nuvoton NCT6116D, program abort.\n");
return(1);
}
WDTInitial();
WDTEnable(10);
WDTDisable();
return 0;
}
//---------------------------------------------------------------------------
void WDTInitial(void)
{
unsigned char bBuf;
Set_NCT6116D_LD(0x08);
//switch
to logic device 8
bBuf = Get_NCT6116D_Reg(0x30);
bBuf &= (~0x01);
Set_NCT6116D_Reg(0x30, bBuf);
//Enable
WDTO
}
//---------------------------------------------------------------------------
Summary of Contents for iBASE IB918
Page 1: ......
Page 3: ...IB918F AMD Ryzen Embedded V1000 R1000 3 5 Disk Size SBC User s Manual Version 1 0A ...
Page 10: ...viii IB918F User s Manual This page is intentionally left blank ...
Page 16: ...6 IB918F User s Manual 1 6 Block Diagram ...
Page 19: ...General Information IB918F User s Manual 9 1 1 8 Dimensions ...
Page 20: ...10 IB918F User s Manual This page is intentionally left blank ...
Page 24: ...14 IB918F User s Manual 2 3 Jumper Connector Locations on IB918F ...