Skip to content

Commit 3ce4ea0

Browse files
committed
Fixes for initial HID-IO driver merge
- A few test bugs
1 parent 2b0df58 commit 3ce4ea0

2 files changed

Lines changed: 39 additions & 0 deletions

File tree

Debug/cli/cli.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
// ----- Includes -----
2323

2424
// Project Includes
25+
#include <Lib/mcu_compat.h>
2526
#include <Lib/chip_version.h>
2627
#include <Lib/entropy.h>
2728
#include <Lib/periodic.h>

Output/usbMuxUart/output_com.c

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#include <arm/usb_dev.h>
4141
#include <arm/usb_keyboard.h>
4242
#include <arm/usb_serial.h>
43+
#include "arm/usb_rawio.h"
4344
#include "arm/usb_mouse.h"
4445
#endif
4546

@@ -847,6 +848,43 @@ inline void Output_softReset()
847848
}
848849

849850

851+
// USB RawIO buffer available
852+
unsigned int Output_rawio_availablechar()
853+
{
854+
#if enableRawIO_define == 1
855+
return usb_rawio_available();
856+
#else
857+
return 0;
858+
#endif
859+
}
860+
861+
862+
// USB RawIO get buffer
863+
// XXX Must be a 64 byte buffer
864+
int Output_rawio_getbuffer( char* buffer )
865+
{
866+
#if enableRawIO_define == 1
867+
// No timeout, fail immediately
868+
return usb_rawio_rx( (void*)buffer, 0 );
869+
#else
870+
return 0;
871+
#endif
872+
}
873+
874+
875+
// USB RawIO send buffer
876+
// XXX Must be a 64 byte buffer
877+
int Output_rawio_sendbuffer( char* buffer )
878+
{
879+
#if enableRawIO_define == 1
880+
// No timeout, fail immediately
881+
return usb_rawio_tx( (void*)buffer, 0 );
882+
#else
883+
return 0;
884+
#endif
885+
}
886+
887+
850888
// Update USB current (mA)
851889
// Triggers power change event
852890
void Output_update_usb_current( unsigned int current )

0 commit comments

Comments
 (0)