diff options
| author | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-10-03 05:32:46 +0200 |
|---|---|---|
| committer | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-10-03 05:32:46 +0200 |
| commit | 36b8e46de0e92aff31664470bb3587a91517ab99 (patch) | |
| tree | 780ce906e9273ebbee00a96230557e0b7e9ac9d9 /dev/modules/APM | |
| parent | 3e30ee1749d19f5188560f9a5cdab922180c71ca (diff) | |
IMP: Fixes improvements and new APIs and implementations.
- Add more threading API calls.
- Moved /dev/zka/modules/ to /dev/modules/.
- Add APM API inside /dev/modules.
- Add SInt{x} types inside Defines.hxx.
- Fix formatting inside PRM.
Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'dev/modules/APM')
| -rw-r--r-- | dev/modules/APM/APM.hxx | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/dev/modules/APM/APM.hxx b/dev/modules/APM/APM.hxx new file mode 100644 index 00000000..abcfb468 --- /dev/null +++ b/dev/modules/APM/APM.hxx @@ -0,0 +1,34 @@ +/* -------------------------------------------
+
+ Copyright ZKA Technologies.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.hxx>
+
+namespace Kernel
+{
+ typedef Int32 APMPowerCmd;
+
+ enum
+ {
+ kAPMPowerCommandStop = 0x01,
+ kAPMPowerCommandStart = 0x02,
+ kAPMPowerCommandSleep = 0x04,
+ kAPMPowerCommandSWakeup = 0x06
+ };
+
+ /// @brief Send a APM command into it's own DMA space.
+ /// @param base_dma the DMA base address.
+ /// @param cmd the command.
+ /// @return status code.
+ EXTERN_C Int32 apm_send_dma_command(Ptr64 base_dma, APMPowerCmd cmd);
+
+ /// @brief Send a APM command into it's own IO space.
+ /// @param base_dma the IO base port.
+ /// @param cmd the command.
+ /// @return status code.
+ EXTERN_C Int32 apm_send_io_command(UInt16 base_port, APMPowerCmd cmd);
+} // namespace Kernel
\ No newline at end of file |
