Loading...
Searching...
No Matches
nrfusb.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2019 Koen Zandberg
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
22#ifndef NRFUSB_H
23#define NRFUSB_H
24
25#include <stdint.h>
26#include <stddef.h>
27#include "periph/usbdev.h"
28#include "cpu.h"
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
37#define NRF_USB_NUM_PERIPH 1
38
42#define NRF_USB_NUM_EP USBDEV_NUM_ENDPOINTS
43
54
65
66#ifdef __cplusplus
67}
68#endif
69#endif /* NRFUSB_H */
#define NRF_USB_NUM_EP
Number of USB IN and OUT endpoints.
Definition nrfusb.h:42
nrfusb_setup_state_t
nrfusb setup packet state tracker for endpoint 0 handling
Definition nrfusb.h:47
@ NRFUSB_SETUP_WRITE
Write request received
Definition nrfusb.h:50
@ NRFUSB_SETUP_ACKOUT
Expecting an ACK on the out endpoint.
Definition nrfusb.h:51
@ NRFUSB_SETUP_ACKIN
Expecting an ACK on the in endpoint
Definition nrfusb.h:52
@ NRFUSB_SETUP_READ
Read request received
Definition nrfusb.h:49
@ NRFUSB_SETUP_READY
Ready for a new setup request
Definition nrfusb.h:48
nrf usb peripheral device context
Definition nrfusb.h:58
nrfusb_setup_state_t sstate
Setup request state machine
Definition nrfusb.h:63
NRF_USBD_Type * device
Ptr to the device registers
Definition nrfusb.h:62
usbdev_t usbdev
Inherited usbdev struct
Definition nrfusb.h:59
usbdev endpoint descriptor
Definition usbdev.h:259
usbdev device descriptor
Definition usbdev.h:247
Definitions low-level USB driver interface.