${COMPILER_SRCS} | ${COMPILER_SRCS} | ||||
${SCAN_SRCS} | ${SCAN_SRCS} | ||||
${MACRO_SRCS} | ${MACRO_SRCS} | ||||
${USB_SRCS} | |||||
${OUTPUT_SRCS} | |||||
${DEBUG_SRCS} | ${DEBUG_SRCS} | ||||
) | ) | ||||
# | # | ||||
#| Check for whether the set modules are compatible with the specified compiler family | #| Check for whether the set modules are compatible with the specified compiler family | ||||
ModuleCompatibility( ${ScanModulePath} ${ScanModuleCompatibility} ) | |||||
ModuleCompatibility( ${MacroModulePath} ${MacroModuleCompatibility} ) | |||||
ModuleCompatibility( ${USBModulePath} ${USBModuleCompatibility} ) | |||||
ModuleCompatibility( ${DebugModulePath} ${DebugModuleCompatibility} ) | |||||
ModuleCompatibility( ${ScanModulePath} ${ScanModuleCompatibility} ) | |||||
ModuleCompatibility( ${MacroModulePath} ${MacroModuleCompatibility} ) | |||||
ModuleCompatibility( ${OutputModulePath} ${OutputModuleCompatibility} ) | |||||
ModuleCompatibility( ${DebugModulePath} ${DebugModuleCompatibility} ) | |||||
/* Copyright (C) 2014 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. | |||||
*/ | |||||
// ----- Includes ----- | |||||
// Compiler Includes | |||||
//#include <stdarg.h> | |||||
// Project Includes | |||||
#include "cli.h" | |||||
// ----- Functions ----- | |||||
void initCLI() | |||||
{ | |||||
} | |||||
/* Copyright (C) 2014 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 cli_h__ | |||||
#define cli_h__ | |||||
// ----- Includes ----- | |||||
// Compiler Includes | |||||
#if defined(_at90usb162_) || defined(_atmega32u4_) || defined(_at90usb646_) || defined(_at90usb1286_) | |||||
#elif defined(_mk20dx128_) | |||||
#include "arm/usb_serial.h" | |||||
#endif | |||||
// ----- Defines ----- | |||||
// ----- Functions and Corresponding Function Aliases ----- | |||||
void initCLI(); | |||||
#endif | |||||
###| CMake Kiibohd Controller Debug Module |### | |||||
# | |||||
# Written by Jacob Alexander in 2014 for the Kiibohd Controller | |||||
# | |||||
# Released into the Public Domain | |||||
# | |||||
### | |||||
### | |||||
# Module C files | |||||
# | |||||
set( DEBUG_SRCS | |||||
cli.c | |||||
) | |||||
### | |||||
# Setup File Dependencies | |||||
# | |||||
### | |||||
# Module Specific Options | |||||
# | |||||
### | |||||
# Just in case, you only want this module and are using others as well | |||||
# | |||||
add_definitions( -I${HEAD_DIR}/Debug/off ) | |||||
### | |||||
# Compiler Family Compatibility | |||||
# | |||||
set( DebugModuleCompatibility | |||||
arm | |||||
avr | |||||
) | |||||
###| CMake Kiibohd Controller Debug Module |### | ###| CMake Kiibohd Controller Debug Module |### | ||||
# | # | ||||
# Written by Jacob Alexander in 2011 for the Kiibohd Controller | |||||
# Written by Jacob Alexander in 2011-2014 for the Kiibohd Controller | |||||
# | # | ||||
# Released into the Public Domain | # Released into the Public Domain | ||||
# | # | ||||
#| XXX Requires the ../ due to how the paths are constructed | #| XXX Requires the ../ due to how the paths are constructed | ||||
set( DEBUG_SRCS | set( DEBUG_SRCS | ||||
../cli/cli.c | |||||
../led/led.c | ../led/led.c | ||||
../print/print.c | ../print/print.c | ||||
) | ) | ||||
# Setup File Dependencies | # Setup File Dependencies | ||||
# | # | ||||
add_file_dependencies( ../led/led.c ../led/led.h ) | add_file_dependencies( ../led/led.c ../led/led.h ) | ||||
add_file_dependencies( ../led/print.c ../led/print.h ) | |||||
add_file_dependencies( ../print/print.c ../print/print.h ) | |||||
### | ### | ||||
# Module Specific Options | # Module Specific Options | ||||
# | # | ||||
add_definitions( | add_definitions( | ||||
-I${HEAD_DIR}/Debug/cli | |||||
-I${HEAD_DIR}/Debug/led | -I${HEAD_DIR}/Debug/led | ||||
-I${HEAD_DIR}/Debug/print | -I${HEAD_DIR}/Debug/print | ||||
) | ) |
/* Copyright (C) 2011-2013 by Jacob Alexander | /* Copyright (C) 2011-2013 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 |
/* Copyright (C) 2011-2013 by Jacob Alexander | /* Copyright (C) 2011-2013 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 |
#endif | #endif | ||||
// Local Includes | // Local Includes | ||||
#include "usb_com.h" | |||||
#include "output_com.h" | |||||
* THE SOFTWARE. | * THE SOFTWARE. | ||||
*/ | */ | ||||
#ifndef __usb_com_h | |||||
#define __usb_com_h | |||||
#ifndef __output_com_h | |||||
#define __output_com_h | |||||
// ----- Includes ----- | // ----- Includes ----- | ||||
#| AVR Compiler | #| AVR Compiler | ||||
if ( ${COMPILER_FAMILY} MATCHES "avr" ) | if ( ${COMPILER_FAMILY} MATCHES "avr" ) | ||||
set( USB_SRCS | |||||
usb_com.c | |||||
set( OUTPUT_SRCS | |||||
output_com.c | |||||
avr/usb_keyboard_debug.c | avr/usb_keyboard_debug.c | ||||
) | ) | ||||
#| ARM Compiler | #| ARM Compiler | ||||
elseif ( ${COMPILER_FAMILY} MATCHES "arm" ) | elseif ( ${COMPILER_FAMILY} MATCHES "arm" ) | ||||
set( USB_SRCS | |||||
usb_com.c | |||||
set( OUTPUT_SRCS | |||||
output_com.c | |||||
arm/usb_desc.c | arm/usb_desc.c | ||||
arm/usb_dev.c | arm/usb_dev.c | ||||
arm/usb_keyboard.c | arm/usb_keyboard.c | ||||
### | ### | ||||
# Compiler Family Compatibility | # Compiler Family Compatibility | ||||
# | # | ||||
set( USBModuleCompatibility | |||||
set( OutputModuleCompatibility | |||||
arm | arm | ||||
avr | avr | ||||
) | ) |
set( MacroModule "buffer" ) | set( MacroModule "buffer" ) | ||||
##| Sends the current list of usb key codes through USB HID | ##| Sends the current list of usb key codes through USB HID | ||||
set( USBModule "pjrc" ) | |||||
set( OutputModule "pjrcUSB" ) | |||||
##| Debugging source to use, each module has it's own set of defines that it sets | ##| Debugging source to use, each module has it's own set of defines that it sets | ||||
set( DebugModule "full" ) | |||||
set( DebugModule "full" ) | |||||
### | ### | ||||
# Path Setup | # Path Setup | ||||
# | |||||
set( ScanModulePath "Scan/${ScanModule}" ) | |||||
set( MacroModulePath "Macro/${MacroModule}" ) | |||||
set( USBModulePath "USB/${USBModule}" ) | |||||
set( DebugModulePath "Debug/${DebugModule}" ) | |||||
# | |||||
set( ScanModulePath "Scan/${ScanModule}" ) | |||||
set( MacroModulePath "Macro/${MacroModule}" ) | |||||
set( OutputModulePath "Output/${OutputModule}" ) | |||||
set( USBModulePath "USB/${USBModule}" ) | |||||
set( DebugModulePath "Debug/${DebugModule}" ) | |||||
#| Top-level directory adjustment | #| Top-level directory adjustment | ||||
set( HEAD_DIR "${CMAKE_CURRENT_SOURCE_DIR}" ) | set( HEAD_DIR "${CMAKE_CURRENT_SOURCE_DIR}" ) | ||||
add_definitions( | add_definitions( | ||||
-I${HEAD_DIR}/${ScanModulePath} | -I${HEAD_DIR}/${ScanModulePath} | ||||
-I${HEAD_DIR}/${MacroModulePath} | -I${HEAD_DIR}/${MacroModulePath} | ||||
-I${HEAD_DIR}/${USBModulePath} | |||||
-I${HEAD_DIR}/${OutputModulePath} | |||||
-I${HEAD_DIR}/${DebugModulePath} | -I${HEAD_DIR}/${DebugModulePath} | ||||
) | ) | ||||
include ( "${MacroModulePath}/setup.cmake" ) | include ( "${MacroModulePath}/setup.cmake" ) | ||||
PathPrepend( MACRO_SRCS ${MacroModulePath} ${MACRO_SRCS} ) | PathPrepend( MACRO_SRCS ${MacroModulePath} ${MACRO_SRCS} ) | ||||
#| USB Module | |||||
include ( "${USBModulePath}/setup.cmake" ) | |||||
PathPrepend( USB_SRCS ${USBModulePath} ${USB_SRCS} ) | |||||
#| Output Module | |||||
include ( "${OutputModulePath}/setup.cmake" ) | |||||
PathPrepend( OUTPUT_SRCS ${OutputModulePath} ${OUTPUT_SRCS} ) | |||||
#| Debugging Module | #| Debugging Module | ||||
include ( "${DebugModulePath}/setup.cmake" ) | include ( "${DebugModulePath}/setup.cmake" ) | ||||
message( STATUS "Detected Macro Module Source Files:" ) | message( STATUS "Detected Macro Module Source Files:" ) | ||||
message( "${MACRO_SRCS}" ) | message( "${MACRO_SRCS}" ) | ||||
message( STATUS "Detected USB Module Source Files:" ) | message( STATUS "Detected USB Module Source Files:" ) | ||||
message( "${USB_SRCS}" ) | |||||
message( "${OUTPUT_SRCS}" ) | |||||
message( STATUS "Detected Debug Module Source Files:" ) | message( STATUS "Detected Debug Module Source Files:" ) | ||||
message( "${DEBUG_SRCS}" ) | message( "${DEBUG_SRCS}" ) | ||||