aboutsummaryrefslogtreecommitdiff
path: root/keyboards/converter/hp_46010a
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/converter/hp_46010a')
-rw-r--r--keyboards/converter/hp_46010a/keyboard.json (renamed from keyboards/converter/hp_46010a/info.json)10
-rw-r--r--keyboards/converter/hp_46010a/matrix.c31
-rw-r--r--keyboards/converter/hp_46010a/rules.mk14
3 files changed, 25 insertions, 30 deletions
diff --git a/keyboards/converter/hp_46010a/info.json b/keyboards/converter/hp_46010a/keyboard.json
index da29c72fac..4519306981 100644
--- a/keyboards/converter/hp_46010a/info.json
+++ b/keyboards/converter/hp_46010a/keyboard.json
@@ -6,10 +6,18 @@
"usb": {
"vid": "0xFEED",
"pid": "0x6060",
- "device_version": "0.0.1"
+ "device_version": "0.0.1",
+ "wait_for_enumeration": true
},
"processor": "atmega32u4",
"bootloader": "halfkay",
+ "features": {
+ "bootmagic": false,
+ "mousekey": true,
+ "extrakey": true,
+ "console": true,
+ "nkro": true
+ },
"layouts": {
"LAYOUT": {
"layout": [
diff --git a/keyboards/converter/hp_46010a/matrix.c b/keyboards/converter/hp_46010a/matrix.c
index 7f4e11ab27..a36e8821a3 100644
--- a/keyboards/converter/hp_46010a/matrix.c
+++ b/keyboards/converter/hp_46010a/matrix.c
@@ -82,17 +82,17 @@ void matrix_scan_user(void) {
// switch, and then into the diode, then into one of the columns into the
// matrix. the reset pin can be used to reset the entire counter.
-#define RESET _BV(PB0)
-#define SCLK _BV(PB1)
-#define SDATA _BV(PB3)
-#define LED _BV(PD6)
+#define HP_46010A_RESET_PIN B0
+#define HP_46010A_SCLK_PIN B1
+#define HP_46010A_SDATA_PIN B3
+#define HP_46010A_LED_PIN D6
inline
static
void SCLK_increment(void) {
- PORTB &= ~SCLK ;
+ gpio_write_pin_low(HP_46010A_SCLK_PIN);
_delay_us( 4 ) ; // make sure the line is stable
- PORTB |= SCLK ;
+ gpio_write_pin_high(HP_46010A_SCLK_PIN);
_delay_us( 4 ) ;
return ;
@@ -101,9 +101,9 @@ void SCLK_increment(void) {
inline
static
void Matrix_Reset(void) {
- PORTB |= RESET ;
+ gpio_write_pin_high(HP_46010A_RESET_PIN);
_delay_us( 4 ) ; // make sure the line is stable
- PORTB &= ~RESET ;
+ gpio_write_pin_low(HP_46010A_RESET_PIN);
return ;
}
@@ -116,7 +116,7 @@ uint8_t Matrix_ReceiveByte (void) {
for ( uint8_t bit = 0; bit < MATRIX_COLS; ++bit ) {
// toggle the clock
SCLK_increment();
- temp = (PINB & SDATA) << 4 ;
+ temp = gpio_read_pin(HP_46010A_SDATA_PIN) << 4 ;
received |= temp >> bit ;
}
@@ -138,18 +138,19 @@ void Matrix_ThrowByte(void) {
void matrix_init (void) {
// debug_matrix = 1;
// PB0 (SS) and PB1 (SCLK) set to outputs
- DDRB |= RESET | SCLK ;
+ gpio_set_pin_output(HP_46010A_RESET_PIN);
+ gpio_set_pin_output(HP_46010A_SCLK_PIN);
// PB2, is unused, and PB3 is our serial input
- DDRB &= ~SDATA ;
+ gpio_set_pin_input(HP_46010A_SDATA_PIN);
// SS is reset for this board, and is active High
// SCLK is the serial clock and is active High
- PORTB &= ~RESET ;
- PORTB |= SCLK ;
+ gpio_write_pin_low(HP_46010A_RESET_PIN);
+ gpio_write_pin_high(HP_46010A_SCLK_PIN);
// led pin
- DDRD |= LED ;
- PORTD &= ~LED ;
+ gpio_set_pin_output(HP_46010A_LED_PIN);
+ gpio_write_pin_low(HP_46010A_LED_PIN);
matrix_init_kb();
diff --git a/keyboards/converter/hp_46010a/rules.mk b/keyboards/converter/hp_46010a/rules.mk
index 104381f12f..857395fb40 100644
--- a/keyboards/converter/hp_46010a/rules.mk
+++ b/keyboards/converter/hp_46010a/rules.mk
@@ -1,17 +1,3 @@
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = yes # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes # Enable N-Key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-AUDIO_ENABLE = no # Audio output
-RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-SPLIT_KEYBOARD = no
-WAIT_FOR_USB = yes
CUSTOM_MATRIX = yes
SRC = matrix.c