Skip to content

Commit

Permalink
Disabling software port switching on Gemini Dusk/Dawn
Browse files Browse the repository at this point in the history
- Will be done in hardware on the shipping keyboard
  • Loading branch information
haata committed Sep 24, 2019
1 parent 134797e commit de3a77c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Bootloader/Devices/Gemini_Dusk_Dawn.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@ void Device_setup()

// PA12 - USB Swap
// Start, disabled
/* XXX (HaaTa) This function is disabled in hardware on the shipping hardware
GPIO_Ctrl( usb_swap_pin, GPIO_Type_DriveSetup, GPIO_Config_None );
GPIO_Ctrl( usb_swap_pin, GPIO_Type_DriveLow, GPIO_Config_None );
*/

// Setup parameters for USB port swap
last_ms = 0;
Expand Down Expand Up @@ -125,6 +127,7 @@ void Device_process()
// For keyboards with dual usb ports, doesn't do anything on keyboards without them
// If a USB connection is not detected in 2 seconds, switch to the other port to see if it's plugged in there
// USB not initialized, attempt to swap
/* XXX (HaaTa) This function is disabled in hardware on the shipping hardware
uint32_t wait_ms = systick_millis_count - last_ms;
if ( wait_ms > USBPortSwapDelay_ms + attempt / 2 * USBPortSwapDelay_ms )
{
Expand All @@ -146,5 +149,6 @@ void Device_process()
attempt++;
}
}
*/
}

4 changes: 4 additions & 0 deletions Scan/Gemini_Dusk_Dawn/scan_loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@
inline void Scan_setup()
{
// Setup Port Swap module
/* XXX (HaaTa) Disabled in the shipping hardware
Port_setup();
*/

// Setup GPIO pins for matrix scanning
Matrix_setup();
Expand All @@ -72,7 +74,9 @@ inline void Scan_setup()
void Scan_poll()
{
// Port Swap detection
/* XXX (HaaTa) Disabled in the shipping hardware
Port_scan();
*/

// Prepare any LED events
Pixel_process();
Expand Down

0 comments on commit de3a77c

Please sign in to comment.