Renamed keyboard, future pull

I just renamed the keyboard and made some simplifying changes in order to make a pull request sometime soon.

I'm too frustrated, tired and knowledge limited to achive using the PWM for leds, I didn't even get to use the debug mode...

I intend to end basic led color change using layers (if I can), document everything properly and make a pull request so other users can continue/use this project.
pull/4126/head
fpazos 6 years ago
parent 3a69000863
commit 468dcfb1a8

@ -4,11 +4,32 @@
#include "quantum.h" #include "quantum.h"
#include "led.h" #include "led.h"
// Modified by Xydane /* ANSI LAYOUT
// Original: ESC| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10| F11| F12| PSC| PGU| PGD
// #define LAYOUT(k00) {{ k00 }} GRA| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ' | ¡ | BCKS | DEL
TAB| Q | W | E | R | T | Y | U | I | O | P | ` | + | | HOM
CAP| A | S | D | F | G | H | J | K | L | Ñ | ´ | Ç | ENTER | END
LSI | Z | X | C | V | B | N | M | , | . | - | RSHIF | UP | FNL
LCT| WIN| ALT| ESPACE | ALG| FN | RCT| LEF| DOW| RIG
*/
#define KEYMAP_SEVENTY_ANSI( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \
K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, \
K50, K51, K52, K53, K54, K55, K56, K57, K58, K59 \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0F }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K0E, K1E }, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K1D, K2D }, \
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \
{ K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E }, \
{ K50, K51, K52, KC_NO, KC_NO, KC_NO, K53, KC_NO, KC_NO,K54, K55, K56, K57, K58, K59 } \
}
/* /* ISO LAYOUT
ESC| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10| F11| F12| PSC| PGU| PGD ESC| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10| F11| F12| PSC| PGU| PGD
GRA| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ' | ¡ | BCKS | DEL GRA| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ' | ¡ | BCKS | DEL
TAB| Q | W | E | R | T | Y | U | I | O | P | ` | + | | HOM TAB| Q | W | E | R | T | Y | U | I | O | P | ` | + | | HOM
@ -17,7 +38,7 @@
LCT| WIN| ALT| ESPACE | ALG| FN | RCT| LEF| DOW| RIG LCT| WIN| ALT| ESPACE | ALG| FN | RCT| LEF| DOW| RIG
*/ */
#define KEYMAP_SEVENTY( \ #define KEYMAP_SEVENTY_ISO( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \

@ -0,0 +1,6 @@
#ifndef BLUEPILL70_H
#define BLUEPILL70_H
#include "bluepill.h"
// Modified by Xydane
// #define LAYOUT(k00) {{ k00 }}
#endif

@ -13,7 +13,7 @@
// Modified by Xydane // Modified by Xydane
#define MANUFACTURER "QMK" #define MANUFACTURER "QMK"
#define USBSTR_MANUFACTURER 'T', '\x00', 'M', '\x00', 'K', '\x00', ' ', '\x00', '\xc6', '\x00' #define USBSTR_MANUFACTURER 'T', '\x00', 'M', '\x00', 'K', '\x00', ' ', '\x00', '\xc6', '\x00'
#define PRODUCT "Stm32 70" #define PRODUCT "BluePill70"
#define USBSTR_PRODUCT 'C', '\x00', 'h', '\x00', 'i', '\x00', 'b', '\x00', 'i', '\x00', 'O', '\x00', 'S', '\x00', ' ', '\x00', 'Q', '\x00', 'M', '\x00', 'K', '\x00', ' ', '\x00', 't', '\x00', 'e', '\x00', 's', '\x00', 't', '\x00' #define USBSTR_PRODUCT 'C', '\x00', 'h', '\x00', 'i', '\x00', 'b', '\x00', 'i', '\x00', 'O', '\x00', 'S', '\x00', ' ', '\x00', 'Q', '\x00', 'M', '\x00', 'K', '\x00', ' ', '\x00', 't', '\x00', 'e', '\x00', 's', '\x00', 't', '\x00'
#define DESCRIPTION "QMK keyboard firmware test for ChibiOS" #define DESCRIPTION "QMK keyboard firmware test for ChibiOS"

@ -81,9 +81,6 @@ void matrix_init(void)
LED_ON(); LED_ON();
wait_ms(500); wait_ms(500);
LED_OFF(); LED_OFF();
// Start of PWM dual color leds
//iniciarluces();
} }
uint8_t matrix_scan(void) uint8_t matrix_scan(void)

@ -14,8 +14,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
//#include "keymap_extras/keymap_spanish.h" // For future unicode spanish keys
#include "stm32.h" #include "bluepill32.h"
// Define layer names // Define layer names
#define _NORMAL 0 #define _NORMAL 0
@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Highly Modified by Xydane // Highly Modified by Xydane
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_NORMAL] = KEYMAP_SEVENTY( [_NORMAL] = KEYMAP_SEVENTY_ISO(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCREEN,KC_HOME, KC_END, \ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCREEN,KC_HOME, KC_END, \
KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DELETE, \ KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DELETE, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGUP, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGUP, \
@ -33,7 +33,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LSPO, KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSPC,KC_UP, F(1), \ KC_LSPO, KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSPC,KC_UP, F(1), \
KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,F(0), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT ), KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,F(0), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT ),
[_FNONE] = KEYMAP_SEVENTY( [_FNONE] = KEYMAP_SEVENTY_ISO(
KC_TRNS, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE,KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, \ KC_TRNS, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE,KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_P7, KC_P8, KC_P9, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_P7, KC_P8, KC_P9, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_P4, KC_P5, KC_P6, KC_PPLS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_P4, KC_P5, KC_P6, KC_PPLS, KC_TRNS, KC_TRNS, KC_TRNS, \
@ -41,7 +41,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_P0, KC_PDOT,KC_PENT, KC_PSLS, KC_TRNS,KC_TRNS,KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_P0, KC_PDOT,KC_PENT, KC_PSLS, KC_TRNS,KC_TRNS,KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, F(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS ), KC_TRNS, KC_TRNS, KC_TRNS, F(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS ),
[_FNTWO] = KEYMAP_SEVENTY( [_FNTWO] = KEYMAP_SEVENTY_ISO(
KC_TRNS, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE,KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, \ KC_TRNS, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE,KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_P7, KC_P8, KC_P9, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_P7, KC_P8, KC_P9, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_P4, KC_P5, KC_P6, KC_PPLS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_P4, KC_P5, KC_P6, KC_PPLS, KC_TRNS, KC_TRNS, KC_TRNS, \

@ -0,0 +1,95 @@
/*
Copyright 2012,2013 Jun Wako <wakojun@gmail.com>
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/>.
*/
#include "bluepill32.h"
// Define layer names
#define _NORMAL 0
#define _FNONE 1
#define _FNTWO 2
// Highly Modified by Xydane
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_NORMAL] = KEYMAP_SEVENTY_ISO(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCREEN,KC_HOME, KC_END, \
KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DELETE, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGUP, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_NUHS, KC_ENT,KC_PGDOWN, \
KC_LSPO, KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSPC,KC_UP, F(1), \
KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,F(0), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT ),
[_FNONE] = KEYMAP_SEVENTY_ISO(
KC_TRNS, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE,KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_P7, KC_P8, KC_P9, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_P4, KC_P5, KC_P6, KC_PPLS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_P1, KC_P2, KC_P3, KC_PAST, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_P0, KC_PDOT,KC_PENT, KC_PSLS, KC_TRNS,KC_TRNS,KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, F(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS ),
[_FNTWO] = KEYMAP_SEVENTY_ISO(
KC_TRNS, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE,KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_P7, KC_P8, KC_P9, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_P4, KC_P5, KC_P6, KC_PPLS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_P1, KC_P2, KC_P3, KC_PAST, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_P0, KC_PDOT,KC_PENT, KC_PSLS, KC_TRNS,KC_TRNS,KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, F(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS ),
};
const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay
[1] = ACTION_LAYER_TOGGLE(2), // to Fn overlay
[2] = ACTION_FUNCTION(2),
[3] = ACTION_FUNCTION(3),
};
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
switch (id) {
case 2:
if (record->event.pressed) {
palTogglePad(GPIOA, 1);
}
break;
// Continuar para incluir funciones propias
/*case 3:
if (record->event.pressed) {
function_led(algo);
}
break;*/
}
}
/* Layer based ilumination, set min value to 0xFFF */
/*uint32_t layer_state_set_user(uint32_t state) {
switch (biton32(state)) {
case _FNONE:
custom_function1(min1, min2;)
rgblight_setrgb (0xFF, 0x00, 0x00);
break;
case _FNTWO:
custom_function2(min1, min2;)
rgblight_setrgb (0x00, 0xFF, 0x00);
break;
default: // for any other layers, or the default layer
custom_function3(min1, min2;)
rgblight_setrgb (0x00, 0xFF, 0xFF);
break;
}
return state;
}*/

@ -1,9 +1,18 @@
/* B3 A15 A10 A9 A8 B15 B14 B13 B12 B11 B10 B1 B0 A7 A6
Introduction
Resistor fix
Not bootloader
Layouts, ansi iso, adding a new map
Pinout, problems using some pins
B3 A15 A10 A9 A8 B15 B14 B13 B12 B11 B10 B1 B0 A7 A6
B9 ESC| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10| F11| F12| PSC| PGU| PGD B9 ESC| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10| F11| F12| PSC| PGU| PGD
B8 GRA| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ' | ¡ | BCKS | DEL B8 GRA| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ' | ¡ | BCKS | DEL
B7 TAB| Q | W | E | R | T | Y | U | I | O | P | ` | + | | HOM B7 TAB| Q | W | E | R | T | Y | U | I | O | P | ` | + | | HOM
B6 º (CAP| A | S | D | F | G | H | J | K | L | Ñ | ´ | Ç | ENTER | END B6 CAP| A | S | D | F | G | H | J | K | L | Ñ | ´ | Ç | ENTER | END
B5 LSI| < | Z | X | C | V | B | N | M | , | . | - | RSHIF | UP | FNL B5 LSI| < | Z | X | C | V | B | N | M | , | . | - | RSHIF | UP | FNT
B4 LCT| WIN| ALT| ESPACE | ALG| FN | RCT| LEF| DOW| RIG B4 LCT| WIN| ALT| ESPACE | ALG| FN | RCT| LEF| DOW| RIG
*/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 232 KiB

@ -1,37 +0,0 @@
/*
Copyright 2012,2013 Jun Wako <wakojun@gmail.com>
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/>.
*/
#include "stm32.h"
// Highly Modified by Xydane
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KEYMAP_SEVENTY(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCREEN, KC_PGUP, KC_PGDOWN, \
KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DELETE, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGUP, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, K3C, K3D, KC_PGDOWN, \
KC_LSFT, KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_INS, \
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, RALT(kc), K55, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT ),
KEYMAP_SEVENTY(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCREEN, KC_PGUP, KC_PGDOWN, \
KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DELETE, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGUP, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, K3C, K3D, KC_PGDOWN, \
KC_LSFT, KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_INS, \
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, RALT(kc), K55, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT ),
};

@ -1 +0,0 @@
#include "stm32.h"

@ -1,79 +0,0 @@
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
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/>.
*/
#include "hal.h"
//#include "led.h"
/* New awesome dual color leds functions, animations and more */
/* Based on pwm_callback by fcayci: https://github.com/fcayci/STM32F4-ChibiOS/blob/master/pwm_callback/main.c */
static void pwmcb(PWMDriver *pwmp);
static PWMConfig pwmcfg = {
1000, // Clock frecuency (seconds) = 1/value
100, // PWM period (ticks = clockfrecuency * pwmperiod)
pwmcb, // Callback, disable with NULL
{
{PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 0 */
{PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 1 */
//{PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 2 */
//{PWM_OUTPUT_ACTIVE_HIGH, NULL} /* Enable Channel 3 */
},
0, /* HW dependent part */
0
};
/*
* PWM callback.
* Each time calculate the next duty cycle.
*/
static void pwmcb(PWMDriver *pwmp) {
(void)pwmp;
static uint16_t dir = 0, width = 0;
if (dir == 0) {width = (width + 100);}
else {width = (width - 100);}
if (width >= 100) {dir = 1;}
else if (width == 0) {dir = 0;}
pwmEnableChannel(&PWMD4, 0, width);
pwmEnableChannel(&PWMD4, 1, 100-width);
//pwmEnableChannel(&PWMD4, 2, width);
//pwmEnableChannel(&PWMD4, 3, 100-width);
}
static void iniciarluces(void) {
palSetPadMode(GPIOC, 15, PAL_MODE_ALTERNATE(2)); /* Green */
palSetPadMode(GPIOC, 14, PAL_MODE_ALTERNATE(2)); /* Red */
pwmStart(&PWMD4, &pwmCFG);
}
// inline void gh60_caps_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); }
// inline void gh60_caps_led_on(void) { DDRB |= (1<<2); PORTB &= ~(1<<2); }

@ -1,35 +0,0 @@
#include "ch.h"
#include "hal.h"
static PWMConfig pwmcfg = {
200000,
1000,
NULL,
{
{PWM_OUTPUT_ACTIVE_HIGH, NULL},
{PWM_OUTPUT_ACTIVE_HIGH, NULL},
{PWM_OUTPUT_ACTIVE_HIGH, NULL},
{PWM_OUTPUT_ACTIVE_HIGH, NULL}
},
0,
0
};
int main(void) {
halInit();
chSysInit();
palSetPadMode(GPIOE, 8, PAL_MODE_ALTERNATE(2));
palSetPadMode(GPIOE, 9, PAL_MODE_ALTERNATE(2));
pwmStart(&PWMD1, &pwmcfg);
while (1) {
pwmEnableChannel(&PWMD1, 0, PWM_PERCENTAGE_TO_WIDTH(&PWMD1, 1000)); // 10% duty cycle
chThdSleepMilliseconds(2000);
pwmEnableChannel(&PWMD1, 0, PWM_PERCENTAGE_TO_WIDTH(&PWMD1, 9000)); // 90% duty cycle
chThdSleepMilliseconds(2000);
}
return 0;
}

@ -1,6 +0,0 @@
#ifndef STM70_H
#define STM70_H
#include "stm32.h"
// Modified by Xydane
// #define LAYOUT(k00) {{ k00 }}
#endif
Loading…
Cancel
Save