Loading...
Searching...
No Matches
nrfusb.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2019 Koen Zandberg
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
20
21#include <stdint.h>
22#include <stddef.h>
23#include "periph/usbdev.h"
24#include "cpu.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
33#define NRF_USB_NUM_PERIPH 1
34
38#define NRF_USB_NUM_EP USBDEV_NUM_ENDPOINTS
39
50
61
62#ifdef __cplusplus
63}
64#endif
#define NRF_USB_NUM_EP
Number of USB IN and OUT endpoints.
Definition nrfusb.h:38
nrfusb_setup_state_t
nrfusb setup packet state tracker for endpoint 0 handling
Definition nrfusb.h:43
@ NRFUSB_SETUP_WRITE
Write request received.
Definition nrfusb.h:46
@ NRFUSB_SETUP_ACKOUT
Expecting an ACK on the out endpoint.
Definition nrfusb.h:47
@ NRFUSB_SETUP_ACKIN
Expecting an ACK on the in endpoint.
Definition nrfusb.h:48
@ NRFUSB_SETUP_READ
Read request received.
Definition nrfusb.h:45
@ NRFUSB_SETUP_READY
Ready for a new setup request.
Definition nrfusb.h:44
struct usbdev_ep usbdev_ep_t
usbdev_ep_t forward declaration
Definition usbdev.h:99
struct usbdev usbdev_t
usbdev_t forward declaration
Definition usbdev.h:94
nrf usb peripheral device context
Definition nrfusb.h:54
usbdev_ep_t ep_outs[NRF_USB_NUM_EP]
OUT type endpoints.
Definition nrfusb.h:57
usbdev_ep_t ep_ins[NRF_USB_NUM_EP]
IN type endpoints.
Definition nrfusb.h:56
nrfusb_setup_state_t sstate
Setup request state machine.
Definition nrfusb.h:59
NRF_USBD_Type * device
Ptr to the device registers.
Definition nrfusb.h:58
usbdev_t usbdev
Inherited usbdev struct.
Definition nrfusb.h:55
Definitions low-level USB driver interface.