C to C++ migration and refactoring #17

Merged
harraiken merged 67 commits from cxxtest into master 2025-09-24 20:18:35 +02:00
2 changed files with 50 additions and 0 deletions
Showing only changes of commit 0a3450f649 - Show all commits

17
xtoskrnl/includes/hl.hh Normal file
View File

@@ -0,0 +1,17 @@
/**
* PROJECT: ExectOS
* COPYRIGHT: See COPYING.md in the top level directory
* FILE: xtoskrnl/includes/hl.hh
* DESCRIPTION: Hardware Layer
* DEVELOPERS: Aiken Harris <harraiken91@gmail.com>
*/
#ifndef __XTOSKRNL_HL_HH
#define __XTOSKRNL_HL_HH
#include <xtos.hh>
#include <hl/ioreg.hh>
#endif /* __XTOSKRNL_HL_HH */

View File

@@ -0,0 +1,33 @@
/**
* PROJECT: ExectOS
* COPYRIGHT: See COPYING.md in the top level directory
* FILE: xtoskrnl/includes/hl/ioreg.hh
* DESCRIPTION: Basic I/O registers access functionality
* DEVELOPERS: Aiken Harris <harraiken91@gmail.com>
*/
#ifndef __XTOSKRNL_HL_IOREG_HH
#define __XTOSKRNL_HL_IOREG_HH
#include <xtos.hh>
/* Hardware Layer */
namespace HL
{
class IoRegister
{
public:
STATIC XTAPI UCHAR ReadRegister8(IN PVOID Register);
STATIC XTAPI USHORT ReadRegister16(IN PVOID Register);
STATIC XTAPI ULONG ReadRegister32(IN PVOID Register);
STATIC XTAPI VOID WriteRegister8(IN PVOID Register,
IN UCHAR Value);
STATIC XTAPI VOID WriteRegister16(IN PVOID Register,
IN USHORT Value);
STATIC XTAPI VOID WriteRegister32(IN PVOID Register,
IN ULONG Value);
};
}
#endif /* __XTOSKRNL_HL_IOREG_HH */