Configurate Screen
This commit is contained in:
@@ -90,6 +90,20 @@ namespace GPU {
|
||||
return ComplexBitMap{construct_cmd(0x04, static_cast<uint32_t>(dir))};
|
||||
}
|
||||
|
||||
static constexpr GP1 HorizontalDisplayRange(uint32_t x1, uint32_t x2) {
|
||||
constexpr auto X1 = BitRange<uint32_t>::from_to(0, 11);
|
||||
constexpr auto X2 = BitRange<uint32_t>::from_to(12, 23);
|
||||
|
||||
return ComplexBitMap{construct_cmd(0x06, ComplexBitMap<uint32_t>::with(X1.with(x1), X2.with(x2)).raw)};
|
||||
}
|
||||
|
||||
static constexpr GP1 VerticalDisplayRange(uint32_t y1, uint32_t y2) {
|
||||
constexpr auto Y1 = BitRange<uint32_t>::from_to(0, 9);
|
||||
constexpr auto Y2 = BitRange<uint32_t>::from_to(10, 19);
|
||||
|
||||
return ComplexBitMap{construct_cmd(0x07, ComplexBitMap<uint32_t>::with(Y1.with(y1), Y2.with(y2)).raw)};
|
||||
}
|
||||
|
||||
static constexpr GP1 DisplayMode(uint32_t mode) {
|
||||
return ComplexBitMap{construct_cmd(0x08, mode)};
|
||||
}
|
||||
|
Reference in New Issue
Block a user