forked for unsupported target
Dependents: stm32-disco-example DISCO-F469NI_BD_SD_Card_Control
Fork of USBHOST by
USBHost/TARGET_RENESAS/TARGET_VK_RZ_A1H/inc/devdrv_usb_host_api.h@1:ab240722d7ef, 2017-02-15 (annotated)
- Committer:
- frq08711@LMECWL0871.LME.ST.COM
- Date:
- Wed Feb 15 10:49:44 2017 +0100
- Revision:
- 1:ab240722d7ef
update to mbed 5.3.5
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 1 | /******************************************************************************* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 2 | * DISCLAIMER |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 3 | * This software is supplied by Renesas Electronics Corporation and is only |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 4 | * intended for use with Renesas products. No other uses are authorized. This |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 5 | * software is owned by Renesas Electronics Corporation and is protected under |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 6 | * all applicable laws, including copyright laws. |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 7 | * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 8 | * THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 9 | * LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 10 | * AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 11 | * TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 12 | * ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 13 | * FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 14 | * ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 15 | * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 16 | * Renesas reserves the right, without notice, to make changes to this software |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 17 | * and to discontinue the availability of this software. By using this software, |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 18 | * you agree to the additional terms and conditions found by accessing the |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 19 | * following link: |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 20 | * http://www.renesas.com/disclaimer |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 21 | * Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved. |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 22 | *******************************************************************************/ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 23 | /******************************************************************************* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 24 | * File Name : devdrv_usb_host_api.h |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 25 | * $Rev: 1116 $ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 26 | * $Date:: 2014-07-09 16:29:19 +0900#$ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 27 | * Description : RZ/A1H R7S72100 USB Sample Program |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 28 | *******************************************************************************/ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 29 | #ifndef USB_HOST_API_H |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 30 | #define USB_HOST_API_H |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 31 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 32 | #include "r_typedefs.h" |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 33 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 34 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 35 | /******************************************************************************* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 36 | Typedef definitions |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 37 | *******************************************************************************/ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 38 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 39 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 40 | /******************************************************************************* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 41 | Macro definitions |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 42 | *******************************************************************************/ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 43 | #define USB_HOST_PORTNUM (2) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 44 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 45 | #define USB_HOST_ELT_INTERRUPT_LEVEL (9) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 46 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 47 | #define USBHCLOCK_X1_48MHZ (0x0000u) /* USB_X1_48MHz */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 48 | #define USBHCLOCK_EXTAL_12MHZ (0x0004u) /* EXTAL_12MHz */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 49 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 50 | #define USB_HOST_MAX_DEVICE (10) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 51 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 52 | #define USB_HOST_ON (1) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 53 | #define USB_HOST_OFF (0) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 54 | #define USB_HOST_YES (1) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 55 | #define USB_HOST_NO (0) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 56 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 57 | #define USB_HOST_NON_SPEED (0) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 58 | #define USB_HOST_LOW_SPEED (1) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 59 | #define USB_HOST_FULL_SPEED (2) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 60 | #define USB_HOST_HIGH_SPEED (3) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 61 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 62 | /* DEVDRV_SUCCESS(0) & DEVDRV_ERROR(-1) is dev_drv.h */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 63 | #define DEVDRV_USBH_STALL (-2) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 64 | #define DEVDRV_USBH_TIMEOUT (-3) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 65 | #define DEVDRV_USBH_NAK_TIMEOUT (-4) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 66 | #define DEVDRV_USBH_DETACH_ERR (-5) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 67 | #define DEVDRV_USBH_SETUP_ERR (-6) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 68 | #define DEVDRV_USBH_CTRL_COM_ERR (-7) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 69 | #define DEVDRV_USBH_COM_ERR (-8) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 70 | #define DEVDRV_USBH_DEV_ADDR_ERR (-9) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 71 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 72 | #define USB_HOST_ATTACH (1) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 73 | #define USB_HOST_DETACH (0) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 74 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 75 | #define USB_HOST_MAX_PIPE_NO (9u) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 76 | #define USB_HOST_PIPE0 (0) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 77 | #define USB_HOST_PIPE1 (1) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 78 | #define USB_HOST_PIPE2 (2) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 79 | #define USB_HOST_PIPE3 (3) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 80 | #define USB_HOST_PIPE4 (4) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 81 | #define USB_HOST_PIPE5 (5) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 82 | #define USB_HOST_PIPE6 (6) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 83 | #define USB_HOST_PIPE7 (7) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 84 | #define USB_HOST_PIPE8 (8) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 85 | #define USB_HOST_PIPE9 (9) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 86 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 87 | #define USB_HOST_ISO (0xc000u) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 88 | #define USB_HOST_INTERRUPT (0x8000u) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 89 | #define USB_HOST_BULK (0x4000u) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 90 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 91 | #define USB_HOST_PIPE_IDLE (0x00) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 92 | #define USB_HOST_PIPE_WAIT (0x01) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 93 | #define USB_HOST_PIPE_DONE (0x02) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 94 | #define USB_HOST_PIPE_NORES (0x03) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 95 | #define USB_HOST_PIPE_STALL (0x04) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 96 | #define USB_HOST_PIPE_ERROR (0x05) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 97 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 98 | #define USB_HOST_NONE (0x0000u) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 99 | #define USB_HOST_BFREFIELD (0x0400u) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 100 | #define USB_HOST_BFREON (0x0400u) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 101 | #define USB_HOST_BFREOFF (0x0000u) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 102 | #define USB_HOST_DBLBFIELD (0x0200u) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 103 | #define USB_HOST_DBLBON (0x0200u) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 104 | #define USB_HOST_DBLBOFF (0x0000u) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 105 | #define USB_HOST_CNTMDFIELD (0x0100u) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 106 | #define USB_HOST_CNTMDON (0x0100u) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 107 | #define USB_HOST_CNTMDOFF (0x0000u) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 108 | #define USB_HOST_SHTNAKON (0x0080u) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 109 | #define USB_HOST_SHTNAKOFF (0x0000u) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 110 | #define USB_HOST_DIRFIELD (0x0010u) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 111 | #define USB_HOST_DIR_H_OUT (0x0010u) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 112 | #define USB_HOST_DIR_H_IN (0x0000u) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 113 | #define USB_HOST_EPNUMFIELD (0x000fu) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 114 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 115 | #define USB_HOST_CUSE (0) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 116 | #define USB_HOST_D0USE (1) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 117 | #define USB_HOST_D0DMA (2) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 118 | #define USB_HOST_D1USE (3) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 119 | #define USB_HOST_D1DMA (4) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 120 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 121 | #define USB_HOST_CFIFO_USE (0x0000) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 122 | #define USB_HOST_D0FIFO_USE (0x1000) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 123 | #define USB_HOST_D1FIFO_USE (0x2000) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 124 | #define USB_HOST_D0FIFO_DMA (0x5000) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 125 | #define USB_HOST_D1FIFO_DMA (0x6000) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 126 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 127 | #define USB_HOST_BUF2FIFO (0) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 128 | #define USB_HOST_FIFO2BUF (1) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 129 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 130 | #define USB_HOST_DRV_DETACHED (0x0000) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 131 | #define USB_HOST_DRV_ATTACHED (0x0001) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 132 | #define USB_HOST_DRV_GET_DEVICE_DESC_64 (0x0002) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 133 | #define USB_HOST_DRV_POWERED (0x0003) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 134 | #define USB_HOST_DRV_DEFAULT (0x0004) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 135 | #define USB_HOST_DRV_SET_ADDRESS (0x0005) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 136 | #define USB_HOST_DRV_ADDRESSED (0x0006) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 137 | #define USB_HOST_DRV_GET_DEVICE_DESC_18 (0x0007) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 138 | #define USB_HOST_DRV_GET_CONGIG_DESC_9 (0x0008) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 139 | #define USB_HOST_DRV_GET_CONGIG_DESC (0x0009) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 140 | #define USB_HOST_DRV_SET_CONFIG (0x000a) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 141 | #define USB_HOST_DRV_CONFIGURED (0x000b) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 142 | #define USB_HOST_DRV_SUSPEND (0x1000) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 143 | #define USB_HOST_DRV_NORES (0x0100) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 144 | #define USB_HOST_DRV_STALL (0x0200) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 145 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 146 | #define USB_HOST_TESTMODE_FORCE (0x000du) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 147 | #define USB_HOST_TESTMODE_TESTPACKET (0x000cu) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 148 | #define USB_HOST_TESTMODE_SE0_NAK (0x000bu) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 149 | #define USB_HOST_TESTMODE_K (0x000au) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 150 | #define USB_HOST_TESTMODE_J (0x0009u) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 151 | #define USB_HOST_TESTMODE_NORMAL (0x0000u) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 152 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 153 | #define USB_HOST_DT_DEVICE (0x01) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 154 | #define USB_HOST_DT_CONFIGURATION (0x02) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 155 | #define USB_HOST_DT_STRING (0x03) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 156 | #define USB_HOST_DT_INTERFACE (0x04) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 157 | #define USB_HOST_DT_ENDPOINT (0x05) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 158 | #define USB_HOST_DT_DEVICE_QUALIFIER (0x06) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 159 | #define USB_HOST_DT_OTHER_SPEED_CONFIGURATION (0x07) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 160 | #define USB_HOST_DT_INTERFACE_POWER (0x08) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 161 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 162 | #define USB_HOST_IF_CLS_NOT (0x00) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 163 | #define USB_HOST_IF_CLS_AUDIO (0x01) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 164 | #define USB_HOST_IF_CLS_CDC_CTRL (0x02) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 165 | #define USB_HOST_IF_CLS_HID (0x03) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 166 | #define USB_HOST_IF_CLS_PHYSICAL (0x05) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 167 | #define USB_HOST_IF_CLS_IMAGE (0x06) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 168 | #define USB_HOST_IF_CLS_PRINTER (0x07) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 169 | #define USB_HOST_IF_CLS_MASS (0x08) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 170 | #define USB_HOST_IF_CLS_HUB (0x09) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 171 | #define USB_HOST_IF_CLS_CDC_DATA (0x0a) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 172 | #define USB_HOST_IF_CLS_CRAD (0x0b) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 173 | #define USB_HOST_IF_CLS_CONTENT (0x0d) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 174 | #define USB_HOST_IF_CLS_VIDEO (0x0e) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 175 | #define USB_HOST_IF_CLS_DIAG (0xdc) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 176 | #define USB_HOST_IF_CLS_WIRELESS (0xe0) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 177 | #define USB_HOST_IF_CLS_APL (0xfe) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 178 | #define USB_HOST_IF_CLS_VENDOR (0xff) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 179 | #define USB_HOST_IF_CLS_HELE (0xaa) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 180 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 181 | #define USB_HOST_EP_DIR_MASK (0x80) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 182 | #define USB_HOST_EP_OUT (0x00) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 183 | #define USB_HOST_EP_IN (0x80) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 184 | #define USB_HOST_EP_TYPE (0x03) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 185 | #define USB_HOST_EP_CNTRL (0x00) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 186 | #define USB_HOST_EP_ISO (0x01) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 187 | #define USB_HOST_EP_BULK (0x02) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 188 | #define USB_HOST_EP_INT (0x03) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 189 | #define USB_HOST_EP_NUM_MASK (0x0f) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 190 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 191 | #define USB_HOST_PIPE_IN (0) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 192 | #define USB_HOST_PIPE_OUT (1) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 193 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 194 | #define USB_END_POINT_ERROR (0xffff) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 195 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 196 | #define USB_HOST_REQ_GET_STATUS (0x0000) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 197 | #define USB_HOST_REQ_CLEAR_FEATURE (0x0100) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 198 | #define USB_HOST_REQ_RESERVED2 (0x0200) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 199 | #define USB_HOST_REQ_SET_FEATURE (0x0300) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 200 | #define USB_HOST_REQ_RESERVED4 (0x0400) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 201 | #define USB_HOST_REQ_SET_ADDRESS (0x0500) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 202 | #define USB_HOST_REQ_GET_DESCRIPTOR (0x0600) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 203 | #define USB_HOST_REQ_SET_DESCRIPTOR (0x0700) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 204 | #define USB_HOST_REQ_GET_CONFIGURATION (0x0800) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 205 | #define USB_HOST_REQ_SET_CONFIGURATION (0x0900) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 206 | #define USB_HOST_REQ_GET_INTERFACE (0x0a00) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 207 | #define USB_HOST_REQ_SET_INTERFACE (0x0b00) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 208 | #define USB_HOST_REQ_SYNCH_FRAME (0x0c00) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 209 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 210 | #define USB_HOST_REQTYPE_HOST_TO_DEVICE (0x0000) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 211 | #define USB_HOST_REQTYPE_DEVICE_TO_HOST (0x0080) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 212 | #define USB_HOST_REQTYPE_STANDARD (0x0020) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 213 | #define USB_HOST_REQTYPE_CLASS (0x0040) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 214 | #define USB_HOST_REQTYPE_VENDOR (0x0060) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 215 | #define USB_HOST_REQTYPE_DEVICE (0x0000) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 216 | #define USB_HOST_REQTYPE_INTERFACE (0x0001) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 217 | #define USB_HOST_REQTYPE_ENDPOINT (0x0002) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 218 | #define USB_HOST_REQTYPE_OTHER (0x0003) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 219 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 220 | #define USB_HOST_DESCTYPE_DEVICE (0x0100) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 221 | #define USB_HOST_DESCTYPE_CONFIGURATION (0x0200) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 222 | #define USB_HOST_DESCTYPE_STRING (0x0300) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 223 | #define USB_HOST_DESCTYPE_INTERFACE (0x0400) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 224 | #define USB_HOST_DESCTYPE_ENDPOINT (0x0500) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 225 | #define USB_HOST_DESCTYPE_DEVICE_QUALIFIER (0x0600) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 226 | #define USB_HOST_DESCTYPE_OTHER_SPEED_CONFIGURATION (0x0700) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 227 | #define USB_HOST_DESCTYPE_INTERFACE_POWER (0x0800) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 228 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 229 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 230 | /******************************************************************************* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 231 | Variable Externs |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 232 | *******************************************************************************/ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 233 | typedef struct |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 234 | { |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 235 | uint16_t pipe_number; |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 236 | uint16_t pipe_cfg; |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 237 | uint16_t pipe_buf; |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 238 | uint16_t pipe_max_pktsize; |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 239 | uint16_t pipe_cycle; |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 240 | uint16_t fifo_port; |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 241 | } USB_HOST_CFG_PIPETBL_t; |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 242 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 243 | typedef struct |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 244 | { |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 245 | uint32_t fifo; |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 246 | uint32_t buffer; |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 247 | uint32_t bytes; |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 248 | uint32_t dir; |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 249 | uint32_t size; |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 250 | } USB_HOST_DMA_t; |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 251 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 252 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 253 | /******************************************************************************* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 254 | Imported global variables and functions (from other files) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 255 | *******************************************************************************/ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 256 | uint16_t R_USB_api_host_init(uint16_t root, uint8_t int_level, uint16_t mode, uint16_t clockmode); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 257 | int32_t R_USB_api_host_enumeration(uint16_t root, uint16_t devadr); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 258 | int32_t R_USB_api_host_detach(uint16_t root); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 259 | int32_t R_USB_api_host_data_in(uint16_t root, uint16_t devadr, uint16_t Pipe, uint32_t Size, uint8_t *data_buf); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 260 | int32_t R_USB_api_host_data_in2(uint16_t root, uint16_t devadr, uint16_t Pipe, uint32_t Size, uint8_t *data_buf, uint32_t *bytes); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 261 | int32_t R_USB_api_host_data_out(uint16_t root, uint16_t devadr, uint16_t Pipe, uint32_t Size, uint8_t *data_buf); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 262 | int32_t R_USB_api_host_control_transfer(uint16_t root, uint16_t devadr, uint16_t Req, uint16_t Val, uint16_t Indx, uint16_t Len, uint8_t *Buf); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 263 | int32_t R_USB_api_host_set_endpoint(uint16_t root, uint16_t devadr, USB_HOST_CFG_PIPETBL_t *user_table, uint8_t *configdescriptor); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 264 | int32_t R_USB_api_host_clear_endpoint(uint16_t root, USB_HOST_CFG_PIPETBL_t *user_table); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 265 | int32_t R_USB_api_host_clear_endpoint_pipe(uint16_t root, uint16_t pipe_sel, USB_HOST_CFG_PIPETBL_t *user_table); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 266 | uint16_t R_USB_api_host_SetEndpointTable(uint16_t root, uint16_t devadr, USB_HOST_CFG_PIPETBL_t *user_table, uint8_t* Table); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 267 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 268 | int32_t R_USB_api_host_GetDeviceDescriptor(uint16_t root, uint16_t devadr, uint16_t size, uint8_t *buf); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 269 | int32_t R_USB_api_host_GetConfigDescriptor(uint16_t root, uint16_t devadr, uint16_t size, uint8_t *buf); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 270 | int32_t R_USB_api_host_SetConfig(uint16_t root, uint16_t devadr, uint16_t confignum); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 271 | int32_t R_USB_api_host_SetInterface(uint16_t root, uint16_t devadr, uint16_t interface_alt, uint16_t interface_index); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 272 | int32_t R_USB_api_host_ClearStall(uint16_t root, uint16_t devadr, uint16_t ep_dir); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 273 | uint16_t R_USB_api_host_GetUsbDeviceState(uint16_t root); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 274 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 275 | void R_USB_api_host_elt_clocksel(uint16_t clockmode); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 276 | void R_USB_api_host_elt_4_4(uint16_t root); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 277 | void R_USB_api_host_elt_4_5(uint16_t root); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 278 | void R_USB_api_host_elt_4_6(uint16_t root); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 279 | void R_USB_api_host_elt_4_7(uint16_t root); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 280 | void R_USB_api_host_elt_4_8(uint16_t root); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 281 | void R_USB_api_host_elt_4_9(uint16_t root); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 282 | void R_USB_api_host_elt_get_desc(uint16_t root); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 283 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 284 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 285 | /******************************************************************************* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 286 | Includes <System Includes> , "Project Includes" |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 287 | *******************************************************************************/ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 288 | #include "usb0_host_api.h" |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 289 | #include "usb1_host_api.h" |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 290 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 291 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 292 | /******************************************************************************* |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 293 | Imported global variables and functions (from other files) |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 294 | *******************************************************************************/ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 295 | #ifdef USB0_HOST_API_H |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 296 | uint16_t Userdef_USB_usb0_host_d0fifo_dmaintid(void); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 297 | uint16_t Userdef_USB_usb0_host_d1fifo_dmaintid(void); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 298 | void Userdef_USB_usb0_host_attach(void); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 299 | void Userdef_USB_usb0_host_detach(void); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 300 | void Userdef_USB_usb0_host_delay_1ms(void); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 301 | void Userdef_USB_usb0_host_delay_xms(uint32_t msec); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 302 | void Userdef_USB_usb0_host_delay_10us(uint32_t usec); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 303 | void Userdef_USB_usb0_host_delay_500ns(void); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 304 | void Userdef_USB_usb0_host_start_dma(USB_HOST_DMA_t * dma, uint16_t dfacc); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 305 | uint32_t Userdef_USB_usb0_host_stop_dma0(void); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 306 | uint32_t Userdef_USB_usb0_host_stop_dma1(void); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 307 | void Userdef_USB_usb0_host_notice(const char * format); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 308 | void Userdef_USB_usb0_host_user_rdy(const char * format, uint16_t data); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 309 | #endif |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 310 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 311 | #ifdef USB1_HOST_API_H |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 312 | uint16_t Userdef_USB_usb1_host_d0fifo_dmaintid(void); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 313 | uint16_t Userdef_USB_usb1_host_d1fifo_dmaintid(void); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 314 | void Userdef_USB_usb1_host_attach(void); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 315 | void Userdef_USB_usb1_host_detach(void); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 316 | void Userdef_USB_usb1_host_delay_1ms(void); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 317 | void Userdef_USB_usb1_host_delay_xms(uint32_t msec); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 318 | void Userdef_USB_usb1_host_delay_10us(uint32_t usec); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 319 | void Userdef_USB_usb1_host_delay_500ns(void); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 320 | void Userdef_USB_usb1_host_start_dma(USB_HOST_DMA_t * dma, uint16_t dfacc); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 321 | uint32_t Userdef_USB_usb1_host_stop_dma0(void); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 322 | uint32_t Userdef_USB_usb1_host_stop_dma1(void); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 323 | void Userdef_USB_usb1_host_notice(const char * format); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 324 | void Userdef_USB_usb1_host_user_rdy(const char * format, uint16_t data); |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 325 | #endif |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 326 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 327 | #endif /* USB_HOST_API_H */ |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 328 | |
frq08711@LMECWL0871.LME.ST.COM | 1:ab240722d7ef | 329 | /* End of File */ |