Ver 0.1.1

OS/4 Extended KEE API

KernSetIRQ

Synopsis

APIRET APIENTRY KernSetIRQ(uint32_t IRQlevel,  KernIRQHandler pIRQhandler,  uint32_t IRQflag,  void *pContext);

Description

It is similar to the DevHelp_SetIRQ function but it sets a 32-bit interrupt handler. Thr Interrupt handler must return INTERRUPT_HANDLED or INTERRUPT_NOT_HANDLED.

Parameters

IRQlevel

        Interrupt level

KernIRQHandler

        Pointer to a interrupt handler  to be set  ( typedef uint32_t __cdecl (*KernIRQHandler)(void*);)

IRQflag

        Interrupt sharing (0=not shared, 1=shared)

pContext

        Pointer to “context”.  This pointer will be passed to the handler when an interrupt occurs.

KernUnSetIRQ

Synopsis

APIRET APIENTRY KernUnSetIRQ(uint32_t IRQlevel, KernIRQHandler IRQhandler);

Description

It is similar to the DevHlp_UnSetIRQ function. It Removes the interrupt handler.

Parameters

IRQlevel

        Interrupt level number

KernIRQHandler

        The Pointer to an interrupt handler  to be removed.

KernEOI

Synopsis

APIRET APIENTRY KernEOI(uint32_t IRQlevel);

Description

It sends the EOI to the PIC/APIC.

Parameters

IRQlevel

        Interrupt level number.

KernRegisterPDD

Synopsis

APIRET APIENTRY KernRegisterPDD(char *pszName, Far32Ptr_t far32PDDProc);

Description

It is similar to the DevHlp_RegisterPDD function. It will register the PDD name and the communication entry point.

Parameters

pszName

        Driver name

far32PDDProc

        The pointer to the communication function of the physical device driver .

KernCopyInVirt

Synopsis

APIRET APIENTRY KernCopyInVirt(void* Destination,  uint32_t Offset, uint32_t Sel,  uint32_t Length);

Description

Copy to Destination  Length of byte from Sel:Offset.

Parameters

Destination

        Pointer to a destination

Sel:Offset

        sel:offset of a source

Length

        amount of bytes to copy

KernPrintf

Synopsis

void  APIENTRY KernPrintf(const char *fmt, ...);

Description

To use the Printf function from a PDD

Parameters

        Printf standard parameter