USB Mouse (relative) example for mbed NXP LPC11U24 beta
USB_HID_STACK/USBBusInterface.h@1:e089be2a6aa1, 2011-11-09 (annotated)
- Committer:
- chris
- Date:
- Wed Nov 09 15:55:10 2011 +0000
- Revision:
- 1:e089be2a6aa1
- Parent:
- 0:163560051396
removed include for <math.h> that is already included by mbed.h
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
chris | 0:163560051396 | 1 | /* USBBusInterface.h */ |
chris | 0:163560051396 | 2 | /* USB Bus Interface */ |
chris | 0:163560051396 | 3 | /* Copyright (c) 2011 ARM Limited. All rights reserved. */ |
chris | 0:163560051396 | 4 | |
chris | 0:163560051396 | 5 | #ifndef _USB_BUS_INTERFACE_ |
chris | 0:163560051396 | 6 | #define _USB_BUS_INTERFACE_ |
chris | 0:163560051396 | 7 | |
chris | 0:163560051396 | 8 | #include "mbed.h" |
chris | 0:163560051396 | 9 | #include "USBEndpoints.h" |
chris | 0:163560051396 | 10 | |
chris | 0:163560051396 | 11 | /* Configuration */ |
chris | 0:163560051396 | 12 | bool USBBusInterface_init(void); |
chris | 0:163560051396 | 13 | void USBBusInterface_uninit(void); |
chris | 0:163560051396 | 14 | void USBBusInterface_connect(void); |
chris | 0:163560051396 | 15 | void USBBusInterface_disconnect(void); |
chris | 0:163560051396 | 16 | void USBBusInterface_configureDevice(void); |
chris | 0:163560051396 | 17 | void USBBusInterface_unconfigureDevice(void); |
chris | 0:163560051396 | 18 | void USBBusInterface_setAddress(uint8_t address); |
chris | 0:163560051396 | 19 | void USBBusInterface_remoteWakeup(void); |
chris | 0:163560051396 | 20 | |
chris | 0:163560051396 | 21 | /* Endpoint 0 */ |
chris | 0:163560051396 | 22 | void USBBusInterface_EP0setup(uint8_t *buffer); |
chris | 0:163560051396 | 23 | void USBBusInterface_EP0read(void); |
chris | 0:163560051396 | 24 | uint32_t USBBusInterface_EP0getReadResult(uint8_t *buffer); |
chris | 0:163560051396 | 25 | void USBBusInterface_EP0write(uint8_t *buffer, uint32_t size); |
chris | 0:163560051396 | 26 | void USBBusInterface_EP0getWriteResult(void); |
chris | 0:163560051396 | 27 | void USBBusInterface_EP0stall(void); |
chris | 0:163560051396 | 28 | |
chris | 0:163560051396 | 29 | /* Other endpoints */ |
chris | 0:163560051396 | 30 | EP_STATUS USBBusInterface_endpointRead(uint8_t endpoint, uint8_t *data, uint32_t maximumSize); |
chris | 0:163560051396 | 31 | EP_STATUS USBBusInterface_endpointReadResult(uint8_t endpoint, uint32_t *bytesRead); |
chris | 0:163560051396 | 32 | EP_STATUS USBBusInterface_endpointWrite(uint8_t endpoint, uint8_t *data, uint32_t size); |
chris | 0:163560051396 | 33 | EP_STATUS USBBusInterface_endpointWriteResult(uint8_t endpoint); |
chris | 0:163560051396 | 34 | void USBBusInterface_stallEndpoint(uint8_t endpoint); |
chris | 0:163560051396 | 35 | void USBBusInterface_unstallEndpoint(uint8_t endpoint); |
chris | 0:163560051396 | 36 | bool USBBusInterface_realiseEndpoint(uint8_t endpoint, uint32_t maxPacket, uint32_t options); |
chris | 0:163560051396 | 37 | bool USBBusInterface_getEndpointStallState(unsigned char endpoint); |
chris | 0:163560051396 | 38 | |
chris | 0:163560051396 | 39 | #endif |
chris | 0:163560051396 | 40 | |
chris | 0:163560051396 | 41 |