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
9#pragma once
10
23
24#include <stdint.h>
25#include <stddef.h>
26#include "periph/usbdev.h"
27#include "cpu.h"
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
36#define NRF_USB_NUM_PERIPH 1
37
41#define NRF_USB_NUM_EP USBDEV_NUM_ENDPOINTS
42
53
64
65#ifdef __cplusplus
66}
67#endif
#define NRF_USB_NUM_EP
Number of USB IN and OUT endpoints.
Definition nrfusb.h:41
nrfusb_setup_state_t
nrfusb setup packet state tracker for endpoint 0 handling
Definition nrfusb.h:46
@ NRFUSB_SETUP_WRITE
Write request received.
Definition nrfusb.h:49
@ NRFUSB_SETUP_ACKOUT
Expecting an ACK on the out endpoint.
Definition nrfusb.h:50
@ NRFUSB_SETUP_ACKIN
Expecting an ACK on the in endpoint.
Definition nrfusb.h:51
@ NRFUSB_SETUP_READ
Read request received.
Definition nrfusb.h:48
@ NRFUSB_SETUP_READY
Ready for a new setup request.
Definition nrfusb.h:47
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:57
usbdev_ep_t ep_outs[NRF_USB_NUM_EP]
OUT type endpoints.
Definition nrfusb.h:60
usbdev_ep_t ep_ins[NRF_USB_NUM_EP]
IN type endpoints.
Definition nrfusb.h:59
nrfusb_setup_state_t sstate
Setup request state machine.
Definition nrfusb.h:62
NRF_USBD_Type * device
Ptr to the device registers.
Definition nrfusb.h:61
usbdev_t usbdev
Inherited usbdev struct.
Definition nrfusb.h:58
Definitions low-level USB driver interface.