Skip to content

AddDevice

Cycl0ne edited this page Apr 20, 2013 · 3 revisions

NAME

AddDevice - Adds a Device to the system device list

SYNOPSIS

AddDevice(device);
void AddDevice(struct Device *);

FUNCTION

This function adds a new device to the system device list, making
it available to other programs.  The device must be ready to be
opened at this time.

INPUTS

device - pointer to a properly initialized device node

SEE ALSO

[[OpenDevice]], [[CloseDevice]], [[RemDevice]]

EXAMPLE

	#include "exec_funcs.h"
	
	APTR SysBase = NULL;

	void main(APTR sysBase)
	{
		SysBase = sysBase;
		struct Device *device = NULL;
	
		/*
		* Initialize you device here, alloc some memory, put stuff into your structure
		*/
	
		AddDevice(device);
	}
Clone this wiki locally