mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-07 01:51:17 -04:00
Implement dbg log interface
This commit is contained in:
parent
a65d380889
commit
d2b1febb43
11 changed files with 471 additions and 1 deletions
|
@ -1,4 +1,14 @@
|
|||
#include "uart.h"
|
||||
#include "misc.h"
|
||||
|
||||
void uart_select(unsigned int id) {
|
||||
/* This confirmation is valid for UART-A, I don't know about the other UARTs. */
|
||||
/* Official Nintendo code (for UART-A, at least) */
|
||||
PINMUX_AUX_UARTn_TX_0(id) = 0; /* UART */
|
||||
PINMUX_AUX_UARTn_RX_0(id) = 0x48; /* UART, enable, pull up */
|
||||
PINMUX_AUX_UARTn_RTS_0(id) = 0; /* UART */
|
||||
PINMUX_AUX_UARTn_CTS_0(id) = 0x44; /* UART, enable, pull down */
|
||||
}
|
||||
|
||||
void uart_initialize(uint16_t divider) {
|
||||
/* Setup UART in 16450 mode. We assume the relevant UART clock has been enabled. */
|
||||
|
@ -33,4 +43,4 @@ void uart_transmit_hex(uint32_t value) {
|
|||
uint32_t nibble = (value >> (28 - i * 4)) & 0xF;
|
||||
uart_transmit_char("0123456789ABCDEF"[nibble]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue