Programme d'utilisation des AX12 avec rajout de l'MX12

Fork of test_carteAToutFaire_PR by CRAC Team

Committer:
R66Y
Date:
Sat May 20 15:23:58 2017 +0000
Revision:
3:1bb26049bdd1
Parent:
1:f3f702086a30
Programme de contr?le des AX12 avec rajout de l'MX12;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ClementBreteau 1:f3f702086a30 1 /* Title: mbed_interface
ClementBreteau 1:f3f702086a30 2 * Functions to control the mbed interface
ClementBreteau 1:f3f702086a30 3 *
ClementBreteau 1:f3f702086a30 4 * mbed Microcontrollers have a built-in interface to provide functionality such as
ClementBreteau 1:f3f702086a30 5 * drag-n-drop download, reset, serial-over-usb, and access to the mbed local file
ClementBreteau 1:f3f702086a30 6 * system. These functions provide means to control the interface suing semihost
ClementBreteau 1:f3f702086a30 7 * calls it supports.
ClementBreteau 1:f3f702086a30 8 */
ClementBreteau 1:f3f702086a30 9
ClementBreteau 1:f3f702086a30 10 /* mbed Microcontroller Library - mbed_interface
ClementBreteau 1:f3f702086a30 11 * Copyright (c) 2009-2011 ARM Limited. All rights reserved.
ClementBreteau 1:f3f702086a30 12 */
ClementBreteau 1:f3f702086a30 13
ClementBreteau 1:f3f702086a30 14 #ifndef MBED_INTERFACE_H
ClementBreteau 1:f3f702086a30 15 #define MBED_INTERFACE_H
ClementBreteau 1:f3f702086a30 16
ClementBreteau 1:f3f702086a30 17 #ifdef __cplusplus
ClementBreteau 1:f3f702086a30 18 extern "C" {
ClementBreteau 1:f3f702086a30 19 #endif
ClementBreteau 1:f3f702086a30 20
ClementBreteau 1:f3f702086a30 21 /* Function: mbed_interface_connected
ClementBreteau 1:f3f702086a30 22 * Determine whether the mbed interface is connected, based on whether debug is enabled
ClementBreteau 1:f3f702086a30 23 *
ClementBreteau 1:f3f702086a30 24 * Variables:
ClementBreteau 1:f3f702086a30 25 * returns - 1 if interface is connected, else 0
ClementBreteau 1:f3f702086a30 26 */
ClementBreteau 1:f3f702086a30 27 int mbed_interface_connected(void);
ClementBreteau 1:f3f702086a30 28
ClementBreteau 1:f3f702086a30 29 /* Function: mbed_interface_reset
ClementBreteau 1:f3f702086a30 30 * Instruct the mbed interface to reset, as if the reset button had been pressed
ClementBreteau 1:f3f702086a30 31 *
ClementBreteau 1:f3f702086a30 32 * Variables:
ClementBreteau 1:f3f702086a30 33 * returns - 1 if successful, else 0 (e.g. interface not present)
ClementBreteau 1:f3f702086a30 34 */
ClementBreteau 1:f3f702086a30 35 int mbed_interface_reset(void);
ClementBreteau 1:f3f702086a30 36
ClementBreteau 1:f3f702086a30 37 /* Function: mbed_interface_disconnect
ClementBreteau 1:f3f702086a30 38 * This will disconnect the debug aspect of the interface, so semihosting will be disabled.
ClementBreteau 1:f3f702086a30 39 * The interface will still support the USB serial aspect
ClementBreteau 1:f3f702086a30 40 *
ClementBreteau 1:f3f702086a30 41 * Variables:
ClementBreteau 1:f3f702086a30 42 * returns - 0 if successful, else -1 (e.g. interface not present)
ClementBreteau 1:f3f702086a30 43 */
ClementBreteau 1:f3f702086a30 44 int mbed_interface_disconnect(void);
ClementBreteau 1:f3f702086a30 45
ClementBreteau 1:f3f702086a30 46 /* Function: mbed_interface_powerdown
ClementBreteau 1:f3f702086a30 47 * This will disconnect the debug aspect of the interface, and if the USB cable is not
ClementBreteau 1:f3f702086a30 48 * connected, also power down the interface. If the USB cable is connected, the interface
ClementBreteau 1:f3f702086a30 49 * will remain powered up and visible to the host
ClementBreteau 1:f3f702086a30 50 *
ClementBreteau 1:f3f702086a30 51 * Variables:
ClementBreteau 1:f3f702086a30 52 * returns - 0 if successful, else -1 (e.g. interface not present)
ClementBreteau 1:f3f702086a30 53 */
ClementBreteau 1:f3f702086a30 54 int mbed_interface_powerdown(void);
ClementBreteau 1:f3f702086a30 55
ClementBreteau 1:f3f702086a30 56 /* Function: mbed_interface_uid
ClementBreteau 1:f3f702086a30 57 * This returns a string containing the 32-character UID of the mbed interface
ClementBreteau 1:f3f702086a30 58 *
ClementBreteau 1:f3f702086a30 59 * This is a weak function that can be overwritten if required
ClementBreteau 1:f3f702086a30 60 *
ClementBreteau 1:f3f702086a30 61 * Variables:
ClementBreteau 1:f3f702086a30 62 * uid - A 33-byte array to write the null terminated 32-byte string
ClementBreteau 1:f3f702086a30 63 * returns - 0 if successful, else -1 (e.g. interface not present)
ClementBreteau 1:f3f702086a30 64 */
ClementBreteau 1:f3f702086a30 65 int mbed_interface_uid(char *uid);
ClementBreteau 1:f3f702086a30 66
ClementBreteau 1:f3f702086a30 67 /* Function: mbed_mac_address
ClementBreteau 1:f3f702086a30 68 * This returns a unique 6-byte MAC address, based on the interface UID
ClementBreteau 1:f3f702086a30 69 *
ClementBreteau 1:f3f702086a30 70 * If the interface is not present, it returns a default fixed MAC address (00:02:F7:F0:00:00)
ClementBreteau 1:f3f702086a30 71 *
ClementBreteau 1:f3f702086a30 72 * This is a weak function that can be overwritten if you want to provide your own mechanism to
ClementBreteau 1:f3f702086a30 73 * provide a MAC address.
ClementBreteau 1:f3f702086a30 74
ClementBreteau 1:f3f702086a30 75 * Variables:
ClementBreteau 1:f3f702086a30 76 * mac - A 6-byte array to write the MAC address
ClementBreteau 1:f3f702086a30 77 */
ClementBreteau 1:f3f702086a30 78 void mbed_mac_address(char *mac);
ClementBreteau 1:f3f702086a30 79
ClementBreteau 1:f3f702086a30 80 /* Function: mbed_die
ClementBreteau 1:f3f702086a30 81 * Cause the mbed to flash the BLOD LED sequence
ClementBreteau 1:f3f702086a30 82 */
ClementBreteau 1:f3f702086a30 83 void mbed_die(void);
ClementBreteau 1:f3f702086a30 84
ClementBreteau 1:f3f702086a30 85 #ifdef __cplusplus
ClementBreteau 1:f3f702086a30 86 }
ClementBreteau 1:f3f702086a30 87 #endif
ClementBreteau 1:f3f702086a30 88
ClementBreteau 1:f3f702086a30 89 #endif