| // Copyright lowRISC contributors. |
| // Licensed under the Apache License, Version 2.0, see LICENSE for details. |
| // SPDX-License-Identifier: Apache-2.0 |
| #ifndef __USB_SIMPLESERIAL_H__ |
| #define __USB_SIMPLESERIAL_H__ |
| // This is only here because caller of _init needs it |
| typedef struct usb_ss_ctx { |
| void (*got_byte)(uint8_t); |
| * Send a byte on a simpleserial endpoint |
| * ssctx - instance context |
| void usb_simpleserial_send_byte(usb_ss_ctx_t *ssctx, uint8_t c); |
| * Initialize a simpleserial endpoint |
| * ctx - initialized usbdev context |
| * ep - endpoint number for this instance |
| * ssctx - unintialized simpleserial instance context |
| * got_byte - callback function for when a byte is received |
| void usb_simpleserial_init(usb_ss_ctx_t *ssctx, usbdev_ctx_t *ctx, int ep, |
| void (*got_byte)(uint8_t)); |