A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Get rid of stupid _backlight_* function names

_remote_backlight_* and _buttonlight_* are cleaned as well

Change-Id: I73653752831bbe170c26ba95d3bc04c2e3a5cf30

authored by

Marcin Bukat and committed by
Gerrit Rockbox
89ba7e81 2a3e1628

+679 -687
+2 -2
apps/plugins/lib/grey_core.c
··· 469 469 static void _timer_isr(void) 470 470 { 471 471 #if defined(HAVE_BACKLIGHT_INVERSION) && !defined(SIMULATOR) 472 - unsigned long check = rb->is_backlight_on(true) 472 + unsigned long check = rb->isbacklight_hw_on(true) 473 473 ? 0 : _GREY_BACKLIGHT_ON; 474 474 475 475 if ((_grey_info.flags & (_GREY_BACKLIGHT_ON|GREY_RAWMAPPED)) == check) ··· 648 648 else 649 649 { 650 650 #if defined(HAVE_BACKLIGHT_INVERSION) && !defined(SIMULATOR) 651 - if (rb->is_backlight_on(true)) 651 + if (rb->isbacklight_hw_on(true)) 652 652 _grey_info.flags |= _GREY_BACKLIGHT_ON; 653 653 #endif 654 654 fill_gvalues();
+5 -5
apps/plugins/mpegplayer/mpegplayer.c
··· 1093 1093 } 1094 1094 #endif 1095 1095 1096 - static void osd_backlight_on_video_mode(bool video_on) 1096 + static void osdbacklight_hw_on_video_mode(bool video_on) 1097 1097 { 1098 1098 if (video_on) { 1099 1099 /* Turn off backlight timeout */ ··· 1779 1779 retval = stream_seek(time, SEEK_SET); 1780 1780 1781 1781 if (retval >= STREAM_OK) { 1782 - osd_backlight_on_video_mode(true); 1782 + osdbacklight_hw_on_video_mode(true); 1783 1783 osd_backlight_brightness_video_mode(true); 1784 1784 stream_show_vo(true); 1785 1785 ··· 1826 1826 1827 1827 osd_set_status(OSD_STATUS_PAUSED); 1828 1828 1829 - osd_backlight_on_video_mode(false); 1829 + osdbacklight_hw_on_video_mode(false); 1830 1830 /* Leave brightness alone and restore it when OSD is hidden */ 1831 1831 1832 1832 if (stream_can_seek() && rb->global_settings->pause_rewind) { ··· 1847 1847 /* Cancel video and resume auto refresh - the resyc when starting 1848 1848 * playback will perform those tasks */ 1849 1849 osd_set_hp_pause_flag(false); 1850 - osd_backlight_on_video_mode(true); 1850 + osdbacklight_hw_on_video_mode(true); 1851 1851 osd_backlight_brightness_video_mode(true); 1852 1852 osd_cancel_refresh(OSD_REFRESH_VIDEO | OSD_REFRESH_RESUME); 1853 1853 osd_set_status(OSD_STATUS_PLAYING); ··· 1871 1871 if (resume_time != INVALID_TIMESTAMP) 1872 1872 settings.resume_time = resume_time; 1873 1873 1874 - osd_backlight_on_video_mode(false); 1874 + osdbacklight_hw_on_video_mode(false); 1875 1875 osd_backlight_brightness_video_mode(false); 1876 1876 } 1877 1877
+1 -1
bootloader/gigabeat.c
··· 63 63 ata_sleepnow(); 64 64 } 65 65 66 - _backlight_off(); 66 + backlight_hw_off(); 67 67 68 68 power_off(); 69 69 }
+2 -2
bootloader/iaudio_coldfire.c
··· 98 98 sleep(HZ*2); 99 99 100 100 /* Backlight OFF */ 101 - _backlight_off(); 101 + backlight_hw_off(); 102 102 #ifdef HAVE_REMOTE_LCD 103 - _remote_backlight_off(); 103 + remote_backlight_hw_off(); 104 104 #endif 105 105 106 106 __reset_cookie();
+2 -2
bootloader/imx233.c
··· 217 217 system_prepare_fw_start(); 218 218 /* if target defines lcd_enable() in bootloader, take this as a hint that 219 219 * we should use it to properly stop the lcd before moving one, the 220 - * _backlight_off() routine is supposed to disable the lcd at the same time */ 220 + * backlight_hw_off() routine is supposed to disable the lcd at the same time */ 221 221 #ifdef HAVE_LCD_ENABLE 222 - _backlight_off(); 222 + backlight_hw_off(); 223 223 #endif 224 224 disable_interrupt(IRQ_FIQ_STATUS); 225 225 commit_discard_idcache();
+6 -6
bootloader/iriver_h1x0.c
··· 158 158 sleep(HZ*2); 159 159 160 160 /* Backlight OFF */ 161 - _backlight_off(); 161 + backlight_hw_off(); 162 162 #ifdef HAVE_REMOTE_LCD 163 - _remote_backlight_off(); 163 + remote_backlight_hw_off(); 164 164 #endif 165 165 166 166 __reset_cookie(); ··· 418 418 __uda1380_reset_hi(); 419 419 420 420 /* Start with the main backlight OFF. */ 421 - _backlight_init(); 422 - _backlight_off(); 421 + backlight_hw_init(); 422 + backlight_hw_off(); 423 423 424 424 /* Remote backlight ON */ 425 425 #ifdef HAVE_REMOTE_LCD 426 - _remote_backlight_on(); 426 + remote_backlight_hw_on(); 427 427 #endif 428 428 429 429 system_init(); ··· 576 576 sleep(HZ); 577 577 578 578 /* Backlight OFF */ 579 - _backlight_off(); 579 + backlight_hw_off(); 580 580 } 581 581 582 582 cpu_idle_mode(false);
+5 -5
bootloader/iriver_h300.c
··· 102 102 103 103 sleep(HZ*2); 104 104 105 - _backlight_off(); 106 - _remote_backlight_off(); 105 + backlight_hw_off(); 106 + remote_backlight_hw_off(); 107 107 108 108 __reset_cookie(); 109 109 power_off(); ··· 184 184 restore_irq(mask); 185 185 186 186 /* Start with the main backlight OFF. */ 187 - _backlight_init(); 188 - _backlight_off(); 187 + backlight_hw_init(); 188 + backlight_hw_off(); 189 189 190 - _remote_backlight_on(); 190 + remote_backlight_hw_on(); 191 191 192 192 system_init(); 193 193 kernel_init();
+1 -1
bootloader/main-e200r-installer.c
··· 101 101 font_init(); 102 102 button_init(); 103 103 i2c_init(); 104 - _backlight_on(); 104 + backlight_hw_on(); 105 105 106 106 lcd_set_foreground(LCD_WHITE); 107 107 lcd_set_background(LCD_BLACK);
+1 -1
bootloader/main-pp.c
··· 320 320 #endif 321 321 #if defined(SANSA_E200) || defined(PHILIPS_SA9200) 322 322 i2c_init(); 323 - _backlight_on(); 323 + backlight_hw_on(); 324 324 #endif 325 325 326 326 if (button_hold())
+1 -1
bootloader/main-ppsansawipe.c
··· 181 181 font_init(); 182 182 button_init(); 183 183 i2c_init(); 184 - _backlight_on(); 184 + backlight_hw_on(); 185 185 186 186 lcd_set_foreground(LCD_WHITE); 187 187 lcd_set_background(LCD_BLACK);
+1 -1
bootloader/meizu_m3.c
··· 176 176 | QT1106_DI | QT1106_SLD_SLIDER | QT1106_RES_256); 177 177 snprintf(mystring, 64, "%x %2.2x",(slider & 0x008000)>>15, slider&0xff); 178 178 lcd_puts(0,1,mystring); 179 - _backlight_set_brightness((slider & 0xFF) >> 4); 179 + backlight_hw_brightness((slider & 0xFF) >> 4); 180 180 181 181 /* 182 182 if(slider & 0x008000)
+2 -2
bootloader/mpio_hd200_hd300.c
··· 150 150 } 151 151 152 152 /* Backlight OFF */ 153 - _backlight_off(); 153 + backlight_hw_off(); 154 154 __reset_cookie(); 155 155 156 156 power_off(); ··· 372 372 cpu_idle_mode(true); 373 373 374 374 /* lowlevel init only */ 375 - _backlight_init(); 375 + backlight_hw_init(); 376 376 377 377 /* Handle wakeup event. Possibilities are: 378 378 * RTC alarm (HD300)
+3 -3
bootloader/samsung_yps3.c
··· 114 114 i2c_init(); 115 115 fmradio_i2c_init(); 116 116 adc_init(); 117 - _backlight_init(); 117 + backlight_hw_init(); 118 118 button_init_device(); 119 119 120 120 // FM power ··· 259 259 if (button & BUTTON_MENU) { 260 260 if (brightness < MAX_BRIGHTNESS_SETTING) { 261 261 brightness++; 262 - _backlight_set_brightness(brightness); 262 + backlight_hw_brightness(brightness); 263 263 } 264 264 } 265 265 else if (button & BUTTON_BACK) { 266 266 if (brightness > MIN_BRIGHTNESS_SETTING) { 267 267 brightness--; 268 - _backlight_set_brightness(brightness); 268 + backlight_hw_brightness(brightness); 269 269 } 270 270 } 271 271 snprintf(mystring, 64, "brightness %3d", brightness);
+4 -4
bootloader/sansaview.c
··· 54 54 55 55 while(1) 56 56 { 57 - _backlight_on(); 58 - _buttonlight_off(); 57 + backlight_hw_on(); 58 + buttonlight_hw_off(); 59 59 sleep(HZ/4); 60 - _backlight_off(); 61 - _buttonlight_on(); 60 + backlight_hw_off(); 61 + buttonlight_hw_on(); 62 62 sleep(HZ/4); 63 63 } 64 64 }
+3 -3
bootloader/telechips.c
··· 82 82 } 83 83 #if 0 84 84 if (button & BUTTON_SELECT){ 85 - _backlight_off(); 85 + backlight_hw_off(); 86 86 } 87 87 else{ 88 - _backlight_on(); 88 + backlight_hw_on(); 89 89 } 90 90 #endif 91 91 printf("Btn: 0x%08x",button); ··· 147 147 148 148 show_logo(); 149 149 150 - _backlight_on(); 150 + backlight_hw_on(); 151 151 152 152 /* Only load the firmware if TCCBOOT is defined - this ensures SDRAM_START is 153 153 available for loading the firmware. Otherwise display the debug screen. */
+4 -4
firmware/backlight-sw-fading.c
··· 28 28 #include "backlight-sw-fading.h" 29 29 30 30 /* To adapt a target do: 31 - * - make sure _backlight_on doesn't set the brightness to something other than 31 + * - make sure backlight_hw_on doesn't set the brightness to something other than 32 32 * the previous value (lowest brightness in most cases) 33 33 * add proper #defines for software fading 34 34 */ ··· 46 46 { 47 47 if (LIKELY(current_brightness < backlight_brightness)) 48 48 { 49 - _backlight_set_brightness(++current_brightness); 49 + backlight_hw_brightness(++current_brightness); 50 50 } 51 51 return(current_brightness >= backlight_brightness); 52 52 } ··· 56 56 { 57 57 if (LIKELY(current_brightness > MIN_BRIGHTNESS_SETTING)) 58 58 { 59 - _backlight_set_brightness(--current_brightness); 59 + backlight_hw_brightness(--current_brightness); 60 60 return false; 61 61 } 62 62 else 63 63 { 64 64 /* decrement once more, since backlight is off */ 65 65 current_brightness--; 66 - _backlight_off(); 66 + backlight_hw_off(); 67 67 return true; 68 68 } 69 69 }
+20 -20
firmware/backlight.c
··· 126 126 if (buttonlight_timer < 0) 127 127 { 128 128 buttonlight_timer = 0; /* Disable the timeout */ 129 - _buttonlight_off(); 129 + buttonlight_hw_off(); 130 130 } 131 131 else 132 - _buttonlight_on(); 132 + buttonlight_hw_on(); 133 133 } 134 134 135 135 /* external interface */ ··· 421 421 if (backlight_fading_state == NOT_FADING) 422 422 { 423 423 /* make sure the backlight is at lowest level */ 424 - _backlight_on(); 424 + backlight_hw_on(); 425 425 } 426 426 backlight_fading_state = FADING_UP; 427 427 } ··· 429 429 { 430 430 backlight_fading_state = NOT_FADING; 431 431 _backlight_fade_update_state(backlight_brightness); 432 - _backlight_on(); 433 - _backlight_set_brightness(backlight_brightness); 432 + backlight_hw_on(); 433 + backlight_hw_brightness(backlight_brightness); 434 434 } 435 435 } 436 436 ··· 444 444 { 445 445 backlight_fading_state = NOT_FADING; 446 446 _backlight_fade_update_state(MIN_BRIGHTNESS_SETTING-1); 447 - _backlight_off(); 447 + backlight_hw_off(); 448 448 #if (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_SW_HW_REG) 449 449 /* write the lowest brightness level to the hardware so that 450 450 * fading up is glitch free */ 451 - _backlight_set_brightness(MIN_BRIGHTNESS_SETTING); 451 + backlight_hw_brightness(MIN_BRIGHTNESS_SETTING); 452 452 #endif 453 453 #ifdef HAVE_LCD_SLEEP 454 454 backlight_lcd_sleep_countdown(true); ··· 463 463 #if BACKLIGHT_FADE_IN_THREAD 464 464 backlight_setup_fade_down(); 465 465 #else 466 - _backlight_off(); 466 + backlight_hw_off(); 467 467 /* targets that have fading need to start the countdown when done with 468 468 * fading */ 469 469 #ifdef HAVE_LCD_SLEEP ··· 500 500 #if BACKLIGHT_FADE_IN_THREAD 501 501 backlight_setup_fade_up(); 502 502 #else 503 - _backlight_on(); 503 + backlight_hw_on(); 504 504 #endif 505 505 } 506 506 } ··· 514 514 if (timeout < 0) 515 515 { 516 516 remote_backlight_timer = 0; /* Disable the timeout */ 517 - _remote_backlight_off(); 517 + remote_backlight_hw_off(); 518 518 } 519 519 else 520 520 { 521 521 remote_backlight_timer = timeout; 522 - _remote_backlight_on(); 522 + remote_backlight_hw_on(); 523 523 } 524 524 } 525 525 #endif /* HAVE_REMOTE_LCD */ ··· 596 596 597 597 case REMOTE_BACKLIGHT_OFF: 598 598 remote_backlight_timer = 0; /* Disable the timeout */ 599 - _remote_backlight_off(); 599 + remote_backlight_hw_off(); 600 600 break; 601 601 #endif /* HAVE_REMOTE_LCD */ 602 602 ··· 611 611 #ifdef HAVE_BACKLIGHT_BRIGHTNESS 612 612 case BACKLIGHT_BRIGHTNESS_CHANGED: 613 613 backlight_brightness = (int)ev.data; 614 - _backlight_set_brightness((int)ev.data); 614 + backlight_hw_brightness((int)ev.data); 615 615 #if (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_SW_SETTING) \ 616 616 || (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_SW_HW_REG) 617 617 /* receive backlight brightness */ ··· 632 632 633 633 case BUTTON_LIGHT_OFF: 634 634 buttonlight_timer = 0; 635 - _buttonlight_off(); 635 + buttonlight_hw_off(); 636 636 break; 637 637 #ifdef HAVE_BUTTONLIGHT_BRIGHTNESS 638 638 case BUTTON_LIGHT_BRIGHTNESS_CHANGED: 639 - _buttonlight_set_brightness((int)ev.data); 639 + buttonlight_hw_brightness((int)ev.data); 640 640 break; 641 641 #endif /* HAVE_BUTTONLIGHT_BRIGHTNESS */ 642 642 #endif /* HAVE_BUTTON_LIGHT */ ··· 703 703 remote_backlight_timer -= BACKLIGHT_THREAD_TIMEOUT; 704 704 if(remote_backlight_timer <= 0) 705 705 { 706 - _remote_backlight_off(); 706 + remote_backlight_hw_off(); 707 707 } 708 708 } 709 709 #endif /* HAVE_REMOVE_LCD */ ··· 713 713 buttonlight_timer -= BACKLIGHT_THREAD_TIMEOUT; 714 714 if (buttonlight_timer <= 0) 715 715 { 716 - _buttonlight_off(); 716 + buttonlight_hw_off(); 717 717 } 718 718 } 719 719 #endif /* HAVE_BUTTON_LIGHT */ ··· 723 723 { 724 724 queue_init(&backlight_queue, true); 725 725 726 - if (_backlight_init()) 726 + if (backlight_hw_init()) 727 727 { 728 728 #if (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_PWM) 729 729 /* If backlight is already on, don't fade in. */ ··· 962 962 #if defined(HAVE_BACKLIGHT) && !defined(BACKLIGHT_FULL_INIT) 963 963 void backlight_init(void) 964 964 { 965 - (void)_backlight_init(); 966 - _backlight_on(); 965 + (void)backlight_hw_init(); 966 + backlight_hw_on(); 967 967 } 968 968 #endif 969 969
+2 -2
firmware/export/backlight.h
··· 65 65 #endif /* !HAVE_BACKLIGHT */ 66 66 67 67 #ifdef HAVE_REMOTE_LCD 68 - void _remote_backlight_on(void); 69 - void _remote_backlight_off(void); 68 + void remote_backlight_hw_on(void); 69 + void remote_backlight_hw_off(void); 70 70 void remote_backlight_on(void); 71 71 void remote_backlight_off(void); 72 72 void remote_backlight_set_timeout(int value);
+5 -5
firmware/target/arm/as3525/backlight-e200v2-fuze.c
··· 28 28 29 29 int buttonlight_is_on = 0; 30 30 31 - void _backlight_set_brightness(int brightness) 31 + void backlight_hw_brightness(int brightness) 32 32 { 33 33 ascodec_write(AS3514_DCDC15, brightness); 34 34 } 35 35 36 - void _backlight_on(void) 36 + void backlight_hw_on(void) 37 37 { 38 38 #ifdef HAVE_LCD_ENABLE 39 39 lcd_enable(true); /* power on lcd + visible display */ ··· 45 45 #endif 46 46 } 47 47 48 - void _backlight_off(void) 48 + void backlight_hw_off(void) 49 49 { 50 50 ascodec_write(AS3514_DCDC15, 0x0); 51 51 #ifdef HAVE_LCD_ENABLE ··· 53 53 #endif 54 54 } 55 55 56 - void _buttonlight_on(void) 56 + void buttonlight_hw_on(void) 57 57 { 58 58 /* Needed for buttonlight and MicroSD to work at the same time */ 59 59 /* Turn ROD control on, as the OF does */ ··· 63 63 buttonlight_is_on = 1; 64 64 } 65 65 66 - void _buttonlight_off(void) 66 + void buttonlight_hw_off(void) 67 67 { 68 68 /* Needed for buttonlight and MicroSD to work at the same time */ 69 69 /* Turn ROD control off, as the OF does */
+8 -8
firmware/target/arm/as3525/sansa-c200v2/backlight-c200v2.c
··· 98 98 } 99 99 } 100 100 101 - bool _backlight_init(void) 101 + bool backlight_hw_init(void) 102 102 { 103 103 GPIOA_DIR |= 1<<5; 104 104 if (c200v2_variant == 1) { ··· 109 109 return true; 110 110 } 111 111 112 - void _backlight_set_brightness(int brightness) 112 + void backlight_hw_brightness(int brightness) 113 113 { 114 114 backlight_level = brightness_table[brightness]; 115 115 116 116 if (brightness > 0) 117 - _backlight_on(); 117 + backlight_hw_on(); 118 118 else 119 - _backlight_off(); 119 + backlight_hw_off(); 120 120 } 121 121 122 122 static void _pwm_on(void) ··· 130 130 _set_timer2_pwm_ratio(0); 131 131 } 132 132 133 - void _backlight_on(void) 133 + void backlight_hw_on(void) 134 134 { 135 135 if (backlight_is_on == 1) { 136 136 /* Update pwm ratio in case user changed the brightness */ ··· 146 146 backlight_is_on = 1; 147 147 } 148 148 149 - void _backlight_off(void) 149 + void backlight_hw_off(void) 150 150 { 151 151 if (backlight_is_on == 0) 152 152 return; ··· 159 159 #endif 160 160 } 161 161 162 - void _buttonlight_on(void) 162 + void buttonlight_hw_on(void) 163 163 { 164 164 if (buttonlight_is_on == 1) 165 165 return; ··· 169 169 buttonlight_is_on = 1; 170 170 } 171 171 172 - void _buttonlight_off(void) 172 + void buttonlight_hw_off(void) 173 173 { 174 174 if (buttonlight_is_on == 0) 175 175 return;
+7 -7
firmware/target/arm/as3525/sansa-c200v2/backlight-target.h
··· 23 23 24 24 #include <stdbool.h> 25 25 26 - bool _backlight_init(void); 26 + bool backlight_hw_init(void); 27 27 void _backlight_pwm(int on); 28 - void _backlight_on(void); 29 - void _backlight_off(void); 28 + void backlight_hw_on(void); 29 + void backlight_hw_off(void); 30 30 31 31 static inline void _backlight_panic_on(void) 32 32 { 33 - _backlight_on(); 33 + backlight_hw_on(); 34 34 _backlight_pwm(1); 35 35 } 36 36 37 - void _backlight_set_brightness(int brightness); 37 + void backlight_hw_brightness(int brightness); 38 38 int __backlight_is_on(void); 39 39 40 - void _buttonlight_on(void); 41 - void _buttonlight_off(void); 40 + void buttonlight_hw_on(void); 41 + void buttonlight_hw_off(void); 42 42 43 43 /* 44 44 * FIXME: This may be better off in kernel.h, but...
+6 -6
firmware/target/arm/as3525/sansa-clip/backlight-target.h
··· 25 25 #include "lcd.h" 26 26 #include "backlight.h" 27 27 28 - static inline void _backlight_on(void) 28 + static inline void backlight_hw_on(void) 29 29 { 30 30 lcd_enable(true); 31 31 } 32 32 33 - static inline void _backlight_off(void) 33 + static inline void backlight_hw_off(void) 34 34 { 35 35 lcd_enable(false); 36 36 } 37 37 38 - #define _backlight_panic_on() _backlight_on() 38 + #define _backlight_panic_on() backlight_hw_on() 39 39 40 - static inline bool _backlight_init(void) 40 + static inline bool backlight_hw_init(void) 41 41 { 42 42 GPIOD_DIR |= (1<<7); /* for button light */ 43 43 return true; 44 44 } 45 45 46 - static inline void _buttonlight_on(void) 46 + static inline void buttonlight_hw_on(void) 47 47 { 48 48 GPIOD_PIN(7) = (1<<7); 49 49 } 50 50 51 - static inline void _buttonlight_off(void) 51 + static inline void buttonlight_hw_off(void) 52 52 { 53 53 GPIOD_PIN(7) = 0; 54 54 }
+2 -2
firmware/target/arm/as3525/sansa-clipplus/backlight-clip.c
··· 24 24 #include "as3525v2.h" 25 25 #include "ascodec.h" 26 26 27 - void _backlight_on(void) 27 + void backlight_hw_on(void) 28 28 { 29 29 ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x90); 30 30 lcd_enable(true); 31 31 } 32 32 33 - void _backlight_off(void) 33 + void backlight_hw_off(void) 34 34 { 35 35 lcd_enable(false); 36 36 ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x00);
+4 -4
firmware/target/arm/as3525/sansa-clipplus/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - #define _backlight_init() true 24 + #define backlight_hw_init() true 25 25 26 - void _backlight_on(void); 27 - void _backlight_off(void); 28 - #define _backlight_panic_on() _backlight_on() 26 + void backlight_hw_on(void); 27 + void backlight_hw_off(void); 28 + #define _backlight_panic_on() backlight_hw_on() 29 29 30 30 #endif
+2 -2
firmware/target/arm/as3525/sansa-clipv2/backlight-clipv2.c
··· 24 24 #include "as3525v2.h" 25 25 #include "ascodec.h" 26 26 27 - void _backlight_on(void) 27 + void backlight_hw_on(void) 28 28 { 29 29 ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x90); 30 30 lcd_enable(true); 31 31 } 32 32 33 - void _backlight_off(void) 33 + void backlight_hw_off(void) 34 34 { 35 35 lcd_enable(false); 36 36 ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x0);
+6 -6
firmware/target/arm/as3525/sansa-clipv2/backlight-target.h
··· 24 24 #include <stdbool.h> 25 25 #include "cpu.h" 26 26 27 - void _backlight_on(void); 28 - void _backlight_off(void); 29 - #define _backlight_panic_on() _backlight_on() 27 + void backlight_hw_on(void); 28 + void backlight_hw_off(void); 29 + #define _backlight_panic_on() backlight_hw_on() 30 30 31 - static inline bool _backlight_init(void) 31 + static inline bool backlight_hw_init(void) 32 32 { 33 33 GPIOA_DIR |= 1<<5; /* for button light */ 34 34 return true; 35 35 } 36 36 37 - static inline void _buttonlight_on(void) 37 + static inline void buttonlight_hw_on(void) 38 38 { 39 39 GPIOA_PIN(5) = 1<<5; 40 40 } 41 41 42 - static inline void _buttonlight_off(void) 42 + static inline void buttonlight_hw_off(void) 43 43 { 44 44 GPIOA_PIN(5) = 0; 45 45 }
+4 -4
firmware/target/arm/as3525/sansa-clipzip/backlight-clipzip.c
··· 27 27 #include "ascodec.h" 28 28 #include "lcd-target.h" 29 29 30 - bool _backlight_init() 30 + bool backlight_hw_init() 31 31 { 32 32 return true; 33 33 } 34 34 35 - void _backlight_on(void) 35 + void backlight_hw_on(void) 36 36 { 37 37 /* GPIO B1 controls backlight */ 38 38 GPIOB_DIR |= (1 << 1); ··· 43 43 #endif 44 44 } 45 45 46 - void _backlight_off(void) 46 + void backlight_hw_off(void) 47 47 { 48 48 #ifdef HAVE_LCD_ENABLE 49 49 lcd_enable(false); ··· 52 52 GPIOB_PIN(1) = 0; 53 53 } 54 54 55 - void _backlight_set_brightness(int brightness) 55 + void backlight_hw_brightness(int brightness) 56 56 { 57 57 oled_brightness(brightness); 58 58 }
+5 -5
firmware/target/arm/as3525/sansa-clipzip/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - bool _backlight_init(void); 25 - void _backlight_on(void); 26 - void _backlight_off(void); 27 - void _backlight_set_brightness(int brightness); 24 + bool backlight_hw_init(void); 25 + void backlight_hw_on(void); 26 + void backlight_hw_off(void); 27 + void backlight_hw_brightness(int brightness); 28 28 29 - #define _backlight_panic_on() _backlight_on() 29 + #define _backlight_panic_on() backlight_hw_on() 30 30 31 31 #endif
+7 -7
firmware/target/arm/as3525/sansa-e200v2/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - #define _backlight_init() true 25 - void _backlight_on(void); 26 - void _backlight_off(void); 27 - #define _backlight_panic_on() _backlight_on() 28 - void _backlight_set_brightness(int brightness); 24 + #define backlight_hw_init() true 25 + void backlight_hw_on(void); 26 + void backlight_hw_off(void); 27 + #define _backlight_panic_on() backlight_hw_on() 28 + void backlight_hw_brightness(int brightness); 29 29 int __backlight_is_on(void); 30 30 31 - void _buttonlight_on(void); 32 - void _buttonlight_off(void); 31 + void buttonlight_hw_on(void); 32 + void buttonlight_hw_off(void); 33 33 #endif
+7 -7
firmware/target/arm/as3525/sansa-fuze/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - #define _backlight_init() true 25 - void _backlight_on(void); 26 - void _backlight_off(void); 27 - #define _backlight_panic_on() _backlight_on() 28 - void _backlight_set_brightness(int brightness); 24 + #define backlight_hw_init() true 25 + void backlight_hw_on(void); 26 + void backlight_hw_off(void); 27 + #define _backlight_panic_on() backlight_hw_on() 28 + void backlight_hw_brightness(int brightness); 29 29 #ifdef HAVE_BUTTON_LIGHT 30 - void _buttonlight_on(void); 31 - void _buttonlight_off(void); 30 + void buttonlight_hw_on(void); 31 + void buttonlight_hw_off(void); 32 32 #endif 33 33 #endif
+6 -6
firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c
··· 26 26 #include "ascodec.h" 27 27 #include "as3514.h" 28 28 29 - void _backlight_set_brightness(int brightness) 29 + void backlight_hw_brightness(int brightness) 30 30 { 31 31 ascodec_write_pmu(AS3543_BACKLIGHT, 2, brightness * 10); 32 32 } 33 33 34 - bool _backlight_init(void) 34 + bool backlight_hw_init(void) 35 35 { 36 36 ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x80); 37 37 ascodec_write_pmu(AS3543_BACKLIGHT, 2, backlight_brightness * 10); ··· 49 49 return true; 50 50 } 51 51 52 - void _backlight_on(void) 52 + void backlight_hw_on(void) 53 53 { 54 54 #ifdef HAVE_LCD_ENABLE 55 55 lcd_enable(true); /* power on lcd + visible display */ ··· 57 57 ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x80); 58 58 } 59 59 60 - void _backlight_off(void) 60 + void backlight_hw_off(void) 61 61 { 62 62 ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x0); 63 63 #ifdef HAVE_LCD_ENABLE ··· 65 65 #endif 66 66 } 67 67 68 - void _buttonlight_on(void) 68 + void buttonlight_hw_on(void) 69 69 { 70 70 if (amsv2_variant == 0) 71 71 { ··· 77 77 } 78 78 } 79 79 80 - void _buttonlight_off(void) 80 + void buttonlight_hw_off(void) 81 81 { 82 82 if (amsv2_variant == 0) 83 83 {
+7 -7
firmware/target/arm/as3525/sansa-fuzev2/backlight-target.h
··· 25 25 #include "config.h" 26 26 #include "ascodec.h" 27 27 28 - bool _backlight_init(void); 29 - void _backlight_on(void); 30 - void _backlight_off(void); 31 - #define _backlight_panic_on() _backlight_on() 32 - void _backlight_set_brightness(int brightness); 28 + bool backlight_hw_init(void); 29 + void backlight_hw_on(void); 30 + void backlight_hw_off(void); 31 + #define _backlight_panic_on() backlight_hw_on() 32 + void backlight_hw_brightness(int brightness); 33 33 #ifdef HAVE_BUTTON_LIGHT 34 - void _buttonlight_on(void); 35 - void _buttonlight_off(void); 34 + void buttonlight_hw_on(void); 35 + void buttonlight_hw_off(void); 36 36 #endif 37 37 #endif
+4 -4
firmware/target/arm/as3525/sansa-m200v4/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - static inline bool _backlight_init(void) 24 + static inline bool backlight_hw_init(void) 25 25 { 26 26 GPIOD_DIR |= (1<<1); 27 27 return true; 28 28 } 29 29 30 - static inline void _backlight_on(void) 30 + static inline void backlight_hw_on(void) 31 31 { 32 32 GPIOD_PIN(1) = (1<<1); 33 33 } 34 34 35 - static inline void _backlight_off(void) 35 + static inline void backlight_hw_off(void) 36 36 { 37 37 GPIOD_PIN(1) = 0x00; 38 38 } 39 39 40 - #define _backlight_panic_on() _backlight_on() 40 + #define _backlight_panic_on() backlight_hw_on() 41 41 42 42 #endif
+2 -2
firmware/target/arm/as3525/sd-as3525.c
··· 969 969 if (buttonlight_is_on) 970 970 GPIOD_DIR &= ~(1<<7); 971 971 else 972 - _buttonlight_off(); 972 + buttonlight_hw_off(); 973 973 #endif 974 974 975 975 #if defined(HAVE_HOTSWAP) && defined (HAVE_ADJUSTABLE_CPU_VOLTAGE) ··· 993 993 #if defined(HAVE_BUTTON_LIGHT) && defined(HAVE_MULTIDRIVE) 994 994 bitmod32(&CCU_IO, 0<<2, 3<<2); /* XPD is general purpose IO (b3:2 = 00) */ 995 995 if (buttonlight_is_on) 996 - _buttonlight_on(); 996 + buttonlight_hw_on(); 997 997 #endif 998 998 } 999 999 }
+1 -1
firmware/target/arm/as3525/system-as3525.c
··· 360 360 361 361 void system_reboot(void) 362 362 { 363 - _backlight_off(); 363 + backlight_hw_off(); 364 364 365 365 disable_irq(); 366 366
+5 -5
firmware/target/arm/at91sam/lyre_proto1/backlight-lyre_proto1.c
··· 19 19 * 20 20 ****************************************************************************/ 21 21 22 - void _backlight_set_brightness(int brightness) 22 + void backlight_hw_brightness(int brightness) 23 23 { 24 24 (void)brightness; 25 25 } 26 26 27 - void _backlight_on(void) 27 + void backlight_hw_on(void) 28 28 { 29 29 30 30 } 31 31 32 - void _backlight_off(void) 32 + void backlight_hw_off(void) 33 33 { 34 34 35 35 } 36 36 37 - void _buttonlight_on(void) 37 + void buttonlight_hw_on(void) 38 38 { 39 39 40 40 } 41 41 42 - void _buttonlight_off(void) 42 + void buttonlight_hw_off(void) 43 43 { 44 44 45 45 }
+4 -4
firmware/target/arm/imx233/creative-zen/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - bool _backlight_init(void); 25 - void _backlight_on(void); 26 - void _backlight_off(void); 27 - void _backlight_set_brightness(int brightness); 24 + bool backlight_hw_init(void); 25 + void backlight_hw_on(void); 26 + void backlight_hw_off(void); 27 + void backlight_hw_brightness(int brightness); 28 28 29 29 #endif /* BACKLIGHT_TARGET_H */
+6 -6
firmware/target/arm/imx233/creative-zen/backlight-zen.c
··· 28 28 #include "pinctrl-imx233.h" 29 29 #include "pwm-imx233.h" 30 30 31 - void _backlight_set_brightness(int level) 31 + void backlight_hw_brightness(int level) 32 32 { 33 33 #if defined(CREATIVE_ZENXFISTYLE) 34 34 imx233_pwm_setup_simple(4, 24000, level); ··· 49 49 #endif 50 50 } 51 51 52 - bool _backlight_init(void) 52 + bool backlight_hw_init(void) 53 53 { 54 54 #if !defined(CREATIVE_ZENV) && !defined(CREATIVE_ZENXFISTYLE) 55 55 imx233_pinctrl_acquire(1, 12, "backlight_enable"); ··· 60 60 return true; 61 61 } 62 62 63 - void _backlight_on(void) 63 + void backlight_hw_on(void) 64 64 { 65 65 #ifdef HAVE_LCD_ENABLE 66 66 lcd_enable(true); /* power on lcd + visible display */ 67 67 #endif 68 68 /* restore the previous backlight level */ 69 - _backlight_set_brightness(backlight_brightness); 69 + backlight_hw_brightness(backlight_brightness); 70 70 } 71 71 72 - void _backlight_off(void) 72 + void backlight_hw_off(void) 73 73 { 74 74 /* there is no real on/off but we can set to 0 brightness */ 75 - _backlight_set_brightness(0); 75 + backlight_hw_brightness(0); 76 76 #ifdef HAVE_LCD_ENABLE 77 77 lcd_enable(false); /* power off visible display */ 78 78 #endif
+4 -4
firmware/target/arm/imx233/creative-zenxfi2/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - bool _backlight_init(void); 25 - void _backlight_on(void); 26 - void _backlight_off(void); 27 - void _backlight_set_brightness(int brightness); 24 + bool backlight_hw_init(void); 25 + void backlight_hw_on(void); 26 + void backlight_hw_off(void); 27 + void backlight_hw_brightness(int brightness); 28 28 29 29 #endif /* BACKLIGHT_TARGET_H */
+6 -6
firmware/target/arm/imx233/creative-zenxfi2/backlight-zenxfi2.c
··· 26 26 #include "backlight-target.h" 27 27 #include "pwm-imx233.h" 28 28 29 - void _backlight_set_brightness(int brightness) 29 + void backlight_hw_brightness(int brightness) 30 30 { 31 31 imx233_pwm_setup_simple(4, 24000, brightness); 32 32 imx233_pwm_enable(4, true); 33 33 } 34 34 35 - bool _backlight_init(void) 35 + bool backlight_hw_init(void) 36 36 { 37 - _backlight_set_brightness(DEFAULT_BRIGHTNESS_SETTING); 37 + backlight_hw_brightness(DEFAULT_BRIGHTNESS_SETTING); 38 38 return true; 39 39 } 40 40 41 - void _backlight_on(void) 41 + void backlight_hw_on(void) 42 42 { 43 43 #ifdef HAVE_LCD_ENABLE 44 44 lcd_enable(true); /* power on lcd + visible display */ ··· 46 46 /* don't do anything special, the core will set the brightness */ 47 47 } 48 48 49 - void _backlight_off(void) 49 + void backlight_hw_off(void) 50 50 { 51 51 /* there is no real on/off but we can set to 0 brightness */ 52 - _backlight_set_brightness(0); 52 + backlight_hw_brightness(0); 53 53 #ifdef HAVE_LCD_ENABLE 54 54 lcd_enable(false); /* power off visible display */ 55 55 #endif
+7 -7
firmware/target/arm/imx233/creative-zenxfi3/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - bool _backlight_init(void); 25 - void _backlight_on(void); 26 - void _backlight_off(void); 27 - void _backlight_set_brightness(int brightness); 24 + bool backlight_hw_init(void); 25 + void backlight_hw_on(void); 26 + void backlight_hw_off(void); 27 + void backlight_hw_brightness(int brightness); 28 28 29 - void _buttonlight_on(void); 30 - void _buttonlight_off(void); 31 - void _buttonlight_set_brightness(int brightness); 29 + void buttonlight_hw_on(void); 30 + void buttonlight_hw_off(void); 31 + void buttonlight_hw_brightness(int brightness); 32 32 33 33 #endif /* BACKLIGHT_TARGET_H */
+9 -9
firmware/target/arm/imx233/creative-zenxfi3/backlight-zenxfi3.c
··· 27 27 #include "pwm-imx233.h" 28 28 #include "mpr121.h" 29 29 30 - void _backlight_set_brightness(int brightness) 30 + void backlight_hw_brightness(int brightness) 31 31 { 32 32 imx233_pwm_setup_simple(2, 24000, brightness); 33 33 imx233_pwm_enable(2, true); 34 34 } 35 35 36 - bool _backlight_init(void) 36 + bool backlight_hw_init(void) 37 37 { 38 - _backlight_set_brightness(DEFAULT_BRIGHTNESS_SETTING); 38 + backlight_hw_brightness(DEFAULT_BRIGHTNESS_SETTING); 39 39 return true; 40 40 } 41 41 42 - void _backlight_on(void) 42 + void backlight_hw_on(void) 43 43 { 44 44 #ifdef HAVE_LCD_ENABLE 45 45 lcd_enable(true); /* power on lcd + visible display */ ··· 47 47 /* don't do anything special, the core will set the brightness */ 48 48 } 49 49 50 - void _backlight_off(void) 50 + void backlight_hw_off(void) 51 51 { 52 52 /* there is no real on/off but we can set to 0 brightness */ 53 - _backlight_set_brightness(0); 53 + backlight_hw_brightness(0); 54 54 #ifdef HAVE_LCD_ENABLE 55 55 lcd_enable(false); /* power off visible display */ 56 56 #endif 57 57 } 58 58 59 59 /* ELE8 is the button light GPIO */ 60 - void _buttonlight_on(void) 60 + void buttonlight_hw_on(void) 61 61 { 62 62 /* assume mpr121 was initialized by button-zenxfi3.c */ 63 63 mpr121_set_gpio_output(8, ELE_GPIO_SET); 64 64 } 65 65 66 - void _buttonlight_off(void) 66 + void buttonlight_hw_off(void) 67 67 { 68 68 /* assume mpr121 was initialized by button-zenxfi3.c */ 69 69 mpr121_set_gpio_output(8, ELE_GPIO_CLR); 70 70 } 71 71 72 - void _buttonlight_set_brightness(int brightness) 72 + void buttonlight_hw_brightness(int brightness) 73 73 { 74 74 /* assume mpr121 was initialized by button-zenxfi3.c */ 75 75 /* since backlight brightness is the same for the screen and the button light,
+4 -4
firmware/target/arm/imx233/samsung-ypz5/backlight-target.h
··· 20 20 #ifndef BACKLIGHT_TARGET_H 21 21 #define BACKLIGHT_TARGET_H 22 22 23 - bool _backlight_init(void); 24 - void _backlight_on(void); 25 - void _backlight_off(void); 26 - void _backlight_set_brightness(int brightness); 23 + bool backlight_hw_init(void); 24 + void backlight_hw_on(void); 25 + void backlight_hw_off(void); 26 + void backlight_hw_brightness(int brightness); 27 27 28 28 #endif /* BACKLIGHT_TARGET_H */
+6 -6
firmware/target/arm/imx233/samsung-ypz5/backlight-ypz5.c
··· 77 77 udelay(TIME_LAT); 78 78 } 79 79 80 - void _backlight_set_brightness(int level) 80 + void backlight_hw_brightness(int level) 81 81 { 82 82 /* Don't try to reset backlight if not necessary 83 83 * Moreover this helps to avoid flickering when ··· 120 120 current_level = level; 121 121 } 122 122 123 - bool _backlight_init(void) 123 + bool backlight_hw_init(void) 124 124 { 125 125 imx233_pinctrl_acquire(3, 13, "backlight"); 126 126 imx233_pinctrl_set_function(3, 13, PINCTRL_FUNCTION_GPIO); ··· 130 130 return true; 131 131 } 132 132 133 - void _backlight_on(void) 133 + void backlight_hw_on(void) 134 134 { 135 135 #ifdef HAVE_LCD_ENABLE 136 136 lcd_enable(true); /* power on lcd + visible display */ 137 137 #endif 138 138 /* restore the previous backlight level */ 139 - _backlight_set_brightness(backlight_brightness); 139 + backlight_hw_brightness(backlight_brightness); 140 140 } 141 141 142 - void _backlight_off(void) 142 + void backlight_hw_off(void) 143 143 { 144 144 /* there is no real on/off but we can set to 0 brightness */ 145 - _backlight_set_brightness(0); 145 + backlight_hw_brightness(0); 146 146 #ifdef HAVE_LCD_ENABLE 147 147 lcd_enable(false); /* power off visible display */ 148 148 #endif
+6 -6
firmware/target/arm/imx233/sansa-fuzeplus/backlight-fuzeplus.c
··· 26 26 #include "backlight-target.h" 27 27 #include "pinctrl-imx233.h" 28 28 29 - void _backlight_set_brightness(int brightness) 29 + void backlight_hw_brightness(int brightness) 30 30 { 31 31 if(brightness != 0) 32 32 brightness = MAX_BRIGHTNESS_SETTING + 1 - brightness; ··· 39 39 } 40 40 } 41 41 42 - bool _backlight_init(void) 42 + bool backlight_hw_init(void) 43 43 { 44 44 imx233_pinctrl_acquire(1, 28, "backlight"); 45 45 imx233_pinctrl_set_function(1, 28, PINCTRL_FUNCTION_GPIO); 46 46 imx233_pinctrl_set_drive(1, 28, PINCTRL_DRIVE_8mA); 47 47 imx233_pinctrl_enable_gpio(1, 28, true); 48 - _backlight_set_brightness(DEFAULT_BRIGHTNESS_SETTING); 48 + backlight_hw_brightness(DEFAULT_BRIGHTNESS_SETTING); 49 49 return true; 50 50 } 51 51 52 - void _backlight_on(void) 52 + void backlight_hw_on(void) 53 53 { 54 54 #ifdef HAVE_LCD_ENABLE 55 55 lcd_enable(true); /* power on lcd + visible display */ ··· 57 57 /* don't do anything special, the core will set the brightness */ 58 58 } 59 59 60 - void _backlight_off(void) 60 + void backlight_hw_off(void) 61 61 { 62 62 /* there is no real on/off but we can set to 0 brightness */ 63 - _backlight_set_brightness(0); 63 + backlight_hw_brightness(0); 64 64 #ifdef HAVE_LCD_ENABLE 65 65 lcd_enable(false); /* power off visible display */ 66 66 #endif
+4 -4
firmware/target/arm/imx233/sansa-fuzeplus/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - bool _backlight_init(void); 25 - void _backlight_on(void); 26 - void _backlight_off(void); 27 - void _backlight_set_brightness(int brightness); 24 + bool backlight_hw_init(void); 25 + void backlight_hw_on(void); 26 + void backlight_hw_off(void); 27 + void backlight_hw_brightness(int brightness); 28 28 29 29 #endif /* BACKLIGHT_TARGET_H */
+6 -6
firmware/target/arm/imx233/sony-nwz/backlight-nwz.c
··· 27 27 #include "pwm-imx233.h" 28 28 #include "pinctrl-imx233.h" 29 29 30 - void _backlight_set_brightness(int brightness) 30 + void backlight_hw_brightness(int brightness) 31 31 { 32 32 bool en = brightness > 0; 33 33 imx233_pwm_setup_simple(2, 24000, 100 - brightness); ··· 35 35 imx233_pinctrl_set_gpio(0, 10, en); 36 36 } 37 37 38 - bool _backlight_init(void) 38 + bool backlight_hw_init(void) 39 39 { 40 40 imx233_pinctrl_acquire(0, 10, "backlight_enable"); 41 41 imx233_pinctrl_set_function(0, 10, PINCTRL_FUNCTION_GPIO); 42 42 imx233_pinctrl_enable_gpio(0, 10, true); 43 43 imx233_pinctrl_set_gpio(0, 10, true); 44 - _backlight_set_brightness(DEFAULT_BRIGHTNESS_SETTING); 44 + backlight_hw_brightness(DEFAULT_BRIGHTNESS_SETTING); 45 45 return true; 46 46 } 47 47 48 - void _backlight_on(void) 48 + void backlight_hw_on(void) 49 49 { 50 50 #ifdef HAVE_LCD_ENABLE 51 51 lcd_enable(true); /* power on lcd + visible display */ ··· 53 53 /* don't do anything special, the core will set the brightness */ 54 54 } 55 55 56 - void _backlight_off(void) 56 + void backlight_hw_off(void) 57 57 { 58 58 /* there is no real on/off but we can set to 0 brightness */ 59 - _backlight_set_brightness(0); 59 + backlight_hw_brightness(0); 60 60 #ifdef HAVE_LCD_ENABLE 61 61 lcd_enable(false); /* power off visible display */ 62 62 #endif
+4 -4
firmware/target/arm/imx233/sony-nwz/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - bool _backlight_init(void); 25 - void _backlight_on(void); 26 - void _backlight_off(void); 27 - void _backlight_set_brightness(int brightness); 24 + bool backlight_hw_init(void); 25 + void backlight_hw_on(void); 26 + void backlight_hw_off(void); 27 + void backlight_hw_brightness(int brightness); 28 28 29 29 #endif /* BACKLIGHT_TARGET_H */
+3 -3
firmware/target/arm/imx233/system-imx233.c
··· 105 105 106 106 void system_reboot(void) 107 107 { 108 - _backlight_off(); 108 + backlight_hw_off(); 109 109 110 110 disable_irq(); 111 111 ··· 119 119 imx233_rtc_enable_watchdog(false); 120 120 /* make sure lcd and backlight are on */ 121 121 lcd_update(); 122 - _backlight_on(); 123 - _backlight_set_brightness(DEFAULT_BRIGHTNESS_SETTING); 122 + backlight_hw_on(); 123 + backlight_hw_brightness(DEFAULT_BRIGHTNESS_SETTING); 124 124 /* wait until button release (if a button is pressed) */ 125 125 #ifdef HAVE_BUTTON_DATA 126 126 int data;
+5 -5
firmware/target/arm/imx31/gigabeat-s/backlight-gigabeat-s.c
··· 79 79 /* Backlight ramping settings */ 80 80 static uint32_t led_ramp_mask = MC13783_LEDMDRAMPDOWN | MC13783_LEDMDRAMPUP; 81 81 82 - bool _backlight_init(void) 82 + bool backlight_hw_init(void) 83 83 { 84 84 /* Set default LED register value */ 85 85 mc13783_write(MC13783_LED_CONTROL0, ··· 88 88 #ifdef HAVE_BACKLIGHT_BRIGHTNESS 89 89 /* Our PWM and I-Level is different than retailos (but same apparent 90 90 * brightness), so init to our default. */ 91 - _backlight_set_brightness(DEFAULT_BRIGHTNESS_SETTING); 91 + backlight_hw_brightness(DEFAULT_BRIGHTNESS_SETTING); 92 92 #else 93 93 /* Use default PWM */ 94 94 backlight_pwm_bits = mc13783_read(MC13783_LED_CONTROL2) & MC13783_LEDMDDC; ··· 113 113 led_ramp_mask &= ~MC13783_LEDMDRAMPUP; 114 114 } 115 115 116 - void _backlight_on(void) 116 + void backlight_hw_on(void) 117 117 { 118 118 static const char regs[2] = 119 119 { ··· 149 149 } 150 150 } 151 151 152 - void _backlight_off(void) 152 + void backlight_hw_off(void) 153 153 { 154 154 uint32_t ctrl0 = MC13783_LED_CONTROL0_BITS | MC13783_LEDEN; 155 155 ··· 173 173 #ifdef HAVE_BACKLIGHT_BRIGHTNESS 174 174 /* Assumes that the backlight has been initialized - parameter should 175 175 * already be range-checked in public interface. */ 176 - void _backlight_set_brightness(int brightness) 176 + void backlight_hw_brightness(int brightness) 177 177 { 178 178 uint32_t md = led_md_pwm_table[brightness].md; 179 179 backlight_pwm_bits = backlight_on_status ?
+4 -4
firmware/target/arm/imx31/gigabeat-s/backlight-target.h
··· 27 27 #define BACKLIGHT_FULL_INIT 28 28 #endif 29 29 30 - bool _backlight_init(void); 31 - void _backlight_on(void); 32 - void _backlight_off(void); 33 - void _backlight_set_brightness(int brightness); 30 + bool backlight_hw_init(void); 31 + void backlight_hw_on(void); 32 + void backlight_hw_off(void); 33 + void backlight_hw_brightness(int brightness); 34 34 35 35 void _backlight_lcd_sleep(void); 36 36
+1 -1
firmware/target/arm/imx31/gigabeat-s/power-gigabeat-s.c
··· 136 136 dptc_stop(); 137 137 138 138 /* Cut backlight */ 139 - _backlight_off(); 139 + backlight_hw_off(); 140 140 141 141 /* Let it fade */ 142 142 sleep(5*HZ/4);
+2 -2
firmware/target/arm/ipod/1g2g/backlight-1g2g.c
··· 24 24 #include "backlight.h" 25 25 #include "backlight-target.h" 26 26 27 - void _backlight_on(void) 27 + void backlight_hw_on(void) 28 28 { 29 29 LCD1_CONTROL |= 0x02; 30 30 lcd_set_backlight_inversion(true); 31 31 } 32 32 33 - void _backlight_off(void) 33 + void backlight_hw_off(void) 34 34 { 35 35 LCD1_CONTROL &= ~0x02; 36 36 lcd_set_backlight_inversion(false);
+3 -3
firmware/target/arm/ipod/1g2g/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - #define _backlight_init() false 25 - void _backlight_on(void); 26 - void _backlight_off(void); 24 + #define backlight_hw_init() false 25 + void backlight_hw_on(void); 26 + void backlight_hw_off(void); 27 27 28 28 #endif
+2 -2
firmware/target/arm/ipod/3g/backlight-3g.c
··· 23 23 #include "backlight.h" 24 24 #include "backlight-target.h" 25 25 26 - void _backlight_on(void) 26 + void backlight_hw_on(void) 27 27 { 28 28 LCD1_CONTROL |= 0x02; 29 29 } 30 30 31 - void _backlight_off(void) 31 + void backlight_hw_off(void) 32 32 { 33 33 LCD1_CONTROL &= ~0x02; 34 34 }
+6 -6
firmware/target/arm/ipod/backlight-4g_color.c
··· 44 44 static unsigned brightness = 100; /* 1 to 255 */ 45 45 static bool enabled = false; 46 46 47 - /* Handling B03 in _backlight_on() and _backlight_off() makes backlight go off 47 + /* Handling B03 in backlight_hw_on() and backlight_hw_off() makes backlight go off 48 48 * without delay. Not doing that does a short (fixed) fade out. Opt for the 49 49 * latter. */ 50 50 51 - void _backlight_on(void) 51 + void backlight_hw_on(void) 52 52 { 53 53 /* brightness full */ 54 54 outl(0x80000000 | (brightness << 16), 0x7000a010); ··· 56 56 enabled = true; 57 57 } 58 58 59 - void _backlight_off(void) 59 + void backlight_hw_off(void) 60 60 { 61 61 outl(0x80000000, 0x7000a010); 62 62 GPIO_CLEAR_BITWISE(GPIOB_OUTPUT_VAL, 0x08); 63 63 enabled = false; 64 64 } 65 65 66 - void _backlight_set_brightness(int val) 66 + void backlight_hw_brightness(int val) 67 67 { 68 68 brightness = log_brightness[val]; 69 69 if (enabled) 70 70 outl(0x80000000 | (brightness << 16), 0x7000a010); 71 71 } 72 72 73 - bool _backlight_init(void) 73 + bool backlight_hw_init(void) 74 74 { 75 75 GPIO_SET_BITWISE(GPIOB_ENABLE, 0x0c); /* B02 and B03 enable */ 76 76 GPIO_SET_BITWISE(GPIOB_OUTPUT_VAL, 0x08); /* B03 = 1 */ 77 77 GPO32_ENABLE &= ~0x2000000; /* D01 disable, so pwm takes over */ 78 78 DEV_EN |= DEV_PWM; /* PWM enable */ 79 79 80 - _backlight_on(); 80 + backlight_hw_on(); 81 81 return true; 82 82 }
+3 -3
firmware/target/arm/ipod/backlight-nano_video.c
··· 38 38 static int current_dim = 16; /* default after enabling the backlight dimmer */ 39 39 static bool enabled = false; 40 40 41 - void _backlight_set_brightness(int val) 41 + void backlight_hw_brightness(int val) 42 42 { 43 43 int oldlevel; 44 44 ··· 91 91 GPIO_SET_BITWISE(GPIOD_OUTPUT_VAL, 0x80); 92 92 sleep(HZ/100); 93 93 current_dim = 16; 94 - _backlight_set_brightness(brightness); 94 + backlight_hw_brightness(brightness); 95 95 } 96 96 else 97 97 { ··· 116 116 GPIO_CLEAR_BITWISE(GPIOL_OUTPUT_VAL, 0x80); 117 117 } 118 118 119 - bool _backlight_init(void) 119 + bool backlight_hw_init(void) 120 120 { 121 121 GPIO_SET_BITWISE(GPIOB_ENABLE, 0x08); 122 122 GPIO_SET_BITWISE(GPIOB_OUTPUT_EN, 0x08);
+22 -22
firmware/target/arm/ipod/backlight-target.h
··· 23 23 24 24 #if defined(IPOD_VIDEO) || defined(IPOD_NANO) 25 25 26 - bool _backlight_init(void); 27 - void _backlight_set_brightness(int val); 26 + bool backlight_hw_init(void); 27 + void backlight_hw_brightness(int val); 28 28 void _backlight_led_on(void); 29 29 void _backlight_led_off(void); 30 30 void _backlight_hw_enable(bool on); ··· 34 34 #endif 35 35 36 36 #ifdef BOOTLOADER 37 - #define _backlight_on() do { _backlight_hw_enable(true); \ 37 + #define backlight_hw_on() do { _backlight_hw_enable(true); \ 38 38 _backlight_led_on(); } while(0) 39 - #define _backlight_off() do { _backlight_led_off(); \ 39 + #define backlight_hw_off() do { _backlight_led_off(); \ 40 40 _backlight_hw_enable(false); } while(0) 41 41 #else /* !BOOTLOADER */ 42 - #define _backlight_on_isr() _backlight_led_on() 43 - #define _backlight_off_isr() _backlight_led_off() 44 - #define _backlight_on_normal() do { _backlight_hw_enable(true); \ 42 + #define backlight_hw_on_isr() _backlight_led_on() 43 + #define backlight_hw_off_isr() _backlight_led_off() 44 + #define backlight_hw_on_normal() do { _backlight_hw_enable(true); \ 45 45 _backlight_led_on(); } while(0) 46 - #define _backlight_off_normal() do { _backlight_led_off(); \ 46 + #define backlight_hw_off_normal() do { _backlight_led_off(); \ 47 47 _backlight_hw_enable(false); } while(0) 48 48 #define _BACKLIGHT_FADE_ENABLE 49 49 #endif /* !BOOTLOADER */ 50 50 51 51 #elif defined(IPOD_4G) || defined(IPOD_COLOR) 52 52 53 - bool _backlight_init(void); 54 - void _backlight_on(void); 55 - void _backlight_off(void); 56 - void _backlight_set_brightness(int val); 53 + bool backlight_hw_init(void); 54 + void backlight_hw_on(void); 55 + void backlight_hw_off(void); 56 + void backlight_hw_brightness(int val); 57 57 58 58 #elif defined(IPOD_MINI) || defined(IPOD_MINI2G) 59 59 60 - #define _backlight_init() true 60 + #define backlight_hw_init() true 61 61 void _backlight_hw_on(void); 62 62 void _backlight_hw_off(void); 63 63 64 64 #ifdef BOOTLOADER 65 - #define _backlight_on() _backlight_hw_on() 66 - #define _backlight_off() _backlight_hw_off() 65 + #define backlight_hw_on() _backlight_hw_on() 66 + #define backlight_hw_off() _backlight_hw_off() 67 67 #else 68 - #define _backlight_on_isr() _backlight_hw_on() 69 - #define _backlight_off_isr() _backlight_hw_off() 70 - #define _backlight_on_normal() _backlight_hw_on() 71 - #define _backlight_off_normal() _backlight_hw_off() 68 + #define backlight_hw_on_isr() _backlight_hw_on() 69 + #define backlight_hw_off_isr() _backlight_hw_off() 70 + #define backlight_hw_on_normal() _backlight_hw_on() 71 + #define backlight_hw_off_normal() _backlight_hw_off() 72 72 #endif 73 73 74 74 #elif defined(IPOD_1G2G) || defined(IPOD_3G) 75 75 76 - #define _backlight_init() true 77 - void _backlight_on(void); 78 - void _backlight_off(void); 76 + #define backlight_hw_init() true 77 + void backlight_hw_on(void); 78 + void backlight_hw_off(void); 79 79 #endif 80 80 81 81 #endif
+4 -4
firmware/target/arm/ipod/button-1g-3g.c
··· 66 66 static int prev_scroll = -1; 67 67 static int direction = 0; 68 68 static int count = 0; 69 - static long next_backlight_on = 0; 69 + static long nextbacklight_hw_on = 0; 70 70 71 71 static unsigned long last_wheel_usec = 0; 72 72 static unsigned long wheel_delta = 1ul << 24; ··· 96 96 } 97 97 98 98 /* poke backlight every 1/4s of activity */ 99 - if (TIME_AFTER(current_tick, next_backlight_on)) { 99 + if (TIME_AFTER(current_tick, nextbacklight_hw_on)) { 100 100 backlight_on(); 101 101 reset_poweroff_timer(); 102 - next_backlight_on = current_tick + HZ/4; 102 + nextbacklight_hw_on = current_tick + HZ/4; 103 103 } 104 104 105 105 /* has wheel travelled far enough? */ ··· 152 152 wheel_velocity = v; 153 153 /* ensure backlight never gets stuck for an extended period if tick 154 154 * wrapped such that next poke is very far ahead */ 155 - next_backlight_on = current_tick - 1; 155 + nextbacklight_hw_on = current_tick - 1; 156 156 } 157 157 else { 158 158 /* some velocity filtering to smooth things out */
+4 -4
firmware/target/arm/ipod/button-mini1g.c
··· 60 60 static int prev_scroll = -1; 61 61 static int direction = 0; 62 62 static int count = 0; 63 - static long next_backlight_on = 0; 63 + static long nextbacklight_hw_on = 0; 64 64 65 65 int wheel_keycode = BUTTON_NONE; 66 66 int scroll; ··· 92 92 } 93 93 94 94 /* poke backlight every 1/4s of activity */ 95 - if (TIME_AFTER(current_tick, next_backlight_on)) { 95 + if (TIME_AFTER(current_tick, nextbacklight_hw_on)) { 96 96 backlight_on(); 97 97 reset_poweroff_timer(); 98 - next_backlight_on = current_tick + HZ/4; 98 + nextbacklight_hw_on = current_tick + HZ/4; 99 99 } 100 100 101 101 if (++count < WHEEL_BASE_SENSITIVITY) ··· 144 144 wheel_velocity = v; 145 145 /* ensure backlight never gets stuck for an extended period if tick 146 146 * wrapped such that next poke is very far ahead */ 147 - next_backlight_on = current_tick - 1; 147 + nextbacklight_hw_on = current_tick - 1; 148 148 } 149 149 else { 150 150 /* some velocity filtering to smooth things out */
+1 -1
firmware/target/arm/ipod/lcd-color_nano.c
··· 122 122 #if defined(IPOD_NANO) 123 123 _backlight_hw_enable(false); 124 124 #elif defined(IPOD_COLOR) 125 - _backlight_off(); 125 + backlight_hw_off(); 126 126 #endif 127 127 128 128 if ((lcd_type&1) == 0) {
+3 -3
firmware/target/arm/iriver/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - #define _backlight_init() true 25 - void _backlight_on(void); 26 - void _backlight_off(void); 24 + #define backlight_hw_init() true 25 + void backlight_hw_on(void); 26 + void backlight_hw_off(void); 27 27 28 28 #endif
+2 -2
firmware/target/arm/iriver/h10/backlight-h10.c
··· 25 25 #include "backlight-target.h" 26 26 #include "lcd.h" 27 27 28 - void _backlight_on(void) 28 + void backlight_hw_on(void) 29 29 { 30 30 #ifdef HAVE_LCD_ENABLE 31 31 lcd_enable(true); /* power on lcd + visible display */ ··· 33 33 GPIO_SET_BITWISE(GPIOL_OUTPUT_VAL, 0x20); 34 34 } 35 35 36 - void _backlight_off(void) 36 + void backlight_hw_off(void) 37 37 { 38 38 GPIO_CLEAR_BITWISE(GPIOL_OUTPUT_VAL, 0x20); 39 39 #ifdef HAVE_LCD_ENABLE
+6 -6
firmware/target/arm/olympus/mrobe-100/backlight-mr100.c
··· 28 28 static const int log_brightness[12] = {0,4,8,12,20,28,40,60,88,124,176,255}; 29 29 30 30 /* Returns the current state of the backlight (true=ON, false=OFF). */ 31 - bool _backlight_init(void) 31 + bool backlight_hw_init(void) 32 32 { 33 33 return (GPO32_ENABLE & 0x1000000) ? true : false; 34 34 } 35 35 36 - void _backlight_hw_on(void) 36 + void backlight_hw_on(void) 37 37 { 38 38 GPO32_ENABLE |= 0x1000000; 39 39 } 40 40 41 - void _backlight_hw_off(void) 41 + void backlight_hw_off(void) 42 42 { 43 43 GPO32_ENABLE &= ~0x1000000; 44 44 } 45 45 46 - void _buttonlight_set_brightness(int brightness) 46 + void buttonlight_hw_brightness(int brightness) 47 47 { 48 48 /* clamp the brightness value */ 49 49 brightness = MAX(0, MIN(15, brightness)); ··· 51 51 outl(MIN_BRIGHTNESS-(log_brightness[brightness - 1] << 16), 0x7000a010); 52 52 } 53 53 54 - void _buttonlight_on(void) 54 + void buttonlight_hw_on(void) 55 55 { 56 56 /* turn on all touchpad leds */ 57 57 GPIOA_OUTPUT_VAL |= BUTTONLIGHT_ALL; 58 58 } 59 59 60 - void _buttonlight_off(void) 60 + void buttonlight_hw_off(void) 61 61 { 62 62 /* turn off all touchpad leds */ 63 63 GPIOA_OUTPUT_VAL &= ~BUTTONLIGHT_ALL;
+11 -14
firmware/target/arm/olympus/mrobe-100/backlight-target.h
··· 22 22 #ifndef BACKLIGHT_TARGET_H 23 23 #define BACKLIGHT_TARGET_H 24 24 25 - bool _backlight_init(void); /* Returns backlight current state (true=ON). */ 25 + bool backlight_hw_init(void); /* Returns backlight current state (true=ON). */ 26 26 void _backlight_hw_on(void); 27 27 void _backlight_hw_off(void); 28 28 29 29 #ifdef HAVE_REMOTE_LCD 30 - void _remote_backlight_on(void); 31 - void _remote_backlight_off(void); 30 + void remote_backlight_hw_on(void); 31 + void remote_backlight_hw_off(void); 32 32 #endif 33 33 34 - #ifdef BOOTLOADER 35 - #define _backlight_on() _backlight_hw_on() 36 - #define _backlight_off() _backlight_hw_off() 37 - #else 38 - #define _backlight_on_isr() _backlight_hw_on() 39 - #define _backlight_off_isr() _backlight_hw_off() 40 - #define _backlight_on_normal() _backlight_hw_on() 41 - #define _backlight_off_normal() _backlight_hw_off() 34 + #ifndef BOOTLOADER 35 + #define _backlight_on_isr() backlight_hw_on() 36 + #define _backlight_off_isr() backlight_hw_off() 37 + #define _backlight_on_normal() backlight_hw_on() 38 + #define _backlight_off_normal() backlight_hw_off() 42 39 #define _BACKLIGHT_FADE_BOOST 43 40 #endif 44 41 ··· 53 50 BUTTONLIGHT_DISPLAY | BUTTONLIGHT_LEFT | \ 54 51 BUTTONLIGHT_RIGHT | BUTTONLIGHT_SCROLL) 55 52 56 - void _buttonlight_set_brightness(int brightness); 57 - void _buttonlight_on(void); 58 - void _buttonlight_off(void); 53 + void buttonlight_hw_brightness(int brightness); 54 + void buttonlight_hw_on(void); 55 + void buttonlight_hw_off(void); 59 56 60 57 #endif
+2 -2
firmware/target/arm/olympus/mrobe-100/lcd-remote-mr100.c
··· 552 552 rc_status |= RC_UPDATE_LCD; 553 553 } 554 554 555 - void _remote_backlight_on(void) 555 + void remote_backlight_hw_on(void) 556 556 { 557 557 rc_status |= RC_BACKLIGHT_ON; 558 558 rc_status |= RC_UPDATE_CONTROLLER; 559 559 } 560 560 561 - void _remote_backlight_off(void) 561 + void remote_backlight_hw_off(void) 562 562 { 563 563 rc_status &= ~RC_BACKLIGHT_ON; 564 564 rc_status |= RC_UPDATE_CONTROLLER;
+7 -7
firmware/target/arm/pbell/vibe500/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - #define _backlight_init() true 25 - void _backlight_on(void); 26 - void _backlight_off(void); 24 + #define backlight_hw_init() true 25 + void backlight_hw_on(void); 26 + void backlight_hw_off(void); 27 27 28 28 #ifdef HAVE_BACKLIGHT_BRIGHTNESS 29 - void _backlight_set_brightness(int brightness); 29 + void backlight_hw_brightness(int brightness); 30 30 #endif 31 31 32 32 #ifdef HAVE_BUTTON_LIGHT 33 - void _buttonlight_on(void); 34 - void _buttonlight_off(void); 35 - void _buttonlight_set_brightness(int brightness); 33 + voidbuttonlight_hw_on(void); 34 + voidbuttonlight_hw_off(void); 35 + voidbuttonlight_hw_set_brightness(int brightness); 36 36 #endif 37 37 38 38 #endif /* BACKLIGHT_TARGET.H */
+6 -6
firmware/target/arm/pbell/vibe500/backlight-vibe500.c
··· 27 27 #include "lcd.h" 28 28 #include "synaptics-mep.h" 29 29 30 - void _backlight_on(void) 30 + void backlight_hw_on(void) 31 31 { 32 32 #ifdef HAVE_LCD_ENABLE 33 33 lcd_enable(true); /* power on lcd + visible display */ ··· 35 35 GPIO_SET_BITWISE(GPIOJ_OUTPUT_VAL, 0x01); 36 36 } 37 37 38 - void _backlight_off(void) 38 + void backlight_hw_off(void) 39 39 { 40 40 GPIO_CLEAR_BITWISE(GPIOJ_OUTPUT_VAL, 0x01); 41 41 #ifdef HAVE_LCD_ENABLE ··· 47 47 static const int brightness_vals[16] = 48 48 {255,237,219,201,183,165,147,130,112,94,76,58,40,22,5,0}; 49 49 50 - void _backlight_set_brightness(int brightness) 50 + void backlight_hw_brightness(int brightness) 51 51 { 52 52 /* From PB Vibe Bootloader and OF */ 53 53 DEV_INIT1&=0xFFFF3F3F; ··· 60 60 #ifdef HAVE_BUTTON_LIGHT 61 61 static unsigned short buttonlight_status = 0; 62 62 63 - void _buttonlight_on(void) 63 + void buttonlight_hw_on(void) 64 64 { 65 65 if (!buttonlight_status) 66 66 { ··· 69 69 } 70 70 } 71 71 72 - void _buttonlight_off(void) 72 + void buttonlight_hw_off(void) 73 73 { 74 74 if (buttonlight_status) 75 75 { ··· 78 78 } 79 79 } 80 80 81 - void _buttonlight_set_brightness(int brightness) 81 + void buttonlight_hw_brightness(int brightness) 82 82 { 83 83 /* no brightness control, but lights stays on - for compatibility */ 84 84 (void)brightness;
+6 -6
firmware/target/arm/philips/hdd1630/backlight-hdd1630.c
··· 29 29 static const int brightness_vals[16] = 30 30 {255,237,219,201,183,165,147,130,112,94,76,58,40,22,5,0}; 31 31 32 - void _backlight_set_brightness(int brightness) 32 + void backlight_hw_brightness(int brightness) 33 33 { 34 34 outl(0x80000000 | (brightness_vals[brightness-1] << 16), 0x7000a000); 35 35 } 36 36 #endif 37 37 38 - void _backlight_on(void) 38 + void backlight_hw_on(void) 39 39 { 40 40 #ifdef HAVE_LCD_ENABLE 41 41 lcd_enable(true); ··· 45 45 GPO32_VAL |= 0x400; 46 46 } 47 47 48 - void _backlight_off(void) 48 + void backlight_hw_off(void) 49 49 { 50 50 GPO32_ENABLE |= 0x400; 51 51 GPO32_VAL &=~0x400; ··· 60 60 static unsigned short buttonight_brightness = DEFAULT_BRIGHTNESS_SETTING - 1; 61 61 static unsigned short buttonlight_status = 0; 62 62 63 - void _buttonlight_on(void) 63 + void buttonlight_hw_on(void) 64 64 { 65 65 if (!buttonlight_status) 66 66 { ··· 69 69 } 70 70 } 71 71 72 - void _buttonlight_off(void) 72 + void buttonlight_hw_off(void) 73 73 { 74 74 if (buttonlight_status) 75 75 { ··· 78 78 } 79 79 } 80 80 81 - void _buttonlight_set_brightness(int brightness) 81 + void buttonlight_hw_brightness(int brightness) 82 82 { 83 83 buttonight_brightness = brightness - 1; 84 84 touchpad_set_buttonlights(BUTTONLIGHT_MASK, buttonight_brightness);
+7 -7
firmware/target/arm/philips/hdd1630/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - #define _backlight_init() true 25 - void _backlight_on(void); 26 - void _backlight_off(void); 24 + #define backlight_hw_init() true 25 + void backlight_hw_on(void); 26 + void backlight_hw_off(void); 27 27 28 28 #ifdef HAVE_BACKLIGHT_BRIGHTNESS 29 - void _backlight_set_brightness(int brightness); 29 + void backlight_hw_brightness(int brightness); 30 30 #endif 31 31 32 32 #ifdef HAVE_BUTTON_LIGHT 33 - void _buttonlight_on(void); 34 - void _buttonlight_off(void); 35 - void _buttonlight_set_brightness(int brightness); 33 + void buttonlight_hw_on(void); 34 + void buttonlight_hw_off(void); 35 + void buttonlight_hw_brightness(int brightness); 36 36 #endif 37 37 38 38 #endif
+6 -6
firmware/target/arm/philips/hdd6330/backlight-hdd6330.c
··· 29 29 static const int brightness_vals[16] = 30 30 {255,237,219,201,183,165,147,130,112,94,76,58,40,22,5,0}; 31 31 32 - void _backlight_set_brightness(int brightness) 32 + void backlight_hw_brightness(int brightness) 33 33 { 34 34 outl(0x80000000 | (brightness_vals[brightness-1] << 16), 0x7000a000); 35 35 } 36 36 #endif 37 37 38 - void _backlight_on(void) 38 + void backlight_hw_on(void) 39 39 { 40 40 #ifdef HAVE_LCD_ENABLE 41 41 lcd_enable(true); ··· 45 45 GPO32_VAL |= 0x400; 46 46 } 47 47 48 - void _backlight_off(void) 48 + void backlight_hw_off(void) 49 49 { 50 50 GPO32_ENABLE |= 0x400; 51 51 GPO32_VAL &= ~0x400; ··· 60 60 static unsigned short buttonight_brightness = DEFAULT_BRIGHTNESS_SETTING - 1; 61 61 static unsigned short buttonlight_status = 0; 62 62 63 - void _buttonlight_on(void) 63 + void buttonlight_hw_on(void) 64 64 { 65 65 if (!buttonlight_status) 66 66 { ··· 77 77 } 78 78 } 79 79 80 - void _buttonlight_off(void) 80 + void buttonlight_hw_off(void) 81 81 { 82 82 if (buttonlight_status) 83 83 { ··· 89 89 } 90 90 } 91 91 92 - void _buttonlight_set_brightness(int brightness) 92 + void buttonlight_hw_brightness(int brightness) 93 93 { 94 94 touchpad_set_parameter(0x01,0x21,0x01); 95 95 touchpad_set_parameter(0x00,0x22,0x15);
+7 -7
firmware/target/arm/philips/hdd6330/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - #define _backlight_init() true 25 - void _backlight_on(void); 26 - void _backlight_off(void); 24 + #define backlight_hw_init() true 25 + void backlight_hw_on(void); 26 + void backlight_hw_off(void); 27 27 28 28 #ifdef HAVE_BACKLIGHT_BRIGHTNESS 29 - void _backlight_set_brightness(int brightness); 29 + void backlight_hw_brightness(int brightness); 30 30 #endif 31 31 32 32 #ifdef HAVE_BUTTON_LIGHT 33 - void _buttonlight_on(void); 34 - void _buttonlight_off(void); 35 - void _buttonlight_set_brightness(int brightness); 33 + void buttonlight_hw_on(void); 34 + void buttonlight_hw_off(void); 35 + void buttonlight_hw_brightness(int brightness); 36 36 #endif 37 37 38 38 #endif
+1 -1
firmware/target/arm/philips/power-hdd.c
··· 111 111 112 112 void power_off(void) 113 113 { 114 - _backlight_off(); 114 + backlight_hw_off(); 115 115 sleep(HZ/10); 116 116 117 117 /* power off bit */
+7 -7
firmware/target/arm/philips/sa9200/backlight-sa9200.c
··· 27 27 #include "synaptics-mep.h" 28 28 #include "lcd.h" 29 29 30 - void _backlight_set_brightness(int brightness) 30 + void backlight_hw_brightness(int brightness) 31 31 { 32 32 ascodec_write(AS3514_DCDC15, brightness); 33 33 } 34 34 35 - void _backlight_on(void) 35 + void backlight_hw_on(void) 36 36 { 37 37 #ifdef HAVE_LCD_ENABLE 38 38 lcd_enable(true); /* power on lcd + visible display */ ··· 40 40 #if (CONFIG_BACKLIGHT_FADING != BACKLIGHT_FADING_SW_SETTING) /* in bootloader/sim */ 41 41 /* if we set the brightness to the settings value, then fading up 42 42 * is glitchy */ 43 - _backlight_set_brightness(backlight_brightness); 43 + backlight_hw_brightness(backlight_brightness); 44 44 #endif 45 45 } 46 46 47 - void _backlight_off(void) 47 + void backlight_hw_off(void) 48 48 { 49 - _backlight_set_brightness(0); 49 + backlight_hw_brightness(0); 50 50 #ifdef HAVE_LCD_ENABLE 51 51 lcd_enable(false); /* power off visible display */ 52 52 #endif ··· 58 58 #define BUTTONLIGHT_MAX 0x0f 59 59 static unsigned short buttonlight_status = 0; 60 60 61 - void _buttonlight_on(void) 61 + void buttonlight_hw_on(void) 62 62 { 63 63 if (!buttonlight_status) 64 64 { ··· 68 68 } 69 69 } 70 70 71 - void _buttonlight_off(void) 71 + void buttonlight_hw_off(void) 72 72 { 73 73 if (buttonlight_status) 74 74 {
+6 -6
firmware/target/arm/philips/sa9200/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - #define _backlight_init() true 25 - void _backlight_on(void); 26 - void _backlight_off(void); 27 - void _backlight_set_brightness(int brightness); 24 + #define backlight_hw_init() true 25 + void backlight_hw_on(void); 26 + void backlight_hw_off(void); 27 + void backlight_hw_brightness(int brightness); 28 28 int __backlight_is_on(void); 29 29 30 30 #ifdef HAVE_BUTTON_LIGHT 31 - void _buttonlight_on(void); 32 - void _buttonlight_off(void); 31 + void buttonlight_hw_on(void); 32 + void buttonlight_hw_off(void); 33 33 #endif 34 34 35 35 #endif
+3 -3
firmware/target/arm/pnx0101/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - #define _backlight_init() true 25 - void _backlight_on(void); 26 - void _backlight_off(void); 24 + #define backlight_hw_init() true 25 + void backlight_hw_on(void); 26 + void backlight_hw_off(void); 27 27 28 28 #endif
+2 -2
firmware/target/arm/pnx0101/iriver-ifp7xx/backlight-ifp7xx.c
··· 24 24 #include "backlight.h" 25 25 #include "lcd.h" 26 26 27 - void _backlight_on(void) 27 + void backlight_hw_on(void) 28 28 { 29 29 GPIO3_SET = 1; 30 30 } 31 31 32 - void _backlight_off(void) 32 + void backlight_hw_off(void) 33 33 { 34 34 GPIO3_CLR = 1; 35 35 }
+4 -4
firmware/target/arm/rk27xx/backlight-rk27xx.c
··· 77 77 }; 78 78 #endif 79 79 80 - bool _backlight_init(void) 80 + bool backlight_hw_init(void) 81 81 { 82 82 /* configure PD4 as output */ 83 83 GPIO_PDCON |= (1<<4); ··· 105 105 return true; 106 106 } 107 107 108 - void _backlight_on(void) 108 + void backlight_hw_on(void) 109 109 { 110 110 #ifdef HAVE_LCD_ENABLE 111 111 lcd_enable(true); ··· 120 120 PWMT0_CTRL |= (1<<3) | (1<<0); 121 121 } 122 122 123 - void _backlight_off(void) 123 + void backlight_hw_off(void) 124 124 { 125 125 /* setup PWM0 pin as GPIO which is pulled low */ 126 126 SCU_IOMUXB_CON &= ~(1<<11); ··· 135 135 #endif 136 136 } 137 137 138 - void _backlight_set_brightness(int val) 138 + void backlight_hw_brightness(int val) 139 139 { 140 140 brightness = val & 0x1f; 141 141 PWMT0_HRC = lin_brightness[brightness];
+4 -4
firmware/target/arm/rk27xx/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - bool _backlight_init(void); 25 - void _backlight_on(void); 26 - void _backlight_off(void); 27 - void _backlight_set_brightness(int brightness); 24 + bool backlight_hw_init(void); 25 + void backlight_hw_on(void); 26 + void backlight_hw_off(void); 27 + void backlight_hw_brightness(int brightness); 28 28 29 29 #endif
+7 -7
firmware/target/arm/s3c2440/gigabeat-fx/backlight-meg-fx.c
··· 74 74 static unsigned short buttonlight_trigger_now; 75 75 76 76 /* Assumes that the backlight has been initialized */ 77 - void _backlight_set_brightness(int brightness) 77 + void backlight_hw_brightness(int brightness) 78 78 { 79 79 /* stop the interrupt from messing us up */ 80 80 backlight_control = BACKLIGHT_CONTROL_IDLE; ··· 335 335 backlight_control = BACKLIGHT_CONTROL_FADE; 336 336 } 337 337 338 - void _backlight_on(void) 338 + void backlight_hw_on(void) 339 339 { 340 340 #ifdef HAVE_LCD_ENABLE 341 341 lcd_enable(true); /* power on lcd + visible display */ ··· 343 343 __backlight_dim(false); 344 344 } 345 345 346 - void _backlight_off(void) 346 + void backlight_hw_off(void) 347 347 { 348 348 __backlight_dim(true); 349 349 } ··· 373 373 buttonlight_control = BUTTONLIGHT_CONTROL_FADE; 374 374 } 375 375 376 - void _buttonlight_on(void) 376 + void buttonlight_hw_on(void) 377 377 { 378 378 __buttonlight_dim(false); 379 379 } 380 380 381 - void _buttonlight_off(void) 381 + void buttonlight_hw_off(void) 382 382 { 383 383 #ifndef BOOTLOADER 384 384 if(buttonlight_get_current_timeout() > 0) ··· 388 388 __buttonlight_off(); 389 389 } 390 390 391 - void _buttonlight_set_brightness(int brightness) 391 + void buttonlight_hw_brightness(int brightness) 392 392 { 393 393 /* stop the interrupt from messing us up */ 394 394 buttonlight_control = BUTTONLIGHT_CONTROL_IDLE; ··· 396 396 buttonlight_control = BUTTONLIGHT_CONTROL_SET; 397 397 } 398 398 399 - bool _backlight_init(void) 399 + bool backlight_hw_init(void) 400 400 { 401 401 unsigned char brightness = log_brightness[DEFAULT_BRIGHTNESS_SETTING]; 402 402 buttonlight_brightness = brightness;
+7 -7
firmware/target/arm/s3c2440/gigabeat-fx/backlight-target.h
··· 43 43 /* See enum buttonlight_mode for available functions */ 44 44 void __buttonlight_mode(enum buttonlight_mode mode); 45 45 46 - bool _backlight_init(void); 47 - void _backlight_on(void); 48 - void _backlight_off(void); 49 - void _backlight_set_brightness(int brightness); 46 + bool backlight_hw_init(void); 47 + void backlight_hw_on(void); 48 + void backlight_hw_off(void); 49 + void backlight_hw_brightness(int brightness); 50 50 51 - void _buttonlight_set_brightness(int brightness); 52 - void _buttonlight_on(void); 53 - void _buttonlight_off(void); 51 + void buttonlight_hw_brightness(int brightness); 52 + void buttonlight_hw_on(void); 53 + void buttonlight_hw_off(void); 54 54 #endif
+2 -2
firmware/target/arm/s3c2440/gigabeat-fx/power-meg-fx.c
··· 81 81 int(*reboot_point)(void); 82 82 reboot_point=(void*)(unsigned char*) 0x00000000; 83 83 /* turn off backlight and wait for 1 second */ 84 - _backlight_off(); 85 - _buttonlight_off(); 84 + backlight_hw_off(); 85 + buttonlight_hw_off(); 86 86 sleep(HZ); 87 87 88 88 /* Do this to allow the drive to properly reset when player restarts
+8 -8
firmware/target/arm/s3c2440/mini2440/backlight-mini2440.c
··· 46 46 47 47 48 48 /* Assumes that the backlight has been initialized */ 49 - void _backlight_set_brightness(int brightness) 49 + void backlight_hw_brightness(int brightness) 50 50 { 51 51 if (brightness < 0) 52 52 brightness = 0; ··· 86 86 backlight_control = BACKLIGHT_CONTROL_IDLE; 87 87 break; 88 88 case BACKLIGHT_CONTROL_OFF: 89 - _backlight_set_brightness(0); 89 + backlight_hw_brightness(0); 90 90 backlight_control = BACKLIGHT_CONTROL_IDLE; 91 91 break; 92 92 case BACKLIGHT_CONTROL_ON: 93 - _backlight_set_brightness(DEFAULT_BRIGHTNESS_SETTING); 93 + backlight_hw_brightness(DEFAULT_BRIGHTNESS_SETTING); 94 94 backlight_control = BACKLIGHT_CONTROL_IDLE; 95 95 break; 96 96 case BACKLIGHT_CONTROL_SET: 97 97 /* TODO: This is probably wrong since it sets a fixed value. 98 98 It was a fixed value of 255 before, but that was even more wrong 99 99 since it accessed the log_brightness buffer out of bounds */ 100 - _backlight_set_brightness(DEFAULT_BRIGHTNESS_SETTING); 100 + backlight_hw_brightness(DEFAULT_BRIGHTNESS_SETTING); 101 101 backlight_control = BACKLIGHT_CONTROL_IDLE; 102 102 break; 103 103 case BACKLIGHT_CONTROL_FADE: 104 - _backlight_set_brightness(0); 104 + backlight_hw_brightness(0); 105 105 backlight_control = BACKLIGHT_CONTROL_IDLE; 106 106 break; 107 107 default: ··· 127 127 backlight_control = BACKLIGHT_CONTROL_FADE; 128 128 } 129 129 130 - void _backlight_on(void) 130 + void backlight_hw_on(void) 131 131 { 132 132 #ifdef HAVE_LCD_ENABLE 133 133 lcd_enable(true); /* power on lcd + visible display */ ··· 135 135 __backlight_dim(false); 136 136 } 137 137 138 - void _backlight_off(void) 138 + void backlight_hw_off(void) 139 139 { 140 140 __backlight_dim(true); 141 141 } 142 142 143 143 144 - bool _backlight_init(void) 144 + bool backlight_hw_init(void) 145 145 { 146 146 unsigned char brightness = log_brightness[DEFAULT_BRIGHTNESS_SETTING]; 147 147 _backlight_brightness = brightness;
+4 -4
firmware/target/arm/s3c2440/mini2440/backlight-target.h
··· 23 23 24 24 #define GPIO_LCD_PWR (1 << 4) /* GPIO.G4 */ 25 25 26 - bool _backlight_init(void); 27 - void _backlight_on(void); 28 - void _backlight_off(void); 29 - void _backlight_set_brightness(int brightness); 26 + bool backlight_hw_init(void); 27 + void backlight_hw_on(void); 28 + void backlight_hw_off(void); 29 + void backlight_hw_brightness(int brightness); 30 30 31 31 #endif
+6 -6
firmware/target/arm/s5l8700/backlight-meizu.c
··· 32 32 level. This makes the brightness curve more linear to the human eye. 33 33 */ 34 34 35 - void _backlight_set_brightness(int brightness) 35 + void backlight_hw_brightness(int brightness) 36 36 { 37 37 /* pwm = round(sqrt(2)**x), where brightness level x = 1..16 */ 38 38 static const unsigned int logtable[] = ··· 42 42 TCDATA0 = logtable[brightness]; 43 43 } 44 44 45 - void _backlight_on(void) 45 + void backlight_hw_on(void) 46 46 { 47 47 /* configure backlight pin P0.2 as timer PWM output */ 48 48 PCON0 = ((PCON0 & ~(3 << 4)) | (2 << 4)); 49 - _backlight_set_brightness(backlight_brightness); 49 + backlight_hw_brightness(backlight_brightness); 50 50 } 51 51 52 - void _backlight_off(void) 52 + void backlight_hw_off(void) 53 53 { 54 54 /* configure backlight pin P0.2 as GPIO and switch off */ 55 55 PCON0 = ((PCON0 & ~(3 << 4)) | (1 << 4)); 56 56 PDAT0 &= ~(1 << 2); 57 57 } 58 58 59 - bool _backlight_init(void) 59 + bool backlight_hw_init(void) 60 60 { 61 61 /* enable timer clock */ 62 62 PWRCON &= ~(1 << 4); ··· 72 72 TCPRE = 20; /* prescaler */ 73 73 TCCMD = (1 << 0); /* TC_EN */ 74 74 75 - _backlight_on(); 75 + backlight_hw_on(); 76 76 77 77 return true; 78 78 }
+4 -4
firmware/target/arm/s5l8700/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - bool _backlight_init(void); 25 - void _backlight_on(void); 26 - void _backlight_off(void); 27 - void _backlight_set_brightness(int brightness); 24 + bool backlight_hw_init(void); 25 + void backlight_hw_on(void); 26 + void backlight_hw_off(void); 27 + void backlight_hw_brightness(int brightness); 28 28 29 29 #endif
+5 -5
firmware/target/arm/s5l8700/ipodnano2g/backlight-nano2g.c
··· 32 32 void lcd_update(void); 33 33 #endif 34 34 35 - void _backlight_set_brightness(int brightness) 35 + void backlight_hw_brightness(int brightness) 36 36 { 37 37 pmu_write(0x28, brightness); 38 38 } 39 39 40 - void _backlight_on(void) 40 + void backlight_hw_on(void) 41 41 { 42 42 #ifdef HAVE_LCD_SLEEP 43 43 if (!lcd_active()) ··· 50 50 pmu_write(0x29, 1); 51 51 } 52 52 53 - void _backlight_off(void) 53 + void backlight_hw_off(void) 54 54 { 55 55 pmu_write(0x29, 0); 56 56 } 57 57 58 - bool _backlight_init(void) 58 + bool backlight_hw_init(void) 59 59 { 60 60 pmu_write(0x2a, 6); 61 61 pmu_write(0x28, 0x2e); 62 62 pmu_write(0x2b, 20); 63 63 64 - _backlight_on(); 64 + backlight_hw_on(); 65 65 66 66 return true; 67 67 }
+6 -6
firmware/target/arm/s5l8700/yps3/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - bool _backlight_init(void); 25 - void _backlight_on(void); 26 - void _backlight_off(void); 27 - void _backlight_set_brightness(int brightness); 24 + bool backlight_hw_init(void); 25 + void backlight_hw_on(void); 26 + void backlight_hw_off(void); 27 + void backlight_hw_brightness(int brightness); 28 28 29 - void _buttonlight_on(void); 30 - void _buttonlight_off(void); 29 + void buttonlight_hw_on(void); 30 + void buttonlight_hw_off(void); 31 31 32 32 #endif /* BACKLIGHT_TARGET_H */ 33 33
+9 -9
firmware/target/arm/s5l8700/yps3/backlight-yps3.c
··· 35 35 are three individually controllable groups: menu/back, cursor, middle). 36 36 */ 37 37 38 - void _backlight_set_brightness(int brightness) 38 + void backlight_hw_brightness(int brightness) 39 39 { 40 40 /* pwm = round(16 * 16**(x/16)), where brightness level x = 1..16 */ 41 41 static const unsigned int logtable[] = ··· 45 45 TADATA0 = logtable[brightness]; 46 46 } 47 47 48 - void _backlight_on(void) 48 + void backlight_hw_on(void) 49 49 { 50 50 /* configure backlight pin P0.0 as timer PWM output */ 51 51 PCON0 = ((PCON0 & ~(3 << 0)) | (2 << 0)); 52 52 53 - _backlight_set_brightness(backlight_brightness); 53 + backlight_hw_brightness(backlight_brightness); 54 54 } 55 55 56 - void _backlight_off(void) 56 + void backlight_hw_off(void) 57 57 { 58 58 /* configure backlight pin P0.0 as GPIO and switch off */ 59 59 PCON0 = ((PCON0 & ~(3 << 0)) | (1 << 0)); 60 60 PDAT0 &= ~(1 << 0); 61 61 } 62 62 63 - void _buttonlight_on(void) 63 + void buttonlight_hw_on(void) 64 64 { 65 65 PDAT3 |= (3 << 2); 66 66 PDAT4 |= (1 << 2); 67 67 } 68 68 69 - void _buttonlight_off(void) 69 + void buttonlight_hw_off(void) 70 70 { 71 71 PDAT3 &= ~(3 << 2); 72 72 PDAT4 &= ~(1 << 2); 73 73 } 74 74 75 - bool _backlight_init(void) 75 + bool backlight_hw_init(void) 76 76 { 77 77 /* Enable button LEDs: P3.2 (menu/back), P3.3 (cursor), P4.2 (middle) */ 78 78 PCON3 = (PCON3 & ~0x0000FF00) | 0x00001100; 79 79 PCON4 = (PCON4 & ~0x00000F00) | 0x00000100; 80 - _buttonlight_off(); 80 + buttonlight_hw_off(); 81 81 82 82 /* enable timer clock */ 83 83 PWRCON &= ~(1 << 4); ··· 93 93 TAPRE = 20; /* prescaler */ 94 94 TACMD = (1 << 0); /* TA_EN */ 95 95 96 - _backlight_on(); 96 + backlight_hw_on(); 97 97 98 98 return true; 99 99 }
+6 -6
firmware/target/arm/s5l8702/ipod6g/backlight-ipod6g.c
··· 32 32 void lcd_update(void); 33 33 #endif 34 34 35 - void _backlight_set_brightness(int brightness) 35 + void backlight_hw_brightness(int brightness) 36 36 { 37 37 pmu_write(0x28, brightness); 38 38 } 39 39 40 - void _backlight_on(void) 40 + void backlight_hw_on(void) 41 41 { 42 42 #ifdef HAVE_LCD_SLEEP 43 43 if (!lcd_active()) ··· 50 50 pmu_write(0x29, 1); 51 51 } 52 52 53 - void _backlight_off(void) 53 + void backlight_hw_off(void) 54 54 { 55 55 pmu_write(0x29, 0); 56 56 } 57 57 58 - bool _backlight_init(void) 58 + bool backlight_hw_init(void) 59 59 { 60 60 /* LEDCTL: overvoltage protection enabled, OCP limit is 500mA */ 61 61 pmu_write(0x2a, 0x05); 62 62 63 63 pmu_write(0x2b, 0x14); /* T_dimstep = 16 * value / 32768 */ 64 - _backlight_set_brightness(DEFAULT_BRIGHTNESS_SETTING); 64 + backlight_hw_brightness(DEFAULT_BRIGHTNESS_SETTING); 65 65 66 - _backlight_on(); 66 + backlight_hw_on(); 67 67 68 68 return true; 69 69 }
+4 -4
firmware/target/arm/s5l8702/ipod6g/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - bool _backlight_init(void); 25 - void _backlight_on(void); 26 - void _backlight_off(void); 27 - void _backlight_set_brightness(int brightness); 24 + bool backlight_hw_init(void); 25 + void backlight_hw_on(void); 26 + void backlight_hw_off(void); 27 + void backlight_hw_brightness(int brightness); 28 28 29 29 #endif
+3 -3
firmware/target/arm/samsung/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - #define _backlight_init() true 25 - void _backlight_on(void); 26 - void _backlight_off(void); 24 + #define backlight_hw_init() true 25 + void backlight_hw_on(void); 26 + void backlight_hw_off(void); 27 27 28 28 #endif
+2 -2
firmware/target/arm/samsung/yh820/backlight-yh820.c
··· 25 25 #include "backlight-target.h" 26 26 #include "lcd.h" 27 27 28 - void _backlight_on(void) 28 + void backlight_hw_on(void) 29 29 { 30 30 #ifdef HAVE_LCD_SLEEP 31 31 backlight_lcd_sleep_countdown(false); /* stop counter */ ··· 36 36 GPIO_SET_BITWISE(GPIOB_OUTPUT_VAL, 0x2); 37 37 } 38 38 39 - void _backlight_off(void) 39 + void backlight_hw_off(void) 40 40 { 41 41 GPIO_CLEAR_BITWISE(GPIOB_OUTPUT_VAL, 0x2); 42 42 #ifdef HAVE_LCD_ENABLE
+2 -2
firmware/target/arm/samsung/yh920/backlight-yh920.c
··· 25 25 #include "backlight-target.h" 26 26 #include "lcd.h" 27 27 28 - void _backlight_on(void) 28 + void backlight_hw_on(void) 29 29 { 30 30 #ifdef HAVE_LCD_SLEEP 31 31 backlight_lcd_sleep_countdown(false); /* stop counter */ ··· 36 36 GPIO_SET_BITWISE(GPIOB_OUTPUT_VAL, 0x2); 37 37 } 38 38 39 - void _backlight_off(void) 39 + void backlight_hw_off(void) 40 40 { 41 41 GPIO_CLEAR_BITWISE(GPIOB_OUTPUT_VAL, 0x2); 42 42 #ifdef HAVE_LCD_ENABLE
+2 -2
firmware/target/arm/samsung/yh925/backlight-yh925.c
··· 25 25 #include "backlight-target.h" 26 26 #include "lcd.h" 27 27 28 - void _backlight_on(void) 28 + void backlight_hw_on(void) 29 29 { 30 30 #ifdef HAVE_LCD_SLEEP 31 31 backlight_lcd_sleep_countdown(false); /* stop counter */ ··· 36 36 GPIO_SET_BITWISE(GPIOF_OUTPUT_VAL, 0x1); 37 37 } 38 38 39 - void _backlight_off(void) 39 + void backlight_hw_off(void) 40 40 { 41 41 GPIO_CLEAR_BITWISE(GPIOF_OUTPUT_VAL, 0x1); 42 42 #ifdef HAVE_LCD_ENABLE
+7 -7
firmware/target/arm/sandisk/backlight-c200_e200.c
··· 26 26 #include "ascodec.h" 27 27 #include "as3514.h" 28 28 29 - void _backlight_set_brightness(int brightness) 29 + void backlight_hw_brightness(int brightness) 30 30 { 31 31 ascodec_write(AS3514_DCDC15, brightness); 32 32 } 33 33 34 - void _backlight_on(void) 34 + void backlight_hw_on(void) 35 35 { 36 36 #ifdef HAVE_LCD_ENABLE 37 37 lcd_enable(true); /* power on lcd + visible display */ ··· 39 39 #if (CONFIG_BACKLIGHT_FADING != BACKLIGHT_FADING_SW_SETTING) /* in bootloader/sim */ 40 40 /* if we set the brightness to the settings value, then fading up 41 41 * is glitchy */ 42 - _backlight_set_brightness(backlight_brightness); 42 + backlight_hw_brightness(backlight_brightness); 43 43 #endif 44 44 } 45 45 46 - void _backlight_off(void) 46 + void backlight_hw_off(void) 47 47 { 48 - _backlight_set_brightness(0); 48 + backlight_hw_brightness(0); 49 49 #ifdef HAVE_LCD_ENABLE 50 50 lcd_enable(false); /* power off visible display */ 51 51 #endif 52 52 } 53 53 54 - void _buttonlight_on(void) 54 + void buttonlight_hw_on(void) 55 55 { 56 56 GPIO_SET_BITWISE(GPIOG_OUTPUT_VAL, 0x80); 57 57 #ifdef SANSA_C200 ··· 59 59 #endif 60 60 } 61 61 62 - void _buttonlight_off(void) 62 + void buttonlight_hw_off(void) 63 63 { 64 64 GPIO_CLEAR_BITWISE(GPIOG_OUTPUT_VAL, 0x80); 65 65 #ifdef SANSA_C200
+6 -6
firmware/target/arm/sandisk/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - #define _backlight_init() true 25 - void _backlight_on(void); 26 - void _backlight_off(void); 27 - void _backlight_set_brightness(int brightness); 24 + #define backlight_hw_init() true 25 + void backlight_hw_on(void); 26 + void backlight_hw_off(void); 27 + void backlight_hw_brightness(int brightness); 28 28 29 - void _buttonlight_on(void); 30 - void _buttonlight_off(void); 29 + void buttonlight_hw_on(void); 30 + void buttonlight_hw_off(void); 31 31 #endif
+4 -4
firmware/target/arm/sandisk/sansa-e200/button-e200.c
··· 135 135 static int prev_keypost = BUTTON_NONE; 136 136 static int count = 0; 137 137 static int fast_mode = 0; 138 - static long next_backlight_on = 0; 138 + static long nextbacklight_hw_on = 0; 139 139 140 140 static unsigned long prev_usec[WHEEL_BASE_SENSITIVITY] = { 0 }; 141 141 static unsigned long delta = 1ul << 24; ··· 166 166 velocity = 0; 167 167 } 168 168 169 - if (TIME_AFTER(current_tick, next_backlight_on)) 169 + if (TIME_AFTER(current_tick, nextbacklight_hw_on)) 170 170 { 171 171 /* Poke backlight to turn it on or maintain it no more often 172 172 * than every 1/4 second */ 173 - next_backlight_on = current_tick + HZ/4; 173 + nextbacklight_hw_on = current_tick + HZ/4; 174 174 backlight_on(); 175 175 #ifdef HAVE_BUTTON_LIGHT 176 176 buttonlight_on(); ··· 209 209 velocity = v; 210 210 /* Ensure backlight never gets stuck for an extended period if tick 211 211 * wrapped such that next poke is very far ahead */ 212 - next_backlight_on = current_tick - 1; 212 + nextbacklight_hw_on = current_tick - 1; 213 213 } 214 214 else 215 215 {
+4 -4
firmware/target/arm/sandisk/sansa-view/backlight-target.h
··· 24 24 25 25 #include <stdbool.h> 26 26 27 - void _backlight_on(void); 28 - void _backlight_off(void); 27 + void backlight_hw_on(void); 28 + void backlight_hw_off(void); 29 29 30 - void _buttonlight_on(void); 31 - void _buttonlight_off(void); 30 + void buttonlight_hw_on(void); 31 + void buttonlight_hw_off(void); 32 32 33 33 #endif
+6 -6
firmware/target/arm/sandisk/sansa-view/backlight-view.c
··· 25 25 #include "lcd.h" 26 26 #include "backlight.h" 27 27 28 - bool _backlight_init(void) 28 + bool backlight_hw_init(void) 29 29 { 30 30 GPIO_SET_BITWISE(GPIOD_ENABLE, 0x01); 31 31 GPIO_SET_BITWISE(GPIOD_OUTPUT_EN, 0x01); ··· 44 44 return true; 45 45 } 46 46 47 - void _backlight_set_brightness(int brightness) 47 + void backlight_hw_brightness(int brightness) 48 48 { 49 49 (void)brightness; 50 50 } 51 51 52 - void _backlight_off(void) 52 + void backlight_hw_off(void) 53 53 { 54 54 GPIO_CLEAR_BITWISE(GPIOD_OUTPUT_VAL, 0x01); 55 55 } 56 56 57 - void _backlight_on(void) 57 + void backlight_hw_on(void) 58 58 { 59 59 GPIO_SET_BITWISE(GPIOD_OUTPUT_VAL, 0x01); 60 60 } 61 61 62 - void _buttonlight_off(void) 62 + void buttonlight_hw_off(void) 63 63 { 64 64 GPIO_CLEAR_BITWISE(GPIOA_OUTPUT_VAL, 0x02); /* vertical buttonlight */ 65 65 GPIO_CLEAR_BITWISE(GPIOA_OUTPUT_VAL, 0x01); /* horizontal buttonlight */ ··· 70 70 GPIO_CLEAR_BITWISE(GPIOR_OUTPUT_VAL, 0x10); /* scrollwheel left led */ 71 71 } 72 72 73 - void _buttonlight_on(void) 73 + void buttonlight_hw_on(void) 74 74 { 75 75 GPIO_SET_BITWISE(GPIOA_OUTPUT_VAL, 0x02); /* vertical buttonlight */ 76 76 GPIO_SET_BITWISE(GPIOA_OUTPUT_VAL, 0x01); /* horizontal buttonlight */
+3 -3
firmware/target/arm/tatung/tpj1022/backlight-target.h
··· 24 24 #ifndef BACKLIGHT_TARGET_H 25 25 #define BACKLIGHT_TARGET_H 26 26 27 - #define _backlight_init() true 28 - void _backlight_on(void); 29 - void _backlight_off(void); 27 + #define backlight_hw_init() true 28 + void backlight_hw_on(void); 29 + void backlight_hw_off(void); 30 30 31 31 #endif
+2 -2
firmware/target/arm/tatung/tpj1022/backlight-tpj1022.c
··· 27 27 #include "system.h" 28 28 #include "backlight.h" 29 29 30 - void _backlight_on(void) 30 + void backlight_hw_on(void) 31 31 { 32 32 #if 0 33 33 int level = disable_irq_save(); ··· 36 36 #endif 37 37 } 38 38 39 - void _backlight_off(void) 39 + void backlight_hw_off(void) 40 40 { 41 41 #if 0 42 42 int level = disable_irq_save();
+3 -3
firmware/target/arm/tcc77x/c100/backlight-target.h
··· 23 23 24 24 #include "tcc77x.h" 25 25 26 - #define _backlight_init() true 26 + #define backlight_hw_init() true 27 27 28 - static inline void _backlight_on(void) 28 + static inline void backlight_hw_on(void) 29 29 { 30 30 /* Enable backlight */ 31 31 GPIOE |= 0x2; 32 32 } 33 33 34 - static inline void _backlight_off(void) 34 + static inline void backlight_hw_off(void) 35 35 { 36 36 /* Disable backlight */ 37 37 GPIOE &= ~0x2;
+3 -3
firmware/target/arm/tcc77x/iaudio7/backlight-target.h
··· 26 26 27 27 void power_touch_panel(bool on); 28 28 29 - static inline bool _backlight_init(void) 29 + static inline bool backlight_hw_init(void) 30 30 { 31 31 GPIOD_DIR |= 0x2; 32 32 /* set backlight on by default, since the screen is unreadable without it */ ··· 34 34 return true; 35 35 } 36 36 37 - static inline void _backlight_on(void) 37 + static inline void backlight_hw_on(void) 38 38 { 39 39 GPIOD |= 0x2; 40 40 power_touch_panel(true); 41 41 } 42 42 43 - static inline void _backlight_off(void) 43 + static inline void backlight_hw_off(void) 44 44 { 45 45 GPIOD &= ~0x2; 46 46 power_touch_panel(false);
+3 -3
firmware/target/arm/tcc77x/logikdax/backlight-target.h
··· 23 23 24 24 #include "tcc77x.h" 25 25 26 - #define _backlight_init() true 26 + #define backlight_hw_init() true 27 27 28 - static inline void _backlight_on(void) 28 + static inline void backlight_hw_on(void) 29 29 { 30 30 /* Enable backlight */ 31 31 GPIOD |= 0x10; 32 32 } 33 33 34 - static inline void _backlight_off(void) 34 + static inline void backlight_hw_off(void) 35 35 { 36 36 /* Disable backlight */ 37 37 GPIOD &= ~0x10;
+3 -3
firmware/target/arm/tcc77x/m200/backlight-target.h
··· 23 23 24 24 #include "tcc77x.h" 25 25 26 - static inline bool _backlight_init(void) 26 + static inline bool backlight_hw_init(void) 27 27 { 28 28 GPIOA_DIR |= 0x40; 29 29 return true; 30 30 } 31 31 32 - static inline void _backlight_on(void) 32 + static inline void backlight_hw_on(void) 33 33 { 34 34 /* Enable backlight */ 35 35 GPIOA |= 0x40; 36 36 } 37 37 38 - static inline void _backlight_off(void) 38 + static inline void backlight_hw_off(void) 39 39 { 40 40 /* Disable backlight */ 41 41 GPIOA &= ~0x40;
+6 -6
firmware/target/arm/tcc780x/cowond2/backlight-cowond2.c
··· 26 26 #include "tcc780x.h" 27 27 #include "pmu-target.h" 28 28 29 - int _backlight_init(void) 29 + int backlight_hw_init(void) 30 30 { 31 - _backlight_set_brightness(DEFAULT_BRIGHTNESS_SETTING); 31 + backlight_hw_brightness(DEFAULT_BRIGHTNESS_SETTING); 32 32 /* set backlight on by default, since the screen is unreadable without it */ 33 - _backlight_on(); 33 + backlight_hw_on(); 34 34 return true; 35 35 } 36 36 37 - void _backlight_set_brightness(int brightness) 37 + void backlight_hw_brightness(int brightness) 38 38 { 39 39 int level = disable_irq_save(); 40 40 ··· 56 56 restore_irq(level); 57 57 } 58 58 59 - void _backlight_on(void) 59 + void backlight_hw_on(void) 60 60 { 61 61 if (get_pmu_type() == PCF50606) 62 62 { ··· 70 70 } 71 71 } 72 72 73 - void _backlight_off(void) 73 + void backlight_hw_off(void) 74 74 { 75 75 if (get_pmu_type() == PCF50606) 76 76 {
+4 -4
firmware/target/arm/tcc780x/cowond2/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - int _backlight_init(void); 25 - void _backlight_on(void); 26 - void _backlight_off(void); 27 - void _backlight_set_brightness(int brightness); 24 + int backlight_hw_init(void); 25 + void backlight_hw_on(void); 26 + void backlight_hw_off(void); 27 + void backlight_hw_brightness(int brightness); 28 28 29 29 #endif
+1 -1
firmware/target/arm/tcc780x/cowond2/button-cowond2.c
··· 92 92 if (!(GPIOA & 0x4)) 93 93 btn |= BUTTON_POWER; 94 94 95 - if (btn & BUTTON_TOUCHSCREEN && !is_backlight_on(true)) 95 + if (btn & BUTTON_TOUCHSCREEN && !isbacklight_hw_on(true)) 96 96 old_data = *data = 0; 97 97 98 98 return btn;
+1 -1
firmware/target/arm/tcc780x/cowond2/power-cowond2.c
··· 78 78 void power_off(void) 79 79 { 80 80 /* Turn the backlight off first to avoid a bright stripe on power-off */ 81 - _backlight_off(); 81 + backlight_hw_off(); 82 82 sleep(HZ/10); 83 83 84 84 /* Power off the player using the same mechanism as the OF */
+4 -4
firmware/target/arm/tms320dm320/creative-zvm/backlight-target.h
··· 22 22 #ifndef BACKLIGHT_TARGET_H 23 23 #define BACKLIGHT_TARGET_H 24 24 25 - bool _backlight_init(void); 26 - void _backlight_on(void); 27 - void _backlight_off(void); 28 - void _backlight_set_brightness(int brightness); 25 + bool backlight_hw_init(void); 26 + void backlight_hw_on(void); 27 + void backlight_hw_off(void); 28 + void backlight_hw_brightness(int brightness); 29 29 30 30 /* true: backlight fades off - false: backlight fades on */ 31 31 void __backlight_dim(bool dim);
+6 -6
firmware/target/arm/tms320dm320/mrobe-500/backlight-mr500.c
··· 55 55 spi_block_transfer(SPI_target_BACKLIGHT, bl_command, 4, 0, 0); 56 56 } 57 57 58 - void _backlight_on(void) 58 + void backlight_hw_on(void) 59 59 { 60 60 lcd_awake(); /* power on lcd + visible display */ 61 61 ··· 64 64 #endif 65 65 } 66 66 67 - void _backlight_off(void) 67 + void backlight_hw_off(void) 68 68 { 69 69 _backlight_write_brightness(0); 70 70 } 71 71 72 72 /* Assumes that the backlight has been initialized */ 73 - void _backlight_set_brightness(int brightness) 73 + void backlight_hw_brightness(int brightness) 74 74 { 75 75 _backlight_write_brightness(brightness); 76 76 } 77 77 78 78 void __backlight_dim(bool dim_now) 79 79 { 80 - _backlight_set_brightness(dim_now ? 80 + backlight_hw_brightness(dim_now ? 81 81 DEFAULT_BRIGHTNESS_SETTING : 82 82 DEFAULT_DIMNESS_SETTING); 83 83 } 84 84 85 - bool _backlight_init(void) 85 + bool backlight_hw_init(void) 86 86 { 87 87 short read_value; 88 88 ··· 102 102 103 103 spi_block_transfer(SPI_target_BACKLIGHT, commands[2], 2, 0, 0); 104 104 105 - _backlight_set_brightness(backlight_brightness); 105 + backlight_hw_brightness(backlight_brightness); 106 106 return true; 107 107 } 108 108
+4 -4
firmware/target/arm/tms320dm320/mrobe-500/backlight-target.h
··· 22 22 #ifndef BACKLIGHT_TARGET_H 23 23 #define BACKLIGHT_TARGET_H 24 24 25 - bool _backlight_init(void); 26 - void _backlight_on(void); 27 - void _backlight_off(void); 28 - void _backlight_set_brightness(int brightness); 25 + bool backlight_hw_init(void); 26 + void backlight_hw_on(void); 27 + void backlight_hw_off(void); 28 + void backlight_hw_brightness(int brightness); 29 29 30 30 /* true: backlight fades off - false: backlight fades on */ 31 31 void __backlight_dim(bool dim);
+2 -2
firmware/target/arm/tms320dm320/mrobe-500/lcd-remote-mr500.c
··· 292 292 remote_state_control=REMOTE_CONTROL_DRAW; 293 293 } 294 294 295 - void _remote_backlight_on(void) 295 + void remote_backlight_hw_on(void) 296 296 { 297 297 remote_power|=0x40; 298 298 remote_state_control_next=REMOTE_CONTROL_POWER; 299 299 } 300 300 301 - void _remote_backlight_off(void) 301 + void remote_backlight_hw_off(void) 302 302 { 303 303 remote_power&=~(0x40); 304 304 remote_state_control_next=REMOTE_CONTROL_POWER;
+1 -1
firmware/target/arm/tms320dm320/mrobe-500/power-mr500.c
··· 75 75 void power_off(void) 76 76 { 77 77 /* turn off backlight and wait for 1 second */ 78 - _backlight_off(); 78 + backlight_hw_off(); 79 79 #if defined(HAVE_REMOTE_LCD) 80 80 lcd_remote_sleep(); 81 81 #endif
+3 -3
firmware/target/arm/tms320dm320/sansa-connect/avr-sansaconnect.c
··· 92 92 static unsigned char velocity = 0; 93 93 static unsigned long wheel_delta = 1ul << 24; 94 94 static unsigned char wheel_prev = 0; 95 - static long next_backlight_on = 0; 95 + static long nextbacklight_hw_on = 0; 96 96 static int prev_key = -1; 97 97 static int prev_key_post = 0; 98 98 99 - if (TIME_AFTER(current_tick, next_backlight_on)) 99 + if (TIME_AFTER(current_tick, nextbacklight_hw_on)) 100 100 { 101 101 backlight_on(); 102 102 reset_poweroff_timer(); 103 - next_backlight_on = current_tick + HZ/4; 103 + nextbacklight_hw_on = current_tick + HZ/4; 104 104 } 105 105 106 106 if (wheel_prev < wheel)
+6 -6
firmware/target/arm/tms320dm320/sansa-connect/backlight-sansaconnect.c
··· 50 50 IO_CLK_PWM1H = brightness*70; 51 51 } 52 52 53 - void _backlight_on(void) 53 + void backlight_hw_on(void) 54 54 { 55 55 #ifdef HAVE_LCD_SLEEP 56 56 if (!lcd_active()) ··· 67 67 #endif 68 68 } 69 69 70 - void _backlight_off(void) 70 + void backlight_hw_off(void) 71 71 { 72 72 _backlight_write_brightness(0); 73 73 ··· 77 77 } 78 78 79 79 /* Assumes that the backlight has been initialized */ 80 - void _backlight_set_brightness(int brightness) 80 + void backlight_hw_brightness(int brightness) 81 81 { 82 82 _backlight_write_brightness(brightness); 83 83 } 84 84 85 85 void __backlight_dim(bool dim_now) 86 86 { 87 - _backlight_set_brightness(dim_now ? 87 + backlight_hw_brightness(dim_now ? 88 88 DEFAULT_BRIGHTNESS_SETTING : 89 89 DEFAULT_DIMNESS_SETTING); 90 90 } 91 91 92 - bool _backlight_init(void) 92 + bool backlight_hw_init(void) 93 93 { 94 94 IO_CLK_PWM1C = 0x58D; /* as found in OF */ 95 95 96 - _backlight_set_brightness(backlight_brightness); 96 + backlight_hw_brightness(backlight_brightness); 97 97 return true; 98 98 } 99 99
+4 -4
firmware/target/arm/tms320dm320/sansa-connect/backlight-target.h
··· 22 22 #ifndef BACKLIGHT_TARGET_H 23 23 #define BACKLIGHT_TARGET_H 24 24 25 - bool _backlight_init(void); 26 - void _backlight_on(void); 27 - void _backlight_off(void); 28 - void _backlight_set_brightness(int brightness); 25 + bool backlight_hw_init(void); 26 + void backlight_hw_on(void); 27 + void backlight_hw_off(void); 28 + void backlight_hw_brightness(int brightness); 29 29 30 30 /* true: backlight fades off - false: backlight fades on */ 31 31 void __backlight_dim(bool dim);
+3 -3
firmware/target/coldfire/iaudio/m3/backlight-m3.c
··· 25 25 #include "backlight.h" 26 26 #include "backlight-target.h" 27 27 28 - bool _backlight_init(void) 28 + bool backlight_hw_init(void) 29 29 { 30 30 and_l(~0x00000008, &GPIO1_OUT); 31 31 or_l(0x00000008, &GPIO1_ENABLE); ··· 33 33 return true; /* Backlight always ON after boot. */ 34 34 } 35 35 36 - void _backlight_on(void) 36 + void backlight_hw_on(void) 37 37 { 38 38 and_l(~0x00000008, &GPIO1_OUT); 39 39 } 40 40 41 - void _backlight_off(void) 41 + void backlight_hw_off(void) 42 42 { 43 43 or_l(0x00000008, &GPIO1_OUT); 44 44 }
+3 -3
firmware/target/coldfire/iaudio/m3/backlight-target.h
··· 22 22 #ifndef BACKLIGHT_TARGET_H 23 23 #define BACKLIGHT_TARGET_H 24 24 25 - bool _backlight_init(void); 26 - void _backlight_on(void); 27 - void _backlight_off(void); 25 + bool backlight_hw_init(void); 26 + void backlight_hw_on(void); 27 + void backlight_hw_off(void); 28 28 29 29 #endif
+6 -6
firmware/target/coldfire/iaudio/m5/backlight-m5.c
··· 26 26 #include "pcf50606.h" 27 27 #include "lcd.h" 28 28 29 - bool _backlight_init(void) 29 + bool backlight_hw_init(void) 30 30 { 31 - _backlight_on(); 31 + backlight_hw_on(); 32 32 33 33 return true; /* Backlight always ON after boot. */ 34 34 } 35 35 36 - void _backlight_on(void) 36 + void backlight_hw_on(void) 37 37 { 38 38 int level = disable_irq_save(); 39 39 ··· 41 41 restore_irq(level); 42 42 } 43 43 44 - void _backlight_off(void) 44 + void backlight_hw_off(void) 45 45 { 46 46 int level = disable_irq_save(); 47 47 ··· 49 49 restore_irq(level); 50 50 } 51 51 52 - void _remote_backlight_on(void) 52 + void remote_backlight_hw_on(void) 53 53 { 54 54 and_l(~0x00200000, &GPIO_OUT); 55 55 } 56 56 57 - void _remote_backlight_off(void) 57 + void remote_backlight_hw_off(void) 58 58 { 59 59 or_l(0x00200000, &GPIO_OUT); 60 60 }
+5 -5
firmware/target/coldfire/iaudio/m5/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - bool _backlight_init(void); 25 - void _backlight_on(void); 26 - void _backlight_off(void); 27 - void _remote_backlight_on(void); 28 - void _remote_backlight_off(void); 24 + bool backlight_hw_init(void); 25 + void backlight_hw_on(void); 26 + void backlight_hw_off(void); 27 + void remote_backlight_hw_on(void); 28 + void remote_backlight_hw_off(void); 29 29 30 30 #endif
+6 -6
firmware/target/coldfire/iaudio/x5/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - bool _backlight_init(void); 25 - void _backlight_on(void); 26 - void _backlight_off(void); 27 - void _backlight_set_brightness(int val); 28 - void _remote_backlight_on(void); 29 - void _remote_backlight_off(void); 24 + bool backlight_hw_init(void); 25 + void backlight_hw_on(void); 26 + void backlight_hw_off(void); 27 + void backlight_hw_brightness(int val); 28 + void remote_backlight_hw_on(void); 29 + void remote_backlight_hw_off(void); 30 30 31 31 #endif
+8 -8
firmware/target/coldfire/iaudio/x5/backlight-x5.c
··· 26 26 #include "pcf50606.h" 27 27 #include "lcd.h" 28 28 29 - bool _backlight_init(void) 29 + bool backlight_hw_init(void) 30 30 { 31 - _backlight_set_brightness(DEFAULT_BRIGHTNESS_SETTING); 32 - _backlight_on(); 31 + backlight_hw_brightness(DEFAULT_BRIGHTNESS_SETTING); 32 + backlight_hw_on(); 33 33 34 34 return true; /* Backlight always ON after boot. */ 35 35 } 36 36 37 - void _backlight_on(void) 37 + void backlight_hw_on(void) 38 38 { 39 39 int level; 40 40 #ifdef HAVE_LCD_ENABLE ··· 45 45 restore_irq(level); 46 46 } 47 47 48 - void _backlight_off(void) 48 + void backlight_hw_off(void) 49 49 { 50 50 int level = disable_irq_save(); 51 51 pcf50606_write(0x38, 0x80); /* Backlight OFF, GPO1INV=1, GPO1ACT=000 */ ··· 56 56 } 57 57 58 58 /* set brightness by changing the PWM */ 59 - void _backlight_set_brightness(int val) 59 + void backlight_hw_brightness(int val) 60 60 { 61 61 /* disable IRQs while bitbanging */ 62 62 int old_irq_level = disable_irq_save(); ··· 65 65 restore_irq(old_irq_level); 66 66 } 67 67 68 - void _remote_backlight_on(void) 68 + void remote_backlight_hw_on(void) 69 69 { 70 70 and_l(~0x00200000, &GPIO_OUT); 71 71 } 72 72 73 - void _remote_backlight_off(void) 73 + void remote_backlight_hw_off(void) 74 74 { 75 75 or_l(0x00200000, &GPIO_OUT); 76 76 }
+3 -3
firmware/target/coldfire/iriver/h100/backlight-h100.c
··· 27 27 #include "lcd.h" 28 28 29 29 /* Returns the current state of the backlight (true=ON, false=OFF). */ 30 - bool _backlight_init(void) 30 + bool backlight_hw_init(void) 31 31 { 32 32 or_l(0x00020000, &GPIO1_ENABLE); 33 33 or_l(0x00020000, &GPIO1_FUNCTION); ··· 45 45 or_l(0x00020000, &GPIO1_OUT); 46 46 } 47 47 48 - void _remote_backlight_on(void) 48 + void remote_backlight_hw_on(void) 49 49 { 50 50 and_l(~0x00000800, &GPIO_OUT); 51 51 } 52 52 53 - void _remote_backlight_off(void) 53 + void remote_backlight_hw_off(void) 54 54 { 55 55 or_l(0x00000800, &GPIO_OUT); 56 56 }
+10 -13
firmware/target/coldfire/iriver/h100/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - bool _backlight_init(void); /* Returns backlight current state (true=ON). */ 25 - void _backlight_hw_on(void); 26 - void _backlight_hw_off(void); 24 + bool backlight_hw_init(void); /* Returns backlight current state (true=ON). */ 25 + void backlight_hw_on(void); 26 + void backlight_hw_off(void); 27 27 28 - #ifdef BOOTLOADER 29 - #define _backlight_on() _backlight_hw_on() 30 - #define _backlight_off() _backlight_hw_off() 31 - #else 32 - #define _backlight_on_isr() _backlight_hw_on() 33 - #define _backlight_off_isr() _backlight_hw_off() 34 - #define _backlight_on_normal() _backlight_hw_on() 35 - #define _backlight_off_normal() _backlight_hw_off() 28 + #ifndef BOOTLOADER 29 + #define backlight_hw_on_isr() backlight_hw_on() 30 + #define backlight_hw_off_isr() backlight_hw_off() 31 + #define backlight_hw_on_normal() backlight_hw_on() 32 + #define backlight_hw_off_normal() backlight_hw_off() 36 33 #define _BACKLIGHT_FADE_BOOST 37 34 #endif 38 35 39 - void _remote_backlight_on(void); 40 - void _remote_backlight_off(void); 36 + void remote_backlight_hw_on(void); 37 + void remote_backlight_hw_off(void); 41 38 42 39 #endif
+6 -6
firmware/target/coldfire/iriver/h300/backlight-h300.c
··· 28 28 #include "pcf50606.h" 29 29 #include "lcd.h" 30 30 31 - bool _backlight_init(void) 31 + bool backlight_hw_init(void) 32 32 { 33 33 or_l(0x00020000, &GPIO1_ENABLE); 34 34 or_l(0x00020000, &GPIO1_FUNCTION); ··· 37 37 return true; /* Backlight always ON after boot. */ 38 38 } 39 39 40 - void _backlight_on(void) 40 + void backlight_hw_on(void) 41 41 { 42 42 lcd_enable(true); 43 43 sleep(HZ/100); /* lcd needs time - avoid flashing for dark screens */ 44 44 or_l(0x00020000, &GPIO1_OUT); 45 45 } 46 46 47 - void _backlight_off(void) 47 + void backlight_hw_off(void) 48 48 { 49 49 and_l(~0x00020000, &GPIO1_OUT); 50 50 lcd_enable(false); 51 51 } 52 52 53 53 /* set brightness by changing the PWM */ 54 - void _backlight_set_brightness(int val) 54 + void backlight_hw_brightness(int val) 55 55 { 56 56 /* disable IRQs while bitbanging */ 57 57 int old_irq_level = disable_irq_save(); ··· 60 60 restore_irq(old_irq_level); 61 61 } 62 62 63 - void _remote_backlight_on(void) 63 + void remote_backlight_hw_on(void) 64 64 { 65 65 and_l(~0x00000002, &GPIO1_OUT); 66 66 } 67 67 68 - void _remote_backlight_off(void) 68 + void remote_backlight_hw_off(void) 69 69 { 70 70 or_l(0x00000002, &GPIO1_OUT); 71 71 }
+6 -6
firmware/target/coldfire/iriver/h300/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - bool _backlight_init(void); /* Returns backlight current state (true=ON). */ 25 - void _backlight_on(void); 26 - void _backlight_off(void); 27 - void _backlight_set_brightness(int val); 28 - void _remote_backlight_on(void); 29 - void _remote_backlight_off(void); 24 + bool backlight_hw_init(void); /* Returns backlight current state (true=ON). */ 25 + void backlight_hw_on(void); 26 + void backlight_hw_off(void); 27 + void backlight_hw_brightness(int val); 28 + void remote_backlight_hw_on(void); 29 + void remote_backlight_hw_off(void); 30 30 31 31 #endif
+10 -10
firmware/target/coldfire/mpio/backlight-mpio.c
··· 27 27 #include "backlight-target.h" 28 28 #include "lcd.h" 29 29 30 - static bool _backlight_on = true; 30 + static bool backlight_hw_on = true; 31 31 static int _brightness = DEFAULT_BRIGHTNESS_SETTING; 32 32 33 33 /* Returns the current state of the backlight (true=ON, false=OFF). */ 34 - bool _backlight_init(void) 34 + bool backlight_hw_init(void) 35 35 { 36 36 #ifdef BOOTLOADER 37 37 and_l(~(1<<28),&GPIO_OUT); ··· 44 44 void _backlight_hw_on(void) 45 45 { 46 46 #ifndef BOOTLOADER 47 - if (_backlight_on) 47 + if (backlight_hw_on) 48 48 return; 49 49 #endif 50 50 51 - _backlight_set_brightness(_brightness); 52 - _backlight_on = true; 51 + backlight_hw_brightness(_brightness); 52 + backlight_hw_on = true; 53 53 54 54 } 55 55 ··· 57 57 { 58 58 /* GPIO28 low */ 59 59 and_l(~(1<<28),&GPIO_OUT); 60 - _backlight_on = false; 60 + backlight_hw_on = false; 61 61 } 62 62 63 - void _backlight_set_brightness(int val) 63 + void backlight_hw_brightness(int val) 64 64 { 65 65 unsigned char i; 66 66 67 67 #ifndef BOOTLOADER 68 - if( _brightness == val && _backlight_on == true ) 68 + if( _brightness == val && backlight_hw_on == true ) 69 69 return; 70 70 #endif 71 71 ··· 83 83 _brightness = val; 84 84 } 85 85 86 - void _remote_backlight_on(void) 86 + void remote_backlight_hw_on(void) 87 87 { 88 88 /* I don't have remote to play with */ 89 89 } 90 90 91 - void _remote_backlight_off(void) 91 + void remote_backlight_hw_off(void) 92 92 { 93 93 /* I don't have remote to play with */ 94 94 }
+8 -10
firmware/target/coldfire/mpio/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - bool _backlight_init(void); /* Returns backlight current state (true=ON). */ 25 - void _backlight_hw_on(void); 26 - void _backlight_hw_off(void); 27 - void _backlight_set_brightness(int val); 24 + bool backlight_hw_init(void); /* Returns backlight current state (true=ON). */ 25 + void backlight_hw_on(void); 26 + void backlight_hw_off(void); 27 + void backlight_hw_brightness(int val); 28 28 29 - #define _backlight_on() _backlight_hw_on() 30 - #define _backlight_off() _backlight_hw_off() 31 - #define _backlight_on_isr() _backlight_hw_on() 32 - #define _backlight_off_isr() _backlight_hw_off() 33 - #define _backlight_on_normal() _backlight_hw_on() 34 - #define _backlight_off_normal() _backlight_hw_off() 29 + #define backlight_hw_on_isr() backlight_hw_on() 30 + #define backlight_hw_off_isr() backlight_hw_off() 31 + #define backlight_hw_on_normal() backlight_hw_on() 32 + #define backlight_hw_off_normal() backlight_hw_off() 35 33 #endif
+3 -3
firmware/target/coldfire/mpio/hd300/button-hd300.c
··· 80 80 static signed char prev_scroll_lines = -1; 81 81 static signed char direction = 0; 82 82 static unsigned char count = 0; 83 - static long next_backlight_on = 0; 83 + static long nextbacklight_hw_on = 0; 84 84 85 85 signed int new_scroll_lines; 86 86 signed int scroll_dir; ··· 120 120 } 121 121 122 122 /* poke backlight */ 123 - if (TIME_AFTER(current_tick, next_backlight_on)) 123 + if (TIME_AFTER(current_tick, nextbacklight_hw_on)) 124 124 { 125 125 backlight_on(); 126 126 reset_poweroff_timer(); 127 - next_backlight_on = current_tick + HZ/4; 127 + nextbacklight_hw_on = current_tick + HZ/4; 128 128 } 129 129 130 130 /* apply sensitivity filter */
+4 -4
firmware/target/hosted/android/dx50/backlight-dx50.c
··· 27 27 #include <stdio.h> 28 28 #include "unistd.h" 29 29 30 - bool _backlight_init(void) 30 + bool backlight_hw_init(void) 31 31 { 32 32 /* We have nothing to do */ 33 33 return true; 34 34 } 35 35 36 - void _backlight_on(void) 36 + void backlight_hw_on(void) 37 37 { 38 38 FILE *f = fopen("/sys/power/state", "w"); 39 39 fputs("on", f); ··· 41 41 lcd_enable(true); 42 42 } 43 43 44 - void _backlight_off(void) 44 + void backlight_hw_off(void) 45 45 { 46 46 FILE * f; 47 47 ··· 62 62 63 63 } 64 64 65 - void _backlight_set_brightness(int brightness) 65 + void backlight_hw_brightness(int brightness) 66 66 { 67 67 /* Just another check... */ 68 68 if (brightness > MAX_BRIGHTNESS_SETTING)
+4 -4
firmware/target/hosted/android/dx50/backlight-target.h
··· 23 23 24 24 #include <stdbool.h> 25 25 26 - bool _backlight_init(void); 27 - void _backlight_on(void); 28 - void _backlight_off(void); 29 - void _backlight_set_brightness(int brightness); 26 + bool backlight_hw_init(void); 27 + void backlight_hw_on(void); 28 + void backlight_hw_off(void); 29 + void backlight_hw_brightness(int brightness); 30 30 31 31 #endif /* BACKLIGHT_TARGET_H */
+4 -4
firmware/target/hosted/samsungypr/backlight-target.h
··· 21 21 #ifndef BACKLIGHT_TARGET_H 22 22 #define BACKLIGHT_TARGET_H 23 23 24 - bool _backlight_init(void); 25 - void _backlight_on(void); 26 - void _backlight_off(void); 27 - void _backlight_set_brightness(int brightness); 24 + bool backlight_hw_init(void); 25 + void backlight_hw_on(void); 26 + void backlight_hw_off(void); 27 + void backlight_hw_brightness(int brightness); 28 28 29 29 #endif /* BACKLIGHT_TARGET_H */
+4 -4
firmware/target/hosted/samsungypr/ypr0/backlight-ypr0.c
··· 29 29 30 30 static bool backlight_on_status = true; /* Is on or off? */ 31 31 32 - bool _backlight_init(void) 32 + bool backlight_hw_init(void) 33 33 { 34 34 /* We have nothing to do */ 35 35 return true; 36 36 } 37 37 38 - void _backlight_on(void) 38 + void backlight_hw_on(void) 39 39 { 40 40 if (!backlight_on_status) 41 41 { ··· 51 51 52 52 } 53 53 54 - void _backlight_off(void) 54 + void backlight_hw_off(void) 55 55 { 56 56 if (backlight_on_status) 57 57 { ··· 66 66 backlight_on_status = false; 67 67 } 68 68 69 - void _backlight_set_brightness(int brightness) 69 + void backlight_hw_brightness(int brightness) 70 70 { 71 71 /* Just another check... */ 72 72 if (brightness > MAX_BRIGHTNESS_SETTING)
+6 -6
firmware/target/hosted/samsungypr/ypr1/backlight-ypr1.c
··· 27 27 28 28 static bool backlight_on_status = true; /* Is on or off? */ 29 29 30 - bool _backlight_init(void) 30 + bool backlight_hw_init(void) 31 31 { 32 32 /* We have nothing to do */ 33 33 return true; 34 34 } 35 35 36 - void _backlight_on(void) 36 + void backlight_hw_on(void) 37 37 { 38 38 if (!backlight_on_status) { 39 - _backlight_set_brightness(backlight_brightness); 39 + backlight_hw_brightness(backlight_brightness); 40 40 } 41 41 42 42 backlight_on_status = true; 43 43 44 44 } 45 45 46 - void _backlight_off(void) 46 + void backlight_hw_off(void) 47 47 { 48 48 if (backlight_on_status) { 49 - _backlight_set_brightness(0); 49 + backlight_hw_brightness(0); 50 50 } 51 51 52 52 backlight_on_status = false; 53 53 } 54 54 55 - void _backlight_set_brightness(int brightness) 55 + void backlight_hw_brightness(int brightness) 56 56 { 57 57 /* Just another check... */ 58 58 if (brightness > MAX_BRIGHTNESS_SETTING) {
+4 -4
firmware/target/mips/ingenic_jz47xx/backlight-target.h
··· 23 23 24 24 #include <stdbool.h> 25 25 26 - bool _backlight_init(void); 27 - void _backlight_on(void); 28 - void _backlight_off(void); 29 - void _backlight_set_brightness(int brightness); 26 + bool backlight_hw_init(void); 27 + void backlight_hw_on(void); 28 + void backlight_hw_off(void); 29 + void backlight_hw_brightness(int brightness); 30 30 31 31 #endif /* BACKLIGHT_TARGET_H */
+9 -9
firmware/target/mips/ingenic_jz47xx/onda_vx747/backlight-onda_vx7X7.c
··· 53 53 old_val = val; 54 54 } 55 55 56 - static void set_backlight_on(void) 56 + static void setbacklight_hw_on(void) 57 57 { 58 58 __tcu_start_counter(BACKLIGHT_PWM); 59 59 __tcu_enable_pwm_output(BACKLIGHT_PWM); 60 60 } 61 61 62 - static void set_backlight_off(void) 62 + static void setbacklight_hw_off(void) 63 63 { 64 64 __tcu_disable_pwm_output(BACKLIGHT_PWM); 65 65 __tcu_stop_counter(BACKLIGHT_PWM); 66 66 } 67 67 68 - bool _backlight_init(void) 68 + bool backlight_hw_init(void) 69 69 { 70 70 __gpio_as_pwm(BACKLIGHT_PWM); 71 71 __tcu_start_timer_clock(BACKLIGHT_PWM); ··· 88 88 return true; 89 89 } 90 90 91 - void _backlight_on(void) 91 + void backlight_hw_on(void) 92 92 { 93 93 #ifdef HAVE_LCD_ENABLE 94 94 lcd_enable(true); /* power on lcd */ 95 95 #endif 96 - set_backlight_on(); 96 + setbacklight_hw_on(); 97 97 } 98 98 99 - void _backlight_off(void) 99 + void backlight_hw_off(void) 100 100 { 101 - set_backlight_off(); 101 + setbacklight_hw_off(); 102 102 #ifdef HAVE_LCD_ENABLE 103 103 lcd_enable(false); /* power off lcd */ 104 104 #endif 105 105 } 106 106 107 107 #ifdef HAVE_BACKLIGHT_BRIGHTNESS 108 - void _backlight_set_brightness(int brightness) 108 + void backlight_hw_brightness(int brightness) 109 109 { 110 110 set_backlight(brightness); 111 111 } ··· 115 115 /* Turn off LED supply */ 116 116 void _backlight_lcd_sleep(void) 117 117 { 118 - _backlight_off(); 118 + backlight_hw_off(); 119 119 } 120 120 #endif
+1 -1
firmware/target/mips/ingenic_jz47xx/onda_vx747/sadc-onda_vx747.c
··· 184 184 #if CONFIG_ORIENTATION == SCREEN_LANDSCAPE 185 185 *data = (*data & 0xFFFF) | ((LCD_HEIGHT - (*data >> 16)) << 16); 186 186 #endif 187 - if( UNLIKELY(!is_backlight_on(true)) ) 187 + if( UNLIKELY(!isbacklight_hw_on(true)) ) 188 188 *data = 0; 189 189 190 190 old_data = *data;
+4 -4
firmware/target/mips/ingenic_jz47xx/onda_vx767/backlight-target.h
··· 23 23 24 24 #include <stdbool.h> 25 25 26 - bool _backlight_init(void); 27 - void _backlight_on(void); 28 - void _backlight_off(void); 29 - void _backlight_set_brightness(int brightness); 26 + bool backlight_hw_init(void); 27 + void backlight_hw_on(void); 28 + void backlight_hw_off(void); 29 + void backlight_hw_brightness(int brightness); 30 30 31 31 #endif /* BACKLIGHT_TARGET_H */
+1 -1
firmware/target/mips/ingenic_jz47xx/system-jz4740.c
··· 272 272 lcd_set_viewport(NULL); 273 273 #endif 274 274 lcd_clear_display(); 275 - _backlight_on(); 275 + backlight_hw_on(); 276 276 277 277 lcd_puts(0, 0, parse_exception(cause)); 278 278 lcd_putsf(0, 1, "0x%08x at 0x%08x", read_c0_badvaddr(), epc);
+3 -3
firmware/target/sh/archos/fm_v2/backlight-target.h
··· 24 24 #include "config.h" 25 25 #include "rtc.h" 26 26 27 - #define _backlight_init() true 27 + #define backlight_hw_init() true 28 28 29 - static inline void _backlight_on(void) 29 + static inline void backlight_hw_on(void) 30 30 { 31 31 rtc_write(0x13, 0x10); /* 32 kHz square wave */ 32 32 rtc_write(0x0a, rtc_read(0x0a) | 0x40); /* Enable square wave */ 33 33 } 34 34 35 - static inline void _backlight_off(void) 35 + static inline void backlight_hw_off(void) 36 36 { 37 37 /* While on, backlight is flashing at 32 kHz. If the square wave output 38 38 is disabled while the backlight is lit, it will become constantly lit,
+3 -3
firmware/target/sh/archos/ondio/backlight-target.h
··· 27 27 #ifdef HAVE_BACKLIGHT 28 28 /* A stock Ondio has no backlight, it needs a hardware mod. */ 29 29 30 - static inline bool _backlight_init(void) 30 + static inline bool backlight_hw_init(void) 31 31 { 32 32 PACR1 &= ~0x3000; /* Set PA14 (backlight control) to GPIO */ 33 33 or_b(0x40, &PADRH); /* drive it high */ ··· 35 35 return true; 36 36 } 37 37 38 - static inline void _backlight_on(void) 38 + static inline void backlight_hw_on(void) 39 39 { 40 40 or_b(0x40, &PADRH); /* drive it high */ 41 41 } 42 42 43 - static inline void _backlight_off(void) 43 + static inline void backlight_hw_off(void) 44 44 { 45 45 and_b(~0x40, &PADRH); /* drive it low */ 46 46 }
+1 -1
firmware/target/sh/archos/ondio/power-ondio.c
··· 70 70 disable_irq(); 71 71 #ifdef HAVE_BACKLIGHT 72 72 /* Switch off the light on backlight-modded Ondios */ 73 - _backlight_off(); 73 + backlight_hw_off(); 74 74 #endif 75 75 and_b(~0x20, &PBDRL); 76 76 or_b(0x20, &PBIORL);
+3 -3
firmware/target/sh/archos/player/backlight-target.h
··· 24 24 #include "config.h" 25 25 #include "cpu.h" 26 26 27 - static inline bool _backlight_init(void) 27 + static inline bool backlight_hw_init(void) 28 28 { 29 29 PACR1 &= ~0x3000; /* Set PA14 (backlight control) to GPIO */ 30 30 and_b(~0x40, &PADRH); /* drive and set low */ ··· 32 32 return true; 33 33 } 34 34 35 - static inline void _backlight_on(void) 35 + static inline void backlight_hw_on(void) 36 36 { 37 37 and_b(~0x40, &PADRH); /* drive and set low */ 38 38 or_b(0x40, &PAIORH); 39 39 } 40 40 41 - static inline void _backlight_off(void) 41 + static inline void backlight_hw_off(void) 42 42 { 43 43 and_b(~0x40, &PAIORH); /* let it float (up) */ 44 44 }
+3 -3
firmware/target/sh/archos/recorder/backlight-target.h
··· 24 24 #include "config.h" 25 25 #include "rtc.h" 26 26 27 - #define _backlight_init() true 27 + #define backlight_hw_init() true 28 28 29 - static inline void _backlight_on(void) 29 + static inline void backlight_hw_on(void) 30 30 { 31 31 rtc_write(0x13, 0x10); /* 32 kHz square wave */ 32 32 rtc_write(0x0a, rtc_read(0x0a) | 0x40); /* Enable square wave */ 33 33 } 34 34 35 - static inline void _backlight_off(void) 35 + static inline void backlight_hw_off(void) 36 36 { 37 37 /* While on, backlight is flashing at 32 kHz. If the square wave output 38 38 is disabled while the backlight is lit, it will become constantly lit,
+9 -9
uisimulator/common/backlight-sim.c
··· 30 30 /* in uisimulator/sdl/lcd-bitmap.c and lcd-charcell.c */ 31 31 extern void sim_backlight(int value); 32 32 33 - bool _backlight_init(void) 33 + bool backlight_hw_init(void) 34 34 { 35 35 return true; 36 36 } ··· 45 45 (MAX_BRIGHTNESS_SETTING - MIN_BRIGHTNESS_SETTING + 1); 46 46 } 47 47 48 - void _backlight_set_brightness(int val) 48 + void backlight_hw_brightness(int val) 49 49 { 50 50 sim_backlight(normalize_backlight(val)); 51 51 } ··· 53 53 #endif /* HAVE_BACKLIGHT_BRIGHTNESS */ 54 54 55 55 56 - void _backlight_on(void) 56 + void backlight_hw_on(void) 57 57 { 58 58 #if defined(HAVE_LCD_ENABLE) 59 59 lcd_enable(true); ··· 72 72 #endif 73 73 } 74 74 75 - void _backlight_off(void) 75 + void backlight_hw_off(void) 76 76 { 77 77 sim_backlight(0); 78 78 #ifdef HAVE_LCD_ENABLE ··· 82 82 83 83 84 84 #ifdef HAVE_BUTTON_LIGHT 85 - void _buttonlight_on(void) 85 + void buttonlight_hw_on(void) 86 86 { 87 87 } 88 88 89 - void _buttonlight_off(void) 89 + void buttonlight_hw_off(void) 90 90 { 91 91 } 92 92 93 93 #ifdef HAVE_BUTTONLIGHT_BRIGHTNESS 94 - void _buttonlight_set_brightness(int val) 94 + void buttonlight_hw_brightness(int val) 95 95 { 96 96 (void)val; 97 97 } ··· 99 99 #endif /* HAVE_BUTTON_LIGHT */ 100 100 101 101 #ifdef HAVE_REMOTE_LCD 102 - void _remote_backlight_on(void) 102 + void remote_backlight_hw_on(void) 103 103 { 104 104 sim_remote_backlight(100); 105 105 } 106 106 107 - void _remote_backlight_off(void) 107 + void remote_backlight_hw_off(void) 108 108 { 109 109 sim_remote_backlight(0); 110 110 }
+7 -7
uisimulator/common/backlight-sim.h
··· 24 24 25 25 #include "config.h" 26 26 27 - bool _backlight_init(void); 28 - void _backlight_on(void); 29 - void _backlight_off(void); 27 + bool backlight_hw_init(void); 28 + void backlight_hw_on(void); 29 + void backlight_hw_off(void); 30 30 31 31 #ifdef HAVE_BACKLIGHT_BRIGHTNESS 32 - void _backlight_set_brightness(int val); 32 + void backlight_hw_brightness(int val); 33 33 #endif /* HAVE_BACKLIGHT_BRIGHTNESS */ 34 34 #ifdef HAVE_BUTTON_LIGHT 35 - void _buttonlight_on(void); 36 - void _buttonlight_off(void); 35 + voidbuttonlight_hw_on(void); 36 + voidbuttonlight_hw_off(void); 37 37 #ifdef HAVE_BUTTONLIGHT_BRIGHTNESS 38 - void _buttonlight_set_brightness(int val); 38 + voidbuttonlight_hw_set_brightness(int val); 39 39 #endif /* HAVE_BUTTONLIGHT_BRIGHTNESS */ 40 40 #endif /* HAVE_BUTTON_LIGHT */ 41 41