Skip to content

Commit

Permalink
added wn files
Browse files Browse the repository at this point in the history
  • Loading branch information
Noteolvides committed Oct 2, 2023
1 parent 91fce3a commit e767f2f
Show file tree
Hide file tree
Showing 66 changed files with 8,731 additions and 37 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Build

on: [push, pull_request]

env:
BOARD_HARDWARE_PATH: ../hardware
ARDUINO_PATH: ./arduino-1.8.13
ARDUINO_DOWNLOAD_URL: https://downloads.arduino.cc/arduino-1.8.13-linux64.tar.xz

jobs:
smoke-sketches:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: git clone --quiet --depth 1 --recurse-submodules=build-tools --recurse-submodules=toolchain --recurse-submodules=avr/libraries/ --jobs 16 --shallow-submodules git://github.com/keyboardio/Kaleidoscope-Bundle-Keyboardio ../hardware/keyboardio
- run: rm -rf ../hardware/keyboardio/avr/libraries/Kaleidoscope
- run: ln -s $(pwd) ../hardware/keyboardio/avr/libraries/Kaleidoscope
# - run: make adjust-git-timestamps
- run: wget --quiet $ARDUINO_DOWNLOAD_URL -O - | tar xJf -
- run: make -j 8 smoke-sketches
run-google-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: git clone --quiet --depth 1 --recurse-submodules=build-tools --recurse-submodules=toolchain --recurse-submodules=avr/libraries/ --jobs 16 --shallow-submodules git://github.com/keyboardio/Kaleidoscope-Bundle-Keyboardio $HOME/Arduino/hardware/keyboardio
- run: rm -rf $HOME/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
- run: ln -s $(pwd) $HOME/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
# - run: make adjust-git-timestamps
- run: wget --quiet $ARDUINO_DOWNLOAD_URL -O - | tar xJf -
- run: BOARD_HARDWARE_PATH=$HOME/Arduino/hardware ARDUINO_PATH=$GITHUB_WORKSPACE/arduino-1.8.13 ARDUINO_BUILDER=$ARDUINO_PATH/arduino-builder make simulator-tests
check-astyle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: git clone --quiet --depth 1 --recurse-submodules=build-tools --recurse-submodules=toolchain --recurse-submodules=avr/libraries/ --jobs 16 --shallow-submodules git://github.com/keyboardio/Kaleidoscope-Bundle-Keyboardio ../hardware/keyboardio
- run: rm -rf ../hardware/keyboardio/avr/libraries/Kaleidoscope
- run: ln -s $(pwd) ../hardware/keyboardio/avr/libraries/Kaleidoscope
# - run: make adjust-git-timestamps
- run: make check-astyle
check-shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: git clone --quiet --depth 1 --recurse-submodules=build-tools --recurse-submodules=toolchain --recurse-submodules=avr/libraries/ --jobs 16 --shallow-submodules git://github.com/keyboardio/Kaleidoscope-Bundle-Keyboardio ../hardware/keyboardio
- run: rm -rf ../hardware/keyboardio/avr/libraries/Kaleidoscope
- run: ln -s $(pwd) ../hardware/keyboardio/avr/libraries/Kaleidoscope
- run: make shellcheck
check-cpplint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: git clone --quiet --depth 1 --recurse-submodules=build-tools --recurse-submodules=toolchain --recurse-submodules=avr/libraries/ --jobs 16 --shallow-submodules git://github.com/keyboardio/Kaleidoscope-Bundle-Keyboardio ../hardware/keyboardio
- run: rm -rf ../hardware/keyboardio/avr/libraries/Kaleidoscope
- run: ln -s $(pwd) ../hardware/keyboardio/avr/libraries/Kaleidoscope
# - run: make adjust-git-timestamps
- run: make cpplint
find-filename-conflicts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: git clone --quiet --depth 1 --recurse-submodules=build-tools --recurse-submodules=toolchain --recurse-submodules=avr/libraries/ --jobs 16 --shallow-submodules git://github.com/keyboardio/Kaleidoscope-Bundle-Keyboardio ../hardware/keyboardio
- run: rm -rf ../hardware/keyboardio/avr/libraries/Kaleidoscope
- run: ln -s $(pwd) ../hardware/keyboardio/avr/libraries/Kaleidoscope
- run: make find-filename-conflicts
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
*~
.arduino
/.docker_xfer
.#*
/output/
/examples/*/output/
/out/
/docs/generated
/docs/doxyoutput
/docs/api
/_build/
/results/
generated-testcase.cpp
.vscode/
.arduino
3 changes: 3 additions & 0 deletions .kaleidoscope-builder.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# -*- mode: sh -*-

DEFAULT_SKETCH=Kaleidoscope
24 changes: 24 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Build documentation with MkDocs
#mkdocs:
# configuration: mkdocs.yml

# Optionally build your docs in additional formats such as PDF and ePub
formats: all

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
install:
- requirements: docs/requirements.txt

57 changes: 57 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
dist: focal
arch: amd64
language: c
os:
- linux
addons:
apt:
packages:
- shellcheck
- cmake
- astyle
env:
global:
- LC_ALL: C
- CCACHE_WRAPPER_PATH: /tmp/kaleidoscope-ccache
- ARDUINO_DOWNLOAD_URL: https://downloads.arduino.cc/arduino-1.8.13-linux64.tar.xz
git:
quiet: true
depth: false
before_install:
- sh .travis/setup-ramdisk.sh
- ccache --set-config=compiler_check=content -M 1G -F 0

install:
- cd $TRAVIS_BUILD_DIR
- git clone --depth 1 --recurse-submodules=build-tools --recurse-submodules=toolchain --recurse-submodules=avr/libraries/ --jobs 16 --shallow-submodules git://github.com/keyboardio/Kaleidoscope-Bundle-Keyboardio ../hardware/keyboardio
## We delete the Bundle's version of Kaleidoscope, and symlink ourselves in.
## This makes sure we're using the current version of the library.
- rm -rf ../hardware/keyboardio/avr/libraries/Kaleidoscope
- ln -s $(pwd) ../hardware/keyboardio/avr/libraries/Kaleidoscope
- export KALEIDOSCOPE_TEMP_PATH=$TRAVIS_BUILD_DIR/.kaleidoscope-build-cache
- export BOARD_HARDWARE_PATH=$TRAVIS_BUILD_DIR/../hardware
- export ARDUINO_PATH=$TRAVIS_BUILD_DIR/arduino-1.8.13
- make adjust-git-timestamps
- wget --quiet $ARDUINO_DOWNLOAD_URL -O - | tar xJf -
- make prepare-ccache
jobs:
include:
- env: TEST_CMD="make -j 2 smoke-sketches"
- env: TEST_CMD="CCACHE_NOT_SUPPORTED=1 make simulator-tests"
- env: TEST_CMD="make cpplint"
- env: TEST_CMD="make find-filename-conflicts"
- env: TEST_CMD="make shellcheck"
- env: TEST_CMD="make check-astyle"
script:
- unset CC
- eval $TEST_CMD
notifications:
email:
on_success: change
on_failure: change
cache:
apt: true
ccache: true
directories:
- .download-cache
- .kaleidoscope-build-cache
16 changes: 16 additions & 0 deletions .travis/setup-ramdisk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash


export BLDDIR=/home/travis/build

df -h
du -sh "$HOME"
du -sh "$BLDDIR"
sudo mv "$BLDDIR" "$BLDDIR.ori"
sudo mkdir -p "$BLDDIR"
sudo mount -t tmpfs -o size=8192m tmps "$BLDDIR"
time sudo cp -R "$BLDDIR.ori/." "$BLDDIR"
sudo chown -R travis:travis "$BLDDIR"
df -h
du -sh "$HOME"
du -sh "$BLDDIR"
21 changes: 21 additions & 0 deletions src/Kaleidoscope-Hardware-Dygma-DefyWN.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* -*- mode: c++ -*-
* kaleidoscope::device::dygma::Raise -- Kaleidoscope device plugin for Dygma Raise
* Copyright (C) 2017-2019 Keyboard.io, Inc
* Copyright (C) 2017-2019 Dygma Lab S.L.
*
* 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 the Free Software
* Foundation, version 3.
*
* This program 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 program. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

#include "kaleidoscope/device/dygma/DefyWN.h"
56 changes: 56 additions & 0 deletions src/kaleidoscope/device/ATmega32U4Keyboard.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/* -*- mode: c++ -*-
* device::ATmega32U4Keyboard -- Generic ATmega32U4 keyboard base class
* Copyright (C) 2019 Keyboard.io, Inc
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of version 3 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program 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 program. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

#if defined(__AVR__) || defined(KALEIDOSCOPE_VIRTUAL_BUILD)

#include <Arduino.h>
#include "kaleidoscope/device/Base.h"

#include "kaleidoscope/driver/mcu/ATmega32U4.h"
#include "kaleidoscope/driver/keyscanner/ATmega.h"
#include "kaleidoscope/driver/storage/ATmega32U4EEPROMProps.h"
#include "kaleidoscope/driver/storage/AVREEPROM.h"

namespace kaleidoscope {
namespace device {

struct ATmega32U4KeyboardProps : kaleidoscope::device::BaseProps {
typedef kaleidoscope::driver::mcu::ATmega32U4Props MCUProps;
typedef kaleidoscope::driver::mcu::ATmega32U4<MCUProps> MCU;
typedef kaleidoscope::driver::storage::ATmega32U4EEPROMProps StorageProps;
typedef kaleidoscope::driver::storage::AVREEPROM<StorageProps> Storage;
};

#ifndef KALEIDOSCOPE_VIRTUAL_BUILD
template <typename _DeviceProps>
class ATmega32U4Keyboard : public kaleidoscope::device::Base<_DeviceProps> {
public:
auto serialPort() -> decltype(Serial) & {
return Serial;
}
};
#else // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
template <typename _DeviceProps>
class ATmega32U4Keyboard;
#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD

}
}

#endif
Loading

0 comments on commit e767f2f

Please sign in to comment.