Sansa AMS debug: small fixes
- Indentation fix - Put braces around _DEBUG_PRINTF macro - read_cp15() is only 1 instruction so inline it, and it doesn't access memory git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21477 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
28a2b4514f
commit
d86cf998e8
1 changed files with 8 additions and 10 deletions
|
@ -29,8 +29,9 @@
|
|||
#include "cpu.h"
|
||||
#include "pl180.h"
|
||||
|
||||
#define _DEBUG_PRINTF(a,varargs...) \
|
||||
snprintf(buf, sizeof(buf), (a), ##varargs); lcd_puts(0,line++,buf)
|
||||
#define _DEBUG_PRINTF(a,varargs...) do { \
|
||||
snprintf(buf, sizeof(buf), (a), ##varargs); lcd_puts(0,line++,buf); \
|
||||
} while(0)
|
||||
|
||||
#define ON "Enabled"
|
||||
#define OFF "Disabled"
|
||||
|
@ -70,15 +71,12 @@
|
|||
unsigned short button_dbop_data(void);
|
||||
#endif
|
||||
|
||||
static unsigned read_cp15 (void)
|
||||
static inline unsigned read_cp15 (void)
|
||||
{
|
||||
unsigned value;
|
||||
|
||||
unsigned cp15_value;
|
||||
asm volatile (
|
||||
"mrc p15, 0, %0, c1, c0, 0 @ read control reg\n":"=r"
|
||||
(value)::"memory"
|
||||
);
|
||||
return (value);
|
||||
"mrc p15, 0, %0, c1, c0, 0 @ read control reg\n" : "=r"(cp15_value));
|
||||
return (cp15_value);
|
||||
}
|
||||
|
||||
int calc_freq(int clk)
|
||||
|
@ -222,7 +220,7 @@ int calc_freq(int clk)
|
|||
|
||||
bool __dbg_hw_info(void)
|
||||
{
|
||||
char buf[50];
|
||||
char buf[50];
|
||||
int line;
|
||||
|
||||
lcd_clear_display();
|
||||
|
|
Loading…
Reference in a new issue