void LED8X8_Display(u16 *LED8X8, u32 d) { u16 m; while(d--){ for(m = 0; m < 8; m++){ *LED8X8_Address = ((1<<(8+m))&0xff00) | ((~(LED8X8[m]))&0x00ff); MS_DELAY(2); } } }
/* * vpoio_reset() * * SCSI reset signal, the drive must be in disk mode */ static void vpoio_reset(struct vpoio_data *vpo) { device_t ppbus = device_get_parent(vpo->vpo_dev); int ret; struct ppb_microseq reset_microseq[] = { #define INITIATOR MS_PARAM(0, 1, MS_TYP_INT) MS_DASS(MS_UNKNOWN), MS_CASS(H_AUTO | H_nSELIN | H_nINIT | H_STROBE), MS_DELAY(25), MS_CASS(H_AUTO | H_nSELIN | H_INIT | H_STROBE), MS_RET(0) }; ppb_MS_init_msq(reset_microseq, 1, INITIATOR, 1 << VP0_INITIATOR); ppb_MS_microseq(ppbus, vpo->vpo_dev, reset_microseq, &ret); return; }
MS_DBRA(-4 /* loop */), MS_CASS(H_AUTO | H_nSELIN | H_INIT | H_STROBE), MS_RET(0) }; /* * This is the sub-microsequence for MS_PUT in both NIBBLE and PS2 modes */ static struct ppb_microseq spp_outbyte_submicroseq[] = { /* loop: */ MS_RASSERT_P(1, MS_REG_DTR), MS_CASS(H_nAUTO | H_nSELIN | H_INIT | H_STROBE), MS_CASS( H_AUTO | H_nSELIN | H_INIT | H_STROBE), MS_DELAY(VP0_PULSE), MS_DBRA(-5 /* loop */), /* return from the put call */ MS_RET(0) }; /* EPP 1.7 microsequences, ptr and len set at runtime */ static struct ppb_microseq epp17_outstr_body[] = { MS_CASS(H_AUTO | H_SELIN | H_INIT | H_STROBE), /* loop: */ MS_RASSERT_P(1, MS_REG_EPP_D), MS_BRSET(TIMEOUT, 3 /* error */), /* EPP timeout? */ MS_DBRA(-3 /* loop */),