Skip to content

Commit

Permalink
cont, compiles but not tested on hardware
Browse files Browse the repository at this point in the history
  • Loading branch information
4pplet committed Sep 23, 2022
1 parent f5a45ce commit d6aa839
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 91 deletions.
21 changes: 14 additions & 7 deletions keyboards/4pplet/eagle_viper_rep/rev_b/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW

/* In switch leds */
//#define BACKLIGHT_PIN A3
//#define BACKLIGHT_PWM_DRIVER PWMD2
//#define BACKLIGHT_PWM_CHANNEL 4
//#define BACKLIGHT_PAL_MODE 2
#define BACKLIGHT_PIN A6
#define BACKLIGHT_PWM_DRIVER PWMD3
#define BACKLIGHT_PWM_CHANNEL 1
#define BACKLIGHT_PAL_MODE 2
#define BACKLIGHT_ON_STATE 1
#define BACKLIGHT_LEVELS 10
#define BACKLIGHT_BREATHING TRUE
Expand All @@ -37,9 +37,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Underglow on PA8 like waffling80

/* Underglow */
#define RGB_DI_PIN A8
#define RGBLED_NUM 16
// ADD INFO
#define RGBLED_NUM 2
#define WS2812_EXTERNAL_PULLUP
#define RGB_DI_PIN A8
#define WS2812_PWM_DRIVER PWMD1
#define WS2812_PWM_CHANNEL 1
//#define WS2812_PWM_PAL_MODE 2 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2
//#define WS2812_PWM_COMPLEMENTARY_OUTPUT // Define for a complementary timer output (TIMx_CHyN); omit for a normal timer output (TIMx_CHy).
//#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
//#define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
//#define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU.

/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
Expand Down
2 changes: 1 addition & 1 deletion keyboards/4pplet/eagle_viper_rep/rev_b/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@

#define HAL_USE_PWM TRUE

#define HAL_USE_SPI TRUE
#define HAL_USE_SPI FALSE

#include_next <halconf.h>
74 changes: 4 additions & 70 deletions keyboards/4pplet/eagle_viper_rep/rev_b/info.json
Original file line number Diff line number Diff line change
@@ -1,82 +1,16 @@
{
"keyboard_name": "Eagle Viper REP Rev A",
"keyboard_name": "Eagle Viper REP Rev B",
"manufacturer": "4pplet",
"url": "https://github.com/4pplet/eagle_viper_rep",
"maintainer": "4pplet",
"usb": {
"vid": "0x4444",
"pid": "0x0007",
"device_version": "0.0.1"
"pid": "0x0010",
"device_version": "0.0.2"
},
"layouts": {
"LAYOUT_all": {
"layout": [
{ "label": "Esc", "x": 0, "y": 0 },
{ "label": "!", "x": 1, "y": 0 },
{ "label": "@", "x": 2, "y": 0 },
{ "label": "#", "x": 3, "y": 0 },
{ "label": "$", "x": 4, "y": 0 },
{ "label": "%", "x": 5, "y": 0 },
{ "label": "^", "x": 6, "y": 0 },
{ "label": "&", "x": 7, "y": 0 },
{ "label": "*", "x": 8, "y": 0 },
{ "label": "(", "x": 9, "y": 0 },
{ "label": ")", "x": 10, "y": 0 },
{ "label": "_", "x": 11, "y": 0 },
{ "label": "+", "x": 12, "y": 0 },
{ "label": "|", "x": 13, "y": 0 },
{ "label": "~", "x": 14, "y": 0 },
{ "label": "Tab", "x": 0, "y": 1, "w": 1.5 },
{ "label": "Q", "x": 1.5, "y": 1 },
{ "label": "W", "x": 2.5, "y": 1 },
{ "label": "E", "x": 3.5, "y": 1 },
{ "label": "R", "x": 4.5, "y": 1 },
{ "label": "T", "x": 5.5, "y": 1 },
{ "label": "Y", "x": 6.5, "y": 1 },
{ "label": "U", "x": 7.5, "y": 1 },
{ "label": "I", "x": 8.5, "y": 1 },
{ "label": "O", "x": 9.5, "y": 1 },
{ "label": "P", "x": 10.5, "y": 1 },
{ "label": "{", "x": 11.5, "y": 1 },
{ "label": "}", "x": 12.5, "y": 1 },
{ "label": "Backsp.", "x": 13.5, "y": 1, "w": 1.5 },
{ "label": "Caps Lock", "x": 0, "y": 2, "w": 1.75 },
{ "label": "A", "x": 1.75, "y": 2 },
{ "label": "S", "x": 2.75, "y": 2 },
{ "label": "D", "x": 3.75, "y": 2 },
{ "label": "F", "x": 4.75, "y": 2 },
{ "label": "G", "x": 5.75, "y": 2 },
{ "label": "H", "x": 6.75, "y": 2 },
{ "label": "J", "x": 7.75, "y": 2 },
{ "label": "K", "x": 8.75, "y": 2 },
{ "label": "L", "x": 9.75, "y": 2 },
{ "label": ":", "x": 10.75, "y": 2 },
{ "label": "\"", "x": 11.75, "y": 2 },
{ "label": "~", "x": 12.75, "y": 2},
{ "label": "Enter", "x": 13.75, "y": 2, "w": 1.25 },
{ "label": "Shift", "x": 0, "y": 3, "w": 1.25 },
{ "label": "|", "x": 1.25, "y": 3 },
{ "label": "Z", "x": 2.25, "y": 3 },
{ "label": "X", "x": 3.25, "y": 3 },
{ "label": "C", "x": 4.25, "y": 3 },
{ "label": "V", "x": 5.25, "y": 3 },
{ "label": "B", "x": 6.25, "y": 3 },
{ "label": "N", "x": 7.25, "y": 3 },
{ "label": "M", "x": 8.25, "y": 3 },
{ "label": "<", "x": 9.25, "y": 3 },
{ "label": ">", "x": 10.25, "y": 3 },
{ "label": "?", "x": 11.25, "y": 3 },
{ "label": "Shift", "x": 12.25, "y": 3, "w": 1.75 },
{ "label": "Fn", "x": 14, "y": 3, "w": 1 },
{ "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 },
{ "label": "Win", "x": 1.25, "y": 4, "w": 1.25 },
{ "label": "Alt", "x": 2.5, "y": 4, "w": 1.25 },
{ "label": "Space", "x": 3.75, "y": 4, "w": 6.25 },
{ "label": "Alt", "x": 10, "y": 4, "w": 1.25 },
{ "label": "Menu", "x": 11.25, "y": 4, "w": 1.25 },
{ "label": "Win", "x": 12.5, "y": 4, "w": 1.25 },
{ "label": "Ctrl", "x": 13.75, "y": 4, "w": 1.25 }
]
"layout": [{"label":"0,0", "x":0, "y":0}, {"label":"1,0", "x":1, "y":0}, {"label":"0,1", "x":2, "y":0}, {"label":"1,1", "x":3, "y":0}, {"label":"0,2", "x":4, "y":0}, {"label":"1,2", "x":5, "y":0}, {"label":"0,3", "x":6, "y":0}, {"label":"1,3", "x":7, "y":0}, {"label":"0,4", "x":8, "y":0}, {"label":"1,4", "x":9, "y":0}, {"label":"0,5", "x":10, "y":0}, {"label":"1,5", "x":11, "y":0}, {"label":"0,6", "x":12, "y":0}, {"label":"1,6", "x":13, "y":0}, {"label":"3,6", "x":14, "y":0}, {"label":"2,0", "x":0, "y":1, "w":1.5}, {"label":"3,0", "x":1.5, "y":1}, {"label":"2,1", "x":2.5, "y":1}, {"label":"3,1", "x":3.5, "y":1}, {"label":"2,2", "x":4.5, "y":1}, {"label":"3,2", "x":5.5, "y":1}, {"label":"2,3", "x":6.5, "y":1}, {"label":"3,3", "x":7.5, "y":1}, {"label":"2,4", "x":8.5, "y":1}, {"label":"3,4", "x":9.5, "y":1}, {"label":"2,5", "x":10.5, "y":1}, {"label":"3,5", "x":11.5, "y":1}, {"label":"2,6", "x":12.5, "y":1}, {"label":"5,6", "x":13.5, "y":1, "w":1.5}, {"label":"4,0", "x":0, "y":2, "w":1.75}, {"label":"5,0", "x":1.75, "y":2}, {"label":"4,1", "x":2.75, "y":2}, {"label":"5,1", "x":3.75, "y":2}, {"label":"4,2", "x":4.75, "y":2}, {"label":"5,2", "x":5.75, "y":2}, {"label":"4,3", "x":6.75, "y":2}, {"label":"5,3", "x":7.75, "y":2}, {"label":"4,4", "x":8.75, "y":2}, {"label":"5,4", "x":9.75, "y":2}, {"label":"4,5", "x":10.75, "y":2}, {"label":"5,5", "x":11.75, "y":2}, {"label":"4,6", "x":12.75, "y":2}, {"label":"7,6", "x":13.75, "y":2, "w":1.25}, {"label":"6,0", "x":0, "y":3, "w":1.25}, {"label":"7,0", "x":1.25, "y":3}, {"label":"6,1", "x":2.25, "y":3}, {"label":"7,1", "x":3.25, "y":3}, {"label":"6,2", "x":4.25, "y":3}, {"label":"7,2", "x":5.25, "y":3}, {"label":"6,3", "x":6.25, "y":3}, {"label":"7,3", "x":7.25, "y":3}, {"label":"6,4", "x":8.25, "y":3}, {"label":"7,4", "x":9.25, "y":3}, {"label":"6,5", "x":10.25, "y":3}, {"label":"7,5", "x":11.25, "y":3}, {"label":"6,6", "x":12.25, "y":3, "w":1.75}, {"label":"9,6", "x":14, "y":3}, {"label":"8,0", "x":0, "y":4, "w":1.25}, {"label":"9,0", "x":1.25, "y":4, "w":1.25}, {"label":"9,1", "x":2.5, "y":4, "w":1.25}, {"label":"9,2", "x":3.75, "y":4, "w":2.25}, {"label":"9,3", "x":6, "y":4, "w":1.25}, {"label":"9,4", "x":10, "y":4, "w":1.25}, {"label":"8,5", "x":11.25, "y":4, "w":1.25}, {"label":"9,5", "x":12.5, "y":4, "w":1.25}, {"label":"8,6", "x":13.75, "y":4, "w":1.25}, {"label":"8,4", "x":7, "y":9, "w":2.75}]
}
}
}
12 changes: 4 additions & 8 deletions keyboards/4pplet/eagle_viper_rep/rev_b/mcuconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,8 @@

#include_next <mcuconf.h>

#undef STM32_PWM_USE_TIM2
#define STM32_PWM_USE_TIM2 TRUE
#undef STM32_PWM_USE_TIM1
#define STM32_PWM_USE_TIM1 TRUE

#undef STM32_SPI_USE_SPI1
#define STM32_SPI_USE_SPI1 TRUE

/* Reallocate the SysTick timer from TIM2 to TIM3, TIM2 is used for in switch leds */
#undef STM32_ST_USE_TIMER
#define STM32_ST_USE_TIMER 3
#undef STM32_PWM_USE_TIM3
#define STM32_PWM_USE_TIM3 TRUE
5 changes: 3 additions & 2 deletions keyboards/4pplet/eagle_viper_rep/rev_b/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ A alternative PCB for Viper and Eagle V2 and V3

Make example for this keyboard (after setting up your build environment):

make 4pplet/eagle_viper_rep/rev_a:default
make 4pplet/eagle_viper_rep/rev_b:default

See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).

How to enter bootloader (DFU):
* Press and hold the button on the keyboard (the small one on the same side as the MCU) for more than 1 second. The keyboard will then enter bootloader (DFU) mode and it's ready to flash the firmware.

* Note: If holding the button a shorter time, the keyboard will just reset. If you want to exit bootloader mode without flashing a firmware, dissconnect the keyboard from your PC and reconnect it.

Alternative option if the firmware is already pre-flashed:
* Unplug your keyboard, hold down the Spacebar and B at the same time, plug in your keyboard and wait a second before releasing the keys. Bootmagic lite is enabled by default.
* Unplug your keyboard, hold down the Esc-key and at the same time, plug in your keyboard and wait a second before releasing the keys. Bootmagic lite is enabled by default.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ 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/>.
*/
#include "rev_a.h"
#include "rev_b.h"

void board_init(void) {
setPinInputHigh(CAPS_PIN);
Expand Down
4 changes: 2 additions & 2 deletions keyboards/4pplet/eagle_viper_rep/rev_b/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ BOOTLOADER = stm32-dfu
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = yes # Console for debug
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Enable N-Key Rollover
BACKLIGHT_ENABLE = yes
BACKLIGHT_DRIVER = pwm
RGBLIGHT_ENABLE = yes
WS2812_DRIVER = spi
WS2812_DRIVER = pwm

# Wildcard to allow APM32 MCU
DFU_SUFFIX_ARGS = -p FFFF -v FFFF
Expand Down

0 comments on commit d6aa839

Please sign in to comment.