forked from len0rd/rockbox
Fix FS#10128 - The View IO Ports debug menu showed weird dbop values (sometimes FFFF prepended), due to sign-extension. Switch to unsigned short to fix it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20757 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
f4ac75752e
commit
e29358c154
5 changed files with 13 additions and 13 deletions
|
@ -43,7 +43,7 @@
|
|||
* if I put the below into a sansa-fuze/debug-target.h, it doesn't work*/
|
||||
#if defined(SANSA_FUZE) || defined(SANSA_E200V2)
|
||||
#define DEBUG_DBOP
|
||||
short button_dbop_data(void);
|
||||
unsigned short button_dbop_data(void);
|
||||
#endif
|
||||
|
||||
static unsigned read_cp15 (void)
|
||||
|
|
|
@ -31,7 +31,7 @@ static bool hold_button = false;
|
|||
#ifndef BOOTLOADER
|
||||
static bool hold_button_old = false;
|
||||
#endif
|
||||
static short _dbop_din = 0;
|
||||
static unsigned short _dbop_din = 0;
|
||||
|
||||
#define WHEEL_REPEAT_INTERVAL (HZ/5)
|
||||
/* in the lcd driver */
|
||||
|
@ -48,7 +48,7 @@ bool button_hold(void)
|
|||
}
|
||||
|
||||
#if !defined(BOOTLOADER) && defined(HAVE_SCROLLWHEEL)
|
||||
static void scrollwheel(short dbop_din)
|
||||
static void scrollwheel(unsigned short dbop_din)
|
||||
{
|
||||
/* current wheel values, parsed from dbop and the resulting button */
|
||||
unsigned wheel_value = 0;
|
||||
|
@ -132,7 +132,7 @@ static void scrollwheel(short dbop_din)
|
|||
}
|
||||
#endif /* !defined(BOOTLOADER) && defined(HAVE_SCROLLWHEEL) */
|
||||
|
||||
short button_read_dbop(void)
|
||||
unsigned short button_read_dbop(void)
|
||||
{
|
||||
/*write a red pixel */
|
||||
if (!lcd_button_support())
|
||||
|
@ -161,7 +161,7 @@ short button_read_dbop(void)
|
|||
return _dbop_din;
|
||||
}
|
||||
|
||||
short button_dbop_data(void)
|
||||
unsigned short button_dbop_data(void)
|
||||
{
|
||||
return _dbop_din;
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ int button_read_device(void)
|
|||
{
|
||||
int btn = BUTTON_NONE;
|
||||
/* read buttons from dbop */
|
||||
short dbop = button_read_dbop();
|
||||
unsigned short dbop = button_read_dbop();
|
||||
|
||||
/* hold button */
|
||||
if(dbop & (1<<12))
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
bool button_hold(void);
|
||||
void button_init_device(void);
|
||||
int button_read_device(void);
|
||||
short button_read_dbop(void);
|
||||
unsigned short button_read_dbop(void);
|
||||
|
||||
/* Sandisk Sansa E200 button codes */
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ static bool hold_button = false;
|
|||
#ifndef BOOTLOADER
|
||||
static bool hold_button_old = false;
|
||||
#endif
|
||||
static short _dbop_din = BUTTON_NONE;
|
||||
static unsigned short _dbop_din = BUTTON_NONE;
|
||||
|
||||
/* in the lcd driver */
|
||||
extern bool lcd_button_support(void);
|
||||
|
@ -49,7 +49,7 @@ void button_init_device(void)
|
|||
}
|
||||
|
||||
#if !defined(BOOTLOADER) && defined(HAVE_SCROLLWHEEL)
|
||||
static void scrollwheel(short dbop_din)
|
||||
static void scrollwheel(unsigned short dbop_din)
|
||||
{
|
||||
/* current wheel values, parsed from dbop and the resulting button */
|
||||
unsigned wheel_value = 0;
|
||||
|
@ -143,7 +143,7 @@ static void button_delay(void)
|
|||
while(i--);
|
||||
}
|
||||
|
||||
short button_read_dbop(void)
|
||||
unsigned short button_read_dbop(void)
|
||||
{
|
||||
/* skip home and power reading if lcd_button_support was blocked,
|
||||
* since the dbop bit 15 is invalid then, and use the old value instead */
|
||||
|
@ -187,7 +187,7 @@ short button_read_dbop(void)
|
|||
}
|
||||
|
||||
/* for the debug menu */
|
||||
short button_dbop_data(void)
|
||||
unsigned short button_dbop_data(void)
|
||||
{
|
||||
return _dbop_din;
|
||||
}
|
||||
|
@ -238,7 +238,7 @@ static int button_gpio(void)
|
|||
int button_read_device(void)
|
||||
{
|
||||
int btn = BUTTON_NONE;
|
||||
short dbop = button_read_dbop();
|
||||
unsigned short dbop = button_read_dbop();
|
||||
static unsigned power_counter = 0;
|
||||
/* hold button */
|
||||
if(dbop & (1<<12))
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
void button_init_device(void);
|
||||
bool button_hold(void);
|
||||
int button_read_device(void);
|
||||
short button_read_dbop(void);
|
||||
unsigned short button_read_dbop(void);
|
||||
/* Sandisk Sansa Fuze button codes */
|
||||
|
||||
/* Main unit's buttons */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue