Kernel Modules

Top  Previous  Next

The kernel can be extended when necessary by the inclusion of modules. This is done automatically by the configurer when it detects that a task needs particular facilities. Typically these include link drivers, EDMA handlers, and implementation-specific device drivers. Each module has a specific numeric identifier, and to gain access to a module, you use the kernel’s SC6xKernel_LocateInterface function.

 

SC6xKernel_LocateInterface

#include <c6kobj.h>

void *SC6xKernel_LocateInterface(void *Kernel, unsigned int ID);

 stand-alone

This searches the list of modules known to the kernel and returns a handle to the one with identifier value ID. The first parameter should be a pointer to the kernel object that is available to all tasks as _kernel. Every call with the same ID returns the same handle. NULL is returned if no suitable module can be located. For example:

 

SC6xExt_Int *xint = SC6xKernel_LocateInterface(_kernel, SIID_SC6xExt_Int);