I'm trying to port GRBL 1.1 to the STM32F746 chip. Tell me the solution, thanks.

Committer:
Sergunb
Date:
Mon Sep 04 12:04:13 2017 +0000
Revision:
0:8f0d870509fe
Initial commit

Who changed what in which revision?

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