Lines Matching refs:cb

681     void (*cb)(void *, int, int), void *cbarg)  in udl_show_screen()
1503 struct udl_cmd_buf *cb = &sc->sc_cmd_buf; in udl_cmd_alloc_buf() local
1505 cb->buf = malloc(UDL_CMD_MAX_XFER_SIZE, M_USBDEV, M_NOWAIT|M_ZERO); in udl_cmd_alloc_buf()
1506 if (cb->buf == NULL) { in udl_cmd_alloc_buf()
1511 cb->off = 0; in udl_cmd_alloc_buf()
1512 cb->compblock = 0; in udl_cmd_alloc_buf()
1520 struct udl_cmd_buf *cb = &sc->sc_cmd_buf; in udl_cmd_free_buf() local
1522 if (cb->buf != NULL) { in udl_cmd_free_buf()
1523 free(cb->buf, M_USBDEV, UDL_CMD_MAX_XFER_SIZE); in udl_cmd_free_buf()
1524 cb->buf = NULL; in udl_cmd_free_buf()
1526 cb->off = 0; in udl_cmd_free_buf()
1532 struct udl_cmd_buf *cb = &sc->sc_cmd_buf; in udl_cmd_insert_int_1() local
1534 cb->buf[cb->off] = value; in udl_cmd_insert_int_1()
1536 cb->off += 1; in udl_cmd_insert_int_1()
1543 struct udl_cmd_buf *cb = &sc->sc_cmd_buf; in udl_cmd_insert_int_2() local
1546 bcopy(&lvalue, cb->buf + cb->off, 2); in udl_cmd_insert_int_2()
1548 cb->off += 2; in udl_cmd_insert_int_2()
1555 struct udl_cmd_buf *cb = &sc->sc_cmd_buf; in udl_cmd_insert_int_3() local
1561 bcopy(&lvalue, cb->buf + cb->off, 3); in udl_cmd_insert_int_3()
1563 cb->off += 3; in udl_cmd_insert_int_3()
1570 struct udl_cmd_buf *cb = &sc->sc_cmd_buf; in udl_cmd_insert_int_4() local
1573 bcopy(&lvalue, cb->buf + cb->off, 4); in udl_cmd_insert_int_4()
1575 cb->off += 4; in udl_cmd_insert_int_4()
1581 struct udl_cmd_buf *cb = &sc->sc_cmd_buf; in udl_cmd_insert_buf() local
1583 bcopy(buf, cb->buf + cb->off, len); in udl_cmd_insert_buf()
1585 cb->off += len; in udl_cmd_insert_buf()
1591 struct udl_cmd_buf *cb = &sc->sc_cmd_buf; in udl_cmd_insert_buf_comp() local
1607 if (cb->compblock >= UDL_CB_RESTART_SIZE) { in udl_cmd_insert_buf_comp()
1608 cb->off -= UDL_CMD_WRITE_HEAD_SIZE; in udl_cmd_insert_buf_comp()
1609 cb->compblock -= UDL_CMD_WRITE_HEAD_SIZE; in udl_cmd_insert_buf_comp()
1637 if (cb->compblock + next >= UDL_CB_BODY_SIZE) { in udl_cmd_insert_buf_comp()
1645 cb->buf[cb->off] = 0; in udl_cmd_insert_buf_comp()
1647 cb->buf[cb->off] |= (bit_cur << bit_pos); in udl_cmd_insert_buf_comp()
1652 cb->off++; in udl_cmd_insert_buf_comp()
1653 cb->compblock++; in udl_cmd_insert_buf_comp()
1664 cb->off++; in udl_cmd_insert_buf_comp()
1665 cb->compblock++; in udl_cmd_insert_buf_comp()
1674 padding = (UDL_CB_BODY_SIZE - cb->compblock); in udl_cmd_insert_buf_comp()
1676 cb->buf[cb->off] = 0; in udl_cmd_insert_buf_comp()
1677 cb->off++; in udl_cmd_insert_buf_comp()
1678 cb->compblock++; in udl_cmd_insert_buf_comp()
1681 cb->compblock = 0; in udl_cmd_insert_buf_comp()
1691 struct udl_cmd_buf *cb = &sc->sc_cmd_buf; in udl_cmd_insert_head_comp() local
1694 if (cb->compblock > UDL_CB_BODY_SIZE) { in udl_cmd_insert_head_comp()
1695 cb->off -= UDL_CMD_COPY_HEAD_SIZE; in udl_cmd_insert_head_comp()
1696 cb->compblock -= UDL_CMD_COPY_HEAD_SIZE; in udl_cmd_insert_head_comp()
1698 padding = (UDL_CB_BODY_SIZE - cb->compblock); in udl_cmd_insert_head_comp()
1700 cb->buf[cb->off] = 0; in udl_cmd_insert_head_comp()
1701 cb->off++; in udl_cmd_insert_head_comp()
1702 cb->compblock++; in udl_cmd_insert_head_comp()
1705 cb->compblock = 0; in udl_cmd_insert_head_comp()
1715 struct udl_cmd_buf *cb = &sc->sc_cmd_buf; in udl_cmd_insert_check() local
1719 total = cb->off + len; in udl_cmd_insert_check()
1723 if (cb->xfer_type == UDL_CMD_XFER_ASYNC) in udl_cmd_insert_check()
1740 struct udl_cmd_buf *cb = &sc->sc_cmd_buf; in udl_cmd_set_xfer_type() local
1742 cb->xfer_type = xfer_type; in udl_cmd_set_xfer_type()
1748 struct udl_cmd_buf *cb = &sc->sc_cmd_buf; in udl_cmd_save_offset() local
1750 cb->off_save = cb->off; in udl_cmd_save_offset()
1751 cb->compblock_save = cb->compblock; in udl_cmd_save_offset()
1757 struct udl_cmd_buf *cb = &sc->sc_cmd_buf; in udl_cmd_restore_offset() local
1759 cb->off = cb->off_save; in udl_cmd_restore_offset()
1760 cb->compblock = cb->compblock_save; in udl_cmd_restore_offset()
1783 struct udl_cmd_buf *cb = &sc->sc_cmd_buf; in udl_cmd_send() local
1792 bcopy(cb->buf, cx->buf, cb->off); in udl_cmd_send()
1794 len = cb->off; in udl_cmd_send()
1804 DN(sc), FUNC, len, cb->off); in udl_cmd_send()
1806 cb->off = 0; in udl_cmd_send()
1807 cb->compblock = 0; in udl_cmd_send()
1815 struct udl_cmd_buf *cb = &sc->sc_cmd_buf; in udl_cmd_send_async() local
1843 bcopy(cb->buf, cx->buf, cb->off); in udl_cmd_send_async()
1846 usbd_setup_xfer(cx->xfer, sc->sc_tx_pipeh, cx, cx->buf, cb->off, in udl_cmd_send_async()
1855 DN(sc), FUNC, cb->off, i); in udl_cmd_send_async()
1858 cb->off = 0; in udl_cmd_send_async()
1859 cb->compblock = 0; in udl_cmd_send_async()
2007 struct udl_cmd_buf *cb = &sc->sc_cmd_buf; in udl_clear_screen() local
2012 if (cb->xfer_type == UDL_CMD_XFER_ASYNC) in udl_clear_screen()
2266 struct udl_cmd_buf *cb = &sc->sc_cmd_buf; in udl_fb_buf_write_comp() local
2283 if (cb->off == 0) in udl_fb_buf_write_comp()
2296 cb->compblock += UDL_CMD_WRITE_HEAD_SIZE; in udl_fb_buf_write_comp()
2298 count = &cb->buf[cb->off - 1]; in udl_fb_buf_write_comp()
2356 struct udl_cmd_buf *cb = &sc->sc_cmd_buf; in udl_fb_off_write_comp() local
2379 if (cb->off == 0) in udl_fb_off_write_comp()
2392 cb->compblock += UDL_CMD_WRITE_HEAD_SIZE; in udl_fb_off_write_comp()
2394 count = &cb->buf[cb->off - 1]; in udl_fb_off_write_comp()
2454 struct udl_cmd_buf *cb = &sc->sc_cmd_buf; in udl_fb_off_copy_comp() local
2469 if (cb->off == 0) in udl_fb_off_copy_comp()
2481 cb->compblock += UDL_CMD_COPY_HEAD_SIZE; in udl_fb_off_copy_comp()