uOFW
Reverse engineered PSP kernel 6.60.
Loading...
Searching...
No Matches
debug.h
1/* Copyright (C) 2011, 2012 The uOFW team
2 See the file COPYING for copying permission.
3*/
4
5#ifndef COMMON_INCLUDED
6# error "Only include common_imp.h or common_header.h!"
7#endif
8
9typedef enum
10{
11 FB_NONE,
12 FB_HARDWARE,
13 FB_AFTER_DISPLAY
14} FbMode;
15
16typedef enum
17{
18 FAT_NONE,
19 FAT_NOINIT,
20 FAT_HARDWARE,
21 FAT_AFTER_SYSCON,
22 FAT_AFTER_FATMS
23} FatMode;
24
25#ifdef DEBUG
26void dbg_init(int eraseLog, FbMode fbMode, FatMode fatMode);
27void dbg_printf(const char *format, ...);
28void dbg_puts(const char *str);
29#else
30static inline void dbg_init()
31{
32}
33
34static inline void dbg_printf()
35{
36}
37
38static inline void dbg_puts()
39{
40}
41#endif
42
43/* Fills the framebuffer with the (r, g, b) color */
44static inline void dbg_fbfill(u8 r, u8 g, u8 b) {
45 u32 i;
46 for (i = 0; i < 480 * 272 * 2; i++)
47 *(int*)(0x44000000 + i * 4) = r | (g << 8) | (b << 16);
48}
49
50