mirror of
https://github.com/osiweb/unified_retro_keyboard.git
synced 2024-11-22 04:33:19 +00:00
562b859540
- Added the apple 2 CAPS map - auto-generate a function to check validity of a keymap index - Added buffered message printing. This is different from keycode buffering, since an extra delay is added for each message character to allow polling hosts to keep up. Keycodes are generated at human speeds and need no further slowdown. - Added a message character delay to the arch-* modules - enlarged the buffer pool, and created a buffer for messages - bumped version number
56 lines
1.5 KiB
CMake
56 lines
1.5 KiB
CMake
cmake_minimum_required(VERSION 3.19)
|
|
|
|
set(KEYMAPFILE keymaps.txt)
|
|
|
|
# Set up the toolchain and other architecture specific details
|
|
|
|
if(ARCH MATCHES atmega328p)
|
|
message(STATUS "setting up for atmega328p")
|
|
set(AVF_H_FUSE 0xd9)
|
|
set(AVR_L_FUSE 0xd2)
|
|
set(AVR_MCU ${ARCH})
|
|
|
|
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/cmake/generic-gcc-avr.cmake)
|
|
set (ASDF_OUT_TARGET ${ASDF_TARGET}.elf)
|
|
|
|
elseif(ARCH MATCHES atmega2560)
|
|
message(STATUS "setting up for atmega2560")
|
|
set(AVF_H_FUSE 0x99)
|
|
set(AVR_L_FUSE 0xe7)
|
|
set(AVR_MCU ${ARCH})
|
|
|
|
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/cmake/generic-gcc-avr.cmake)
|
|
set (ASDF_OUT_TARGET ${ASDF_TARGET}.elf)
|
|
|
|
endif()
|
|
|
|
project("asdf"
|
|
VERSION 1.6.2
|
|
DESCRIPTION "A customizable keyboard matrix controller for retrocomputers"
|
|
LANGUAGES C)
|
|
|
|
set_property(GLOBAL PROPERTY C_STANDARD 99)
|
|
|
|
set(ASDF_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
|
|
|
set (ASDF_TARGET_NAME asdf-v${PROJECT_VERSION}-${ARCH})
|
|
set (ASDF_EXECUTABLE_TARGET_NAME ${ASDF_TARGET_NAME})
|
|
|
|
if(ARCH MATCHES test)
|
|
add_subdirectory(test)
|
|
else()
|
|
if((ARCH MATCHES atmega328p) OR (ARCH MATCHES atmega2560))
|
|
set (ASDF_EXECUTABLE_TARGET_NAME ${ASDF_TARGET_NAME}.elf)
|
|
|
|
function(custom_add_library EXECUTABLE_NAME)
|
|
add_avr_library(${EXECUTABLE_NAME} ${ARGN})
|
|
endfunction(custom_add_library)
|
|
|
|
function(custom_add_executable EXECUTABLE_NAME)
|
|
add_avr_executable(${EXECUTABLE_NAME} ${ARGN})
|
|
endfunction(custom_add_executable)
|
|
endif()
|
|
|
|
add_subdirectory(src)
|
|
endif()
|