-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #226 from panix-os/225-Basic-Framebuffer-Support
- Loading branch information
Showing
11 changed files
with
417 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,6 @@ set default=0 | |
|
||
menuentry "Panix" { | ||
multiboot2 /boot/kernel | ||
set vbemode=auto | ||
boot | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/** | ||
* @file fb.cpp | ||
* @author Keeton Feavel ([email protected]) | ||
* @brief | ||
* @version 0.1 | ||
* @date 2021-06-11 | ||
* | ||
* @copyright Copyright the Panix Contributors (c) 2021 | ||
* | ||
*/ | ||
#include <dev/vga/fb.hpp> | ||
// Types | ||
#include <stddef.h> | ||
#include <stdint.h> | ||
|
||
namespace fb { | ||
|
||
FramebufferInfo::FramebufferInfo() | ||
: _addr(NULL) | ||
, _width(0) | ||
, _height(0) | ||
, _depth(0) | ||
, _pitch(0) | ||
, _redMaskSize(0) | ||
, _redMaskShift(0) | ||
, _greenMaskSize(0) | ||
, _greenMaskShift(0) | ||
, _blueMaskSize(0) | ||
, _blueMaskShift(0) | ||
, _memoryModel(Undefined_FBMM) | ||
{ | ||
// Default constructor. | ||
} | ||
|
||
FramebufferInfo::FramebufferInfo(uint32_t width, uint32_t height, uint16_t depth, uint32_t pitch, void* addr) | ||
: _addr(addr) | ||
, _width(width) | ||
, _height(height) | ||
, _depth(depth) | ||
, _pitch(pitch) | ||
, _redMaskSize(0) | ||
, _redMaskShift(0) | ||
, _greenMaskSize(0) | ||
, _greenMaskShift(0) | ||
, _blueMaskSize(0) | ||
, _blueMaskShift(0) | ||
, _memoryModel(Undefined_FBMM) | ||
{ | ||
// Common parameters constructor | ||
} | ||
|
||
FramebufferInfo::FramebufferInfo(uint32_t width, uint32_t height, | ||
uint16_t depth, uint32_t pitch, | ||
void* addr, FramebufferMemoryModel model, | ||
uint8_t redMaskSize, uint8_t redMaskShift, | ||
uint8_t greenMaskSize, uint8_t greenMaskShift, | ||
uint8_t blueMaskSize, uint8_t blueMaskShift) | ||
: _addr(addr) | ||
, _width(width) | ||
, _height(height) | ||
, _depth(depth) | ||
, _pitch(pitch) | ||
, _redMaskSize(redMaskSize) | ||
, _redMaskShift(redMaskShift) | ||
, _greenMaskSize(greenMaskSize) | ||
, _greenMaskShift(greenMaskShift) | ||
, _blueMaskSize(blueMaskSize) | ||
, _blueMaskShift(blueMaskShift) | ||
, _memoryModel(model) | ||
{ | ||
// All parameters constructor | ||
} | ||
|
||
}; |
Oops, something went wrong.