Annotation of prex-old/dev/ic/com.c, Revision 1.1
1.1 ! nbrk 1: /*
! 2: * $Id$
! 3: */
! 4: #include <driver.h>
! 5:
! 6: #include <dev/ic/comvar.h>
! 7:
! 8: /*
! 9: * Autoconf glue.
! 10: */
! 11: int com_match(struct device *parent, void *aux);
! 12: int com_attach(struct device *parent, struct device *self, void *aux);
! 13:
! 14: struct driver com_drv = {
! 15: "com", /* name */
! 16: sizeof(struct com_softc),/* datasize */
! 17: com_match, /* match */
! 18: com_attach, /* attach */
! 19: NULL, /* detach */
! 20: -1 /* nunits XXX */
! 21: };
! 22:
! 23:
! 24: int
! 25: com_match(struct device *parent, void *aux)
! 26: {
! 27: return(1);
! 28: }
! 29:
! 30:
! 31: int
! 32: com_attach(struct device *parent, struct device *self, void *aux)
! 33: {
! 34: struct com_softc *sc = self->dv_data;
! 35: const char *str = "Hello, everyone!\n";
! 36:
! 37: sc->sc_uaap = aux;
! 38:
! 39: printk("\n");
! 40:
! 41: while (*str != 0) {
! 42: sc->sc_uaap->ua_putc(sc->sc_uaap->ua_cookie, 0, *str);
! 43:
! 44: str++;
! 45: }
! 46:
! 47: return(0);
! 48: }
! 49:
CVSweb