Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Suyu
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
many-archive
Suyu
Commits
08da0b7a
There was an error fetching the commit references. Please try again later.
Unverified
Commit
08da0b7a
authored
7 years ago
by
Lioncash
Browse files
Options
Downloads
Patches
Plain Diff
core/hw: Move logging macros over to fmt-capable ones
parent
f81b915f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/core/hw/hw.cpp
+6
-4
6 additions, 4 deletions
src/core/hw/hw.cpp
src/core/hw/lcd.cpp
+4
-4
4 additions, 4 deletions
src/core/hw/lcd.cpp
with
10 additions
and
8 deletions
src/core/hw/hw.cpp
+
6
−
4
View file @
08da0b7a
...
@@ -33,7 +33,8 @@ inline void Read(T& var, const u32 addr) {
...
@@ -33,7 +33,8 @@ inline void Read(T& var, const u32 addr) {
LCD
::
Read
(
var
,
addr
);
LCD
::
Read
(
var
,
addr
);
break
;
break
;
default:
default:
LOG_ERROR
(
HW_Memory
,
"unknown Read%lu @ 0x%08X"
,
sizeof
(
var
)
*
8
,
addr
);
NGLOG_ERROR
(
HW_Memory
,
"Unknown Read{} @ {:#010X}"
,
sizeof
(
var
)
*
8
,
addr
);
break
;
}
}
}
}
...
@@ -61,7 +62,8 @@ inline void Write(u32 addr, const T data) {
...
@@ -61,7 +62,8 @@ inline void Write(u32 addr, const T data) {
LCD
::
Write
(
addr
,
data
);
LCD
::
Write
(
addr
,
data
);
break
;
break
;
default:
default:
LOG_ERROR
(
HW_Memory
,
"unknown Write%lu 0x%08X @ 0x%08X"
,
sizeof
(
data
)
*
8
,
(
u32
)
data
,
addr
);
NGLOG_ERROR
(
HW_Memory
,
"Unknown Write{} {:#010X} @ {:#010X}"
,
sizeof
(
data
)
*
8
,
data
,
addr
);
break
;
}
}
}
}
...
@@ -83,12 +85,12 @@ void Update() {}
...
@@ -83,12 +85,12 @@ void Update() {}
/// Initialize hardware
/// Initialize hardware
void
Init
()
{
void
Init
()
{
LCD
::
Init
();
LCD
::
Init
();
LOG_DEBUG
(
HW
,
"
i
nitialized OK"
);
NG
LOG_DEBUG
(
HW
,
"
I
nitialized OK"
);
}
}
/// Shutdown hardware
/// Shutdown hardware
void
Shutdown
()
{
void
Shutdown
()
{
LCD
::
Shutdown
();
LCD
::
Shutdown
();
LOG_DEBUG
(
HW
,
"
s
hutdown OK"
);
NG
LOG_DEBUG
(
HW
,
"
S
hutdown OK"
);
}
}
}
// namespace HW
}
// namespace HW
This diff is collapsed.
Click to expand it.
src/core/hw/lcd.cpp
+
4
−
4
View file @
08da0b7a
...
@@ -20,7 +20,7 @@ inline void Read(T& var, const u32 raw_addr) {
...
@@ -20,7 +20,7 @@ inline void Read(T& var, const u32 raw_addr) {
// Reads other than u32 are untested, so I'd rather have them abort than silently fail
// Reads other than u32 are untested, so I'd rather have them abort than silently fail
if
(
index
>=
0x400
||
!
std
::
is_same
<
T
,
u32
>::
value
)
{
if
(
index
>=
0x400
||
!
std
::
is_same
<
T
,
u32
>::
value
)
{
LOG_ERROR
(
HW_LCD
,
"
u
nknown Read
%lu @ 0x%08X
"
,
sizeof
(
var
)
*
8
,
addr
);
NG
LOG_ERROR
(
HW_LCD
,
"
U
nknown Read
{} @ {:#010X}
"
,
sizeof
(
var
)
*
8
,
addr
);
return
;
return
;
}
}
...
@@ -34,7 +34,7 @@ inline void Write(u32 addr, const T data) {
...
@@ -34,7 +34,7 @@ inline void Write(u32 addr, const T data) {
// Writes other than u32 are untested, so I'd rather have them abort than silently fail
// Writes other than u32 are untested, so I'd rather have them abort than silently fail
if
(
index
>=
0x400
||
!
std
::
is_same
<
T
,
u32
>::
value
)
{
if
(
index
>=
0x400
||
!
std
::
is_same
<
T
,
u32
>::
value
)
{
LOG_ERROR
(
HW_LCD
,
"
u
nknown Write
%lu 0x%08X @ 0x%08X
"
,
sizeof
(
data
)
*
8
,
(
u32
)
data
,
addr
);
NG
LOG_ERROR
(
HW_LCD
,
"
U
nknown Write
{} {:#010X} @ {:#010X}
"
,
sizeof
(
data
)
*
8
,
data
,
addr
);
return
;
return
;
}
}
...
@@ -56,12 +56,12 @@ template void Write<u8>(u32 addr, const u8 data);
...
@@ -56,12 +56,12 @@ template void Write<u8>(u32 addr, const u8 data);
/// Initialize hardware
/// Initialize hardware
void
Init
()
{
void
Init
()
{
memset
(
&
g_regs
,
0
,
sizeof
(
g_regs
));
memset
(
&
g_regs
,
0
,
sizeof
(
g_regs
));
LOG_DEBUG
(
HW_LCD
,
"
i
nitialized OK"
);
NG
LOG_DEBUG
(
HW_LCD
,
"
I
nitialized OK"
);
}
}
/// Shutdown hardware
/// Shutdown hardware
void
Shutdown
()
{
void
Shutdown
()
{
LOG_DEBUG
(
HW_LCD
,
"
s
hutdown OK"
);
NG
LOG_DEBUG
(
HW_LCD
,
"
S
hutdown OK"
);
}
}
}
// namespace LCD
}
// namespace LCD
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment