aboutsummaryrefslogtreecommitdiff
path: root/keyboards/handwired/pterodactyl
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/handwired/pterodactyl')
-rw-r--r--keyboards/handwired/pterodactyl/keyboard.json (renamed from keyboards/handwired/pterodactyl/info.json)9
-rw-r--r--keyboards/handwired/pterodactyl/matrix.c10
-rw-r--r--keyboards/handwired/pterodactyl/rules.mk14
3 files changed, 14 insertions, 19 deletions
diff --git a/keyboards/handwired/pterodactyl/info.json b/keyboards/handwired/pterodactyl/keyboard.json
index ad83f34999..fac20aeebe 100644
--- a/keyboards/handwired/pterodactyl/info.json
+++ b/keyboards/handwired/pterodactyl/keyboard.json
@@ -10,6 +10,15 @@
},
"processor": "atmega32u4",
"bootloader": "caterina",
+ "features": {
+ "bootmagic": false,
+ "mousekey": false,
+ "extrakey": true,
+ "console": true,
+ "nkro": true,
+ "unicode": true,
+ "bluetooth": true
+ },
"debounce": 0,
"tapping": {
"toggle": 1
diff --git a/keyboards/handwired/pterodactyl/matrix.c b/keyboards/handwired/pterodactyl/matrix.c
index 0dff65eda6..54da26a7d4 100644
--- a/keyboards/handwired/pterodactyl/matrix.c
+++ b/keyboards/handwired/pterodactyl/matrix.c
@@ -182,14 +182,14 @@ void init_expander(void) {
uint8_t data[] = { expander_input_pin_mask, 0};
# endif
#endif
- expander_status = i2c_writeReg(I2C_ADDR, IODIRA, data, sizeof(data), I2C_TIMEOUT);
+ expander_status = i2c_write_register(I2C_ADDR, IODIRA, data, sizeof(data), I2C_TIMEOUT);
if (!expander_status) {
// set pull-up
// - unused : off : 0
// - input : on : 1
// - driving : off : 0
- expander_status = i2c_writeReg(I2C_ADDR, GPPUA, data, sizeof(data), I2C_TIMEOUT);
+ expander_status = i2c_write_register(I2C_ADDR, GPPUA, data, sizeof(data), I2C_TIMEOUT);
}
}
@@ -305,7 +305,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
// Read columns from expander, unless it's in an error state
if (! expander_status) {
uint8_t data;
- i2c_readReg(I2C_ADDR, EXPANDER_COL_REGISTER, &data, 1, I2C_TIMEOUT);
+ i2c_read_register(I2C_ADDR, EXPANDER_COL_REGISTER, &data, 1, I2C_TIMEOUT);
current_matrix[current_row] |= (~data) & expander_input_pin_mask;
}
@@ -329,7 +329,7 @@ static void select_row(uint8_t row) {
// set active row low : 0
// set other rows hi-Z : 1
uint8_t data = 0xFF & ~(1<<row);
- i2c_writeReg(I2C_ADDR, EXPANDER_ROW_REGISTER, &data, 1, I2C_TIMEOUT);
+ i2c_write_register(I2C_ADDR, EXPANDER_ROW_REGISTER, &data, 1, I2C_TIMEOUT);
}
// select on teensy
@@ -385,7 +385,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
return false;
}
- i2c_writeReg(I2C_ADDR, EXPANDER_ROW_REGISTER, &column_state, 1, I2C_TIMEOUT);
+ i2c_write_register(I2C_ADDR, EXPANDER_ROW_REGISTER, &column_state, 1, I2C_TIMEOUT);
column_state = ~column_state;
} else {
for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) {
diff --git a/keyboards/handwired/pterodactyl/rules.mk b/keyboards/handwired/pterodactyl/rules.mk
index 108e1498a8..e332a03eaa 100644
--- a/keyboards/handwired/pterodactyl/rules.mk
+++ b/keyboards/handwired/pterodactyl/rules.mk
@@ -1,21 +1,7 @@
# Processor frequency
F_CPU = 8000000
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = no # 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
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-UNICODE_ENABLE = yes
CUSTOM_MATRIX = yes
-BLUETOOTH_ENABLE = yes
SRC += matrix.c
I2C_DRIVER_REQUIRED = yes