Initial code for ARM UART output module (mainly for CLI)
This commit is contained in:
parent
99d4aaba84
commit
6f563bdc9f
8 changed files with 619 additions and 23 deletions
|
@ -105,6 +105,10 @@ inline void Output_setup()
|
|||
// If the Teensy is powered without a PC connected to the USB port,
|
||||
// this will wait forever.
|
||||
usb_init();
|
||||
#include <led.h>
|
||||
init_errorLED();
|
||||
errorLED( 1 );
|
||||
while(1);
|
||||
while ( !usb_configured() ) /* wait */ ;
|
||||
|
||||
// Register USB Output CLI dictionary
|
||||
|
@ -119,19 +123,19 @@ inline void Output_setup()
|
|||
// USB Data Send
|
||||
inline void Output_send(void)
|
||||
{
|
||||
// TODO undo potentially old keys
|
||||
for ( uint8_t c = USBKeys_Sent; c < USBKeys_MaxSize; c++ )
|
||||
USBKeys_Array[c] = 0;
|
||||
// TODO undo potentially old keys
|
||||
for ( uint8_t c = USBKeys_Sent; c < USBKeys_MaxSize; c++ )
|
||||
USBKeys_Array[c] = 0;
|
||||
|
||||
// Send keypresses
|
||||
usb_keyboard_send();
|
||||
// Send keypresses
|
||||
usb_keyboard_send();
|
||||
|
||||
// Clear modifiers and keys
|
||||
USBKeys_Modifiers = 0;
|
||||
USBKeys_Sent = 0;
|
||||
// Clear modifiers and keys
|
||||
USBKeys_Modifiers = 0;
|
||||
USBKeys_Sent = 0;
|
||||
|
||||
// Signal Scan Module we are finishedA
|
||||
Scan_finishedWithUSBBuffer( USBKeys_Sent <= USBKeys_MaxSize ? USBKeys_Sent : USBKeys_MaxSize );
|
||||
// Signal Scan Module we are finishedA
|
||||
Scan_finishedWithUSBBuffer( USBKeys_Sent <= USBKeys_MaxSize ? USBKeys_Sent : USBKeys_MaxSize );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue