Skip to content

Commit

Permalink
Merge pull request #12 from Salicylic-acid3/nrf52
Browse files Browse the repository at this point in the history
Add New KeyBoard Naked64SF
  • Loading branch information
sekigon-gonnoc authored Jun 30, 2019
2 parents 3d11945 + b093a22 commit 334e0d1
Show file tree
Hide file tree
Showing 16 changed files with 1,823 additions and 0 deletions.
385 changes: 385 additions & 0 deletions keyboards/naked60_ble/keymaps/salicylic/test.c

Large diffs are not rendered by default.

73 changes: 73 additions & 0 deletions keyboards/naked60_ble/rev1/test.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#pragma once

//#include "../naked64.h"

//void promicro_bootloader_jmp(bool program);

#ifndef KEYBOARDS_NAKED64_BLE_REV1_REV1_H_
#define KEYBOARDS_NAKED64_BLE_REV1_REV1_H_

#include "quantum.h"

/*#ifdef RGBLIGHT_ENABLE
//rgb led driver
#include "ws2812.h"
#endif
#ifdef USE_I2C
#include <stddef.h>
#ifdef __AVR__
#include <avr/io.h>
#include <avr/interrupt.h>
#endif
#endif*/

//void promicro_bootloader_jmp(bool program);
/*
* ,------------------------------------------ -----------------------------------------.
* | L00 | L20 | L70 | L31 | L02 | L52 | L13 | | L63 | L34 | L05 | L45 | L16 | L66 | L37 |
* |------------------------------------------ ------------------------------------------+
* | L10 | L30 | L01 | L41 | L12 | L62 | L23 | | L73 | L44 | L15 | L55 | L26 | L76 | L47 |
* |------------------------------------------ ------------------------------------------+
* | L40 | L11 | L51 | L22 | L72 | L33 | | L04 | L54 | L25 | L65 | L36 | L07 | L57 |
* |------------------------------------ ------------------------------------------+
* | L50 | L21 | L61 | L32 | L03 | L43 | | L14 | L64 | L35 | L75 | L46 | L17 | L67 |
* |------------------------------------ ------------------------------------------+
* | L60 | | L71 | L42 | | L53 | | L24 | L74 | | L06 | L56 | L27 | L77 |
* |------------------------------------ ------------------------------------------'
*/

#define LAYOUT( \
L00, L20, L70, L31, L02, L52, L13, L63, L34, L05, L45, L16, L66, L37, \
L10, L30, L01, L41, L12, L62, L23, L73, L44, L15, L55, L26, L76, L47, \
L40, L11, L51, L22, L72, L33, L04, L54, L25, L65, L36, L07, L57, \
L50, L21, L61, L32, L03, L43, L14, L64, L35, L75, L46, L17, L67, \
L60, L71, L42, L53, L24, L74, L06, L56, L27, L77 \
) \
{ \
{ L00, L01, L02, L03, L04, L05, L06, L07 }, \
{ L10, L11, L12, L13, L14, L15, L16, L17 }, \
{ L20, L21, L22, L23, L24, L25, L26, L27 }, \
{ L30, L31, L32, L33, L34, L35, L36, L37 }, \
{ L40, L41, L42, L43, L44, L45, L46, L47 }, \
{ L50, L51, L52, L53, L54, L55, L56, L57 }, \
{ L60, L61, L62, L63, L64, L65, L66, L67 }, \
{ L70, L71, L72, L73, L74, L75, L76, L77 } \
}

// Used to create a keymap using only KC_ prefixed keys
#define LAYOUT_kc( \
L00, L20, L70, L31, L02, L52, L13, L63, L34, L05, L45, L16, L66, L37, \
L10, L30, L01, L41, L12, L62, L23, L73, L44, L15, L55, L26, L76, L47, \
L40, L11, L51, L22, L72, L33, L04, L54, L25, L65, L36, L07, L57, \
L50, L21, L61, L32, L03, L43, L14, L64, L35, L75, L46, L17, L67, \
L60, L71, L42, L53, L24, L74, L06, L56, L27, L77 \
) \
LAYOUT( \
KC_##L00, KC_##L20, KC_##L70, KC_##L31, KC_##L02, KC_##L52, KC_##L13, KC_##L63, KC_##L34, KC_##L05, KC_##L45, KC_##L16, KC_##L66, KC_##L37, \
KC_##L10, KC_##L30, KC_##L01, KC_##L41, KC_##L12, KC_##L62, KC_##L23, KC_##L73, KC_##L44, KC_##L15, KC_##L55, KC_##L26, KC_##L76, KC_##L47, \
KC_##L40, KC_##L11, KC_##L51, KC_##L22, KC_##L72, KC_##L33, KC_##L04, KC_##L54, KC_##L25, KC_##L65, KC_##L36, KC_##L07, KC_##L57, \
KC_##L50, KC_##L21, KC_##L61, KC_##L32, KC_##L03, KC_##L43, KC_##L14, KC_##L64, KC_##L35, KC_##L75, KC_##L46, KC_##L17, KC_##L67, \
KC_##L60, KC_##L71, KC_##L42, KC_##L53, KC_##L24, KC_##L74, KC_##L06, KC_##L56, KC_##L27, KC_##L77 \
)

#endif /* KEYBOARDS_naked64_BLE_REV1_REV1_H_ */
90 changes: 90 additions & 0 deletions keyboards/naked64_ble/board/custom_board.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
/**
* Copyright (c) 2014 - 2017, Nordic Semiconductor ASA
* Copyright (c) 2018, Sekigon
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form, except as embedded into a Nordic
* Semiconductor ASA integrated circuit in a product or a software update for
* such product, must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* 4. This software, with or without modification, must only be used with a
* Nordic Semiconductor ASA integrated circuit.
*
* 5. Any software provided in binary form under this license must not be reverse
* engineered, decompiled, modified and/or disassembled.
*
* THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef CUSTOM_BOARD_H
#define CUSTOM_BOARD_H

#ifdef __cplusplus
extern "C" {
#endif

//#include "nrf_gpio.h"

#define GPIO(port, pin) ((port << 6) | pin)
#define PIN1 GPIO(0,8)
#define PIN2 GPIO(0,11)
#define PIN5 GPIO(0,18)
#define PIN6 GPIO(0,16)
#define PIN7 GPIO(0,19)
#define PIN8 GPIO(0,20)
#define PIN9 GPIO(0,22)
#define PIN10 GPIO(0,23)
#define PIN11 GPIO(1,0)
#define PIN12 GPIO(1,3)

#define PIN13 GPIO(0,9)
#define PIN14 GPIO(0,10)
#define PIN15 GPIO(1,15)
#define PIN16 GPIO(1,14)
#define PIN17 GPIO(0,3)
#define PIN18 GPIO(0,30)
#define PIN19 GPIO(0,0)
#define PIN20 GPIO(0,5)
#define PIN22 GPIO(0,7)
//#define NRF_LOG_ENABLED 0
//#define NRF_LOG_BACKEND_SERIAL_USES_UART 0
//#define NRF_LOG_BACKEND_SERIAL_UART_TX_PIN 5
#define NRF_LOG_BACKEND_UART_TX_PIN 8
//#define DEBUG
// Low frequency clock source to be used by the SoftDevice
#ifdef S210
// #define NRF_CLOCK_LFCLKSRC NRF_CLOCK_LFCLKSRC_XTAL_20_PPM
#else
#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_RC, \
.rc_ctiv = 16, \
.rc_temp_ctiv = 2, \
.xtal_accuracy = 0}
#endif

#ifdef __cplusplus
}
#endif

#endif // CUSTOM_BOARD_H
103 changes: 103 additions & 0 deletions keyboards/naked64_ble/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
/*
Copyright 2018 Sekigon
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, either version 2 of the License, or
(at your option) any later version.
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/>.
*/

#ifndef CONFIG_H
#define CONFIG_H

/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6464
#define DEVICE_VER 0x0003
/* in python2: list(u"whatever".encode('utf-16-le')) */
/* at most 32 characters or the ugly hack in usb_main.c borks */
#define MANUFACTURER Salicylic_Acid
#define PRODUCT naked64
#define DESCRIPTION QMK based keyboard

/* key matrix size */
#define MATRIX_ROWS 8
#define MATRIX_COLS 8

//#define DIODE_DIRECTION ROW2COL
#define DIODE_DIRECTION COL2ROW

/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST

/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 1

/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE

/* key combination for command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)

#define TAPPING_TERM 200
#define PREVENT_STUCK_MODIFIERS
#define IGNORE_MOD_TAP_INTERRUPT

#define MK_3_SPEED

#undef MOUSEKEY_INTERVAL
#define MOUSEKEY_INTERVAL 0

#undef MOUSEKEY_TIME_TO_MAX
#define MOUSEKEY_TIME_TO_MAX 150

#undef MOUSEKEY_MAX_SPEED
#define MOUSEKEY_MAX_SPEED 3

#undef MOUSEKEY_MOVE_DELTA
#define MOUSEKEY_MOVE_DELTA 5

#undef MOUSEKEY_DELAY
#define MOUSEKEY_DELAY 0

#undef MOUSEKEY_WHEEL_MAX_SPEED
#define MOUSEKEY_WHEEL_MAX_SPEED 1

#undef MOUSEKEY_WHEEL_TIME_TO_MAX
#define MOUSEKEY_WHEEL_TIME_TO_MAX 0

#define RGBLIGHT_ANIMATIONS
#define RGB_DI_PIN GPIO(0,9) // The pin the LED strip is connected to
#define RGBLED_NUM 6 // Number of LEDs in your strip

/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/

/* disable debug print */
//#define NO_DEBUG

/* disable print */
//#define NO_PRINT

/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION

#endif
Loading

0 comments on commit 334e0d1

Please sign in to comment.