code petit robot pour homologation

Fork of CRAC-Strat_2017_V2 by CRAC Team

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?

UserRevisionLine numberNew contents of line
antbig 0:ad97421fb1fb 1 /* mbed Microcontroller Library - DigitalIn
antbig 0:ad97421fb1fb 2 * Copyright (c) 2007-2009 ARM Limited. All rights reserved.
antbig 0:ad97421fb1fb 3 */
antbig 0:ad97421fb1fb 4
antbig 0:ad97421fb1fb 5 #ifndef MBED_BUSIN_H
antbig 0:ad97421fb1fb 6 #define MBED_BUSIN_H
antbig 0:ad97421fb1fb 7
antbig 0:ad97421fb1fb 8 #include "platform.h"
antbig 0:ad97421fb1fb 9 #include "PinNames.h"
antbig 0:ad97421fb1fb 10 #include "PeripheralNames.h"
antbig 0:ad97421fb1fb 11 #include "Base.h"
antbig 0:ad97421fb1fb 12 #include "DigitalIn.h"
antbig 0:ad97421fb1fb 13
antbig 0:ad97421fb1fb 14 namespace mbed {
antbig 0:ad97421fb1fb 15
antbig 0:ad97421fb1fb 16 /* Class: BusIn
antbig 0:ad97421fb1fb 17 * A digital input bus, used for reading the state of a collection of pins
antbig 0:ad97421fb1fb 18 */
antbig 0:ad97421fb1fb 19 class BusIn : public Base {
antbig 0:ad97421fb1fb 20
antbig 0:ad97421fb1fb 21 public:
antbig 0:ad97421fb1fb 22
antbig 0:ad97421fb1fb 23 /* Group: Configuration Methods */
antbig 0:ad97421fb1fb 24
antbig 0:ad97421fb1fb 25 /* Constructor: BusIn
antbig 0:ad97421fb1fb 26 * Create an BusIn, connected to the specified pins
antbig 0:ad97421fb1fb 27 *
antbig 0:ad97421fb1fb 28 * Variables:
antbig 0:ad97421fb1fb 29 * p<n> - DigitalIn pin to connect to bus bit <n> (p5-p30, NC)
antbig 0:ad97421fb1fb 30 *
antbig 0:ad97421fb1fb 31 * Note:
antbig 0:ad97421fb1fb 32 * It is only required to specify as many pin variables as is required
antbig 0:ad97421fb1fb 33 * for the bus; the rest will default to NC (not connected)
antbig 0:ad97421fb1fb 34 */
antbig 0:ad97421fb1fb 35 BusIn(PinName p0, PinName p1 = NC, PinName p2 = NC, PinName p3 = NC,
antbig 0:ad97421fb1fb 36 PinName p4 = NC, PinName p5 = NC, PinName p6 = NC, PinName p7 = NC,
antbig 0:ad97421fb1fb 37 PinName p8 = NC, PinName p9 = NC, PinName p10 = NC, PinName p11 = NC,
antbig 0:ad97421fb1fb 38 PinName p12 = NC, PinName p13 = NC, PinName p14 = NC, PinName p15 = NC,
antbig 0:ad97421fb1fb 39 const char *name = NULL);
antbig 0:ad97421fb1fb 40
antbig 0:ad97421fb1fb 41 BusIn(PinName pins[16], const char *name = NULL);
antbig 0:ad97421fb1fb 42
antbig 0:ad97421fb1fb 43 virtual ~BusIn();
antbig 0:ad97421fb1fb 44
antbig 0:ad97421fb1fb 45 /* Group: Access Methods */
antbig 0:ad97421fb1fb 46
antbig 0:ad97421fb1fb 47 /* Function: read
antbig 0:ad97421fb1fb 48 * Read the value of the input bus
antbig 0:ad97421fb1fb 49 *
antbig 0:ad97421fb1fb 50 * Variables:
antbig 0:ad97421fb1fb 51 * returns - An integer with each bit corresponding to the value read from the associated DigitalIn pin
antbig 0:ad97421fb1fb 52 */
antbig 0:ad97421fb1fb 53 int read();
antbig 0:ad97421fb1fb 54
antbig 0:ad97421fb1fb 55 #ifdef MBED_OPERATORS
antbig 0:ad97421fb1fb 56 /* Group: Access Method Shorthand */
antbig 0:ad97421fb1fb 57
antbig 0:ad97421fb1fb 58 /* Function: operator int()
antbig 0:ad97421fb1fb 59 * A shorthand for <read>
antbig 0:ad97421fb1fb 60 */
antbig 0:ad97421fb1fb 61 operator int();
antbig 0:ad97421fb1fb 62 #endif
antbig 0:ad97421fb1fb 63
antbig 0:ad97421fb1fb 64 #ifdef MBED_RPC
antbig 0:ad97421fb1fb 65 virtual const struct rpc_method *get_rpc_methods();
antbig 0:ad97421fb1fb 66 static struct rpc_class *get_rpc_class();
antbig 0:ad97421fb1fb 67 #endif
antbig 0:ad97421fb1fb 68
antbig 0:ad97421fb1fb 69 protected:
antbig 0:ad97421fb1fb 70
antbig 0:ad97421fb1fb 71 DigitalIn* _pin[16];
antbig 0:ad97421fb1fb 72
antbig 0:ad97421fb1fb 73 #ifdef MBED_RPC
antbig 0:ad97421fb1fb 74 static void construct(const char *arguments, char *res);
antbig 0:ad97421fb1fb 75 #endif
antbig 0:ad97421fb1fb 76
antbig 0:ad97421fb1fb 77 };
antbig 0:ad97421fb1fb 78
antbig 0:ad97421fb1fb 79 } // namespace mbed
antbig 0:ad97421fb1fb 80
antbig 0:ad97421fb1fb 81 #endif
antbig 0:ad97421fb1fb 82