serial_downloader.c
来自「freescale atk source code」· C语言 代码 · 共 94 行
C
94 行
/*================================================================================================== Module Name: SerialDownloader.c General Description: Serial Downloader for USB and UART ====================================================================================================Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved.This file contains copyrighted material. Use of this file isrestricted by the provisions of a Freescale Software LicenseAgreement, which has either been electronically accepted byyou or has been expressly executed between the parties. Revision History:==================================================================================================== INCLUDE FILES==================================================================================================*/#include "su_basictypes.h"#include "usb_common.h"#include "usb_ipl_al_extern.h"#include "usb_tl_al_extern.h"#include "serial_downloader.h"#include "bl_transreceiver.h"/*================================================================================================== GLOBAL VARIABLES==================================================================================================*//*================================================================================================== LOCAL CONSTANTS==================================================================================================*//*================================================================================================= GLOBAL FUNCTION PROTOTYPES==================================================================================================*//*================================================================================================== LOCAL VARIABLES==================================================================================================*//*================================================================================================== LOCAL MACROS==================================================================================================*//*================================================================================================== GLOBAL FUNCTIONS==================================================================================================*//*==================================================================================================FUNCTION: serial_downloader_usbDESCRIPTION: Initialize the USB and starts the parser ARGUMENTS PASSED: None RETURN VALUE: None PRE-CONDITIONS: USB path is being followed. POST-CONDITIONS: NoneIMPORTANT NOTES: Never returns==================================================================================================*/void serial_downloader_usb(void){ usb_state_t state; /* Transfer Layer Initialisation */ tl_init(); /* Get the state of the USB */ state = tl_get_state(); /* Enumeration the USB Device. */ while( state != USB_DEV_CONFIGURED_STATE ) { /* enumeration of usb */ tl_configure(); /* Get the state of the USB */ state = tl_get_state(); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?