From 36b8e46de0e92aff31664470bb3587a91517ab99 Mon Sep 17 00:00:00 2001 From: Amlal EL Mahrouss Date: Thu, 3 Oct 2024 05:32:46 +0200 Subject: 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 --- dev/modules/APM/APM.hxx | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 dev/modules/APM/APM.hxx (limited to 'dev/modules/APM') 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 + +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 -- cgit v1.2.3