/* * $Id: com.c,v 1.1 2008/08/08 13:18:16 nbrk Exp $ */ #include #include /* * Autoconf glue. */ int com_match(struct device *parent, void *aux); int com_attach(struct device *parent, struct device *self, void *aux); struct driver com_drv = { "com", /* name */ sizeof(struct com_softc),/* datasize */ com_match, /* match */ com_attach, /* attach */ NULL, /* detach */ -1 /* nunits XXX */ }; int com_match(struct device *parent, void *aux) { return(1); } int com_attach(struct device *parent, struct device *self, void *aux) { struct com_softc *sc = self->dv_data; const char *str = "Hello, everyone!\n"; sc->sc_uaap = aux; printk("\n"); while (*str != 0) { sc->sc_uaap->ua_putc(sc->sc_uaap->ua_cookie, 0, *str); str++; } return(0); }