SyterKit 0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
Functions
stdlib.h File Reference
#include <types.h>
Include dependency graph for stdlib.h:

Go to the source code of this file.

Functions

void sunxi_uart_init (uint32_t base)
 
void sunxi_uart_putc (char c)
 
void uart_printf (const char *fmt,...)
 Print message via UART.
 
void printf (const char *fmt,...)
 Print message via UART.
 
uint32_t time_ms (void)
 Get the current time in milliseconds.
 
uint64_t time_us (void)
 Get the current time in microseconds.
 
void mdelay (uint32_t ms)
 Delay execution for a specified number of milliseconds.
 

Function Documentation

◆ mdelay()

void mdelay ( uint32_t  ms)

Delay execution for a specified number of milliseconds.

This function converts milliseconds to microseconds and calls the udelay function to implement the delay.

Parameters
msNumber of milliseconds to delay.

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

◆ sunxi_uart_init()

void sunxi_uart_init ( uint32_t  base)

◆ sunxi_uart_putc()

void sunxi_uart_putc ( char  c)

◆ time_ms()

uint32_t time_ms ( void  )

Get the current time in milliseconds.

This function calculates the current time based on the architecture counter and returns it in milliseconds.

Returns
Current time in milliseconds.

This function calculates the current time by dividing the architecture counter value by the current HOSC frequency (in MHz) scaled to milliseconds.

Returns
Current time in milliseconds.

This function calculates the current time based on the architecture counter and returns it in milliseconds.

Returns
Current time in milliseconds.

This function calculates the current time by dividing the architecture counter value by the current HOSC frequency (in MHz) scaled to milliseconds.

Returns
Current time in milliseconds.

◆ time_us()

uint64_t time_us ( void  )

Get the current time in microseconds.

This function calculates the current time based on the architecture counter and returns it in microseconds.

Returns
Current time in microseconds.

This function calculates the current time by dividing the architecture counter value by the current HOSC frequency (in MHz).

Returns
Current time in microseconds.

This function calculates the current time based on the architecture counter and returns it in microseconds.

Returns
Current time in microseconds.

This function calculates the current time by dividing the architecture counter value by the current HOSC frequency (in MHz).

Returns
Current time in microseconds.

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