59
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
* e32\include\drivers\usbcshared.h
|
|
16 |
* Kernel side definitions for the USB Device driver stack (PIL + LDD).
|
|
17 |
*
|
|
18 |
*/
|
33
|
19 |
|
|
20 |
/**
|
|
21 |
@file usbotgperipheralcontrolif.h
|
|
22 |
@internalTechnology
|
|
23 |
*/
|
|
24 |
|
|
25 |
#ifndef USBOTGPERIPHERALCONTROLIF_H
|
|
26 |
#define USBOTGPERIPHERALCONTROLIF_H
|
|
27 |
|
|
28 |
#include <usb/usb_peripheral_shai.h> // For UsbShai::TUsbPeripheralEvent
|
|
29 |
|
|
30 |
/**
|
|
31 |
* This M-class specifies the observer interface that the OTG state
|
|
32 |
* machine implements to listen to events of the peripheral stack.
|
|
33 |
*/
|
|
34 |
NONSHARABLE_CLASS(MUsbOtgPeripheralObserverIf)
|
|
35 |
{
|
|
36 |
public:
|
|
37 |
/**
|
|
38 |
* Called by the peripheral stack to report a peripheral event to
|
|
39 |
* the OTG stack.
|
|
40 |
*
|
|
41 |
* @param aEvent An enumeration value specifying the type of event
|
|
42 |
* that has occurred
|
|
43 |
*/
|
|
44 |
virtual void NotifyPeripheralEvent(UsbShai::TUsbPeripheralEvent aEvent) = 0;
|
|
45 |
};
|
|
46 |
|
|
47 |
|
|
48 |
/**
|
|
49 |
* This M-class specifies the control interface that the OTG state
|
|
50 |
* machine uses to control the peripheral stack and register for
|
|
51 |
* peripheral events.
|
|
52 |
*/
|
|
53 |
NONSHARABLE_CLASS(MUsbOtgPeripheralControlIf)
|
|
54 |
{
|
|
55 |
public:
|
|
56 |
/**
|
|
57 |
* Called by the OTG state machine to enable the peripheral stack.
|
|
58 |
* When called, the peripheral stack must activate the controller
|
|
59 |
* and connect to the bus as soon as possible.
|
|
60 |
*/
|
|
61 |
virtual void EnablePeripheralStack() = 0;
|
|
62 |
|
|
63 |
/**
|
|
64 |
* Called by the OTG state machine to disable the peripheral
|
|
65 |
* stack. When called, the peripheral stack must immediately
|
|
66 |
* disconnect from the bus and deactivate the controller.
|
|
67 |
*/
|
|
68 |
virtual void DisablePeripheralStack() = 0;
|
|
69 |
|
|
70 |
/**
|
|
71 |
* Called by the OTG state machine to set the peripheral event
|
|
72 |
* observer.
|
|
73 |
*
|
|
74 |
* @param aObserver Pointer to the OTG Observer, or NULL when the
|
|
75 |
* OTG stack is being shutdown.
|
|
76 |
*/
|
|
77 |
virtual void SetOtgObserver(MUsbOtgPeripheralObserverIf* aObserver) = 0;
|
|
78 |
};
|
|
79 |
|
|
80 |
|
|
81 |
#endif // USBOTGPERIPHERALCONTROLIF_H
|