Adding automatic port swapping to ICPad

- Works the same as the bootloader variant, waits 1000 ms before attempting to swap
  Only swaps if USB not already intialized
  If USB never initializes, will swap forever

TODO
- Stop swapping if UARTConnect detected and initialized
This commit is contained in:
Jacob Alexander 2015-12-12 15:16:57 -08:00
parent 571c7ad35a
commit 415a0aab52
5 changed files with 274 additions and 0 deletions

30
Scan/PortSwap/port_scan.h Normal file
View file

@ -0,0 +1,30 @@
/* Copyright (C) 2015 by Jacob Alexander
*
* This file is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this file. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
// ----- Includes -----
// Compiler Includes
#include <stdint.h>
// ----- Functions -----
void Port_setup();
uint8_t Port_scan();