Final version.

Dependencies:   F746_GUI F746_SAI_IO UIT_FFT_Real

Fork of F746_Spectrogram by 不韋 呂

Committer:
MikamiUitOpen
Date:
Sun Oct 02 10:51:10 2016 +0000
Revision:
4:c1beacfc42c7
5

Who changed what in which revision?

UserRevisionLine numberNew contents of line
MikamiUitOpen 4:c1beacfc42c7 1 /* mbed Microcontroller Library
MikamiUitOpen 4:c1beacfc42c7 2 * Copyright (c) 2006-2013 ARM Limited
MikamiUitOpen 4:c1beacfc42c7 3 *
MikamiUitOpen 4:c1beacfc42c7 4 * Licensed under the Apache License, Version 2.0 (the "License");
MikamiUitOpen 4:c1beacfc42c7 5 * you may not use this file except in compliance with the License.
MikamiUitOpen 4:c1beacfc42c7 6 * You may obtain a copy of the License at
MikamiUitOpen 4:c1beacfc42c7 7 *
MikamiUitOpen 4:c1beacfc42c7 8 * http://www.apache.org/licenses/LICENSE-2.0
MikamiUitOpen 4:c1beacfc42c7 9 *
MikamiUitOpen 4:c1beacfc42c7 10 * Unless required by applicable law or agreed to in writing, software
MikamiUitOpen 4:c1beacfc42c7 11 * distributed under the License is distributed on an "AS IS" BASIS,
MikamiUitOpen 4:c1beacfc42c7 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
MikamiUitOpen 4:c1beacfc42c7 13 * See the License for the specific language governing permissions and
MikamiUitOpen 4:c1beacfc42c7 14 * limitations under the License.
MikamiUitOpen 4:c1beacfc42c7 15 */
MikamiUitOpen 4:c1beacfc42c7 16 #ifndef MBED_INTERFACE_H
MikamiUitOpen 4:c1beacfc42c7 17 #define MBED_INTERFACE_H
MikamiUitOpen 4:c1beacfc42c7 18
MikamiUitOpen 4:c1beacfc42c7 19 #include "device.h"
MikamiUitOpen 4:c1beacfc42c7 20
MikamiUitOpen 4:c1beacfc42c7 21 /* Mbed interface mac address
MikamiUitOpen 4:c1beacfc42c7 22 * if MBED_MAC_ADD_x are zero, interface uid sets mac address,
MikamiUitOpen 4:c1beacfc42c7 23 * otherwise MAC_ADD_x are used.
MikamiUitOpen 4:c1beacfc42c7 24 */
MikamiUitOpen 4:c1beacfc42c7 25 #define MBED_MAC_ADDR_INTERFACE 0x00
MikamiUitOpen 4:c1beacfc42c7 26 #define MBED_MAC_ADDR_0 MBED_MAC_ADDR_INTERFACE
MikamiUitOpen 4:c1beacfc42c7 27 #define MBED_MAC_ADDR_1 MBED_MAC_ADDR_INTERFACE
MikamiUitOpen 4:c1beacfc42c7 28 #define MBED_MAC_ADDR_2 MBED_MAC_ADDR_INTERFACE
MikamiUitOpen 4:c1beacfc42c7 29 #define MBED_MAC_ADDR_3 MBED_MAC_ADDR_INTERFACE
MikamiUitOpen 4:c1beacfc42c7 30 #define MBED_MAC_ADDR_4 MBED_MAC_ADDR_INTERFACE
MikamiUitOpen 4:c1beacfc42c7 31 #define MBED_MAC_ADDR_5 MBED_MAC_ADDR_INTERFACE
MikamiUitOpen 4:c1beacfc42c7 32 #define MBED_MAC_ADDRESS_SUM (MBED_MAC_ADDR_0 | MBED_MAC_ADDR_1 | MBED_MAC_ADDR_2 | MBED_MAC_ADDR_3 | MBED_MAC_ADDR_4 | MBED_MAC_ADDR_5)
MikamiUitOpen 4:c1beacfc42c7 33
MikamiUitOpen 4:c1beacfc42c7 34 #ifdef __cplusplus
MikamiUitOpen 4:c1beacfc42c7 35 extern "C" {
MikamiUitOpen 4:c1beacfc42c7 36 #endif
MikamiUitOpen 4:c1beacfc42c7 37
MikamiUitOpen 4:c1beacfc42c7 38 #if DEVICE_SEMIHOST
MikamiUitOpen 4:c1beacfc42c7 39
MikamiUitOpen 4:c1beacfc42c7 40 /** Functions to control the mbed interface
MikamiUitOpen 4:c1beacfc42c7 41 *
MikamiUitOpen 4:c1beacfc42c7 42 * mbed Microcontrollers have a built-in interface to provide functionality such as
MikamiUitOpen 4:c1beacfc42c7 43 * drag-n-drop download, reset, serial-over-usb, and access to the mbed local file
MikamiUitOpen 4:c1beacfc42c7 44 * system. These functions provide means to control the interface suing semihost
MikamiUitOpen 4:c1beacfc42c7 45 * calls it supports.
MikamiUitOpen 4:c1beacfc42c7 46 */
MikamiUitOpen 4:c1beacfc42c7 47
MikamiUitOpen 4:c1beacfc42c7 48 /** Determine whether the mbed interface is connected, based on whether debug is enabled
MikamiUitOpen 4:c1beacfc42c7 49 *
MikamiUitOpen 4:c1beacfc42c7 50 * @returns
MikamiUitOpen 4:c1beacfc42c7 51 * 1 if interface is connected,
MikamiUitOpen 4:c1beacfc42c7 52 * 0 otherwise
MikamiUitOpen 4:c1beacfc42c7 53 */
MikamiUitOpen 4:c1beacfc42c7 54 int mbed_interface_connected(void);
MikamiUitOpen 4:c1beacfc42c7 55
MikamiUitOpen 4:c1beacfc42c7 56 /** Instruct the mbed interface to reset, as if the reset button had been pressed
MikamiUitOpen 4:c1beacfc42c7 57 *
MikamiUitOpen 4:c1beacfc42c7 58 * @returns
MikamiUitOpen 4:c1beacfc42c7 59 * 1 if successful,
MikamiUitOpen 4:c1beacfc42c7 60 * 0 otherwise (e.g. interface not present)
MikamiUitOpen 4:c1beacfc42c7 61 */
MikamiUitOpen 4:c1beacfc42c7 62 int mbed_interface_reset(void);
MikamiUitOpen 4:c1beacfc42c7 63
MikamiUitOpen 4:c1beacfc42c7 64 /** This will disconnect the debug aspect of the interface, so semihosting will be disabled.
MikamiUitOpen 4:c1beacfc42c7 65 * The interface will still support the USB serial aspect
MikamiUitOpen 4:c1beacfc42c7 66 *
MikamiUitOpen 4:c1beacfc42c7 67 * @returns
MikamiUitOpen 4:c1beacfc42c7 68 * 0 if successful,
MikamiUitOpen 4:c1beacfc42c7 69 * -1 otherwise (e.g. interface not present)
MikamiUitOpen 4:c1beacfc42c7 70 */
MikamiUitOpen 4:c1beacfc42c7 71 int mbed_interface_disconnect(void);
MikamiUitOpen 4:c1beacfc42c7 72
MikamiUitOpen 4:c1beacfc42c7 73 /** This will disconnect the debug aspect of the interface, and if the USB cable is not
MikamiUitOpen 4:c1beacfc42c7 74 * connected, also power down the interface. If the USB cable is connected, the interface
MikamiUitOpen 4:c1beacfc42c7 75 * will remain powered up and visible to the host
MikamiUitOpen 4:c1beacfc42c7 76 *
MikamiUitOpen 4:c1beacfc42c7 77 * @returns
MikamiUitOpen 4:c1beacfc42c7 78 * 0 if successful,
MikamiUitOpen 4:c1beacfc42c7 79 * -1 otherwise (e.g. interface not present)
MikamiUitOpen 4:c1beacfc42c7 80 */
MikamiUitOpen 4:c1beacfc42c7 81 int mbed_interface_powerdown(void);
MikamiUitOpen 4:c1beacfc42c7 82
MikamiUitOpen 4:c1beacfc42c7 83 /** This returns a string containing the 32-character UID of the mbed interface
MikamiUitOpen 4:c1beacfc42c7 84 * This is a weak function that can be overwritten if required
MikamiUitOpen 4:c1beacfc42c7 85 *
MikamiUitOpen 4:c1beacfc42c7 86 * @param uid A 33-byte array to write the null terminated 32-byte string
MikamiUitOpen 4:c1beacfc42c7 87 *
MikamiUitOpen 4:c1beacfc42c7 88 * @returns
MikamiUitOpen 4:c1beacfc42c7 89 * 0 if successful,
MikamiUitOpen 4:c1beacfc42c7 90 * -1 otherwise (e.g. interface not present)
MikamiUitOpen 4:c1beacfc42c7 91 */
MikamiUitOpen 4:c1beacfc42c7 92 int mbed_interface_uid(char *uid);
MikamiUitOpen 4:c1beacfc42c7 93
MikamiUitOpen 4:c1beacfc42c7 94 #endif
MikamiUitOpen 4:c1beacfc42c7 95
MikamiUitOpen 4:c1beacfc42c7 96 /** This returns a unique 6-byte MAC address, based on the interface UID
MikamiUitOpen 4:c1beacfc42c7 97 * If the interface is not present, it returns a default fixed MAC address (00:02:F7:F0:00:00)
MikamiUitOpen 4:c1beacfc42c7 98 *
MikamiUitOpen 4:c1beacfc42c7 99 * This is a weak function that can be overwritten if you want to provide your own mechanism to
MikamiUitOpen 4:c1beacfc42c7 100 * provide a MAC address.
MikamiUitOpen 4:c1beacfc42c7 101 *
MikamiUitOpen 4:c1beacfc42c7 102 * @param mac A 6-byte array to write the MAC address
MikamiUitOpen 4:c1beacfc42c7 103 */
MikamiUitOpen 4:c1beacfc42c7 104 void mbed_mac_address(char *mac);
MikamiUitOpen 4:c1beacfc42c7 105
MikamiUitOpen 4:c1beacfc42c7 106 /** Cause the mbed to flash the BLOD (Blue LEDs Of Death) sequence
MikamiUitOpen 4:c1beacfc42c7 107 */
MikamiUitOpen 4:c1beacfc42c7 108 void mbed_die(void);
MikamiUitOpen 4:c1beacfc42c7 109
MikamiUitOpen 4:c1beacfc42c7 110 #ifdef __cplusplus
MikamiUitOpen 4:c1beacfc42c7 111 }
MikamiUitOpen 4:c1beacfc42c7 112 #endif
MikamiUitOpen 4:c1beacfc42c7 113
MikamiUitOpen 4:c1beacfc42c7 114 #endif