Exemple #1
0
void ikbd_reset(void)
{
	static const char cmd[2] = { 0x80, 0x01 };

	ikbd_write(cmd, 2);

}
Exemple #2
0
void ikbd_mem_read(int address, char data[6])
{
	char cmd[3] = { 0x21, address>>8, address&0xFF };

	ikbd_write(cmd, 3);

	
}
Exemple #3
0
/* Memory read */
void ikbd_mem_read(int address, char data[6])
{
    char cmd[3] = { 0x21, address>>8, address&0xFF };

    ikbd_write(cmd, 3);

    /* receive data and put it in data */
}
Exemple #4
0
/* Interrogate mouse position */
void ikbd_mouse_pos_get(int *x, int *y)
{
    static const char cmd[1] = { 0x0D };

    ikbd_write(cmd, 1);

    /* wait for returning bytes */
}
Exemple #5
0
/* Set joystick monitoring */
void ikbd_joystick_monitor(int rate)
{
    static const char cmd[2] = { 0x17, rate };

    ikbd_write(cmd, 2);

    kb_state.state = JOYSTICK_MONITOR;
}
Exemple #6
0
void ikbd_mouse_pos_get(int *x, int *y)
{
	static const char cmd[1] = { 0x0D };

	ikbd_write(cmd, 1);

	
}
Exemple #7
0
/* Reset (without touching the clock) */
void ikbd_reset(void)
{
    static const char cmd[2] = { 0x80, 0x01 };
    
    ikbd_write(cmd, 2);

    /* if all's well code 0xF1 is returned, else the break codes of
       all keys making contact */
}
Exemple #8
0
/* Disable joysticks */
void ikbd_joystick_disable(void)
{
    static const char cmd[1] = { 0x1A };

    ikbd_write(cmd, 1);
}
Exemple #9
0
/* Time-of-day clock set */
void ikbd_clock_set(int year, int month, int day, int hour, int minute, int second)
{
    char cmd[7] = { 0x1B, year, month, day, hour, minute, second };

    ikbd_write(cmd, 7);
}
Exemple #10
0
/* Joystick interrogation */
void ikbd_joystick_get_state(void)
{
    static const char cmd[1] = { 0x16 };

    ikbd_write(cmd, 1);
}
Exemple #11
0
/* Set relative mouse position reporting */
void ikbd_mouse_rel_pos(void)
{
    static const char cmd[1] = { 0x08 };

    ikbd_write(cmd, 1);
}
Exemple #12
0
/* Pause output */
void ikbd_pause(void)
{
    static const char cmd[1] = { 0x13 };

    ikbd_write(cmd, 1);
}
Exemple #13
0
/* Set joystick interrogation mode */
void ikbd_joystick_event_off(void)
{
    static const char cmd[1] = { 0x15 };

    ikbd_write(cmd, 1);
}
Exemple #14
0
/* Resume */
void ikbd_resume(void)
{
    static const char cmd[1] = { 0x11 };

    ikbd_write(cmd, 1);
}
Exemple #15
0
/* Set mouse threshold */
void ikbd_mouse_thresh(int x, int y)
{
    char cmd[3] = { 0x0B, x, y };

    ikbd_write(cmd, 3);
}
Exemple #16
0
/* Controller execute */
void ikbd_exec(int address)
{
    char cmd[3] = { 0x22, address>>8, address&0xFF };

    ikbd_write(cmd, 3);
}
Exemple #17
0
/* Set mouse button action */
void ikbd_mouse_button_action(int mode)
{
    char cmd[2] = { 0x07, mode };

    ikbd_write(cmd, 2);
}
Exemple #18
0
/* Load mouse position */
void ikbd_mouse_pos_set(int x, int y)
{
    char cmd[6] = { 0x0E, 0x00, x>>8, x&0xFF, y>>8, y&0xFF };

    ikbd_write(cmd, 6);
}
Exemple #19
0
/* Set absolute mouse position reporting */
void ikbd_mouse_abs_pos(int xmax, int ymax)
{
    char cmd[5] = { 0x09, xmax>>8, xmax&0xFF, ymax>>8, ymax&0xFF };

    ikbd_write(cmd, 5);
}
Exemple #20
0
/* Set mouse scale */
void ikbd_mouse_scale(int x, int y)
{
    char cmd[3] = { 0x0C, x, y };

    ikbd_write(cmd, 3);
}
Exemple #21
0
/* Interrogate time-of-day clock */
void ikbd_clock_get(int *year, int *month, int *day, int *hour, int *minute, int second)
{
    static const char cmd[1] = { 0x1C };

    ikbd_write(cmd, 1);
}
Exemple #22
0
/* Disable mouse */
void ikbd_mouse_disable(void)
{
    static const char cmd[1] = { 0x12 };

    ikbd_write(cmd, 1);
}
Exemple #23
0
/* Set Y=0 at bottom */
void ikbd_mouse_y0_bot(void)
{
    static const char cmd[1] = { 0x0F };

    ikbd_write(cmd, 1);
}
Exemple #24
0
/* Set mouse keycode mode */
void ikbd_mouse_kbd_mode(int dx, int dy)
{
    char cmd[3] = { 0x0A, dx, dy };

    ikbd_write(cmd, 3);
}
Exemple #25
0
/* Set the state of the caps lock led. */
void atari_kbd_leds (unsigned int leds)
{
    char cmd[6] = {32, 0, 4, 1, 254 + ((leds & 4) != 0), 0};
    ikbd_write(cmd, 6);
}
Exemple #26
0
/* Set Y=0 at top */
void ikbd_mouse_y0_top(void)
{
    static const char cmd[1] = { 0x10 };

    ikbd_write(cmd, 1);
}