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

Refactor more backlight to a common location #8292

Merged
merged 3 commits into from
Mar 6, 2020
Merged
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
align function names
zvecr committed Mar 6, 2020
commit 6e341cc8699873a6c8a18190f36e5d7d2e14c3da
2 changes: 1 addition & 1 deletion quantum/backlight/backlight.c
Original file line number Diff line number Diff line change
@@ -61,7 +61,7 @@ static inline void backlight_off(pin_t backlight_pin) {
# endif
}

void backlight_init_pins(void) {
void backlight_pins_init(void) {
// Setup backlight pin as output and output to off state.
FOR_EACH_LED(setPinOutput(backlight_pin); backlight_off(backlight_pin);)
}
2 changes: 1 addition & 1 deletion quantum/backlight/backlight.h
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ typedef union {
};
} backlight_config_t;

void backlight_init_pins(void);
void backlight_pins_init(void);
void backlight_pins_on(void);
void backlight_pins_off(void);

2 changes: 1 addition & 1 deletion quantum/backlight/backlight_avr.c
Original file line number Diff line number Diff line change
@@ -385,7 +385,7 @@ ISR(TIMERx_OVF_vect)

void backlight_init_ports(void) {
// Setup backlight pin as output and output to on state.
backlight_init_pins();
backlight_pins_init();

// I could write a wall of text here to explain... but TL;DW
// Go read the ATmega32u4 datasheet.
2 changes: 1 addition & 1 deletion quantum/backlight/backlight_soft.c
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ static const uint16_t backlight_duty_table[] = {

static uint8_t scale_backlight(uint8_t v) { return v * (backlight_duty_table_size - 1) / BACKLIGHT_LEVELS; }

void backlight_init_ports(void) { backlight_init_pins(); }
void backlight_init_ports(void) { backlight_pins_init(); }

void backlight_set(uint8_t level) { s_duty_pattern = backlight_duty_table[scale_backlight(level)]; }