Example #1
0
def clk_isr():
	global bufchar
	global dir

	blit.fill(pyvga.framebuffer, 320, 312, 0, 8, 8, (isr.ticker & 15) + 16)

	if py8042.more_squeaks():
		dx = dy = 0
		while py8042.more_squeaks():
			_,dx,dy = py8042.get_squeak()
		if   dx > 10:  dir = 'l'
		elif dy > 10:  dir = 'k'
		elif dx < -10: dir = 'h'
		elif dy < -10: dir = 'j'
	elif dir:
		bufchar = dir; dir = None
Example #2
0
def clk_isr():
    global bufchar
    global dir

    blit.fill(pyvga.framebuffer, 320, 312, 0, 8, 8, (isr.ticker & 15) + 16)

    if py8042.more_squeaks():
        dx = dy = 0
        while py8042.more_squeaks():
            _, dx, dy = py8042.get_squeak()
        if dx > 10: dir = 'l'
        elif dy > 10: dir = 'k'
        elif dx < -10: dir = 'h'
        elif dy < -10: dir = 'j'
    elif dir:
        bufchar = dir
        dir = None
Example #3
0
def clk_work():
	while 1:
		global dir

		blit.fill(pyvga.framebuffer, 320, \
				312, 0, 8, 8, (isr.ticker & 15) + 16)
		pybeep.on(qerf[isr.ticker & 31])

		if py8042.more_squeaks():
			dx = dy = 0
			while py8042.more_squeaks():
				_,dx,dy = py8042.get_squeak()
			if   dx > 10:  dir = 'l'
			elif dy > 10:  dir = 'k'
			elif dx < -10: dir = 'h'
			elif dy < -10: dir = 'j'
			stack.swap(None, idl_task)
		elif dir:
			ch = dir; dir = None
			stack.swap(ch)
		else:
			stack.swap(None, idl_task)
Example #4
0
def clk_isr():
	tb[158] = '/-\|'[isr.ticker & 3]
	while py8042.more_squeaks():
		print "mouse: %x %d %d" % py8042.get_squeak()
		global squeaks
		squeaks = squeaks + 1
Example #5
0
def clk_isr():
    tb[158] = '/-\|'[isr.ticker & 3]
    while py8042.more_squeaks():
        print "mouse: %x %d %d" % py8042.get_squeak()
        global squeaks
        squeaks = squeaks + 1