ruputer

onHand

Home PcOnHand

OnHand Pc Details

HandySurf

Software

Jukebox

Store

Developer

About

Developers

onHand Manual: wbios (C bindings)

Button input (key input)

  • int bi_getbtn(void)
    Reads a button from the button data buffer encoded in a word (b7...Down/Right/Up/Left/Enter/El/Menu/Filer...b0; b15: Event)
  • int bi_sensbtn(int *code)
    If true, returns into code the next word waiting in the button data buffer
  • int bi_scanbtn(void)
    Read the button I/O ports and return actual status of the buttons encoded as in bi_getbtn() but b15:Event always 0
  • void bi_clrbtn()
    Clears the button data buffer, discarding any ramaining keys
  • void bi_chatpsbtn(int clk)
    Sets the clock to (clk*16)Hz (default: clk=1) to prevent misunderstanding of Filer/Menu/EL/Enter buttons because of chattering
  • void bi_chatjkbtn(int clk)
    Sets the clock to (clk*16)Hz (default: clk=1) to prevent misunderstanding of cursor buttons because of chattering

 

Disk control

 

RS-232c (full duplex) and IR (half duplex) using XMODEM protocol

 

RTC

 

Timer

 

Sound

 

System control


Name
int bi_getbtn(void)

Synopsis

#include <wbios.h>

int bi_getbtn(void);
Description
Returns the button status and other misc info from the button data buffer encoded in bits inside a word.
If no button presses or events waits in the button input buffer the function waits until button input before returning.
The meaning of each bit follows:
  • b0: K0 Filer/time button
  • b1: K1 Menu button
  • b2: K2 EL button
  • b3: K3 ENTER button
  • b4: K4 Cursor left
  • b5: K5 Cursor up
  • b6: K6 Cursor right
  • b7: K7 Cursor down
  • b8: TEST (not used)
  • b9: Cell dismounted
  • b10: RS-232 connected but idle
  • b11: RS-232 connected
  • b12: CPU multiplier (1=3.6Mhz, 0=1.8Mhz)
  • b13: Reserved (always 0)
  • b14: Reserved (always 0)
  • b15: Event number at address 0xf080
If it is an event, b0..b7 are used to store the event number (which is in the range 0-255).

Return values
Returns a word indicating the button status (see description).

Examples
(none)


Written with the information provided in the onHand manuals. Copyleft by dario@softhome.net
This text is distributed under the GNU FDL. Last updated (dd/mm/yyyy): 21/10/2001