User manual

Table Of Contents
57 PCM-3353 User Manual
Appendix D GPIO Sample Code
NEWIODELAY
call CT_Chk_SMBus_Ready
pop ax
mov dl,03h
out dx,al ;Index
NEWIODELAY
NEWIODELAY
mov dl,02h
mov al,48h
out dx,al ;Read data
NEWIODELAY
NEWIODELAY
mov cx, 100h
@@:
newiodelay
loop short @B
call CT_Chk_SMBus_Ready
mov dl,05
in al,dx ;Data0
NEWIODELAY
NEWIODELAY
ret
Ct_I2CReadByteEndp
;==============================================================
;Input : CL - register index
; CH - device ID
; AL - Value to write
;Output: none
;==============================================================
Ct_I2CWriteByteProcNear
push ax
push cx
mov dx,SMBus_Port +04h
mov al,ch ;ID cmd(Write)
out dx,al