m:robe 100 - backlight PWM fading
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17248 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
db73339716
commit
b39f9bffde
3 changed files with 27 additions and 9 deletions
|
@ -4,8 +4,6 @@
|
|||
|
||||
#define TARGET_TREE
|
||||
|
||||
#define OLYMPUS_MROBE_100 1
|
||||
|
||||
/* For Rolo and boot loader */
|
||||
#define MODEL_NUMBER 23
|
||||
#define MODEL_NAME "Olympus m:robe MR-100"
|
||||
|
@ -65,7 +63,9 @@
|
|||
|
||||
/* Define this for LCD backlight available */
|
||||
#define HAVE_BACKLIGHT
|
||||
/* TODO #define HAVE_BACKLIGHT_BRIGHTNESS */
|
||||
|
||||
/* We can fade the backlight by using PWM */
|
||||
#define HAVE_BACKLIGHT_PWM_FADING
|
||||
|
||||
/* Main LCD backlight brightness range and defaults */
|
||||
#define MIN_BRIGHTNESS_SETTING 1
|
||||
|
|
|
@ -17,19 +17,26 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "backlight-target.h"
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "backlight-target.h"
|
||||
|
||||
#define MIN_BRIGHTNESS 0x80ff08ff
|
||||
|
||||
static const int log_brightness[12] = {0,4,8,12,20,28,40,60,88,124,176,255};
|
||||
|
||||
void _backlight_on(void)
|
||||
/* Returns the current state of the backlight (true=ON, false=OFF). */
|
||||
bool _backlight_init(void)
|
||||
{
|
||||
return (GPO32_ENABLE & 0x1000000) ? true : false;
|
||||
}
|
||||
|
||||
void _backlight_hw_on(void)
|
||||
{
|
||||
GPO32_ENABLE |= 0x1000000;
|
||||
}
|
||||
|
||||
void _backlight_off(void)
|
||||
void _backlight_hw_off(void)
|
||||
{
|
||||
GPO32_ENABLE &= ~0x1000000;
|
||||
}
|
||||
|
|
|
@ -20,9 +20,20 @@
|
|||
#ifndef BACKLIGHT_TARGET_H
|
||||
#define BACKLIGHT_TARGET_H
|
||||
|
||||
#define _backlight_init() true
|
||||
void _backlight_on(void);
|
||||
void _backlight_off(void);
|
||||
bool _backlight_init(void); /* Returns backlight current state (true=ON). */
|
||||
void _backlight_hw_on(void);
|
||||
void _backlight_hw_off(void);
|
||||
|
||||
#ifdef BOOTLOADER
|
||||
#define _backlight_on() _backlight_hw_on()
|
||||
#define _backlight_off() _backlight_hw_off()
|
||||
#else
|
||||
#define _backlight_on_isr() _backlight_hw_on()
|
||||
#define _backlight_off_isr() _backlight_hw_off()
|
||||
#define _backlight_on_normal() _backlight_hw_on()
|
||||
#define _backlight_off_normal() _backlight_hw_off()
|
||||
#define _BACKLIGHT_FADE_BOOST
|
||||
#endif
|
||||
|
||||
/* Button lights are controlled by GPIOA_OUTPUT_VAL */
|
||||
#define BUTTONLIGHT_PLAY 0x01
|
||||
|
|
Loading…
Reference in a new issue