Format code according to conventions (#15196)

master
QMK Bot 2021-11-17 13:07:45 -08:00 committed by GitHub
parent e0a5056963
commit cc7600cf0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 26 additions and 29 deletions

View File

@ -385,12 +385,9 @@ ISR(TIMERx_OVF_vect)
{ {
// Only run this ISR at ~120 Hz // Only run this ISR at ~120 Hz
if(breath_scale_counter++ == breathing_freq_scale_factor) if (breath_scale_counter++ == breathing_freq_scale_factor) {
{
breath_scale_counter = 1; breath_scale_counter = 1;
} } else {
else
{
return; return;
} }
uint16_t interval = (uint16_t)breathing_period * breathing_ISR_frequency / BREATHING_STEPS; uint16_t interval = (uint16_t)breathing_period * breathing_ISR_frequency / BREATHING_STEPS;
@ -435,9 +432,9 @@ void backlight_init_ports(void) {
*/ */
TCCRxA = _BV(COMxx1) | _BV(WGM11); // = 0b00001010; TCCRxA = _BV(COMxx1) | _BV(WGM11); // = 0b00001010;
TCCRxB = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001; TCCRxB = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001;
# endif #endif
# ifdef BACKLIGHT_CUSTOM_RESOLUTION #ifdef BACKLIGHT_CUSTOM_RESOLUTION
# if (BACKLIGHT_CUSTOM_RESOLUTION > 0xFFFF || BACKLIGHT_CUSTOM_RESOLUTION < 1) # if (BACKLIGHT_CUSTOM_RESOLUTION > 0xFFFF || BACKLIGHT_CUSTOM_RESOLUTION < 1)
# error "This out of range of the timer capabilities" # error "This out of range of the timer capabilities"
# elif (BACKLIGHT_CUSTOM_RESOLUTION < 0xFF) # elif (BACKLIGHT_CUSTOM_RESOLUTION < 0xFF)
@ -447,9 +444,9 @@ void backlight_init_ports(void) {
breathing_freq_scale_factor = F_CPU / BACKLIGHT_CUSTOM_RESOLUTION / 120; breathing_freq_scale_factor = F_CPU / BACKLIGHT_CUSTOM_RESOLUTION / 120;
# endif # endif
ICRx = BACKLIGHT_CUSTOM_RESOLUTION; ICRx = BACKLIGHT_CUSTOM_RESOLUTION;
# else #else
ICRx = TIMER_TOP; ICRx = TIMER_TOP;
# endif #endif
backlight_init(); backlight_init();
#ifdef BACKLIGHT_BREATHING #ifdef BACKLIGHT_BREATHING