summaryrefslogtreecommitdiff
path: root/keyboards/cluepad
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-06-29 16:21:41 -0400
committerGitHub <noreply@github.com>2016-06-29 16:21:41 -0400
commit215c2119af5281072d5a6efb0308408793cadd08 (patch)
tree995bb9788a4f40b835d7713af3eb3015e9f43689 /keyboards/cluepad
parent755b17f8fc0f484261108f912af38430b27e9c95 (diff)
downloadqmk_firmware-215c2119af5281072d5a6efb0308408793cadd08.tar.gz
qmk_firmware-215c2119af5281072d5a6efb0308408793cadd08.zip
Implements subprojects and updates projects for this (#459)
* non-working commit * working * subprojects implemented for planck * pass a subproject variable through to c * consolidates clueboard revisions * thanks for letting me know about conflicts.. * turn off audio for yang's * corrects starting paths for subprojects * messing around with travis * semicolon * travis script * travis script * script for travis * correct directory (probably), amend files to commit * remove origin before adding * git pull, correct syntax * git checkout * git pull origin branch * where are we? * where are we? * merging * force things to happen * adds commit message, adds add * rebase, no commit message * rebase branch * idk! * try just pull * fetch - merge * specify repo branch * checkout * goddammit * merge? idk * pls * after all * don't split up keyboards * syntax * adds quick for all-keyboards * trying out new script * script update * lowercase * all keyboards * stop replacing compiled.hex automatically * adds if statement * skip automated build branches * forces push to automated build branch * throw an add in there * upstream? * adds AUTOGEN * ignore all .hex files again * testing out new repo * global ident * generate script, keyboard_keymap.hex * skip generation for now, print pandoc info, submodule update * try trusty * and sudo * try generate * updates subprojects to keyboards * no idea * updates to keyboards * cleans up clueboard stuff * setup to use local readme * updates cluepad, planck experimental * remove extra led.c [ci skip] * disable power up for now * config files updates * makefile updates * .h file updates, config tuning * disable audio for yang
Diffstat (limited to 'keyboards/cluepad')
-rw-r--r--keyboards/cluepad/Makefile4
-rw-r--r--keyboards/cluepad/backlight.c54
-rw-r--r--keyboards/cluepad/cluepad.c53
-rw-r--r--keyboards/cluepad/cluepad.h4
4 files changed, 50 insertions, 65 deletions
diff --git a/keyboards/cluepad/Makefile b/keyboards/cluepad/Makefile
index eb7a58025e..a331ff4dcd 100644
--- a/keyboards/cluepad/Makefile
+++ b/keyboards/cluepad/Makefile
@@ -1,8 +1,4 @@
-
-# # project specific files
-SRC = backlight.c
-
# MCU name
#MCU = at90usb1287
MCU = atmega32u4
diff --git a/keyboards/cluepad/backlight.c b/keyboards/cluepad/backlight.c
deleted file mode 100644
index a9caed1df8..0000000000
--- a/keyboards/cluepad/backlight.c
+++ /dev/null
@@ -1,54 +0,0 @@
-#include <avr/io.h>
-#include "backlight.h"
-#include "led.h"
-
-#include "print.h"
-
-int pwm_level;
-
-void led_set_kb(uint8_t usb_led)
-{
- print("led_set\n");
-}
-
-void init_backlight_pin(void)
-{
- // Set C7 to output
- DDRC |= (1<<7);
-
- // Initialize the timer
- TC4H = 0x03;
- OCR4C = 0xFF;
- TCCR4A = 0b10000010;
- TCCR4B = 0b00000001;
-}
-
-void backlight_set(uint8_t level)
-{
- // Determine the PWM level
- switch (level)
- {
- case 0:
- // 33%
- pwm_level = 0x54;
- break;
- case 1:
- // 66%
- pwm_level = 0xA8;
- break;
- case 2:
- // 100%
- pwm_level = 0xFF;
- break;
- case 3:
- // 0%
- pwm_level = 0x00;
- break;
- default:
- xprintf("Unknown level: %d\n", level);
- }
-
- // Write the PWM level to the timer
- TC4H = pwm_level >> 8;
- OCR4A = 0xFF & pwm_level;
-}
diff --git a/keyboards/cluepad/cluepad.c b/keyboards/cluepad/cluepad.c
index cbbdccb300..1867b617fd 100644
--- a/keyboards/cluepad/cluepad.c
+++ b/keyboards/cluepad/cluepad.c
@@ -1,15 +1,60 @@
#include "cluepad.h"
+int pwm_level;
+
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
- #ifdef BACKLIGHT_ENABLE
- init_backlight_pin();
- #endif
-
// JTAG disable for PORT F. write JTD bit twice within four cycles.
MCUCR |= (1<<JTD);
MCUCR |= (1<<JTD);
};
+
+void led_set_kb(uint8_t usb_led)
+{
+ print("led_set\n");
+}
+
+void backlight_init_ports(void)
+{
+ // Set C7 to output
+ DDRC |= (1<<7);
+
+ // Initialize the timer
+ TC4H = 0x03;
+ OCR4C = 0xFF;
+ TCCR4A = 0b10000010;
+ TCCR4B = 0b00000001;
+}
+
+void backlight_set(uint8_t level)
+{
+ // Determine the PWM level
+ switch (level)
+ {
+ case 0:
+ // 33%
+ pwm_level = 0x54;
+ break;
+ case 1:
+ // 66%
+ pwm_level = 0xA8;
+ break;
+ case 2:
+ // 100%
+ pwm_level = 0xFF;
+ break;
+ case 3:
+ // 0%
+ pwm_level = 0x00;
+ break;
+ default:
+ xprintf("Unknown level: %d\n", level);
+ }
+
+ // Write the PWM level to the timer
+ TC4H = pwm_level >> 8;
+ OCR4A = 0xFF & pwm_level;
+}
diff --git a/keyboards/cluepad/cluepad.h b/keyboards/cluepad/cluepad.h
index 615a9111e2..5e4a5999e2 100644
--- a/keyboards/cluepad/cluepad.h
+++ b/keyboards/cluepad/cluepad.h
@@ -1,9 +1,7 @@
#ifndef CLUEPAD_H
#define CLUEPAD_H
-#include "matrix.h"
-#include "keymap.h"
-#include <stddef.h>
+#include "quantum.h"
/* Cluepad matrix layout