Skip to content

Commit

Permalink
rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
onlykey committed Sep 20, 2018
1 parent 1bc7a56 commit a9787cd
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 17 deletions.
8 changes: 6 additions & 2 deletions OnlyKey_Beta/OnlyKey_Beta.ino
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
*/


#define DEBUG //Enable Serial Monitor
//#define DEBUG //Enable Serial Monitor
#define US_VERSION //Define for US Version Firmware
#define OK_Color //Color Version

Expand Down Expand Up @@ -665,6 +665,10 @@ void payload(int duration) {
}
Keyboard.begin();
*keybuffer = '\0';
#ifdef DEBUG
Serial.print("Button selected");
Serial.println(button_selected-'0');
#endif
if (CRYPTO_AUTH == 1 && button_selected==Challenge_button1 && isfade) {
if (profile2mode==NOENCRYPT) return;
#ifdef US_VERSION
Expand All @@ -682,7 +686,7 @@ void payload(int duration) {
#endif
CRYPTO_AUTH++;
return;
} else if (CRYPTO_AUTH == 3 && (button_selected==Challenge_button3 || sshchallengemode==1 || pgpchallengemode==1) && isfade) {
} else if ((CRYPTO_AUTH == 3 && button_selected==Challenge_button3 && isfade) || (sshchallengemode==1 && isfade) || (pgpchallengemode==1 && isfade)) {
if (profile2mode==NOENCRYPT) return;
#ifdef US_VERSION
#ifdef DEBUG
Expand Down
49 changes: 34 additions & 15 deletions usb_desc.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@
* SOFTWARE.
*/


#ifndef _usb_desc_h_
#define _usb_desc_h_

Expand Down Expand Up @@ -305,20 +304,17 @@ let me know? http://forum.pjrc.com/forums/4-Suggestions-amp-Bug-Reports
#define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_ONLY



#elif defined(USB_RAWHID)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0486
// #define VENDOR_ID 0x05ac
// #define PRODUCT_ID 0x0250
// #define RAWHID_USAGE_PAGE 0xFFAB // recommended: 0xFF00 to 0xFFFF
// #define RAWHID_USAGE 0x0200 // recommended: 0x0100 to 0xFFFF
#elif defined(USB_RAWHID)
#define VENDOR_ID 0x1d50
#define PRODUCT_ID 0x60fc
#define RAWHID_USAGE_PAGE 0xf1d0 // Changed for FIDO support
#define RAWHID_USAGE 0x01 // Changed for FIDO support
#define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
#define MANUFACTURER_NAME {'C','R','Y','P','T','O','T','R','U','S','T'}
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME {'K','e','y','b','o','a','r','d','/','R','a','w','H','I','D'}
#define PRODUCT_NAME_LEN 15
#define PRODUCT_NAME {'O','N','L','Y','K','E','Y'}
#define PRODUCT_NAME_LEN 7
#define EP0_SIZE 64
#define NUM_ENDPOINTS 5
#define NUM_USB_BUFFERS 30
Expand All @@ -341,16 +337,39 @@ let me know? http://forum.pjrc.com/forums/4-Suggestions-amp-Bug-Reports
#define KEYBOARD_ENDPOINT 5
#define KEYBOARD_SIZE 8
#define KEYBOARD_INTERVAL 1
//#define RAWHID_DESC_OFFSET (9 + 9)
//#define SEREMU_DESC_OFFSET (9 + 9+9+7+7 + 9)
//#define KEYBOARD_DESC_OFFSET (9 + 9+9+7+7 + 9+9+7+7 + 9)
//#define CONFIG_DESC_SIZE (9 + 9+9+7+7 + 9+9+7+7 + 9+9+7)
#define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
#define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_ONLY
#define ENDPOINT5_CONFIG ENDPOINT_TRANSIMIT_ONLY

//#define VENDOR_ID 0x1d50
//#define PRODUCT_ID 0x60fc
//#define RAWHID_USAGE_PAGE 0xf1d0 // Changed for FIDO support
//#define RAWHID_USAGE 0x01 // Changed for FIDO support
//#define MANUFACTURER_NAME {'C','R','Y','P','T','O','T','R','U','S','T'}
//#define MANUFACTURER_NAME_LEN 11
//#define PRODUCT_NAME {'O','N','L','Y','K','E','Y'}
//#define PRODUCT_NAME_LEN 7
//#define EP0_SIZE 64
//#define NUM_ENDPOINTS 3
//#define NUM_USB_BUFFERS 30
//#define NUM_INTERFACE 2
//#define RAWHID_INTERFACE 0 // RawHID
//#define RAWHID_TX_ENDPOINT 1
//#define RAWHID_TX_SIZE 64
//#define RAWHID_TX_INTERVAL 1
//#define RAWHID_RX_ENDPOINT 2
//#define RAWHID_RX_SIZE 64
//#define RAWHID_RX_INTERVAL 1
//#define KEYBOARD_INTERFACE 1 // Keyboard
//#define KEYBOARD_ENDPOINT 3
//#define KEYBOARD_SIZE 8
//#define KEYBOARD_INTERVAL 1
//#define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
//#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
//#define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY


#elif defined(USB_FLIGHTSIM)
#define VENDOR_ID 0x16C0
Expand Down

0 comments on commit a9787cd

Please sign in to comment.