diff options
Diffstat (limited to 'quantum/backlight/backlight.c')
-rw-r--r-- | quantum/backlight/backlight.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/quantum/backlight/backlight.c b/quantum/backlight/backlight.c index 708022f68f..e57b31d103 100644 --- a/quantum/backlight/backlight.c +++ b/quantum/backlight/backlight.c @@ -21,6 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. backlight_config_t backlight_config; +// TODO: migrate to backlight_config_t +static uint8_t breathing_period = BREATHING_PERIOD; + /** \brief Backlight initialization * * FIXME: needs doc @@ -191,3 +194,21 @@ void backlight_disable_breathing(void) { */ bool is_backlight_breathing(void) { return backlight_config.breathing; } #endif + +// following are marked as weak purely for backwards compatibility +__attribute__((weak)) void breathing_period_set(uint8_t value) { breathing_period = value ? value : 1; } + +__attribute__((weak)) uint8_t get_breathing_period(void) { return breathing_period; } + +__attribute__((weak)) void breathing_period_default(void) { breathing_period_set(BREATHING_PERIOD); } + +__attribute__((weak)) void breathing_period_inc(void) { breathing_period_set(breathing_period + 1); } + +__attribute__((weak)) void breathing_period_dec(void) { breathing_period_set(breathing_period - 1); } + +// defaults for backlight api +__attribute__((weak)) void backlight_init_ports(void) {} + +__attribute__((weak)) void backlight_set(uint8_t level) {} + +__attribute__((weak)) void backlight_task(void) {} |