Aaeon PICO-KBU4 User Manual page 104

Table of Contents

Advertisement

out dx, al
mov dx, F040h + 00h ; Host Control Register
mov al, 12h ; Start a byte access
out dx, al
call CT_Chk_SMBus_Ready ;R14
ret
Ct_I2CWriteByte Endp
; Wait until the busy bit clears, indicating that the SMBUS
; activity has concluded.
CT_Chk_SMBus_Ready Proc Near
mov dx, F040h + 01h ; Host Status Register
Check_I2C_ByteRead_ForBusy:
in al, dx
test al, 08h
jnz Check_I2C_ByteRead_ForBusy
Check_I2C_ByteRead_ForStatus:
in al, dx
test al, 07h ; HSTS[2:0]=All clearable status bits
jz Check_I2C_ByteRead_ForStatus
ret
CT_Chk_SMBus_Ready Endp
END begin
Appendix D –DIO
91

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents