API to send console messages to the ARM9 from the ARM7.
More...
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <sys/cdefs.h>
|
|
void | consoleFlush (void) |
| | Sends a message to the ARM9 to print the contents stored in the buffer.
|
| |
| bool | consoleIsSetup (void) |
| | Checks if the console has been setup by the ARM9 or not.
|
| |
| int | consolePrintChar (char c) |
| | Adds a character to the ring buffer to be printed.
|
| |
| int | consolePrintf (const char *fmt,...) |
| | It adds a formatted string to the buffer.
|
| |
| void | consolePrintNumUnsigned (uint32_t num, uint32_t base) |
| | Adds an unsigned integer to the ring buffer to be printed.
|
| |
| void | consolePuts (const char *str) |
| | Adds a string to the ring buffer to be printed.
|
| |
| int | consoleVprintf (const char *fmt, va_list args) |
| | It adds a formatted string to the buffer.
|
| |
API to send console messages to the ARM9 from the ARM7.
You need to setup this console by calling consoleArm7Setup() on the ARM9.
◆ consoleIsSetup()
| bool consoleIsSetup |
( |
void |
| ) |
|
Checks if the console has been setup by the ARM9 or not.
- Returns
- Returns true if the console is setup, false if not.
◆ consolePrintChar()
| int consolePrintChar |
( |
char |
c | ) |
|
Adds a character to the ring buffer to be printed.
If the buffer is full, this function will send a flush command to the ARM9 and it will wait until there is space to add a new character.
- Parameters
-
| c | Character to be printed. |
- Returns
- It returns 0 on success, or an error code if the console hasn't been initialized.
◆ consolePrintf()
| int consolePrintf |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
It adds a formatted string to the buffer.
This version is a super minimalistic printf(). Supported flags:
- c: Character.
- $d: Signed decimal 32-bit integer.
- s: String.
- $u: Unsigned decimal 32-bit integer.
- x: Hexadecimal 32-bit integer.
- Parameters
-
- Returns
- It returns 0 on success, -1 if there are unsuported flags.
◆ consolePrintNumUnsigned()
| void consolePrintNumUnsigned |
( |
uint32_t |
num, |
|
|
uint32_t |
base |
|
) |
| |
Adds an unsigned integer to the ring buffer to be printed.
- Parameters
-
| num | Unsigned integer to be printed. |
| base | Base of the number to be used (normally 10 or 16, max is 16). |
◆ consolePuts()
| void consolePuts |
( |
const char * |
str | ) |
|
Adds a string to the ring buffer to be printed.
- Parameters
-
◆ consoleVprintf()
| int consoleVprintf |
( |
const char * |
fmt, |
|
|
va_list |
args |
|
) |
| |
It adds a formatted string to the buffer.
- Parameters
-
| fmt | Formatted string. |
| args | va_list object. |
- Returns
- It returns 0 on success, -1 if there are unsuported flags.