Updating Kaypro1 code to use newer APIs
This commit is contained in:
parent
94390571c4
commit
fff3212a10
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2011 by Jacob Alexander
|
/* Copyright (C) 2011-2013 by Jacob Alexander
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@ -255,22 +255,55 @@ ISR(USART1_RX_vect)
|
|||||||
case 0xC3: // Keypad Enter
|
case 0xC3: // Keypad Enter
|
||||||
print("\n");
|
print("\n");
|
||||||
info_print("BEEEEP! - Clicker on");
|
info_print("BEEEEP! - Clicker on");
|
||||||
UDR1 = cmd_clickON;
|
scan_sendData( cmd_clickON );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0xB2: // Keypad Decimal
|
case 0xB2: // Keypad Decimal
|
||||||
print("\n");
|
print("\n");
|
||||||
info_print("BEEP! - Clicker off");
|
info_print("BEEP! - Clicker off");
|
||||||
UDR1 = cmd_clickOFF;
|
scan_sendData( cmd_clickOFF );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x0A: // Line Feed
|
case 0x0A: // Line Feed
|
||||||
print("\n");
|
print("\n");
|
||||||
info_print("ACK!!");
|
info_print("ACK!!");
|
||||||
UDR1 = cmd_ACK_AA;
|
scan_sendData( cmd_ACK_AA );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
sei(); // Re-enable Interrupts
|
sei(); // Re-enable Interrupts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Send data
|
||||||
|
uint8_t scan_sendData( uint8_t dataPayload )
|
||||||
|
{
|
||||||
|
UDR1 = dataPayload;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Signal KeyIndex_Buffer that it has been properly read
|
||||||
|
void scan_finishedWithBuffer( void )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// Signal that the keys have been properly sent over USB
|
||||||
|
void scan_finishedWithUSBBuffer( void )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reset/Hold keyboard
|
||||||
|
// NOTE: Does nothing with the BETKB
|
||||||
|
void scan_lockKeyboard( void )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// NOTE: Does nothing with the BETKB
|
||||||
|
void scan_unlockKeyboard( void )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reset Keyboard
|
||||||
|
void scan_resetKeyboard( void )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2011 by Jacob Alexander
|
/* Copyright (C) 2011-2013 by Jacob Alexander
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@ -42,13 +42,26 @@
|
|||||||
|
|
||||||
extern volatile uint8_t KeyIndex_Buffer[KEYBOARD_BUFFER];
|
extern volatile uint8_t KeyIndex_Buffer[KEYBOARD_BUFFER];
|
||||||
extern volatile uint8_t KeyIndex_BufferUsed;
|
extern volatile uint8_t KeyIndex_BufferUsed;
|
||||||
|
extern volatile uint8_t KeyIndex_Add_InputSignal;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ----- Functions -----
|
// ----- Functions -----
|
||||||
|
|
||||||
|
// Functions used by main.c
|
||||||
void scan_setup( void );
|
void scan_setup( void );
|
||||||
uint8_t scan_loop( void );
|
uint8_t scan_loop( void );
|
||||||
|
|
||||||
|
|
||||||
|
// Functions available to macro.c
|
||||||
|
uint8_t scan_sendData( uint8_t dataPayload );
|
||||||
|
|
||||||
|
void scan_finishedWithBuffer( void );
|
||||||
|
void scan_finishedWithUSBBuffer( void );
|
||||||
|
void scan_lockKeyboard( void );
|
||||||
|
void scan_unlockKeyboard( void );
|
||||||
|
void scan_resetKeyboard( void );
|
||||||
|
|
||||||
|
|
||||||
#endif // __SCAN_LOOP_H
|
#endif // __SCAN_LOOP_H
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user