Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Bad Wings Support #20153

Merged
merged 20 commits into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
updates based on feedback from drashna
  • Loading branch information
Jason Hazel committed Mar 21, 2023
commit 5b93f3ebf2287be7c73dc2375d056e1655c19200
3 changes: 1 addition & 2 deletions keyboards/hazel/bad_wings/keymaps/default/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ MOUSEKEY_ENABLE = yes
EXTRAKEY_ENABLE = yes
CAPS_WORD_ENABLE = yes
TAP_DANCE_ENABLE = yes
TRI_LAYER_ENABLE = yes
POINTING_DEVICE_ENABLE = yes
TRI_LAYER_ENABLE = yes
9 changes: 4 additions & 5 deletions keyboards/hazel/bad_wings/matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void sr_74hc595_spi_stop(void) {

bool sr_74hc595_spi_start(void) {
if (!spi_start(SHIFTREG_MATRIX_COL_CS, false, 0, SHIFTREG_DIVISOR)) {
xprintf("74hc595 matrix: failed to start spi\n");
dprintf("74hc595 matrix: failed to start spi\n");
sr_74hc595_spi_stop();
return false;
}
Expand Down Expand Up @@ -69,7 +69,7 @@ void clearColumns(void) {
void setColumn(int columnShift, bool test_run) {
uint8_t columnShiftByte = ((uint8_t)1 << columnShift);
if(test_run) {
xprintf("byte sent: %d\n", columnShiftByte);
dprintf("byte sent: %d\n", columnShiftByte);
}
sr_74hc595_spi_send_byte(columnShiftByte);
}
Expand Down Expand Up @@ -111,7 +111,7 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) {
// Loop through the columns, activating one at a time, and read the rows, and place in the new current_matrix
for (int c = 0; c < SHIFTREG_COLS; c++) {
if (debug_output) {
xprintf("column iteration: %d\n", c);
dprintf("column iteration: %d\n", c);
}
setColumn(c, debug_output);
matrix_io_delay();
Expand All @@ -127,8 +127,7 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) {
if (matrix_has_changed) {
matrix_print();
}
// matrix_print();
// xprintf("matrix_has_changed: %d\n", matrix_has_changed);


// Deactivate all the columns for the next run.
clearColumns();
Expand Down
2 changes: 1 addition & 1 deletion keyboards/hazel/bad_wings/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ QUANTUM_LIB_SRC += spi_master.c
CUSTOM_MATRIX = lite

POINTING_DEVICE_DRIVER = cirque_pinnacle_spi

POINTING_DEVICE_ENABLE = yes