Skip to content

Commit 186db7a

Browse files
committed
Change the name of toggle_bit to toggle_led
Which bit? There is only one LED. PD6. Everybody knows that. This changes all the functions related to the LED to be more consistent with this idea. Signed-off-by: Vernon Mauery <[email protected]>
1 parent 4896336 commit 186db7a

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

cw-kbd.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -447,11 +447,11 @@ static void inject_string(void) {
447447
}
448448
}
449449

450-
static void set_toggle_bit(void) {
450+
static void set_led(void) {
451451
PORTD |= _BV(PD6);
452452
}
453453

454-
static void toggle_bit(void) {
454+
static void toggle_led(void) {
455455
PORTD ^= _BV(PD6);
456456
}
457457

@@ -880,16 +880,16 @@ void set_command_mode(bool mode) {
880880
if (command_mode) {
881881
cw_set_word_space(false);
882882
cw_disable_outputs(CW_ENABLE_KEYER|CW_ENABLE_DIDAH);
883-
ms_tick_register(toggle_bit, TICK_TOGGLE_BIT, 250);
883+
ms_tick_register(toggle_led, TICK_TOGGLE_LED, 250);
884884
ms_tick_register(exit_command_mode, TICK_FAUX_WDT, 30000);
885885
command_mode_cb(0);
886886
cw_set_dq_callback(command_mode_cb);
887887
} else {
888888
cw_set_word_space(true);
889889
cw_enable_outputs(CW_ENABLE_KEYER|CW_ENABLE_DIDAH);
890-
ms_tick_unregister(TICK_TOGGLE_BIT);
890+
ms_tick_unregister(TICK_TOGGLE_LED);
891891
ms_tick_unregister(TICK_FAUX_WDT);
892-
set_toggle_bit();
892+
set_led();
893893
cw_set_dq_callback(hid_nq);
894894
}
895895
cw_clear_queues();
@@ -974,7 +974,7 @@ void hw_init(void)
974974

975975
/* enable blinky led */
976976
DDRD |= _BV(PD6);
977-
set_toggle_bit();
977+
set_led();
978978

979979
/* initialize the command mode button */
980980
int6_enable();

tick.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ enum tick_events {
4040
TICK_CW_PARSE,
4141
TICK_CW_ADVANCE,
4242
TICK_USB_WORK,
43-
TICK_TOGGLE_BIT,
43+
TICK_TOGGLE_LED,
4444
TICK_INJECT_STR,
4545
TICK_FAUX_WDT,
4646
TICK_EVENTS

0 commit comments

Comments
 (0)