My Project
Loading...
Searching...
No Matches
mg.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include "stdarg_myos.h"
#include "efi.h"

Go to the source code of this file.

Macros

#define COLOR_RED   0xFFFF0000
 Colors definitions for easier access.
#define COLOR_GREEN   0xFF00FF00
#define COLOR_BLUE   0xFF0000FF
#define COLOR_WHITE   0xFFFFFFFF
#define COLOR_BLACK   0xFF000000
#define COLOR_YELLOW   0xFFFFFF00
#define COLOR_CYAN   0xFF00FFFF
#define COLOR_MAGENTA   0xFFFF00FF
#define COLOR_GRAY   0xFF808080
#define COLOR_DARK_GRAY   0xFF404040
#define COLOR_LIGHT_GRAY   0xFFD3D3D3
#define COLOR_ORANGE   0xFFFFA500
#define COLOR_BROWN   0xFFA52A2A
#define COLOR_PURPLE   0xFF800080
#define COLOR_PINK   0xFFFFC0CB
#define COLOR_LIME   0xFF32CD32
#define COLOR_NAVY   0xFF000080
#define COLOR_TEAL   0xFF008080
#define COLOR_OLIVE   0xFF808000

Functions

void gop_printf (uint32_t color, const char *fmt,...) __attribute__((format(printf
void void gop_clear_screen (GOP_PARAMS *gop, uint32_t color)
int ksnprintf (char *buf, size_t bufsize, const char *fmt,...)
int kstrcmp (const char *s1, const char *s2)
int kstrncmp (const char *s1, const char *s2, size_t length)
size_t kstrlen (const char *str)
char * kstrcpy (char *dst, const char *src)
char * kstrncpy (char *dst, const char *src, size_t n)
char * kstrtok_r (char *str, const char *delim, char **save_ptr)
char * kstrncat (char *dest, const char *src, size_t max_len)
 Concatenates src onto dest, up to max_len total bytes in dest.
void MgAcquireExclusiveGopOwnerShip (void)
void MgReleaseExclusiveGopOwnerShip (void)

Macro Definition Documentation

◆ COLOR_BLACK

#define COLOR_BLACK   0xFF000000

Definition at line 33 of file mg.h.

◆ COLOR_BLUE

#define COLOR_BLUE   0xFF0000FF

Definition at line 31 of file mg.h.

◆ COLOR_BROWN

#define COLOR_BROWN   0xFFA52A2A

Definition at line 41 of file mg.h.

◆ COLOR_CYAN

#define COLOR_CYAN   0xFF00FFFF

Definition at line 35 of file mg.h.

◆ COLOR_DARK_GRAY

#define COLOR_DARK_GRAY   0xFF404040

Definition at line 38 of file mg.h.

◆ COLOR_GRAY

#define COLOR_GRAY   0xFF808080

Definition at line 37 of file mg.h.

◆ COLOR_GREEN

#define COLOR_GREEN   0xFF00FF00

Definition at line 30 of file mg.h.

◆ COLOR_LIGHT_GRAY

#define COLOR_LIGHT_GRAY   0xFFD3D3D3

Definition at line 39 of file mg.h.

◆ COLOR_LIME

#define COLOR_LIME   0xFF32CD32

Definition at line 44 of file mg.h.

◆ COLOR_MAGENTA

#define COLOR_MAGENTA   0xFFFF00FF

Definition at line 36 of file mg.h.

◆ COLOR_NAVY

#define COLOR_NAVY   0xFF000080

Definition at line 45 of file mg.h.

◆ COLOR_OLIVE

#define COLOR_OLIVE   0xFF808000

Definition at line 47 of file mg.h.

◆ COLOR_ORANGE

#define COLOR_ORANGE   0xFFFFA500

Definition at line 40 of file mg.h.

◆ COLOR_PINK

#define COLOR_PINK   0xFFFFC0CB

Definition at line 43 of file mg.h.

◆ COLOR_PURPLE

#define COLOR_PURPLE   0xFF800080

Definition at line 42 of file mg.h.

◆ COLOR_RED

#define COLOR_RED   0xFFFF0000

Colors definitions for easier access.

Definition at line 29 of file mg.h.

◆ COLOR_TEAL

#define COLOR_TEAL   0xFF008080

Definition at line 46 of file mg.h.

◆ COLOR_WHITE

#define COLOR_WHITE   0xFFFFFFFF

Definition at line 32 of file mg.h.

◆ COLOR_YELLOW

#define COLOR_YELLOW   0xFFFFFF00

Definition at line 34 of file mg.h.

Function Documentation

◆ gop_clear_screen()

void void gop_clear_screen ( GOP_PARAMS * gop,
uint32_t color )

Definition at line 249 of file gop.c.

◆ gop_printf()

void gop_printf ( uint32_t color,
const char * fmt,
... )

◆ ksnprintf()

int ksnprintf ( char * buf,
size_t bufsize,
const char * fmt,
... )

Definition at line 546 of file gop.c.

◆ kstrcmp()

int kstrcmp ( const char * s1,
const char * s2 )

Definition at line 657 of file gop.c.

◆ kstrcpy()

char * kstrcpy ( char * dst,
const char * src )

Definition at line 404 of file gop.c.

◆ kstrlen()

size_t kstrlen ( const char * str)

Definition at line 393 of file gop.c.

◆ kstrncat()

char * kstrncat ( char * dest,
const char * src,
size_t max_len )

Concatenates src onto dest, up to max_len total bytes in dest.

Parameters
destDestination buffer (must be mutable)
srcString to append
max_lenTotal size of the destination buffer
Returns
Pointer to dest

Definition at line 365 of file gop.c.

◆ kstrncmp()

int kstrncmp ( const char * s1,
const char * s2,
size_t length )

Definition at line 666 of file gop.c.

◆ kstrncpy()

char * kstrncpy ( char * dst,
const char * src,
size_t n )

Definition at line 416 of file gop.c.

◆ kstrtok_r()

char * kstrtok_r ( char * str,
const char * delim,
char ** save_ptr )

Definition at line 491 of file gop.c.

◆ MgAcquireExclusiveGopOwnerShip()

void MgAcquireExclusiveGopOwnerShip ( void )

Definition at line 794 of file gop.c.

◆ MgReleaseExclusiveGopOwnerShip()

void MgReleaseExclusiveGopOwnerShip ( void )

Definition at line 806 of file gop.c.