Subversion Repositories NaviCtrl

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 ingob 1
/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
2
* File Name          : usb_init.c
3
* Author             : MCD Application Team
4
* Date First Issued  : 10/27/2003 : V1.0
5
* Description        : Initialization routines & global variables
6
********************************************************************************
7
* History:
8
* 09/18/2006 : V3.0
9
* 09/01/2006 : V2.0
10
* 10/27/2003 : V1.0
11
********************************************************************************
12
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
13
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
14
* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
15
* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
16
* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
17
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
18
*******************************************************************************/
19
 
20
/* Includes ------------------------------------------------------------------*/
21
#include "usb_lib.h"
22
/* Private typedef -----------------------------------------------------------*/
23
/* Private define ------------------------------------------------------------*/
24
/* Private macro -------------------------------------------------------------*/
25
/* Private variables ---------------------------------------------------------*/
26
 
27
/*  The number of current endpoint, it will be used to specify an endpoint */
28
 u8     EPindex;
29
/*  The number of current device, it is an index to the Device_Table */
30
/* u8   Device_no; */
31
/*  Points to the DEVICE_INFO structure of current device */
32
/*  The purpose of this register is to speed up the execution */
33
DEVICE_INFO *pInformation;
34
/*  Points to the DEVICE_PROP structure of current device */
35
/*  The purpose of this register is to speed up the execution */
36
DEVICE_PROP *pProperty;
37
/*  Temporary save the state of Rx & Tx status. */
38
/*  Whenever the Rx or Tx state is changed, its value is saved */
39
/*  in this variable first and will be set to the EPRB or EPRA */
40
/*  at the end of interrupt process */
41
 u16    SaveState ;
42
 u16  wInterrupt_Mask;
43
 DEVICE_INFO    Device_Info;
44
 
45
USER_STANDARD_REQUESTS  *pUser_Standard_Requests;
46
/* Extern variables ----------------------------------------------------------*/
47
/* Private function prototypes -----------------------------------------------*/
48
/* Private functions ---------------------------------------------------------*/
49
 
50
/*******************************************************************************
51
* Function Name  : USB_Init
52
* Description    : USB system initialization
53
* Input          :
54
* Output         :
55
* Return         :
56
*******************************************************************************/
57
void USB_Init(void)
58
{
59
  pInformation = &Device_Info;
60
  pInformation->ControlState = 2;
61
  pProperty = &Device_Property;
62
  pUser_Standard_Requests = &User_Standard_Requests;
63
  /* Initialize devices one by one */
64
  pProperty->Init();
65
}
66
/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/