File: [local] / funnyos / other / skeleton_driver.c (download)
Revision 1.1, Thu Nov 15 15:05:30 2007 UTC (16 years, 6 months ago) by nbrk
Branch: MAIN
add template for device driver cause i'm too lazy to write same things many times.
|
/*
* $Id: skeleton_driver.c,v 1.1 2007/11/15 15:05:30 nbrk Exp $
*/
#include <sys/types.h>
#include <sys/device.h>
#include <sys/bus.h>
#include <arch/XXX/dev/XXXreg.h>
#include <arch/XXX/dev/XXXvar.h>
/*
* Skeleton driver.
*/
int XXX_attach(struct device *, uint32_t, uint8_t);
struct driver XXX_dr = {
sizeof(struct XXX_dd),
XXX_attach,
NULL,
NULL
};
int
XXX_attach(struct device *, uint32_t loc, uint8_t flags)
{
struct XXX_dd *ddp = self->dv_devdata;
return(0);
}