SyterKit 0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions | Variables
printf.c File Reference
#include <byteorder.h>
#include <endian.h>
#include <io.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <types.h>
#include <rtc.h>
#include <xformat.h>
Include dependency graph for printf.c:

Classes

struct  uart_serial
 

Macros

#define thr   rbr
 
#define dll   rbr
 
#define dlh   ier
 
#define iir   fcr
 
#define SUNXI_UART0_BASE   0x05000000
 

Typedefs

typedef struct uart_serial uart_serial_t
 

Functions

void set_timer_count ()
 Set timer count.
 
void sunxi_serial_init ()
 
void sunxi_uart_putc (char c)
 
void uart_log_putchar (void *arg, char c)
 Writes a single character 'c' to the log output.
 
void uart_printf (const char *fmt,...)
 Print message via UART.
 
void printf (const char *fmt,...)
 Print message via UART.
 

Variables

static uart_serial_tuart_dbg
 
static uint32_t init_timestamp = 0
 

Macro Definition Documentation

◆ dlh

#define dlh   ier

◆ dll

#define dll   rbr

◆ iir

#define iir   fcr

◆ SUNXI_UART0_BASE

#define SUNXI_UART0_BASE   0x05000000

◆ thr

#define thr   rbr

Typedef Documentation

◆ uart_serial_t

typedef struct uart_serial uart_serial_t

Function Documentation

◆ printf()

void 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.

◆ set_timer_count()

void set_timer_count ( )

Set timer count.

This function is used to set the count value of the timer.

Note
Before calling this function, timer-related hardware configuration should be initialized.

Set timer count.

This function calls the frequency detection routine and initializes the timestamp based on the current time in microseconds.

◆ sunxi_serial_init()

void sunxi_serial_init ( )

◆ sunxi_uart_putc()

void sunxi_uart_putc ( char  c)

◆ uart_log_putchar()

void uart_log_putchar ( void *  arg,
char  c 
)

Writes a single character 'c' to the log output.

Parameters
argA pointer to optional arguments.
cThe character to be written.

◆ 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.

Variable Documentation

◆ init_timestamp

uint32_t init_timestamp = 0
static

◆ uart_dbg

uart_serial_t* uart_dbg
static