UVic Assistive Technology Lab / Mbed 2 deprecated DSLR_Camera_Gimbal

Dependencies:   mbed ros_lib_kinetic

Committer:
group-UVic-Assistive-Technolog
Date:
Wed Jan 31 05:24:12 2018 +0000
Revision:
0:3a767f41cf04
Initial commit

Who changed what in which revision?

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