-
-
Notifications
You must be signed in to change notification settings - Fork 522
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[macOS] Add support for LUFA-HID/QMK-HID (#347)
- Loading branch information
Showing
7 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#import "BootloaderDevice.h" | ||
|
||
@interface LUFAHIDDevice : BootloaderDevice | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#import "LUFAHIDDevice.h" | ||
|
||
@implementation LUFAHIDDevice | ||
|
||
- (id)initWithUSBDevice:(USBDevice *)usbDevice { | ||
if (self = [super initWithUSBDevice:usbDevice]) { | ||
if ([self revisionBCD] == 0x0936) { | ||
self.name = @"QMK HID"; | ||
self.type = BootloaderTypeQMKHID; | ||
} else { | ||
self.name = @"LUFA HID"; | ||
self.type = BootloaderTypeLUFAHID; | ||
} | ||
} | ||
return self; | ||
} | ||
|
||
-(void)flashWithMCU:(NSString *)mcu file:(NSString *)file { | ||
[self runProcess:@"hid_bootloader_cli" withArgs:@[[NSString stringWithFormat:@"-mmcu=%@", mcu], file, @"-v"]]; | ||
} | ||
|
||
// hid_bootloader_cli 210130 lacks -b flag | ||
// Next LUFA release should have it thanks to abcminiuser/lufa#173 | ||
//-(void)resetWithMCU:(NSString *)mcu { | ||
// [self runProcess:@"hid_bootloader_cli" withArgs:@[[NSString stringWithFormat:@"-mmcu=%@", mcu], @"-bv"]]; | ||
//} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters