,-,((
!+
Let GPIO32,33,34,35 as GPIO pins by
GPIO_USE_SEL2 (=:(GP 30h))_bit[3..0]P[1,1,1,1];
Define GPIO as input or output pin 1=input pin , 0=output pin
GP_IO_SEL2 (=:(GP 34h))_bit[3..0]P[0/1,0/1,0/1,0/1];
Output value or read status ?
GP_LVL2 (=:(GP 38h))_bit[3..0];
Output value When output pin defined
Read returned status when input pin defined
------------- SAMPLE START----------------------------------------------------------------------------
Get GPIOBASE Base Address, and save to ECX_bit[31..16]
mov dx,0CF8h
mov eax,8000F85Ch ; B0:D31:F0:Offset_5Ch
out dx,eax
mov dx,0CFCh
in eax,dx
or al,10h ; 5Ch_Bit4P1 to Enable GPIO
out dx,eax
mov dx,0CF8h ; Get GPIOBASE
mov eax,8000F858h ; B0:D31:F0:Offset_58h
out dx,eax
mov dx,0CFCh
in eax,dx
and al,0feh ; bit 0 cleared to 0.
rol eax,10h
mov ecx,eax ; Save GPIOBASE to ECX[31..16]
------------- SAMPLE END-------------------------------------------------------------------------------
Summary of Contents for PEB-7710VLA
Page 10: ......
Page 32: ...in eax dx...