6.GP25
:
//Enter the Extended Function Mode
IO_WRITE_BYTE(0x2E, 0x87);
IO_WRITE_BYTE(0x2E, 0x87);
//
Configure the configuration registers
//Switch to local device 7
IO_WRITE_BYTE(0x2E, 0x07);
IO_WRITE_BYTE(0x2F, 0x07);
//Activate GPIO group 2
IO_WRITE_BYTE(0x2E, 0x30);
UCHAR Temp = IO_READ_BYTE(0x2F)|0x04;
IO_WRITE_BYTE(0x2E, 0x30);
IO_WRITE_BYTE(0x2F, Temp);
//Programmed GPIO25 as an output port
IO_WRITE_BYTE(0x2E, 0xE8);
UCHAR Temp = IO_READ_BYTE(0x2F)&0xDF;
IO_WRITE_BYTE(0x2E, 0xE8);
IO_WRITE_BYTE(0x2F, Temp);
//
Set GPIO25 to low state
IO_WRITE_BYTE(0x2E, 0xE9);
UCHAR Temp = IO_READ_BYTE(0x2F)&0xDF;
IO_WRITE_BYTE(0x2E, 0xE9);
IO_WRITE_BYTE(0x2F, Temp);
//
Set GPIO25 to high state
IO_WRITE_BYTE(0x2E, 0xE9);
UCHAR Temp = IO_READ_BYTE(0x2F)|0x20;
IO_WRITE_BYTE(0x2E, 0xE9);
IO_WRITE_BYTE(0x2F, Temp);
//
Exit the Extended Function Mode
IO_WRITE_BYTE(0x2E, 0xAA);