Arrow / Mbed OS DAPLink Reset
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.h Source File

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 #include <stdbool.h>
00027 
00028 // LED state
00029 typedef enum main_led_state {
00030     MAIN_LED_DEF = 0,
00031     MAIN_LED_FLASH,
00032     MAIN_LED_FLASH_PERMANENT
00033 } main_led_state_t;
00034 
00035 typedef enum main_usb_connect {
00036     USB_DISCONNECTED,
00037     USB_CONNECTING,
00038     USB_CONNECTED,
00039     USB_CHECK_CONNECTED,
00040     USB_CONFIGURED,
00041     USB_DISCONNECTING
00042 } main_usb_connect_t;
00043 
00044 #ifdef __cplusplus
00045 extern "C" {
00046 #endif
00047 
00048 void main_reset_target(uint8_t send_unique_id);
00049 void main_usb_set_test_mode(bool enabled);
00050 void main_powerdown_event(void);
00051 void main_disable_debug_event(void);
00052 void main_cdc_send_event(void);
00053 void main_msc_disconnect_event(void);
00054 void main_msc_delay_disconnect_event(void);
00055 void main_force_msc_disconnect_event(void);
00056 void main_blink_hid_led(main_led_state_t state);
00057 void main_blink_msc_led(main_led_state_t state);
00058 void main_blink_cdc_led(main_led_state_t state);
00059 
00060 #ifdef __cplusplus
00061 }
00062 #endif
00063 
00064 #endif