mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
Update Driver API header
This commit is contained in:
parent
692a309289
commit
bff3cb04a0
65
DAPI.hpp
65
DAPI.hpp
@ -127,11 +127,6 @@ enum CallbackReason
|
|||||||
*/
|
*/
|
||||||
ConfigurationReason,
|
ConfigurationReason,
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief This will be called when the registered interrupt is triggered.
|
|
||||||
*/
|
|
||||||
InterruptReason,
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This is used when the kernel wants to stop the driver.
|
* @brief This is used when the kernel wants to stop the driver.
|
||||||
*
|
*
|
||||||
@ -262,7 +257,7 @@ union KernelCallback
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Adjust the encoding.
|
* @brief Adjust the encoding.
|
||||||
*
|
*
|
||||||
* 0 - None, use default
|
* 0 - None, use default
|
||||||
*
|
*
|
||||||
* 1 - Signed PCM 8-bit
|
* 1 - Signed PCM 8-bit
|
||||||
@ -293,10 +288,10 @@ union KernelCallback
|
|||||||
*
|
*
|
||||||
* 21 - Float PCM 32-bit Big Endian
|
* 21 - Float PCM 32-bit Big Endian
|
||||||
* 22 - Float PCM 64-bit Big Endian
|
* 22 - Float PCM 64-bit Big Endian
|
||||||
*
|
*
|
||||||
* 23 - PCM A-law
|
* 23 - PCM A-law
|
||||||
* 24 - PCM Mu-law
|
* 24 - PCM Mu-law
|
||||||
*
|
*
|
||||||
* ... - More
|
* ... - More
|
||||||
*/
|
*/
|
||||||
unsigned short Encoding;
|
unsigned short Encoding;
|
||||||
@ -324,7 +319,7 @@ union KernelCallback
|
|||||||
*/
|
*/
|
||||||
unsigned char Channels;
|
unsigned char Channels;
|
||||||
} Adjust;
|
} Adjust;
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
unsigned char *Data;
|
unsigned char *Data;
|
||||||
@ -348,4 +343,56 @@ union KernelCallback
|
|||||||
unsigned long raw;
|
unsigned long raw;
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
|
union CPURegisters
|
||||||
|
{
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
#if defined(__x86_64__) || defined(__amd64__)
|
||||||
|
unsigned long r15;
|
||||||
|
unsigned long r14;
|
||||||
|
unsigned long r13;
|
||||||
|
unsigned long r12;
|
||||||
|
unsigned long r11;
|
||||||
|
unsigned long r10;
|
||||||
|
unsigned long r9;
|
||||||
|
unsigned long r8;
|
||||||
|
|
||||||
|
unsigned long rbp;
|
||||||
|
unsigned long rdi;
|
||||||
|
unsigned long rsi;
|
||||||
|
unsigned long rdx;
|
||||||
|
unsigned long rcx;
|
||||||
|
unsigned long rbx;
|
||||||
|
unsigned long rax;
|
||||||
|
|
||||||
|
unsigned long InterruptNumber;
|
||||||
|
unsigned long ErrorCode;
|
||||||
|
unsigned long rip;
|
||||||
|
unsigned long cs;
|
||||||
|
unsigned long rflags;
|
||||||
|
unsigned long rsp;
|
||||||
|
unsigned long ss;
|
||||||
|
#elif defined(__i386__) || defined(__i686__)
|
||||||
|
unsigned int ebp;
|
||||||
|
unsigned int edi;
|
||||||
|
unsigned int esi;
|
||||||
|
unsigned int edx;
|
||||||
|
unsigned int ecx;
|
||||||
|
unsigned int ebx;
|
||||||
|
unsigned int eax;
|
||||||
|
|
||||||
|
unsigned int InterruptNumber;
|
||||||
|
unsigned int ErrorCode;
|
||||||
|
unsigned int eip;
|
||||||
|
unsigned int cs;
|
||||||
|
unsigned int eflags;
|
||||||
|
unsigned int esp;
|
||||||
|
unsigned int ss;
|
||||||
|
#else
|
||||||
|
#error "Unsupported architecture"
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
unsigned long raw;
|
||||||
|
} __attribute__((packed));
|
||||||
|
|
||||||
#endif // !__FENNIX_DRIVER_API_H__
|
#endif // !__FENNIX_DRIVER_API_H__
|
||||||
|
Loading…
x
Reference in New Issue
Block a user