#include <string.h>#include <usb.h>#include "base.h"#include "libnjb.h"#include "ioutil.h"#include "usb_io.h"#include "njb_error.h"Functions | |
| ssize_t | usb_pipe_write (njb_t *njb, void *buf, size_t nbytes) |
| ssize_t | usb_pipe_read (njb_t *njb, void *buf, size_t nbytes) |
| int | usb_setup (njb_t *njb, int type, int request, int value, int index, int length, void *data) |
Variables | |
| int | __sub_depth |
| ssize_t usb_pipe_read | ( | njb_t * | njb, | |
| void * | buf, | |||
| size_t | nbytes | |||
| ) |
This function reads a chunk of bytes to a buffer from a device's IN endpoint.
| njb | the jukebox object to use | |
| buf | the buffer to store the bytes in | |
| nbytes | the number of bytes to read in |
| ssize_t usb_pipe_write | ( | njb_t * | njb, | |
| void * | buf, | |||
| size_t | nbytes | |||
| ) |
This function writes a number of bytes from a buffer to a devices OUT endpoint.
| njb | the jukebox object to use | |
| buf | the buffer to send bytes from | |
| nbytes | the number of bytes to write |
| int usb_setup | ( | njb_t * | njb, | |
| int | type, | |||
| int | request, | |||
| int | value, | |||
| int | index, | |||
| int | length, | |||
| void * | data | |||
| ) |
This function sends a USB SETUP 8-byte command across to endpoint 0 on the device.
| int __sub_depth |
The current subroutine depth for all of libnjb (global)
1.5.2