ADLINK MXC-6000 Series User Manual

Page 93

Advertising
background image

Watchdog Timer (WDT) Function Library

81

MXC-6000

outp(0x2E, 0x87);

outp(0x2E, 0x87);

}

/* Config LPC IO to exit config mode */

ExitConfig(void)

{

outp(0x2E, 0xAA);

}

/* Read byte from LPC IO register */

unsigned char r_reg(unsigned char regoffset)

{

outp(0x2E, regoffset);

return inp(0x2F);

}

/* Write byte to LPC IO register */

void w_reg(unsigned char regoffset, unsigned char

data)

{

outp(0x2E, regoffset);

outp(0x2F, data);

}

main(void)

{

unsigned int count;

/* print program title */

printf("-----------------MXC-6000 WDT Demo------------

-----\n");

printf("Init and config GPIO

ports<<<<<<<<<<<<<<<<<<<<<<<<<\n");

Advertising