mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
Sansa clip+: fix display brightness for players with newer OLED controller type (and reorganise the variant detection a bit in the process)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27522 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
10e79de27c
commit
55a4520f07
7 changed files with 49 additions and 76 deletions
|
|
@ -25,8 +25,11 @@
|
|||
#include "lcd-clip.h"
|
||||
#include "system.h"
|
||||
#include "cpu.h"
|
||||
#include "ascodec.h"
|
||||
|
||||
void lcd_hw_init(int *offset)
|
||||
#define LCD_DELAY 1
|
||||
|
||||
int lcd_hw_init(void)
|
||||
{
|
||||
/* DBOP initialisation, do what OF does */
|
||||
CGU_DBOP = (1<<3) | AS3525_DBOP_DIV;
|
||||
|
|
@ -46,11 +49,9 @@ void lcd_hw_init(int *offset)
|
|||
GPIOA_PIN(4) = 0;
|
||||
GPIOB_PIN(6) = (1<<6);
|
||||
|
||||
*offset = 2;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define LCD_DELAY 1
|
||||
|
||||
void lcd_write_command(int byte)
|
||||
{
|
||||
volatile int i = 0;
|
||||
|
|
@ -90,3 +91,9 @@ void lcd_write_data(const fb_data* p_bytes, int count)
|
|||
/* While push fifo is not empty */
|
||||
while ((DBOP_STAT & (1<<10)) == 0);
|
||||
}
|
||||
|
||||
void lcd_enable_power(bool onoff)
|
||||
{
|
||||
ascodec_write(AS3514_DCDC15, onoff ? 1 : 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue