mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
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 "cpu.h"
|
||||||
#include "pl180.h"
|
#include "pl180.h"
|
||||||
|
|
||||||
#define _DEBUG_PRINTF(a,varargs...) \
|
#define _DEBUG_PRINTF(a,varargs...) do { \
|
||||||
snprintf(buf, sizeof(buf), (a), ##varargs); lcd_puts(0,line++,buf)
|
snprintf(buf, sizeof(buf), (a), ##varargs); lcd_puts(0,line++,buf); \
|
||||||
|
} while(0)
|
||||||
|
|
||||||
#define ON "Enabled"
|
#define ON "Enabled"
|
||||||
#define OFF "Disabled"
|
#define OFF "Disabled"
|
||||||
|
|
@ -70,15 +71,12 @@
|
||||||
unsigned short button_dbop_data(void);
|
unsigned short button_dbop_data(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static unsigned read_cp15 (void)
|
static inline unsigned read_cp15 (void)
|
||||||
{
|
{
|
||||||
unsigned value;
|
unsigned cp15_value;
|
||||||
|
|
||||||
asm volatile (
|
asm volatile (
|
||||||
"mrc p15, 0, %0, c1, c0, 0 @ read control reg\n":"=r"
|
"mrc p15, 0, %0, c1, c0, 0 @ read control reg\n" : "=r"(cp15_value));
|
||||||
(value)::"memory"
|
return (cp15_value);
|
||||||
);
|
|
||||||
return (value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int calc_freq(int clk)
|
int calc_freq(int clk)
|
||||||
|
|
@ -222,7 +220,7 @@ int calc_freq(int clk)
|
||||||
|
|
||||||
bool __dbg_hw_info(void)
|
bool __dbg_hw_info(void)
|
||||||
{
|
{
|
||||||
char buf[50];
|
char buf[50];
|
||||||
int line;
|
int line;
|
||||||
|
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue