1
0
Fork 0
forked from len0rd/rockbox

Clip: add backlight and buttonlight code

Revive lcd_enable() as well, and use it in _backlight_on/off()
Don't update the lcd framebuffer if the display is off

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18952 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rafaël Carré 2008-10-31 22:02:41 +00:00
parent ee593c95e2
commit 603a9c7c7d
34 changed files with 184 additions and 97 deletions

View file

@ -10221,17 +10221,17 @@
<source>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</source>
<dest>
*: none
e200*: "Изключване на осветяването на колелото"
c200,gigabeatf,mrobe100,sa9200: "Изключване на осветяването на бутоните"
clip,c200,gigabeatf,mrobe100,sa9200: "Изключване на осветяването на бутоните"
</dest>
<voice>
*: none
e200*: ""
c200,gigabeatf,mrobe100,sa9200: ""
clip,c200,gigabeatf,mrobe100,sa9200: ""
</voice>
</phrase>
<phrase>

View file

@ -3828,17 +3828,17 @@
<source>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</source>
<dest>
*: none
e200*: "Apagat de llum de roda"
c200,gigabeatf,mrobe100,sa9200: "Apagat de llum de botons"
clip,c200,gigabeatf,mrobe100,sa9200: "Apagat de llum de botons"
</dest>
<voice>
*: none
e200*: "Apagat de llum de roda"
c200,gigabeatf,mrobe100,sa9200: "Apagat de llum de botons"
clip,c200,gigabeatf,mrobe100,sa9200: "Apagat de llum de botons"
</voice>
</phrase>
<phrase>

View file

@ -10687,17 +10687,17 @@
<source>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</source>
<dest>
*: none
e200*: "转盘背光自动关闭时滞"
c200,gigabeatf,mrobe100,sa9200: "按键背光自动关闭时滞"
clip,c200,gigabeatf,mrobe100,sa9200: "按键背光自动关闭时滞"
</dest>
<voice>
*: none
e200*: "转盘背光自动关闭时滞"
c200,gigabeatf,mrobe100,sa9200: "按键背光自动关闭时滞"
clip,c200,gigabeatf,mrobe100,sa9200: "按键背光自动关闭时滞"
</voice>
</phrase>
<phrase>

View file

@ -10705,17 +10705,17 @@
<source>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</source>
<dest>
*: none
e200*: "轉盤燈自動關時間"
c200,gigabeatf,mrobe100,sa9200: ""
clip,c200,gigabeatf,mrobe100,sa9200: ""
</dest>
<voice>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: ""
clip,c200,gigabeatf,mrobe100,sa9200: ""
</voice>
</phrase>
<phrase>

View file

@ -3836,17 +3836,17 @@
<source>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</source>
<dest>
*: none
e200*: "Časový limit osvětlení kolečka"
c200,gigabeatf,mrobe100,sa9200: ""
clip,c200,gigabeatf,mrobe100,sa9200: ""
</dest>
<voice>
*: none
e200*: "Časový limit osvětlení kolečka"
c200,gigabeatf,mrobe100,sa9200: ""
clip,c200,gigabeatf,mrobe100,sa9200: ""
</voice>
</phrase>
<phrase>

View file

@ -9933,17 +9933,17 @@
<source>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</source>
<dest>
*: none
e200*: "Hjul-lys sluk"
c200,gigabeatf,mrobe100,sa9200: "Knap-lys sluk"
clip,c200,gigabeatf,mrobe100,sa9200: "Knap-lys sluk"
</dest>
<voice>
*: none
e200*: "Hjul-lys sluk"
c200,gigabeatf,mrobe100,sa9200: "Knap-lys sluk"
clip,c200,gigabeatf,mrobe100,sa9200: "Knap-lys sluk"
</voice>
</phrase>
<phrase>

View file

@ -3850,17 +3850,17 @@
<source>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</source>
<dest>
*: none
e200*: "Scrollradbeleuchtungsdauer"
c200,gigabeatf,mrobe100,sa9200: "Tastenbeleuchtungsdauer"
clip,c200,gigabeatf,mrobe100,sa9200: "Tastenbeleuchtungsdauer"
</dest>
<voice>
*: none
e200*: "Scrollradbeleuchtungsdauer"
c200,gigabeatf,mrobe100,sa9200: "Tastenbeleuchtungsdauer"
clip,c200,gigabeatf,mrobe100,sa9200: "Tastenbeleuchtungsdauer"
</voice>
</phrase>
<phrase>

View file

@ -3924,17 +3924,17 @@
<source>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</source>
<dest>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</dest>
<voice>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</voice>
</phrase>
<phrase>

View file

@ -11181,17 +11181,17 @@
<source>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</source>
<dest>
*: none
e200*: "Tiempo de espera en la luz de la rueda"
c200,gigabeatf,mrobe100,sa9200: "Tiempo de espera en la luz del botón"
clip,c200,gigabeatf,mrobe100,sa9200: "Tiempo de espera en la luz del botón"
</dest>
<voice>
*: none
e200*: "Tiempo de espera en la luz de la rueda"
c200,gigabeatf,mrobe100,sa9200: "Tiempo de espera en la luz del botón"
clip,c200,gigabeatf,mrobe100,sa9200: "Tiempo de espera en la luz del botón"
</voice>
</phrase>
<phrase>

View file

@ -9974,17 +9974,17 @@
<source>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</source>
<dest>
*: none
e200*: "Rullavalon aikakatkaisu"
c200,gigabeatf,mrobe100,sa9200: "Painikevalon aikakatkaisu"
clip,c200,gigabeatf,mrobe100,sa9200: "Painikevalon aikakatkaisu"
</dest>
<voice>
*: none
e200*: "Rullavalon aikakatkaisu"
c200,gigabeatf,mrobe100,sa9200: "Painikevalon aikakatkaisu"
clip,c200,gigabeatf,mrobe100,sa9200: "Painikevalon aikakatkaisu"
</voice>
</phrase>
<phrase>

View file

@ -3880,17 +3880,17 @@
<source>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</source>
<dest>
*: none
e200*: "Durée de l'éclairage de la molette"
c200,gigabeatf,mrobe100,sa9200: "Durée de l'éclairage des touches"
clip,c200,gigabeatf,mrobe100,sa9200: "Durée de l'éclairage des touches"
</dest>
<voice>
*: none
e200*: "Durée de l'éclairage de la molette"
c200,gigabeatf,mrobe100,sa9200: "Durée de l'éclairage des touches"
clip,c200,gigabeatf,mrobe100,sa9200: "Durée de l'éclairage des touches"
</voice>
</phrase>
<phrase>

View file

@ -3838,17 +3838,17 @@
<source>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</source>
<dest>
*: none
e200*: "Χρόνος σβησίματος τροχού"
c200,gigabeatf,mrobe100,sa9200: "Χρόνος σβησίματος πλήκτρων"
clip,c200,gigabeatf,mrobe100,sa9200: "Χρόνος σβησίματος πλήκτρων"
</dest>
<voice>
*: none
e200*: "Χρόνος σβησίματος τροχού"
c200,gigabeatf,mrobe100,sa9200: "Χρόνος σβησίματος πλήκτρων"
clip,c200,gigabeatf,mrobe100,sa9200: "Χρόνος σβησίματος πλήκτρων"
</voice>
</phrase>
<phrase>

View file

@ -3832,17 +3832,17 @@
<source>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</source>
<dest>
*: none
e200*: "זמן תאורת הגלגל"
c200,gigabeatf,mrobe100,sa9200: "זמן תאורת כפתור"
clip,c200,gigabeatf,mrobe100,sa9200: "זמן תאורת כפתור"
</dest>
<voice>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</voice>
</phrase>
<phrase>

View file

@ -3853,17 +3853,17 @@
<source>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</source>
<dest>
*: none
e200*: "Tempo di spegnimento illuminazione rotella"
c200,gigabeatf,mrobe100,sa9200: "Tempo di spegnimento illuminazione tasti"
clip,c200,gigabeatf,mrobe100,sa9200: "Tempo di spegnimento illuminazione tasti"
</dest>
<voice>
*: none
e200*: "Tempo di spegnimento illuminazione rotella"
c200,gigabeatf,mrobe100,sa9200: "Tempo di spegnimento illuminazione tasti"
clip,c200,gigabeatf,mrobe100,sa9200: "Tempo di spegnimento illuminazione tasti"
</voice>
</phrase>
<phrase>

View file

@ -3834,17 +3834,17 @@
<source>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</source>
<dest>
*: none
e200*: "ホイールライトのタイムアウト"
c200,gigabeatf,mrobe100,sa9200: "ボタンライトのタイムアウト"
clip,c200,gigabeatf,mrobe100,sa9200: "ボタンライトのタイムアウト"
</dest>
<voice>
*: none
e200*: "ホイールライトのタイムアウト"
c200,gigabeatf,mrobe100,sa9200: "ボタンライトのタイムアウト"
clip,c200,gigabeatf,mrobe100,sa9200: "ボタンライトのタイムアウト"
</voice>
</phrase>
<phrase>

View file

@ -10762,17 +10762,17 @@
<source>
*: ""
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100: "Button Light Timeout"
</source>
<dest>
*: ""
e200*: "휠버튼 조명 시간"
c200,gigabeatf,mrobe100: "버튼 조명 시간"
clip,c200,gigabeatf,mrobe100: "버튼 조명 시간"
</dest>
<voice>
*: ""
e200*: "휠버튼 조명 시간"
c200,gigabeatf,mrobe100: "버튼 조명 시간"
clip,c200,gigabeatf,mrobe100: "버튼 조명 시간"
</voice>
</phrase>
<phrase>

View file

@ -3827,17 +3827,17 @@
<source>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100: "Button Light Timeout"
</source>
<dest>
*: none
e200*: "Kerék világításának hossza"
c200,gigabeatf,mrobe100: "Gomb világításának hossza"
clip,c200,gigabeatf,mrobe100: "Gomb világításának hossza"
</dest>
<voice>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100: "Button Light Timeout"
</voice>
</phrase>
<phrase>

View file

@ -10274,17 +10274,17 @@
<source>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</source>
<dest>
*: none
e200*: "Wiel Licht Vertraging"
c200,gigabeatf,mrobe100,sa9200: "Knoppen Licht Vertraging"
clip,c200,gigabeatf,mrobe100,sa9200: "Knoppen Licht Vertraging"
</dest>
<voice>
*: none
e200*: "Wiel Licht Vertraging"
c200,gigabeatf,mrobe100,sa9200: "Knoppen Licht Vertraging"
clip,c200,gigabeatf,mrobe100,sa9200: "Knoppen Licht Vertraging"
</voice>
</phrase>
<phrase>

View file

@ -9871,17 +9871,17 @@
<source>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</source>
<dest>
*: none
e200*: "Avbrotstid for hjullys"
c200,gigabeatf,mrobe100,sa9200: "Avbrotstid for knappelys"
clip,c200,gigabeatf,mrobe100,sa9200: "Avbrotstid for knappelys"
</dest>
<voice>
*: none
e200*: "Avbrotstid for hjullys"
c200,gigabeatf,mrobe100,sa9200: "Avbrotstid for knappelys"
clip,c200,gigabeatf,mrobe100,sa9200: "Avbrotstid for knappelys"
</voice>
</phrase>
<phrase>

View file

@ -10023,17 +10023,17 @@
<source>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</source>
<dest>
*: none
e200*: "Slukketid for hjullys"
c200,gigabeatf,mrobe100,sa9200: "Slukketid for knapplys"
clip,c200,gigabeatf,mrobe100,sa9200: "Slukketid for knapplys"
</dest>
<voice>
*: none
e200*: "Tid før lys på hjul slukker"
c200,gigabeatf,mrobe100,sa9200: "Tid før lys på knapper slukker"
clip,c200,gigabeatf,mrobe100,sa9200: "Tid før lys på knapper slukker"
</voice>
</phrase>
<phrase>

View file

@ -3841,17 +3841,17 @@
<source>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</source>
<dest>
*: none
e200*: "Wygaszanie koła sterującego"
c200,gigabeatf,mrobe100,sa9200: "Wygaszanie klawiszy"
clip,c200,gigabeatf,mrobe100,sa9200: "Wygaszanie klawiszy"
</dest>
<voice>
*: none
e200*: "Wygaszanie koła sterującego"
c200,gigabeatf,mrobe100,sa9200: "Wygaszanie klawiszy"
clip,c200,gigabeatf,mrobe100,sa9200: "Wygaszanie klawiszy"
</voice>
</phrase>
<phrase>

View file

@ -3841,17 +3841,17 @@
<source>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</source>
<dest>
*: none
e200*: "Duração da Luz da Roda"
c200,gigabeatf,mrobe100,sa9200: "Duração da Luz do Botão"
clip,c200,gigabeatf,mrobe100,sa9200: "Duração da Luz do Botão"
</dest>
<voice>
*: none
e200*: "Duração da Luz da Roda"
c200,gigabeatf,mrobe100,sa9200: "Duração da Luz do Botão"
clip,c200,gigabeatf,mrobe100,sa9200: "Duração da Luz do Botão"
</voice>
</phrase>
<phrase>

View file

@ -10303,17 +10303,17 @@
<source>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</source>
<dest>
*: none
e200*: "Timp iluminare rotita"
c200,gigabeatf,mrobe100,sa9200: "Timp iluminare butoane"
clip,c200,gigabeatf,mrobe100,sa9200: "Timp iluminare butoane"
</dest>
<voice>
*: none
e200*: "Timp iluminare rotita"
c200,gigabeatf,mrobe100,sa9200: "Timp iluminare butoane"
clip,c200,gigabeatf,mrobe100,sa9200: "Timp iluminare butoane"
</voice>
</phrase>
<phrase>

View file

@ -10949,17 +10949,17 @@
<source>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</source>
<dest>
*: none
e200*: "Таймаут подсветки колёсика"
c200,gigabeatf,mrobe100,sa9200: "Таймаут подсветки клавиш"
clip,c200,gigabeatf,mrobe100,sa9200: "Таймаут подсветки клавиш"
</dest>
<voice>
*: none
e200*: "Таймаут подсветки колёсика"
c200,gigabeatf,mrobe100,sa9200: "Таймаут подсветки клавиш"
clip,c200,gigabeatf,mrobe100,sa9200: "Таймаут подсветки клавиш"
</voice>
</phrase>
<phrase>

View file

@ -3841,17 +3841,17 @@
<source>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</source>
<dest>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: ""
clip,c200,gigabeatf,mrobe100,sa9200: ""
</dest>
<voice>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: ""
clip,c200,gigabeatf,mrobe100,sa9200: ""
</voice>
</phrase>
<phrase>

View file

@ -3835,17 +3835,17 @@
<source>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</source>
<dest>
*: none
e200*: "Hjulbelysning"
c200,gigabeatf,mrobe100,sa9200: "Knappbelysning"
clip,c200,gigabeatf,mrobe100,sa9200: "Knappbelysning"
</dest>
<voice>
*: none
e200*: "Hjulbelysning"
c200,gigabeatf,mrobe100,sa9200: "Knappbelysning"
clip,c200,gigabeatf,mrobe100,sa9200: "Knappbelysning"
</voice>
</phrase>
<phrase>

View file

@ -3841,17 +3841,17 @@
<source>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</source>
<dest>
*: none
e200*: "Pahintuin gulong sa ilaw"
c200,gigabeatf,mrobe100,sa9200: "Pahintuin buttones sa ilaw"
clip,c200,gigabeatf,mrobe100,sa9200: "Pahintuin buttones sa ilaw"
</dest>
<voice>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: ""
clip,c200,gigabeatf,mrobe100,sa9200: ""
</voice>
</phrase>
<phrase>

View file

@ -3835,17 +3835,17 @@
<source>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
clip,c200,gigabeatf,mrobe100,sa9200: "Button Light Timeout"
</source>
<dest>
*: none
e200*: "เวลาเปิดไฟล้อหมุน"
c200,gigabeatf,mrobe100,sa9200: ""
clip,c200,gigabeatf,mrobe100,sa9200: ""
</dest>
<voice>
*: none
e200*: "Wheel Light Timeout"
c200,gigabeatf,mrobe100,sa9200: ""
clip,c200,gigabeatf,mrobe100,sa9200: ""
</voice>
</phrase>
<phrase>

View file

@ -1045,6 +1045,7 @@ target/arm/pcm-telechips.c
#ifndef SIMULATOR
target/arm/as3525/sansa-clip/lcd-ssd1303.c
target/arm/as3525/sansa-clip/button-clip.c
target/arm/as3525/sansa-clip/backlight-clip.c
target/arm/as3525/as3525-codec.c
#endif /* !SIMULATOR */
#endif /* SANSA_CLIP */

View file

@ -29,7 +29,7 @@
#define HAVE_LCD_BITMAP
/* define this if you have a light associated with the buttons */
//#define HAVE_BUTTON_LIGHT
#define HAVE_BUTTON_LIGHT
/* define this if you have access to the quickscreen */
//#define HAVE_QUICKSCREEN
@ -47,12 +47,11 @@
#define LCD_PIXELFORMAT VERTICAL_PACKING
/* define this if you have LCD enable function */
//#define HAVE_LCD_ENABLE
#define HAVE_LCD_ENABLE
#ifndef BOOTLOADER
/* Define this if your LCD can be put to sleep. HAVE_LCD_ENABLE
should be defined as well. */
/* Define this if your LCD can be put to sleep.
* HAVE_LCD_ENABLE should be defined as well. */
//#define HAVE_LCD_SLEEP
//#define HAVE_LCD_SLEEP_SETTING
#endif
@ -91,6 +90,10 @@
//#define CONFIG_TUNER LV24020LP
//#define HAVE_TUNER_PWR_CTRL
/* Define this for LCD backlight available */
#define HAVE_BACKLIGHT
//#define HAVE_BACKLIGHT_BRIGHTNESS /* TODO */
/* define this if you have a flash memory storage */
#define HAVE_FLASH_STORAGE

View file

@ -0,0 +1,58 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright © 2008 Rafaël Carré
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
****************************************************************************/
#include "backlight-target.h"
#include "as3525.h"
/* TODO : backlight brightness */
/* XXX : xpd is used for SD/MCI interface
* If interrupts are used to access this interface, they should be
* disabled in _buttonlight_on/off ()
*/
void _buttonlight_on(void)
{
int saved_ccu_io;
saved_ccu_io = CCU_IO; /* save XPD setting */
CCU_IO &= ~(3<<2); /* setup xpd as GPIO */
GPIOD_DIR |= (1<<7);
GPIOD_PIN(7) = (1<<7); /* set pin d7 high */
CCU_IO = saved_ccu_io; /* restore the previous XPD setting */
}
void _buttonlight_off(void)
{
int saved_ccu_io;
saved_ccu_io = CCU_IO; /* save XPD setting */
CCU_IO &= ~(3<<2); /* setup xpd as GPIO */
GPIOD_DIR |= (1<<7);
GPIOD_PIN(7) = 0; /* set pin d7 low */
CCU_IO = saved_ccu_io; /* restore the previous XPD setting */
}

View file

@ -7,7 +7,7 @@
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) 2008 ??
* Copyright © 2008 Rafaël Carré
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -21,17 +21,23 @@
#ifndef BACKLIGHT_TARGET_H
#define BACKLIGHT_TARGET_H
static inline bool _backlight_init(void)
{
return true;
}
#include "stdbool.h"
#include "lcd.h"
#include "backlight.h"
#define _backlight_init() true
static inline void _backlight_on(void)
{
lcd_enable(true);
}
static inline void _backlight_off(void)
{
lcd_enable(false);
}
void _buttonlight_on(void);
void _buttonlight_off(void);
#endif

View file

@ -149,6 +149,9 @@ void lcd_set_flip(bool yesno)
void lcd_enable(bool enable)
{
if(display_on == enable)
return;
if( (display_on = enable) ) /* simple '=' is not a typo ! */
lcd_write_command(LCD_SET_DISPLAY_ON);
else
@ -240,6 +243,9 @@ void lcd_init_device(void)
void lcd_blit_mono(const unsigned char *data, int x, int by, int width,
int bheight, int stride)
{
if(!display_on)
return;
/* Copy display bitmap to hardware */
while (bheight--)
{
@ -258,6 +264,13 @@ void lcd_blit_mono(const unsigned char *data, int x, int by, int width,
void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases,
int x, int by, int width, int bheight, int stride)
{
/* TODO */
#if 0
if(!display_on)
return;
#endif
(void)values;
(void)phases;
(void)x;
@ -274,6 +287,9 @@ void lcd_update(void)
{
int y;
if(!display_on)
return;
/* Copy display bitmap to hardware */
for (y = 0; y < LCD_FBHEIGHT; y++)
{
@ -291,6 +307,9 @@ void lcd_update_rect(int x, int y, int width, int height)
{
int ymax;
if(!display_on)
return;
/* The Y coordinates have to work on even 8 pixel rows */
ymax = (y + height-1) >> 3;
y >>= 3;

View file

@ -445,9 +445,9 @@
#define UI_LCD_WIDTH 128
#define UI_LCD_HEIGHT 64
#define UI_LCD_BGCOLOR 0, 0, 0 /* bkgnd color of LCD (no backlight) */
#define UI_LCD_BGCOLORLIGHT 192, 192, 192 /* bkgnd color of LCD (backlight) */
#define UI_LCD_FGCOLOR 13, 226, 229 /* foreground color of LCD (no backlight) */
#define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */
#define UI_LCD_BGCOLORLIGHT 0, 0, 0 /* bkgnd color of LCD (backlight) */
#define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */
#define UI_LCD_FGCOLORLIGHT 13, 226, 229 /* foreground color of LCD (backlight) */
#endif
extern SDL_Surface *gui_surface;