2019-06-05 22:05:56 +08:00
|
|
|
/****************************************************************************
|
|
|
|
* arch/arm/include/cxd56xx/usbdev.h
|
|
|
|
*
|
2021-04-01 00:53:35 +08:00
|
|
|
* 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
|
2019-06-05 22:05:56 +08:00
|
|
|
*
|
2021-04-01 00:53:35 +08:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2019-06-05 22:05:56 +08:00
|
|
|
*
|
2021-04-01 00:53:35 +08:00
|
|
|
* 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.
|
2019-06-05 22:05:56 +08:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef __ARCH_ARM_INCLUDE_CXD56XX_USBDEV_H
|
|
|
|
#define __ARCH_ARM_INCLUDE_CXD56XX_USBDEV_H
|
|
|
|
|
2020-04-14 18:50:12 +08:00
|
|
|
/****************************************************************************
|
2019-06-05 22:05:56 +08:00
|
|
|
* Included Files
|
2020-04-14 18:50:12 +08:00
|
|
|
****************************************************************************/
|
2019-06-05 22:05:56 +08:00
|
|
|
|
2020-04-14 18:50:12 +08:00
|
|
|
/****************************************************************************
|
2021-03-21 18:37:01 +08:00
|
|
|
* Pre-processor Prototypes
|
2020-04-14 18:50:12 +08:00
|
|
|
****************************************************************************/
|
2019-06-05 22:05:56 +08:00
|
|
|
|
2020-04-14 18:50:12 +08:00
|
|
|
/* BOARDIOC_USBDEV_SETNOTIFYSIG signal value ********************************/
|
2019-06-05 22:05:56 +08:00
|
|
|
|
|
|
|
#define USBDEV_STATE_DETACH 0
|
|
|
|
#define USBDEV_STATE_ATTACH 1
|
|
|
|
|
2020-04-14 18:50:12 +08:00
|
|
|
/* The BOARDIOC_USBDEV_SETNOTIFYSIG signal output the VBUS connection state
|
2019-06-05 22:05:56 +08:00
|
|
|
* and supply current value to the signal handler argument (sival_int).
|
|
|
|
*
|
|
|
|
* Please use the following macros.
|
|
|
|
*
|
|
|
|
* - USBDEV_CONNECTED : Get VBUS connection state.
|
|
|
|
* - USBDEV_POWER_CURRENT : Get VBUS supply current.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define USBDEV_CONNECTED(x) (0xffff & ((x)>>16))
|
|
|
|
#define USBDEV_POWER_CURRENT(x) (0xffff & (x))
|
|
|
|
|
|
|
|
#endif /* __ARCH_ARM_INCLUDE_CXD56XX_USBDEV_H */
|