return os::phys_ptr<const info>((ptr.get_phys_addr() + ptr->size + 7) / 8 * 8); // + 7) / 8 * 8 is required for alignment.
}
- std::uint64_t framebuffer_addr(os::phys_ptr<const info> ptr) {
+ inline std::uint64_t framebuffer_addr(os::phys_ptr<const info> ptr) {
return *reinterpret_cast<const std::uint64_t*>(&ptr->rest[0]);
}
- std::uint32_t framebuffer_pitch(os::phys_ptr<const info> ptr) {
+ inline std::uint32_t framebuffer_pitch(os::phys_ptr<const info> ptr) {
return *reinterpret_cast<const std::uint32_t*>(&ptr->rest[8]);
}
- std::uint32_t framebuffer_width(os::phys_ptr<const info> ptr) {
+ inline std::uint32_t framebuffer_width(os::phys_ptr<const info> ptr) {
return *reinterpret_cast<const std::uint32_t*>(&ptr->rest[12]);
}
- std::uint32_t framebuffer_height(os::phys_ptr<const info> ptr) {
+ inline std::uint32_t framebuffer_height(os::phys_ptr<const info> ptr) {
return *reinterpret_cast<const std::uint32_t*>(&ptr->rest[16]);
}
- std::uint8_t framebuffer_bpp(os::phys_ptr<const info> ptr) {
+ inline std::uint8_t framebuffer_bpp(os::phys_ptr<const info> ptr) {
return *reinterpret_cast<const std::uint8_t*>(&ptr->rest[20]);
}
- std::uint8_t framebuffer_type(os::phys_ptr<const info> ptr) {
+ inline std::uint8_t framebuffer_type(os::phys_ptr<const info> ptr) {
return *reinterpret_cast<const std::uint8_t*>(&ptr->rest[21]);
}
- const std::uint8_t* color_info(os::phys_ptr<const info> ptr) {
+ inline const std::uint8_t* color_info(os::phys_ptr<const info> ptr) {
return reinterpret_cast<const std::uint8_t*>(&ptr->rest[24]);
}
#endif // __cplusplus