Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.h
00001 /** 00002 * @file main.h 00003 * @brief 00004 * 00005 * DAPLink Interface Firmware 00006 * Copyright (c) 2009-2019, ARM Limited, All Rights Reserved 00007 * SPDX-License-Identifier: Apache-2.0 00008 * 00009 * Licensed under the Apache License, Version 2.0 (the "License"); you may 00010 * not use this file except in compliance with the License. 00011 * You may obtain a copy of the License at 00012 * 00013 * http://www.apache.org/licenses/LICENSE-2.0 00014 * 00015 * Unless required by applicable law or agreed to in writing, software 00016 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 00017 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00018 * See the License for the specific language governing permissions and 00019 * limitations under the License. 00020 */ 00021 00022 #ifndef MAIN_H 00023 #define MAIN_H 00024 00025 #include <stdint.h> 00026 00027 /** 00028 * @enum main_usb_busy_t 00029 * @brief Defines the filtered activity of the USB connection 00030 */ 00031 typedef enum { 00032 MAIN_USB_IDLE, /*!< MAIN_USB_IDLE value means no bus activity */ 00033 MAIN_USB_ACTIVE /*!< MAIN_USB_ACTIVE value means MSC transfers are occuring */ 00034 } main_usb_busy_t; 00035 00036 /** 00037 * @enum main_usb_connect_t 00038 * @brief State the USB connection can be in 00039 */ 00040 typedef enum { 00041 MAIN_USB_DISCONNECTED, /*!< MAIN_USB_DISCONNECTED state for a USB */ 00042 MAIN_USB_CONNECTING, /*!< MAIN_USB_CONNECTING state for a USB */ 00043 MAIN_USB_CONNECTED, /*!< MAIN_USB_CONNECTED state for a USB */ 00044 MAIN_USB_CHECK_CONNECTED, /*!< MAIN_USB_CHECK_CONNECTED state for a USB */ 00045 MAIN_USB_DISCONNECTING /*!< MAIN_USB_DISCONNECTING state for a USB */ 00046 } main_usb_connect_t; 00047 00048 /** 00049 * @enum main_led_state_t 00050 * @brief Statest the USB connection can be in 00051 */ 00052 typedef enum { 00053 MAIN_LED_DEF = 0, 00054 MAIN_LED_FLASH, 00055 MAIN_LED_FLASH_PERMANENT 00056 } main_led_state_t; 00057 00058 #ifdef __cplusplus 00059 extern "C" { 00060 #endif 00061 00062 /** 00063 * Allows other parts of the program to request the device to eject physical media 00064 * @param none 00065 * @return none 00066 */ 00067 void main_msc_disconnect_event(void); 00068 00069 /** 00070 * Delay the disconnect if there is one in progress 00071 * @param none 00072 * @return none 00073 */ 00074 void main_msc_delay_disconnect_event(void); 00075 00076 /** 00077 * Allows other parts of the program to request the device to immediately eject physical media 00078 * @param none 00079 * @return none 00080 */ 00081 void main_force_msc_disconnect_event(void); 00082 00083 /** 00084 * Allows other parts of the program to request a LED to toggle state 00085 * @param permanent decides if the led should remain on or flash 00086 * @return none 00087 */ 00088 void main_blink_msc_led(main_led_state_t permanent); 00089 00090 #ifdef __cplusplus 00091 } 00092 #endif 00093 00094 #endif
Generated on Tue Jul 12 2022 15:37:20 by
1.7.2