mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-27 11:31:13 +00:00
delete skyloong/gk980/q1/readme.md and add skyloong/gk980/q1/ansi/readme.md.
This commit is contained in:
parent
3d2f0fefeb
commit
90eda6da5a
@ -16,11 +16,11 @@ The following is the QMK Firmware for the Destop 96% keylayout - designed by Do
|
|||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
make skyloong/gk980/q1:default
|
make skyloong/gk980/q1/ansi:default
|
||||||
|
|
||||||
Flashing example for this keyboard:
|
Flashing example for this keyboard:
|
||||||
|
|
||||||
make skyloong/gk980/q1:default:flash
|
make skyloong/gk980/q1/ansi:default:flash
|
||||||
|
|
||||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
|
|
@ -24,27 +24,27 @@ static inline void select_delay(uint16_t n) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void setPinOutput_writeLow(pin_t pin) {
|
static inline void gpio_set_pin_output_write_low(pin_t pin) {
|
||||||
ATOMIC_BLOCK_FORCEON {
|
ATOMIC_BLOCK_FORCEON {
|
||||||
gpio_set_pin_output(pin);
|
gpio_set_pin_output(pin);
|
||||||
gpio_write_pin_low(pin);
|
gpio_write_pin_low(pin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void setPinOutput_writeHigh(pin_t pin) {
|
static inline void gpio_set_pin_output_write_high(pin_t pin) {
|
||||||
ATOMIC_BLOCK_FORCEON {
|
ATOMIC_BLOCK_FORCEON {
|
||||||
gpio_set_pin_output(pin);
|
gpio_set_pin_output(pin);
|
||||||
gpio_write_pin_high(pin);
|
gpio_write_pin_high(pin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void setPinInputHigh_atomic(pin_t pin) {
|
static inline void gpio_set_pin_input_high_atomic(pin_t pin) {
|
||||||
ATOMIC_BLOCK_FORCEON {
|
ATOMIC_BLOCK_FORCEON {
|
||||||
gpio_set_pin_input_high(pin);
|
gpio_set_pin_input_high(pin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint8_t readMatrixPin(pin_t pin) {
|
static inline uint8_t gpio_read_matrix_pin(pin_t pin) {
|
||||||
if (pin != NO_PIN) {
|
if (pin != NO_PIN) {
|
||||||
return (gpio_read_pin(pin) == MATRIX_INPUT_PRESSED_STATE) ? 0 : 1;
|
return (gpio_read_pin(pin) == MATRIX_INPUT_PRESSED_STATE) ? 0 : 1;
|
||||||
} else {
|
} else {
|
||||||
@ -52,7 +52,7 @@ static inline uint8_t readMatrixPin(pin_t pin) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void clockPulse(uint16_t n) {
|
static inline void clock_pulse(uint16_t n) {
|
||||||
gpio_write_pin_high(HC595_SH_PIN);
|
gpio_write_pin_high(HC595_SH_PIN);
|
||||||
gpio_write_pin_high(HC595_ST_PIN);
|
gpio_write_pin_high(HC595_ST_PIN);
|
||||||
select_delay(n);
|
select_delay(n);
|
||||||
@ -63,14 +63,14 @@ static inline void clockPulse(uint16_t n) {
|
|||||||
// matrix code
|
// matrix code
|
||||||
|
|
||||||
static bool select_col(uint8_t col) {
|
static bool select_col(uint8_t col) {
|
||||||
setPinOutput_writeHigh(HC595_DS_PIN);
|
gpio_set_pin_output_write_high(HC595_DS_PIN);
|
||||||
for (uint8_t m = 0; m <= col; m++) {
|
for (uint8_t m = 0; m <= col; m++) {
|
||||||
if(m == 0){
|
if(m == 0){
|
||||||
writePinLow(HC595_DS_PIN);
|
gpio_write_pin_low(HC595_DS_PIN);
|
||||||
}else{
|
}else{
|
||||||
writePinHigh(HC595_DS_PIN);
|
gpio_write_pin_high(HC595_DS_PIN);
|
||||||
}
|
}
|
||||||
clockPulse(ClockTime);
|
clock_pulse(ClockTime);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@ -78,18 +78,18 @@ static bool select_col(uint8_t col) {
|
|||||||
|
|
||||||
static void unselect_col(uint8_t col) {
|
static void unselect_col(uint8_t col) {
|
||||||
uint8_t x = (MATRIX_COLS - col);
|
uint8_t x = (MATRIX_COLS - col);
|
||||||
setPinOutput_writeHigh(HC595_DS_PIN);
|
gpio_set_pin_output_write_high(HC595_DS_PIN);
|
||||||
for (uint8_t y = 0; y < x ; y++) {
|
for (uint8_t y = 0; y < x ; y++) {
|
||||||
clockPulse(ClockTime);
|
clock_pulse(ClockTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void unselect_cols(void) {
|
static void unselect_cols(void) {
|
||||||
setPinOutput_writeLow(HC595_SH_PIN);
|
gpio_set_pin_output_write_low(HC595_SH_PIN);
|
||||||
setPinOutput_writeLow(HC595_ST_PIN);
|
gpio_set_pin_output_write_low(HC595_ST_PIN);
|
||||||
setPinOutput_writeHigh(HC595_DS_PIN);
|
gpio_set_pin_output_write_high(HC595_DS_PIN);
|
||||||
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
|
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
|
||||||
clockPulse(ClockTime);
|
clock_pulse(ClockTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,7 +97,7 @@ __attribute__((weak)) void matrix_init_pins(void) {
|
|||||||
unselect_cols();
|
unselect_cols();
|
||||||
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
|
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
|
||||||
if (row_pins[x] != NO_PIN) {
|
if (row_pins[x] != NO_PIN) {
|
||||||
setPinInputHigh_atomic(row_pins[x]);
|
gpio_set_pin_input_high_atomic(row_pins[x]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -114,7 +114,7 @@ __attribute__((weak)) void matrix_read_rows_on_col(matrix_row_t current_matrix[]
|
|||||||
// For each row...
|
// For each row...
|
||||||
for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) {
|
for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) {
|
||||||
// Check row pin state
|
// Check row pin state
|
||||||
if (readMatrixPin(row_pins[row_index]) == 0) {
|
if (gpio_read_matrix_pin(row_pins[row_index]) == 0) {
|
||||||
// Pin LO, set col bit
|
// Pin LO, set col bit
|
||||||
current_matrix[row_index] |= row_shifter;
|
current_matrix[row_index] |= row_shifter;
|
||||||
key_pressed = true;
|
key_pressed = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user