7.GP26
:
//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 GPIO26 as an output port
IO_WRITE_BYTE(0x2E, 0xE8);
UCHAR Temp = IO_READ_BYTE(0x2F)&0xBF;
IO_WRITE_BYTE(0x2E, 0xE8);
IO_WRITE_BYTE(0x2F, Temp);
//
Set GPIO26 to low state
IO_WRITE_BYTE(0x2E, 0xE9);
UCHAR Temp = IO_READ_BYTE(0x2F)&0xBF;
IO_WRITE_BYTE(0x2E, 0xE9);
IO_WRITE_BYTE(0x2F, Temp);
//
Set GPIO26 to high state
IO_WRITE_BYTE(0x2E, 0xE9);
UCHAR Temp = IO_READ_BYTE(0x2F)|0x40;
IO_WRITE_BYTE(0x2E, 0xE9);
IO_WRITE_BYTE(0x2F, Temp);
//
Exit the Extended Function Mode
IO_WRITE_BYTE(0x2E, 0xAA);