SyterKit 0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
Functions
log.c File Reference
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <timer.h>
#include <types.h>
#include "log.h"
#include "uart.h"
#include "xformat.h"
Include dependency graph for log.c:

Functions

void printk (int level, const char *fmt,...)
 Print message to kernel log.
 
void uart_printf (const char *fmt,...)
 Print message via UART.
 
int printf (const char *fmt,...)
 Print message via UART.
 
int printf_dram (const char *fmt,...)
 
void dump_hex (uint32_t start_addr, uint32_t count)
 Dumps memory content in hexadecimal format.
 

Function Documentation

◆ dump_hex()

void dump_hex ( uint32_t  start_addr,
uint32_t  count 
)

Dumps memory content in hexadecimal format.

This function dumps the content of memory starting from the specified address in hexadecimal format. It prints the hexadecimal values of memory contents and ASCII characters corresponding to printable characters.

Parameters
start_addrThe starting address of the memory region to dump.
countThe number of bytes to dump.

◆ printf()

int printf ( const char *  fmt,
  ... 
)

Print message via UART.

This function is used to print formatted message to the terminal via UART serial port.

Parameters
fmtFormat string describing the format of the message to print.
...Variable argument list used to fill placeholders in the format string.
Note
This function is typically used in embedded systems for debugging and outputting system status information.

◆ printf_dram()

int printf_dram ( const char *  fmt,
  ... 
)

◆ printk()

void printk ( int  level,
const char *  fmt,
  ... 
)

Print message to kernel log.

This function is used to print the message with specified level to the kernel log.

Parameters
levelInformation level, typically used to specify the importance or type of the message.
fmtFormat string describing the format of the message to print.
...Variable argument list used to fill placeholders in the format string.
Note
This function should be used within the kernel to record important system information or debug messages.

◆ uart_printf()

void uart_printf ( const char *  fmt,
  ... 
)

Print message via UART.

This function is used to print formatted message to the terminal via UART serial port.

Parameters
fmtFormat string describing the format of the message to print.
...Variable argument list used to fill placeholders in the format string.
Note
This function is typically used in embedded systems for debugging and outputting system status information.