Simplify the license rows, standardize header macro name
This commit is contained in:
@@ -1,26 +1,10 @@
|
||||
/**
|
||||
* @file usbd_core.h
|
||||
*
|
||||
* Copyright (c) 2022 sakumisu
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
/*
|
||||
* Copyright (c) 2022, sakumisu
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#ifndef _USBD_CORE_H
|
||||
#define _USBD_CORE_H
|
||||
#ifndef USBD_CORE_H
|
||||
#define USBD_CORE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -41,44 +25,18 @@ extern "C" {
|
||||
#include "usb_dc.h"
|
||||
|
||||
enum usbd_event_type {
|
||||
/** USB error reported by the controller */
|
||||
USBD_EVENT_ERROR,
|
||||
/** USB reset */
|
||||
USBD_EVENT_RESET,
|
||||
/** Start of Frame received */
|
||||
USBD_EVENT_SOF,
|
||||
/** USB connection established, hardware enumeration is completed */
|
||||
USBD_EVENT_CONNECTED,
|
||||
/** USB configuration done */
|
||||
USBD_EVENT_CONFIGURED,
|
||||
/** USB connection suspended by the HOST */
|
||||
USBD_EVENT_SUSPEND,
|
||||
/** USB connection lost */
|
||||
USBD_EVENT_DISCONNECTED,
|
||||
/** USB connection resumed by the HOST */
|
||||
USBD_EVENT_RESUME,
|
||||
/* USB DCD IRQ */
|
||||
USBD_EVENT_ERROR, /** USB error reported by the controller */
|
||||
USBD_EVENT_RESET, /** USB reset */
|
||||
USBD_EVENT_SOF, /** Start of Frame received */
|
||||
USBD_EVENT_CONNECTED, /** USB connected*/
|
||||
USBD_EVENT_DISCONNECTED, /** USB disconnected */
|
||||
USBD_EVENT_SUSPEND, /** USB connection suspended by the HOST */
|
||||
USBD_EVENT_RESUME, /** USB connection resumed by the HOST */
|
||||
|
||||
/** USB interface selected */
|
||||
USBD_EVENT_SET_INTERFACE,
|
||||
/** USB interface selected */
|
||||
USBD_EVENT_SET_REMOTE_WAKEUP,
|
||||
/** USB interface selected */
|
||||
USBD_EVENT_CLEAR_REMOTE_WAKEUP,
|
||||
/** Set Feature ENDPOINT_HALT received */
|
||||
USBD_EVENT_SET_HALT,
|
||||
/** Clear Feature ENDPOINT_HALT received */
|
||||
USBD_EVENT_CLEAR_HALT,
|
||||
/** setup packet received */
|
||||
USBD_EVENT_SETUP_NOTIFY,
|
||||
/** ep0 in packet received */
|
||||
USBD_EVENT_EP0_IN_NOTIFY,
|
||||
/** ep0 out packet received */
|
||||
USBD_EVENT_EP0_OUT_NOTIFY,
|
||||
/** ep in packet except ep0 received */
|
||||
USBD_EVENT_EP_IN_NOTIFY,
|
||||
/** ep out packet except ep0 received */
|
||||
USBD_EVENT_EP_OUT_NOTIFY,
|
||||
/** Initial USB connection status */
|
||||
/* USB DEVICE STATUS */
|
||||
USBD_EVENT_CONFIGURED, /** USB configuration done */
|
||||
USBD_EVENT_SET_INTERFACE, /** USB interface selected */
|
||||
USBD_EVENT_UNKNOWN
|
||||
};
|
||||
|
||||
@@ -127,4 +85,4 @@ int usbd_initialize(void);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* USBD_CORE_H */
|
||||
|
||||
Reference in New Issue
Block a user