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