muteki
Loading...
Searching...
No Matches
utils.h File Reference

Miscellaneous utility syscalls. More...

#include <muteki/common.h>
#include <muteki/ui/canvas.h>

Go to the source code of this file.

Functions

lcd_surface_tGetActiveVRamAddress (void)
 Get the descriptor of the currently active LCD surface.
 
bool WarningBeep (void)
 Play a beep using the built in piezo speaker.
 
void WriteComDebugMsg (char *format,...) SYS_IS_PRINTF(1
 Format and send a message to debug UART port.
 

Detailed Description

Miscellaneous utility syscalls.

Contains syscalls that cannot be easily grouped with other syscalls.

Function Documentation

◆ GetActiveVRamAddress()

lcd_surface_t * GetActiveVRamAddress ( void  )
extern

Get the descriptor of the currently active LCD surface.

This is functionally equivalent to the following:

return GetActiveLCD()->surface;
}
lcd_t * GetActiveLCD(void)
Get the current active LCD descriptor.
lcd_surface_t * surface
Surface linked to the LCD.
Definition common.h:903
Descriptor of an LCD drawing surface or hardware framebuffer.
Definition common.h:728
lcd_surface_t * GetActiveVRamAddress(void)
Get the descriptor of the currently active LCD surface.

Requires -lkrnllib when dynamically linking with the shims.

Syscall Number
0x20022

Parameters
None.

Returns
The LCD surface descriptor.

◆ WarningBeep()

bool WarningBeep ( void  )
extern

Play a beep using the built in piezo speaker.

This usually plays a 4000Hz tone for 10ms.

Syscall Number
0x1009e

Parameters
None.

Return values
trueThe operation was completed successfully.

◆ WriteComDebugMsg()

void WriteComDebugMsg ( char *  format,
  ... 
)
extern

Format and send a message to debug UART port.

Supports all conversion specifiers Printf() and PrintfXY() supports. This internally calls an implementation of vsnprintf() to generate the final message.

Note
This function may be stubbed on some devices and UART test point availability vary between devices. Moreover, the size of the internal buffer used by vsnprintf() to save formatted message might also be device-specific. On BA742 this buffer is 0x800 bytes long, with 0x7ff bytes actually available to the formatted message.
Syscall Number
0x102a1
Parameters
formatThe format string.
...Any subsequent values.

Returns
None.