Browse Source

Code cleanup

- Changing header file ifndef define to pragma once's
- Removed duplicate output_com.h's
bringup
Jacob Alexander 9 years ago
parent
commit
5f262ea4b6
75 changed files with 158 additions and 650 deletions
  1. 2
    5
      Bootloader/_buildvars.h
  2. 1
    4
      Bootloader/debug.h
  3. 2
    5
      Bootloader/dfu.desc.h
  4. 1
    3
      Bootloader/dfu.h
  5. 1
    5
      Bootloader/flash.h
  6. 2
    5
      Bootloader/ftfl.h
  7. 2
    5
      Bootloader/mchck-cdefs.h
  8. 2
    5
      Bootloader/mchck.h
  9. 2
    5
      Bootloader/sim.h
  10. 2
    5
      Bootloader/usb-common.h
  11. 2
    5
      Bootloader/usb-internal.h
  12. 2
    5
      Bootloader/usb.h
  13. 3
    1
      Bootloader/usbotg.h
  14. 1
    5
      Debug/cli/cli.h
  15. 5
    8
      Debug/led/led.h
  16. 2
    5
      Debug/print/print.h
  17. 2
    6
      Lib/Interrupts.h
  18. 2
    7
      Lib/MacroLib.h
  19. 2
    7
      Lib/MainLib.h
  20. 2
    7
      Lib/OutputLib.h
  21. 2
    7
      Lib/ScanLib.h
  22. 1
    4
      Lib/_buildvars.h
  23. 2
    5
      Lib/delay.h
  24. 1
    4
      Lib/mk20dx.h
  25. 2
    7
      Macro/PartialMap/kll.h
  26. 2
    5
      Macro/PartialMap/macro.h
  27. 1
    6
      Macro/PartialMap/usb_hid.h
  28. 5
    8
      Macro/basic/macro.h
  29. 5
    8
      Macro/buffer/macro.h
  30. 2
    6
      Output/pjrcUSB/arm/usb_desc.h
  31. 2
    7
      Output/pjrcUSB/arm/usb_dev.h
  32. 2
    7
      Output/pjrcUSB/arm/usb_keyboard.h
  33. 2
    7
      Output/pjrcUSB/arm/usb_mem.h
  34. 2
    7
      Output/pjrcUSB/arm/usb_serial.h
  35. 2
    7
      Output/pjrcUSB/avr/usb_keyboard_serial.h
  36. 1
    4
      Output/pjrcUSB/output_com.h
  37. 2
    5
      Output/uartOut/arm/uart_serial.h
  38. 0
    105
      Output/uartOut/output_com.h
  39. 10
    0
      Output/uartOut/setup.cmake
  40. 0
    119
      Output/usbMuxUart/output_com.h
  41. 2
    6
      Scan/ADCTest/defaultMap.h
  42. 2
    5
      Scan/ADCTest/scan_loop.h
  43. 2
    6
      Scan/BETKB/scan_loop.h
  44. 2
    7
      Scan/BudKeypad/matrix.h
  45. 2
    6
      Scan/DPH/scan_loop.h
  46. 2
    6
      Scan/EpsonQX-10/scan_loop.h
  47. 2
    6
      Scan/FACOM6684/scan_loop.h
  48. 2
    6
      Scan/HP150/scan_loop.h
  49. 2
    7
      Scan/HeathZenith/matrix.h
  50. 2
    7
      Scan/IBMConvertible/matrix.h
  51. 9
    7
      Scan/ISSILed/led_scan.c
  52. 1
    5
      Scan/ISSILed/led_scan.h
  53. 2
    6
      Scan/Kaypro1/scan_loop.h
  54. 2
    5
      Scan/MBC-55X/defaultMap.h
  55. 2
    6
      Scan/MBC-55X/scan_loop.h
  56. 2
    6
      Scan/MD1/matrix.h
  57. 2
    6
      Scan/MD1/scan_loop.h
  58. 2
    6
      Scan/MD2/matrix.h
  59. 2
    6
      Scan/MD2/scan_loop.h
  60. 1
    5
      Scan/MatrixARM/matrix_scan.h
  61. 2
    6
      Scan/MatrixARM/matrix_setup.h
  62. 2
    6
      Scan/MicroSwitch8304/scan_loop.h
  63. 2
    6
      Scan/SKM67001/customSKM.h
  64. 2
    6
      Scan/SKM67001/defaultMap.h
  65. 5
    10
      Scan/SKM67001/matrix.h
  66. 1
    5
      Scan/STLcd/lcd_scan.h
  67. 1
    7
      Scan/SonyNEWS/scan_loop.h
  68. 1
    7
      Scan/SonyOA-S3400/scan_loop.h
  69. 2
    6
      Scan/Tandy1000/scan_loop.h
  70. 1
    5
      Scan/UARTConnect/connect_scan.h
  71. 2
    6
      Scan/UnivacF3W9/scan_loop.h
  72. 2
    5
      Scan/matrix/matrix_scan.h
  73. 2
    7
      Scan/matrix/matrix_template.h
  74. 2
    6
      Scan/matrix/scan_loop.h
  75. 0
    11
      main.c

+ 2
- 5
Bootloader/_buildvars.h View File

/* Copyright (C) 2013-2014 by Jacob Alexander
/* Copyright (C) 2013-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __buildvars_h
#define __buildvars_h
#pragma once


// ----- Includes ----- // ----- Includes -----


#define VENDOR_ID @BOOT_VENDOR_ID@ #define VENDOR_ID @BOOT_VENDOR_ID@
#define PRODUCT_ID @BOOT_PRODUCT_ID@ #define PRODUCT_ID @BOOT_PRODUCT_ID@


#endif


+ 1
- 4
Bootloader/debug.h View File

* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef debug_h__
#define debug_h__
#pragma once


// ----- Includes ----- // ----- Includes -----


#define printHex_op(in,op) #define printHex_op(in,op)
#endif #endif


#endif


+ 2
- 5
Bootloader/dfu.desc.h View File

// Originally Generated from MCHCK Toolkit // Originally Generated from MCHCK Toolkit
/* Copyright (c) Jacob Alexander 2014 <[email protected]>
/* Copyright (c) Jacob Alexander 2014-2015 <[email protected]>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */


#ifndef __DFU_DESC_H
#define __DFU_DESC_H
#pragma once


// ----- Local Includes ----- // ----- Local Includes -----


struct dfu_function_desc usb_function_0; struct dfu_function_desc usb_function_0;
}; };


#endif


+ 1
- 3
Bootloader/dfu.h View File

* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */


#ifndef _USB_DFU_H
#define _USB_DFU_H
#pragma once


// ----- Compiler Includes ----- // ----- Compiler Includes -----


void dfu_init( dfu_setup_read_t setup_read, dfu_setup_write_t setup_write, dfu_finish_write_t finish_write, struct dfu_ctx *ctx ); void dfu_init( dfu_setup_read_t setup_read, dfu_setup_write_t setup_write, dfu_finish_write_t finish_write, struct dfu_ctx *ctx );
void dfu_app_init( dfu_detach_t detachcb ); void dfu_app_init( dfu_detach_t detachcb );


#endif

+ 1
- 5
Bootloader/flash.h View File

* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */


#ifndef __FLASH_H
#define __FLASH_H
#pragma once


// ----- Defines ----- // ----- Defines -----


int ftfl_submit_cmd(void); int ftfl_submit_cmd(void);
int flash_prepare_flashing(void); int flash_prepare_flashing(void);
int flash_erase_sector(uintptr_t); int flash_erase_sector(uintptr_t);
//int flash_program_section(uintptr_t, size_t);
int flash_program_sector(uintptr_t, size_t); int flash_program_sector(uintptr_t, size_t);
int flash_program_longword(uintptr_t, uint8_t*); int flash_program_longword(uintptr_t, uint8_t*);
void *flash_get_staging_area(uintptr_t, size_t); void *flash_get_staging_area(uintptr_t, size_t);


#endif


+ 2
- 5
Bootloader/ftfl.h View File

/* Copyright (c) 2011,2012 Simon Schubert <[email protected]>. /* Copyright (c) 2011,2012 Simon Schubert <[email protected]>.
* Modifications by Jacob Alexander 2014 <[email protected]>
* Modifications by Jacob Alexander 2014-2015 <[email protected]>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */


#ifndef __FTFL_H
#define __FTFL_H
#pragma once


// ----- Local Includes ----- // ----- Local Includes -----


extern char FlexRAM[]; extern char FlexRAM[];
extern struct FTFL_CONFIG_t FTFL_CONFIG; extern struct FTFL_CONFIG_t FTFL_CONFIG;


#endif


+ 2
- 5
Bootloader/mchck-cdefs.h View File

/* Copyright (c) 2011,2012 Simon Schubert <[email protected]>. /* Copyright (c) 2011,2012 Simon Schubert <[email protected]>.
* Modifications by Jacob Alexander 2014 <[email protected]>
* Modifications by Jacob Alexander 2014-2015 <[email protected]>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */


#ifndef _MCHCK_CDEFS_H
#define _MCHCK_CDEFS_H
#pragma once


// ----- Compiler Includes ----- // ----- Compiler Includes -----


) \ ) \
) )


#endif


+ 2
- 5
Bootloader/mchck.h View File

/* Copyright (c) 2011,2012 Simon Schubert <[email protected]>. /* Copyright (c) 2011,2012 Simon Schubert <[email protected]>.
* Modifications by Jacob Alexander 2014=2015 <[email protected]>
* Modifications by Jacob Alexander 2014-2015 <[email protected]>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */


#ifndef __MCHCK_H
#define __MCHCK_H
#pragma once


// ----- Compiler Includes ----- // ----- Compiler Includes -----


#include "flash.h" #include "flash.h"
#include "usb.h" #include "usb.h"


#endif


+ 2
- 5
Bootloader/sim.h View File

/* Copyright (c) 2011,2012 Simon Schubert <[email protected]>. /* Copyright (c) 2011,2012 Simon Schubert <[email protected]>.
* Modifications by Jacob Alexander 2014 <[email protected]>
* Modifications by Jacob Alexander 2014-2015 <[email protected]>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */


#ifndef __SIM_H
#define __SIM_H
#pragma once


// ----- Local Includes ----- // ----- Local Includes -----




extern volatile struct SIM_t SIM; extern volatile struct SIM_t SIM;


#endif


+ 2
- 5
Bootloader/usb-common.h View File

/* Copyright (c) 2011,2012 Simon Schubert <[email protected]>. /* Copyright (c) 2011,2012 Simon Schubert <[email protected]>.
* Modifications by Jacob Alexander 2014 <[email protected]>
* Modifications by Jacob Alexander 2014-2015 <[email protected]>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */


#ifndef _USB_COMMON_H
#define _USB_COMMON_H
#pragma once


// ----- Enumerations ----- // ----- Enumerations -----


EP0_BUFSIZE = 64 EP0_BUFSIZE = 64
}; };


#endif


+ 2
- 5
Bootloader/usb-internal.h View File

/* Copyright (c) 2011,2012 Simon Schubert <[email protected]>. /* Copyright (c) 2011,2012 Simon Schubert <[email protected]>.
* Modifications by Jacob Alexander 2014 <[email protected]>
* Modifications by Jacob Alexander 2014-2015 <[email protected]>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */


#ifndef __USB_INTERNAL_H
#define __USB_INTERNAL_H
#pragma once


/** /**
* Internal driver structures * Internal driver structures
void usb_enable(void); void usb_enable(void);
const struct usbd_config *usb_get_config_data(int config); const struct usbd_config *usb_get_config_data(int config);


#endif


+ 2
- 5
Bootloader/usb.h View File

/* Copyright (c) 2011,2012 Simon Schubert <[email protected]>. /* Copyright (c) 2011,2012 Simon Schubert <[email protected]>.
* Modifications by Jacob Alexander 2014 <[email protected]>
* Modifications by Jacob Alexander 2014-2015 <[email protected]>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */


#ifndef __USB_H
#define __USB_H
#pragma once


// ----- Compiler Includes ----- // ----- Compiler Includes -----




#include "dfu.h" #include "dfu.h"


#endif


+ 3
- 1
Bootloader/usbotg.h View File

/* Copyright (c) 2011,2012 Simon Schubert <[email protected]>. /* Copyright (c) 2011,2012 Simon Schubert <[email protected]>.
* Modifications by Jacob Alexander 2014 <[email protected]>
* Modifications by Jacob Alexander 2014-2015 <[email protected]>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */


#pragma once

// ----- Local Includes ----- // ----- Local Includes -----


#include "mchck.h" #include "mchck.h"

+ 1
- 5
Debug/cli/cli.h View File

* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef cli_h__
#define cli_h__
#pragma once


// ----- Includes ----- // ----- Includes -----


void cliFunc_restart ( char* args ); void cliFunc_restart ( char* args );
void cliFunc_version ( char* args ); void cliFunc_version ( char* args );



#endif


+ 5
- 8
Debug/led/led.h View File

/* Copyright (C) 2011-2013 by Jacob Alexander
*
/* Copyright (C) 2011-2013,2015 by Jacob Alexander
*
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights * in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is * copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions: * furnished to do so, subject to the following conditions:
*
*
* The above copyright notice and this permission notice shall be included in * The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software. * all copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __led_h
#define __led_h
#pragma once


// ----- Includes ----- // ----- Includes -----


void init_errorLED( void ); void init_errorLED( void );
void errorLED( uint8_t on ); void errorLED( uint8_t on );


#endif


+ 2
- 5
Debug/print/print.h View File

/* Copyright (C) 2011-2014 by Jacob Alexander
/* Copyright (C) 2011-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef print_h__
#define print_h__
#pragma once


// ----- Includes ----- // ----- Includes -----


int16_t eqStr ( char* str1, char* str2 ); // Returns -1 if identical, last character of str1 comparison (0 if str1 is like str2) int16_t eqStr ( char* str1, char* str2 ); // Returns -1 if identical, last character of str1 comparison (0 if str1 is like str2)
int numToInt ( char* in ); // Returns the int representation of a string int numToInt ( char* in ); // Returns the int representation of a string


#endif


+ 2
- 6
Lib/Interrupts.h View File

/* Copyright (C) 2013-2014 by Jacob Alexander
/* Copyright (C) 2013-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal


// ----- Includes ----- // ----- Includes -----


#ifndef __INTERRUPTS_H
#define __INTERRUPTS_H
#pragma once


// ARM // ARM
#if defined(_mk20dx128_) || defined(_mk20dx128vlf5_) || defined(_mk20dx256_) || defined(_mk20dx256vlh7_) #if defined(_mk20dx128_) || defined(_mk20dx128vlf5_) || defined(_mk20dx256_) || defined(_mk20dx256vlh7_)


#endif #endif



#endif


+ 2
- 7
Lib/MacroLib.h View File

/* Copyright (C) 2013-2014 by Jacob Alexander
/* Copyright (C) 2013-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
// This include file decides which set of compiler family include files to use on typical Macro modules. // This include file decides which set of compiler family include files to use on typical Macro modules.
// Additional includes should only be added to this file if they should be added to *all* Macro modules. // Additional includes should only be added to this file if they should be added to *all* Macro modules.



#ifndef __MACROLIB_H
#define __MACROLIB_H
#pragma once


// ----- Includes ----- // ----- Includes -----




#endif #endif



#endif


+ 2
- 7
Lib/MainLib.h View File

/* Copyright (C) 2013-2014 by Jacob Alexander
/* Copyright (C) 2013-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
// This include file decides which set of compiler family include files to use on typical Scan modules. // This include file decides which set of compiler family include files to use on typical Scan modules.
// Additional includes should only be added to this file if they should be added to *all* Scan modules. // Additional includes should only be added to this file if they should be added to *all* Scan modules.



#ifndef __MAINLIB_H
#define __MAINLIB_H
#pragma once


// ----- Includes ----- // ----- Includes -----




#endif #endif



#endif


+ 2
- 7
Lib/OutputLib.h View File

/* Copyright (C) 2013-2014 by Jacob Alexander
/* Copyright (C) 2013-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
// This include file decides which set of compiler family include files to use on typical Scan modules. // This include file decides which set of compiler family include files to use on typical Scan modules.
// Additional includes should only be added to this file if they should be added to *all* Scan modules. // Additional includes should only be added to this file if they should be added to *all* Scan modules.



#ifndef __OUTPUTLIB_H
#define __OUTPUTLIB_H
#pragma once


// ----- Includes ----- // ----- Includes -----




#endif #endif



#endif


+ 2
- 7
Lib/ScanLib.h View File

/* Copyright (C) 2013-2014 by Jacob Alexander
/* Copyright (C) 2013-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
// This include file decides which set of compiler family include files to use on typical Scan modules. // This include file decides which set of compiler family include files to use on typical Scan modules.
// Additional includes should only be added to this file if they should be added to *all* Scan modules. // Additional includes should only be added to this file if they should be added to *all* Scan modules.



#ifndef __SCANLIB_H
#define __SCANLIB_H
#pragma once


// ----- Includes ----- // ----- Includes -----




#endif #endif



#endif


+ 1
- 4
Lib/_buildvars.h View File

* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __buildvars_h
#define __buildvars_h
#pragma once


// ----- Includes ----- // ----- Includes -----


#define VENDOR_ID @VENDOR_ID@ #define VENDOR_ID @VENDOR_ID@
#define PRODUCT_ID @PRODUCT_ID@ #define PRODUCT_ID @PRODUCT_ID@


#endif


+ 2
- 5
Lib/delay.h View File

/* Teensyduino Core Library /* Teensyduino Core Library
* http://www.pjrc.com/teensy/ * http://www.pjrc.com/teensy/
* Copyright (c) 2013 PJRC.COM, LLC. * Copyright (c) 2013 PJRC.COM, LLC.
* Modifications by Jacob Alexander 2013-2014
* Modifications by Jacob Alexander 2013-2015
* *
* Permission is hereby granted, free of charge, to any person obtaining * Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the * a copy of this software and associated documentation files (the
* SOFTWARE. * SOFTWARE.
*/ */


#ifndef __DELAY_H
#define __DELAY_H
#pragma once


// ----- System Includes ----- // ----- System Includes -----




void delay(uint32_t ms); void delay(uint32_t ms);


#endif


+ 1
- 4
Lib/mk20dx.h View File

* SOFTWARE. * SOFTWARE.
*/ */


#ifndef _mk20dx_h_
#define _mk20dx_h_
#pragma once


// ----- Defines ----- // ----- Defines -----


extern void porte_isr(void); extern void porte_isr(void);
extern void software_isr(void); extern void software_isr(void);


#endif


+ 2
- 7
Macro/PartialMap/kll.h View File

/* Copyright (C) 2014 by Jacob Alexander
/* Copyright (C) 2014-2015 by Jacob Alexander
* *
* This file is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* along with this file. If not, see <http://www.gnu.org/licenses/>. * along with this file. If not, see <http://www.gnu.org/licenses/>.
*/ */


#ifndef __kll_h
#define __kll_h
#pragma once


// ----- Includes ----- // ----- Includes -----


// Total number of layers // Total number of layers
#define LayerNum sizeof( LayerIndex ) / sizeof( Layer ) #define LayerNum sizeof( LayerIndex ) / sizeof( Layer )




#endif // __kll_h


+ 2
- 5
Macro/PartialMap/macro.h View File

/* Copyright (C) 2014 by Jacob Alexander
/* Copyright (C) 2014-2015 by Jacob Alexander
* *
* This file is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* along with this file. If not, see <http://www.gnu.org/licenses/>. * along with this file. If not, see <http://www.gnu.org/licenses/>.
*/ */


#ifndef __macro_h
#define __macro_h
#pragma once


// ----- Includes ----- // ----- Includes -----


void Macro_process(); void Macro_process();
void Macro_setup(); void Macro_setup();


#endif


+ 1
- 6
Macro/PartialMap/usb_hid.h View File

* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __usb_hid_h
#define __usb_hid_h
#pragma once


// ----- Defines ----- // ----- Defines -----


#define AC_DISTRIBUTE_VERTICALLY 0x29C #define AC_DISTRIBUTE_VERTICALLY 0x29C
// 0x29D-0xFFFF Reserved // 0x29D-0xFFFF Reserved




#endif


+ 5
- 8
Macro/basic/macro.h View File

/* Copyright (C) 2011 by Jacob Alexander
*
/* Copyright (C) 2011,2015 by Jacob Alexander
*
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights * in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is * copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions: * furnished to do so, subject to the following conditions:
*
*
* The above copyright notice and this permission notice shall be included in * The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software. * all copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __macro_h
#define __macro_h
#pragma once


// ----- Includes ----- // ----- Includes -----


void keyPressDetection( uint8_t *keys, uint8_t numberOfKeys, uint8_t *modifiers, uint8_t numberOfModifiers, uint8_t *map ); void keyPressDetection( uint8_t *keys, uint8_t numberOfKeys, uint8_t *modifiers, uint8_t numberOfModifiers, uint8_t *map );
void process_macros(void); void process_macros(void);


#endif


+ 5
- 8
Macro/buffer/macro.h View File

/* Copyright (C) 2011 by Jacob Alexander
*
/* Copyright (C) 2011,2015 by Jacob Alexander
*
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights * in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is * copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions: * furnished to do so, subject to the following conditions:
*
*
* The above copyright notice and this permission notice shall be included in * The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software. * all copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __macro_h
#define __macro_h
#pragma once


// ----- Includes ----- // ----- Includes -----


void keyPressDetection( uint8_t *keys, uint8_t numberOfKeys, uint8_t *modifiers, uint8_t numberOfModifiers, uint8_t *map ); void keyPressDetection( uint8_t *keys, uint8_t numberOfKeys, uint8_t *modifiers, uint8_t numberOfModifiers, uint8_t *map );
void process_macros(void); void process_macros(void);


#endif


+ 2
- 6
Output/pjrcUSB/arm/usb_desc.h View File

/* Teensyduino Core Library /* Teensyduino Core Library
* http://www.pjrc.com/teensy/ * http://www.pjrc.com/teensy/
* Copyright (c) 2013 PJRC.COM, LLC. * Copyright (c) 2013 PJRC.COM, LLC.
* Modified by Jacob Alexander (2013-2014)
* Modified by Jacob Alexander (2013-2015)
* *
* Permission is hereby granted, free of charge, to any person obtaining * Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the * a copy of this software and associated documentation files (the
* SOFTWARE. * SOFTWARE.
*/ */


#ifndef _usb_desc_h_
#define _usb_desc_h_
#pragma once


// ----- Includes ----- // ----- Includes -----




extern const usb_descriptor_list_t usb_descriptor_list[]; extern const usb_descriptor_list_t usb_descriptor_list[];



#endif


+ 2
- 7
Output/pjrcUSB/arm/usb_dev.h View File

/* Teensyduino Core Library /* Teensyduino Core Library
* http://www.pjrc.com/teensy/ * http://www.pjrc.com/teensy/
* Copyright (c) 2013 PJRC.COM, LLC. * Copyright (c) 2013 PJRC.COM, LLC.
* Modifications by Jacob Alexander 2014
* Modifications by Jacob Alexander 2014-2015
* *
* Permission is hereby granted, free of charge, to any person obtaining * Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the * a copy of this software and associated documentation files (the
* SOFTWARE. * SOFTWARE.
*/ */


#ifndef _usb_dev_h_
#define _usb_dev_h_
#pragma once


// ----- Includes ----- // ----- Includes -----




extern void usb_serial_flush_callback(); extern void usb_serial_flush_callback();




#endif


+ 2
- 7
Output/pjrcUSB/arm/usb_keyboard.h View File

/* Teensyduino Core Library /* Teensyduino Core Library
* http://www.pjrc.com/teensy/ * http://www.pjrc.com/teensy/
* Copyright (c) 2013 PJRC.COM, LLC. * Copyright (c) 2013 PJRC.COM, LLC.
* Modifications by Jacob Alexander 2013-2014
* Modifications by Jacob Alexander 2013-2015
* *
* Permission is hereby granted, free of charge, to any person obtaining * Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the * a copy of this software and associated documentation files (the
* SOFTWARE. * SOFTWARE.
*/ */


#ifndef USBkeyboard_h_
#define USBkeyboard_h_
#pragma once


// ----- Includes ----- // ----- Includes -----




void usb_keyboard_send(); void usb_keyboard_send();




#endif // USBkeyboard_h_


+ 2
- 7
Output/pjrcUSB/arm/usb_mem.h View File

/* Teensyduino Core Library /* Teensyduino Core Library
* http://www.pjrc.com/teensy/ * http://www.pjrc.com/teensy/
* Copyright (c) 2013 PJRC.COM, LLC. * Copyright (c) 2013 PJRC.COM, LLC.
* Modifications by Jacob Alexander (2013-2014)
* Modifications by Jacob Alexander (2013-2015)
* *
* Permission is hereby granted, free of charge, to any person obtaining * Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the * a copy of this software and associated documentation files (the
* SOFTWARE. * SOFTWARE.
*/ */


#ifndef _usb_mem_h_
#define _usb_mem_h_
#pragma once


// ----- Includes ----- // ----- Includes -----


usb_packet_t *usb_malloc(); usb_packet_t *usb_malloc();
void usb_free( usb_packet_t *p ); void usb_free( usb_packet_t *p );




#endif


+ 2
- 7
Output/pjrcUSB/arm/usb_serial.h View File

/* Teensyduino Core Library /* Teensyduino Core Library
* http://www.pjrc.com/teensy/ * http://www.pjrc.com/teensy/
* Copyright (c) 2013 PJRC.COM, LLC. * Copyright (c) 2013 PJRC.COM, LLC.
* Modifications by Jacob Alexander (2013-2014)
* Modifications by Jacob Alexander (2013-2015)
* *
* Permission is hereby granted, free of charge, to any person obtaining * Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the * a copy of this software and associated documentation files (the
* SOFTWARE. * SOFTWARE.
*/ */


#ifndef USBserial_h_
#define USBserial_h_
#pragma once


// ----- Includes ----- // ----- Includes -----


void usb_serial_flush_input(); void usb_serial_flush_input();
void usb_serial_flush_output(); void usb_serial_flush_output();




#endif // USBserial_h_


+ 2
- 7
Output/pjrcUSB/avr/usb_keyboard_serial.h View File

/* USB Keyboard and CDC Serial Device for Teensy USB Development Board /* USB Keyboard and CDC Serial Device for Teensy USB Development Board
* Copyright (c) 2009 PJRC.COM, LLC * Copyright (c) 2009 PJRC.COM, LLC
* Modifications by Jacob Alexander (2011-2014)
* Modifications by Jacob Alexander (2011-2015)
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef usb_keyboard_serial_h__
#define usb_keyboard_serial_h__
#pragma once


// ----- Includes ----- // ----- Includes -----


}; };
#define NUM_DESC_LIST (sizeof(descriptor_list)/sizeof(struct descriptor_list_struct)) #define NUM_DESC_LIST (sizeof(descriptor_list)/sizeof(struct descriptor_list_struct))




#endif // usb_keyboard_serial_h__


+ 1
- 4
Output/pjrcUSB/output_com.h View File

* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __output_com_h
#define __output_com_h
#pragma once


// ----- Includes ----- // ----- Includes -----


int Output_putchar( char c ); int Output_putchar( char c );
int Output_putstr( char* str ); int Output_putstr( char* str );


#endif


+ 2
- 5
Output/uartOut/arm/uart_serial.h View File

/* Copyright (C) 2014 by Jacob Alexander
/* Copyright (C) 2014-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __uart_serial_h_
#define __uart_serial_h_
#pragma once


#include <inttypes.h> #include <inttypes.h>




void uart_device_reload(); void uart_device_reload();


#endif // __uart_serial_h_


+ 0
- 105
Output/uartOut/output_com.h View File

/* Copyright (C) 2013-2015 by Jacob Alexander
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

#ifndef __output_com_h
#define __output_com_h

// ----- Includes -----

// Compiler Includes
#include <stdint.h>

// Local Includes
#include <buildvars.h> // Defines USB Parameters, partially generated by CMake



// ----- Defines -----

// Max size of key buffer needed for NKRO
// Boot mode uses only the first 6 bytes
#define USB_NKRO_BITFIELD_SIZE_KEYS 26
#define USB_BOOT_MAX_KEYS 6



// ----- Enumerations -----

// USB NKRO state transitions (indicates which Report ID's need refreshing)
// Boot mode just checks if any keys were changed (as everything is sent every time)
typedef enum USBKeyChangeState {
USBKeyChangeState_None = 0x00,
USBKeyChangeState_Modifiers = 0x01,
USBKeyChangeState_MainKeys = 0x02,
USBKeyChangeState_SecondaryKeys = 0x04,
USBKeyChangeState_System = 0x08,
USBKeyChangeState_Consumer = 0x10,
} USBKeyChangeState;



// ----- Variables -----

// Variables used to communciate to the output module
// XXX Even if the output module is not USB, this is internally understood keymapping scheme
extern uint8_t USBKeys_Modifiers;
extern uint8_t USBKeys_Keys[USB_NKRO_BITFIELD_SIZE_KEYS];
extern uint8_t USBKeys_Sent;
extern volatile uint8_t USBKeys_LEDs;

extern uint8_t USBKeys_SysCtrl; // 1KRO container for System Control HID table
extern uint16_t USBKeys_ConsCtrl; // 1KRO container for Consumer Control HID table

extern volatile uint8_t USBKeys_Protocol; // 0 - Boot Mode, 1 - NKRO Mode

// Misc variables (XXX Some are only properly utilized using AVR)
extern uint8_t USBKeys_Idle_Config;
extern uint8_t USBKeys_Idle_Count;

extern USBKeyChangeState USBKeys_Changed;

extern uint8_t Output_Available; // 0 - Output module not fully functional, 1 - Output module working



// ----- Capabilities -----

void Output_usbCodeSend_capability( uint8_t state, uint8_t stateType, uint8_t *args );



// ----- Functions -----

void Output_setup();
void Output_send();

void Output_firmwareReload();
void Output_softReset();

// Relies on USB serial module
unsigned int Output_availablechar();

int Output_getchar();
int Output_putchar( char c );
int Output_putstr( char* str );

#endif


+ 10
- 0
Output/uartOut/setup.cmake View File

endif () endif ()




###
# Includes
#

# Use pjrcUSB output_com.h
include_directories (
${CMAKE_CURRENT_LIST_DIR}/../pjrcUSB
)


### ###
# Compiler Family Compatibility # Compiler Family Compatibility
# #

+ 0
- 119
Output/usbMuxUart/output_com.h View File

/* Copyright (C) 2013-2015 by Jacob Alexander
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

#ifndef __output_com_h
#define __output_com_h

// ----- Includes -----

// Compiler Includes
#include <stdint.h>

// Local Includes
#include <buildvars.h> // Defines USB Parameters, partially generated by CMake



// ----- Defines -----

// Max size of key buffer needed for NKRO
// Boot mode uses only the first 6 bytes
#define USB_NKRO_BITFIELD_SIZE_KEYS 27
#define USB_BOOT_MAX_KEYS 6



// ----- Enumerations -----

// USB NKRO state transitions (indicates which Report ID's need refreshing)
// Boot mode just checks if any keys were changed (as everything is sent every time)
typedef enum USBKeyChangeState {
USBKeyChangeState_None = 0x00,
USBKeyChangeState_Modifiers = 0x01,
USBKeyChangeState_MainKeys = 0x02,
USBKeyChangeState_SecondaryKeys = 0x04,
USBKeyChangeState_TertiaryKeys = 0x08,
USBKeyChangeState_QuartiaryKeys = 0x10,
USBKeyChangeState_System = 0x20,
USBKeyChangeState_Consumer = 0x40,
USBKeyChangeState_All = 0x7F,
} USBKeyChangeState;



// ----- Variables -----

// Variables used to communciate to the output module
// XXX Even if the output module is not USB, this is internally understood keymapping scheme
extern uint8_t USBKeys_Modifiers;
extern uint8_t USBKeys_Keys[USB_NKRO_BITFIELD_SIZE_KEYS];
extern uint8_t USBKeys_Sent;
extern volatile uint8_t USBKeys_LEDs;

extern uint8_t USBKeys_SysCtrl; // 1KRO container for System Control HID table
extern uint16_t USBKeys_ConsCtrl; // 1KRO container for Consumer Control HID table

extern volatile uint8_t USBKeys_Protocol; // 0 - Boot Mode, 1 - NKRO Mode

// Misc variables (XXX Some are only properly utilized using AVR)
extern uint8_t USBKeys_Idle_Config;
extern uint8_t USBKeys_Idle_Count;

extern USBKeyChangeState USBKeys_Changed;

extern uint8_t Output_Available; // 0 - Output module not fully functional, 1 - Output module working

extern uint8_t Output_DebugMode; // 0 - Debug disabled, 1 - Debug enabled



// ----- Capabilities -----

void Output_consCtrlSend_capability( uint8_t state, uint8_t stateType, uint8_t *args );
void Output_noneSend_capability( uint8_t state, uint8_t stateType, uint8_t *args );
void Output_sysCtrlSend_capability( uint8_t state, uint8_t stateType, uint8_t *args );
void Output_usbCodeSend_capability( uint8_t state, uint8_t stateType, uint8_t *args );

// Configuration capabilities
void Output_kbdProtocolBoot_capability( uint8_t state, uint8_t stateType, uint8_t *args );
void Output_kbdProtocolNKRO_capability( uint8_t state, uint8_t stateType, uint8_t *args );



// ----- Functions -----

void Output_setup();
void Output_send();

void Output_flushBuffers();

void Output_firmwareReload();
void Output_softReset();

// Relies on USB serial module
unsigned int Output_availablechar();

int Output_getchar();
int Output_putchar( char c );
int Output_putstr( char* str );

#endif


+ 2
- 6
Scan/ADCTest/defaultMap.h View File

/* Copyright (C) 2014 by Jacob Alexander
/* Copyright (C) 2014-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __KEYMAP_H
#define __KEYMAP_H
#pragma once




// ----- Variables ----- // ----- Variables -----
0, // 0x04 0, // 0x04
}; };



#endif


+ 2
- 5
Scan/ADCTest/scan_loop.h View File

/* Copyright (C) 2014 by Jacob Alexander
/* Copyright (C) 2014-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __SCAN_LOOP_H
#define __SCAN_LOOP_H
#pragma once


// ----- Includes ----- // ----- Includes -----




void Scan_resetKeyboard(); void Scan_resetKeyboard();


#endif // __SCAN_LOOP_H


+ 2
- 6
Scan/BETKB/scan_loop.h View File

/* Copyright (C) 2012,2014 by Jacob Alexander
/* Copyright (C) 2012,2014-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __SCAN_LOOP_H
#define __SCAN_LOOP_H
#pragma once


// ----- Includes ----- // ----- Includes -----


void Scan_unlockKeyboard( void ); void Scan_unlockKeyboard( void );
void Scan_resetKeyboard( void ); void Scan_resetKeyboard( void );



#endif // __SCAN_LOOP_H


+ 2
- 7
Scan/BudKeypad/matrix.h View File

/* Copyright (C) 2011 by Jacob Alexander
/* Copyright (C) 2011,2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __MATRIX_H
#define __MATRIX_H
#pragma once


// ----- Includes ----- // ----- Includes -----




}; };




#endif // __MATRIX_H


+ 2
- 6
Scan/DPH/scan_loop.h View File

/* Copyright (C) 2013-2014 by Jacob Alexander
/* Copyright (C) 2013-2015 by Jacob Alexander
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>. * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/ */


#ifndef __SCAN_LOOP_H
#define __SCAN_LOOP_H
#pragma once


// ----- Includes ----- // ----- Includes -----


void Scan_finishedWithMacro( uint8_t sentKeys ); void Scan_finishedWithMacro( uint8_t sentKeys );
void Scan_finishedWithOutput( uint8_t sentKeys ); void Scan_finishedWithOutput( uint8_t sentKeys );



#endif // __SCAN_LOOP_H


+ 2
- 6
Scan/EpsonQX-10/scan_loop.h View File

/* Copyright (C) 2011,2014 by Jacob Alexander
/* Copyright (C) 2011,2014-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __SCAN_LOOP_H
#define __SCAN_LOOP_H
#pragma once


// ----- Includes ----- // ----- Includes -----


void Scan_unlockKeyboard( void ); void Scan_unlockKeyboard( void );
void Scan_resetKeyboard( void ); void Scan_resetKeyboard( void );



#endif // __SCAN_LOOP_H


+ 2
- 6
Scan/FACOM6684/scan_loop.h View File

/* Copyright (C) 2013-2014 by Jacob Alexander
/* Copyright (C) 2013-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __SCAN_LOOP_H
#define __SCAN_LOOP_H
#pragma once


// ----- Includes ----- // ----- Includes -----


void Scan_unlockKeyboard( void ); void Scan_unlockKeyboard( void );
void Scan_resetKeyboard( void ); void Scan_resetKeyboard( void );



#endif // __SCAN_LOOP_H


+ 2
- 6
Scan/HP150/scan_loop.h View File

/* Copyright (C) 2012,2014 by Jacob Alexander
/* Copyright (C) 2012,2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __SCAN_LOOP_H
#define __SCAN_LOOP_H
#pragma once


// ----- Includes ----- // ----- Includes -----


void Scan_unlockKeyboard( void ); void Scan_unlockKeyboard( void );
void Scan_resetKeyboard( void ); void Scan_resetKeyboard( void );



#endif // __SCAN_LOOP_H


+ 2
- 7
Scan/HeathZenith/matrix.h View File

/* Copyright (C) 2011 by Jacob Alexander
/* Copyright (C) 2011,2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __MATRIX_H
#define __MATRIX_H
#pragma once


// ----- Includes ----- // ----- Includes -----




}; };




#endif // __MATRIX_H


+ 2
- 7
Scan/IBMConvertible/matrix.h View File

/* Copyright (C) 2012 by Jacob Alexander
/* Copyright (C) 2012,2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __MATRIX_H
#define __MATRIX_H
#pragma once


// ----- Includes ----- // ----- Includes -----




}; };




#endif // __MATRIX_H


+ 9
- 7
Scan/ISSILed/led_scan.c View File

#include <cli.h> #include <cli.h>
#include <led.h> #include <led.h>
#include <print.h> #include <print.h>
#include <led_conf.h> // Located with scan_loop.c


// Local Includes // Local Includes
#include "led_scan.h" #include "led_scan.h"
0x43, 0x43, // C9-1 -> C9-16 0x43, 0x43, // C9-1 -> C9-16
}; };
*/ */

/*
const uint8_t LED_ledEnableMask[] = { const uint8_t LED_ledEnableMask[] = {
0xE8, // I2C address 0xE8, // I2C address
0x00, // Starting register address 0x00, // Starting register address
0x00, 0x00, // C8-1 -> C8-16 0x00, 0x00, // C8-1 -> C8-16
0x00, 0x00, // C9-1 -> C9-16 0x00, 0x00, // C9-1 -> C9-16
}; };
*/




/*
// XXX Pre-fill example of buffers // XXX Pre-fill example of buffers
const uint8_t examplePage[] = { const uint8_t examplePage[] = {
0xE8, // I2C address 0xE8, // I2C address
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // C8-1 -> C8-16 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // C8-1 -> C8-16
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // C9-1 -> C9-16 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // C9-1 -> C9-16
}; };
*/


/*
// XXX Pre-fill example of buffers // XXX Pre-fill example of buffers
const uint8_t examplePage[] = { const uint8_t examplePage[] = {
0xE8, // I2C address 0xE8, // I2C address
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F, // C8-1 -> C8-16 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F, // C8-1 -> C8-16
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, // C9-1 -> C9-16 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, // C9-1 -> C9-16
}; };
*/






// Initialize I2C // Initialize I2C
I2C_setup(); I2C_setup();


/* TODO Make work
// Zero out Frame Registers // Zero out Frame Registers
// This needs to be done before disabling the hardware shutdown (or the leds will do undefined things) // This needs to be done before disabling the hardware shutdown (or the leds will do undefined things)
LED_zeroPages( 0x0B, 1, 0x00, 0x0C ); // Control Registers LED_zeroPages( 0x0B, 1, 0x00, 0x0C ); // Control Registers


// Disable Hardware shutdown of ISSI chip (pull high) // Disable Hardware shutdown of ISSI chip (pull high)
GPIOD_PDDR |= (1<<1);
PORTD_PCR1 = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1);
GPIOD_PSOR |= (1<<1);
GPIOB_PDDR |= (1<<16);
PORTB_PCR16 = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1);
GPIOB_PSOR |= (1<<16);


// Clear LED Pages // Clear LED Pages
LED_zeroPages( 0x00, 8, 0x00, 0xB4 ); // LED Registers LED_zeroPages( 0x00, 8, 0x00, 0xB4 ); // LED Registers


// Disable Software shutdown of ISSI chip // Disable Software shutdown of ISSI chip
LED_writeReg( 0x0A, 0x01, 0x0B ); LED_writeReg( 0x0A, 0x01, 0x0B );
*/
} }





+ 1
- 5
Scan/ISSILed/led_scan.h View File

* along with this file. If not, see <http://www.gnu.org/licenses/>. * along with this file. If not, see <http://www.gnu.org/licenses/>.
*/ */


#ifndef __LED_SCAN_H
#define __LED_SCAN_H
#pragma once


// ----- Includes ----- // ----- Includes -----


void LED_setup(); void LED_setup();
uint8_t LED_scan(); uint8_t LED_scan();



#endif // __LED_SCAN_H


+ 2
- 6
Scan/Kaypro1/scan_loop.h View File

/* Copyright (C) 2011-2014 by Jacob Alexander
/* Copyright (C) 2011-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __SCAN_LOOP_H
#define __SCAN_LOOP_H
#pragma once


// ----- Includes ----- // ----- Includes -----


void Scan_unlockKeyboard( void ); void Scan_unlockKeyboard( void );
void Scan_resetKeyboard( void ); void Scan_resetKeyboard( void );



#endif // __SCAN_LOOP_H


+ 2
- 5
Scan/MBC-55X/defaultMap.h View File

/* Copyright (C) 2013-2014 by Jacob Alexander
/* Copyright (C) 2013-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __KEYMAP_H
#define __KEYMAP_H
#pragma once


// This file contains various key layouts for the Sanyo MBC-55X Computer Keyboard // This file contains various key layouts for the Sanyo MBC-55X Computer Keyboard


0, // 0xFF 0, // 0xFF
}; };


#endif


+ 2
- 6
Scan/MBC-55X/scan_loop.h View File

/* Copyright (C) 2013,2014 by Jacob Alexander
/* Copyright (C) 2013-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __SCAN_LOOP_H
#define __SCAN_LOOP_H
#pragma once


// ----- Includes ----- // ----- Includes -----


void Scan_unlockKeyboard( void ); void Scan_unlockKeyboard( void );
void Scan_resetKeyboard( void ); void Scan_resetKeyboard( void );



#endif // __SCAN_LOOP_H


+ 2
- 6
Scan/MD1/matrix.h View File

/* Copyright (C) 2014 by Jacob Alexander
/* Copyright (C) 2014-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __MATRIX_H
#define __MATRIX_H
#pragma once


// ----- Includes ----- // ----- Includes -----


// Define type of scan matrix // Define type of scan matrix
Config Matrix_type = Config_Pulldown; Config Matrix_type = Config_Pulldown;



#endif // __MATRIX_H


+ 2
- 6
Scan/MD1/scan_loop.h View File

/* Copyright (C) 2014 by Jacob Alexander
/* Copyright (C) 2014-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __SCAN_LOOP_H
#define __SCAN_LOOP_H
#pragma once


// ----- Includes ----- // ----- Includes -----


void Scan_finishedWithMacro( uint8_t sentKeys ); // Called by Macro Module void Scan_finishedWithMacro( uint8_t sentKeys ); // Called by Macro Module
void Scan_finishedWithOutput( uint8_t sentKeys ); // Called by Output Module void Scan_finishedWithOutput( uint8_t sentKeys ); // Called by Output Module



#endif // __SCAN_LOOP_H


+ 2
- 6
Scan/MD2/matrix.h View File

/* Copyright (C) 2014 by Jacob Alexander
/* Copyright (C) 2014-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __MATRIX_H
#define __MATRIX_H
#pragma once


// ----- Macros ----- // ----- Macros -----


// Define type of scan matrix // Define type of scan matrix
Config Matrix_type = Config_Pulldown; Config Matrix_type = Config_Pulldown;



#endif // __MATRIX_H


+ 2
- 6
Scan/MD2/scan_loop.h View File

/* Copyright (C) 2014 by Jacob Alexander
/* Copyright (C) 2014-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __SCAN_LOOP_H
#define __SCAN_LOOP_H
#pragma once


// ----- Includes ----- // ----- Includes -----


void Scan_finishedWithMacro( uint8_t sentKeys ); // Called by Macro Module void Scan_finishedWithMacro( uint8_t sentKeys ); // Called by Macro Module
void Scan_finishedWithOutput( uint8_t sentKeys ); // Called by Output Module void Scan_finishedWithOutput( uint8_t sentKeys ); // Called by Output Module



#endif // __SCAN_LOOP_H


+ 1
- 5
Scan/MatrixARM/matrix_scan.h View File

* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __MATRIX_SCAN_H
#define __MATRIX_SCAN_H
#pragma once


// ----- Includes ----- // ----- Includes -----


void Matrix_setup(); void Matrix_setup();
void Matrix_scan( uint16_t scanNum ); void Matrix_scan( uint16_t scanNum );



#endif // __MATRIX_SCAN_H


+ 2
- 6
Scan/MatrixARM/matrix_setup.h View File

/* Copyright (C) 2014 by Jacob Alexander
/* Copyright (C) 2014-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __MATRIX_SETUP_H
#define __MATRIX_SETUP_H
#pragma once


// ----- Macros ----- // ----- Macros -----


#define Matrix_rowsNum sizeof( Matrix_rows ) / sizeof( GPIO_Pin ) #define Matrix_rowsNum sizeof( Matrix_rows ) / sizeof( GPIO_Pin )
#define Matrix_maxKeys sizeof( Matrix_scanArray ) / sizeof( KeyState ) #define Matrix_maxKeys sizeof( Matrix_scanArray ) / sizeof( KeyState )



#endif // __MATRIX_SETUP_H


+ 2
- 6
Scan/MicroSwitch8304/scan_loop.h View File

/* Copyright (C) 2011,2014 by Jacob Alexander
/* Copyright (C) 2011,2014-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __SCAN_LOOP_H
#define __SCAN_LOOP_H
#pragma once


// ----- Includes ----- // ----- Includes -----


void Scan_unlockKeyboard( void ); void Scan_unlockKeyboard( void );
void Scan_resetKeyboard( void ); void Scan_resetKeyboard( void );



#endif // __SCAN_LOOP_H


+ 2
- 6
Scan/SKM67001/customSKM.h View File

/* Copyright (C) 2012,2014 by Jacob Alexander
/* Copyright (C) 2012,2014-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __KEYMAP_H
#define __KEYMAP_H
#pragma once


// ----- Variables ----- // ----- Variables -----


0, // 0x55 0, // 0x55
}; };



#endif


+ 2
- 6
Scan/SKM67001/defaultMap.h View File

/* Copyright (C) 2012,2014 by Jacob Alexander
/* Copyright (C) 2012,2014-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __KEYMAP_H
#define __KEYMAP_H
#pragma once


// This file contains various key layouts for the SKM 67001 Keyboard from the Olympia Professional ES 105 Typewriter // This file contains various key layouts for the SKM 67001 Keyboard from the Olympia Professional ES 105 Typewriter


0, // 0x55 0, // 0x55
}; };



#endif


+ 5
- 10
Scan/SKM67001/matrix.h View File

/* Copyright (C) 2012 by Jacob Alexander
*
/* Copyright (C) 2012,2015 by Jacob Alexander
*
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights * in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is * copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions: * furnished to do so, subject to the following conditions:
*
*
* The above copyright notice and this permission notice shall be included in * The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software. * all copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __MATRIX_H
#define __MATRIX_H
#pragma once


// ----- Includes ----- // ----- Includes -----




}; };




#endif // __MATRIX_H


+ 1
- 5
Scan/STLcd/lcd_scan.h View File

* along with this file. If not, see <http://www.gnu.org/licenses/>. * along with this file. If not, see <http://www.gnu.org/licenses/>.
*/ */


#ifndef __LCD_SCAN_H
#define __LCD_SCAN_H
#pragma once


// ----- Includes ----- // ----- Includes -----


void LCD_setup(); void LCD_setup();
uint8_t LCD_scan(); uint8_t LCD_scan();



#endif // __LCD_SCAN_H


+ 1
- 7
Scan/SonyNEWS/scan_loop.h View File

/* Copyright (C) 2011,2014 by Jacob Alexander
/* Copyright (C) 2011,2014-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __SCAN_LOOP_H
#define __SCAN_LOOP_H

// ----- Includes ----- // ----- Includes -----


// Compiler Includes // Compiler Includes
void Scan_unlockKeyboard( void ); void Scan_unlockKeyboard( void );
void Scan_resetKeyboard( void ); void Scan_resetKeyboard( void );



#endif // __SCAN_LOOP_H


+ 1
- 7
Scan/SonyOA-S3400/scan_loop.h View File

/* Copyright (C) 2012,2014 by Jacob Alexander
/* Copyright (C) 2012,2014-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __SCAN_LOOP_H
#define __SCAN_LOOP_H

// ----- Includes ----- // ----- Includes -----


// Compiler Includes // Compiler Includes
void Scan_unlockKeyboard( void ); void Scan_unlockKeyboard( void );
void Scan_resetKeyboard( void ); void Scan_resetKeyboard( void );



#endif // __SCAN_LOOP_H


+ 2
- 6
Scan/Tandy1000/scan_loop.h View File

/* Copyright (C) 2011,2014 by Jacob Alexander
/* Copyright (C) 2011,2014-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __SCAN_LOOP_H
#define __SCAN_LOOP_H
#pragma once


// ----- Includes ----- // ----- Includes -----


void Scan_unlockKeyboard( void ); void Scan_unlockKeyboard( void );
void Scan_resetKeyboard( void ); void Scan_resetKeyboard( void );



#endif // __SCAN_LOOP_H


+ 1
- 5
Scan/UARTConnect/connect_scan.h View File

* along with this file. If not, see <http://www.gnu.org/licenses/>. * along with this file. If not, see <http://www.gnu.org/licenses/>.
*/ */


#ifndef __CONNECT_SCAN_H
#define __CONNECT_SCAN_H
#pragma once


// ----- Includes ----- // ----- Includes -----


void Connect_setup( uint8_t master ); void Connect_setup( uint8_t master );
void Connect_scan(); void Connect_scan();



#endif // __CONNECT_SCAN_H


+ 2
- 6
Scan/UnivacF3W9/scan_loop.h View File

/* Copyright (C) 2012,2014 by Jacob Alexander
/* Copyright (C) 2012,2014-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __SCAN_LOOP_H
#define __SCAN_LOOP_H
#pragma once


// ----- Includes ----- // ----- Includes -----


void Scan_unlockKeyboard( void ); void Scan_unlockKeyboard( void );
void Scan_resetKeyboard( void ); void Scan_resetKeyboard( void );



#endif // __SCAN_LOOP_H


+ 2
- 5
Scan/matrix/matrix_scan.h View File

/* Copyright (C) 2011,2014 by Jacob Alexander
/* Copyright (C) 2011,2014-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __MATRIX_SCAN_H
#define __MATRIX_SCAN_H
#pragma once


// ----- Includes ----- // ----- Includes -----


void matrix_pinSetup( uint8_t *matrix, uint8_t scanType ); void matrix_pinSetup( uint8_t *matrix, uint8_t scanType );
void matrix_scan( uint8_t *matrix, uint8_t *detectArray ); void matrix_scan( uint8_t *matrix, uint8_t *detectArray );


#endif // __MATRIX_SCAN_H


+ 2
- 7
Scan/matrix/matrix_template.h View File

/* Copyright (C) 2011,2014 by Jacob Alexander
/* Copyright (C) 2011,2014-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __MATRIX_H
#define __MATRIX_H
#pragma once


// ----- Includes ----- // ----- Includes -----




}; };




#endif // __MATRIX_H


+ 2
- 6
Scan/matrix/scan_loop.h View File

/* Copyright (C) 2011-2012,2014 by Jacob Alexander
/* Copyright (C) 2011-2012,2014-2015 by Jacob Alexander
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* THE SOFTWARE. * THE SOFTWARE.
*/ */


#ifndef __SCAN_LOOP_H
#define __SCAN_LOOP_H
#pragma once


// ----- Includes ----- // ----- Includes -----


void Scan_finishedWithBuffer( uint8_t sentKeys ); void Scan_finishedWithBuffer( uint8_t sentKeys );
void Scan_finishedWithUSBBuffer( uint8_t sentKeys ); void Scan_finishedWithUSBBuffer( uint8_t sentKeys );



#endif // __SCAN_LOOP_H


+ 0
- 11
main.c View File



int main() int main()
{ {
/*
GPIOA_PDDR |= (1<<5);
// Setup pin - A5 - See Lib/pin_map.mchck for more details on pins
PORTA_PCR5 = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1);
while( 1 )
{
GPIOA_PTOR |= (1<<5);
for (uint32_t d = 0; d < 720000; d++ );
}
*/

// AVR - Teensy Set Clock speed to 16 MHz // AVR - Teensy Set Clock speed to 16 MHz
#if defined(_at90usb162_) || defined(_atmega32u4_) || defined(_at90usb646_) || defined(_at90usb1286_) #if defined(_at90usb162_) || defined(_atmega32u4_) || defined(_at90usb646_) || defined(_at90usb1286_)
CLKPR = 0x80; CLKPR = 0x80;