mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-02-21 14:24:56 +00:00
update skyloong/gk87/bl_pro/led_hc595.c
This commit is contained in:
parent
22e59a56a9
commit
71cf1d0e94
@ -35,14 +35,14 @@
|
||||
|
||||
#define CLOCK_TIME 15
|
||||
|
||||
static inline void setPinOutput_writeLow(pin_t pin) {
|
||||
static inline void gpio_set_pin_output_write_low(pin_t pin) {
|
||||
ATOMIC_BLOCK_FORCEON {
|
||||
gpio_set_pin_output(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 {
|
||||
gpio_set_pin_output(pin);
|
||||
gpio_write_pin_high(pin);
|
||||
@ -64,9 +64,9 @@ static inline void clockPulse(uint16_t n) {
|
||||
}
|
||||
|
||||
static void s_serial_to_parallel(uint8_t data) { // Serial port to parallel port function
|
||||
setPinOutput_writeLow(HC595_DS);
|
||||
setPinOutput_writeLow(HC595_SH_PIN);
|
||||
setPinOutput_writeLow(HC595_ST_PIN);
|
||||
gpio_set_pin_output_write_low(HC595_DS);
|
||||
gpio_set_pin_output_write_low(HC595_SH_PIN);
|
||||
gpio_set_pin_output_write_low(HC595_ST_PIN);
|
||||
for(uint8_t i = 0; i < 8; i++) {
|
||||
if(data & 0x01){
|
||||
gpio_write_pin_high(HC595_DS);
|
||||
|
Loading…
Reference in New Issue
Block a user