Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- switch_on:
- /* Send the command to the EC to turn the keyboard backlight on */
- movw $0x66, %dx
- 1:
- inb %dx, %al /* Wait for IBF == 0 */
- andb $0x02, %al
- jnz 1b
- movb $0x81, %al /* Send EC write command */
- outb %al, %dx
- 2:
- inb %dx, %al /* Wait for IBF == 0 */
- andb $0x02, %al
- jnz 2b
- movb $0x19, %al /* Register 0x19 */
- movw $0x62, %dx
- outb %al, %dx
- movw $0x66, %dx
- 3:
- inb %dx, %al /* Wait for IBF == 0 */
- andb $0x02, %al
- jnz 3b
- movb $0xee, %al /* Value 0xee */
- movw $0x62, %dx
- outb %al, %dx
- /* Delay for a while */
- movl $0x00010000, %ecx
- wait1:
- nop
- loop wait1
Add Comment
Please, Sign In to add comment