Mouse code for the MacroRat

Dependencies:   ITG3200 QEI

Committer:
sahilmgandhi
Date:
Sat Jun 03 00:22:44 2017 +0000
Revision:
46:b156ef445742
Parent:
18:6a4db94011d3
Final code for internal battlebot competition.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sahilmgandhi 18:6a4db94011d3 1 /* mbed Microcontroller Library
sahilmgandhi 18:6a4db94011d3 2 * Copyright (c) 2006-2013 ARM Limited
sahilmgandhi 18:6a4db94011d3 3 *
sahilmgandhi 18:6a4db94011d3 4 * Licensed under the Apache License, Version 2.0 (the "License");
sahilmgandhi 18:6a4db94011d3 5 * you may not use this file except in compliance with the License.
sahilmgandhi 18:6a4db94011d3 6 * You may obtain a copy of the License at
sahilmgandhi 18:6a4db94011d3 7 *
sahilmgandhi 18:6a4db94011d3 8 * http://www.apache.org/licenses/LICENSE-2.0
sahilmgandhi 18:6a4db94011d3 9 *
sahilmgandhi 18:6a4db94011d3 10 * Unless required by applicable law or agreed to in writing, software
sahilmgandhi 18:6a4db94011d3 11 * distributed under the License is distributed on an "AS IS" BASIS,
sahilmgandhi 18:6a4db94011d3 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
sahilmgandhi 18:6a4db94011d3 13 * See the License for the specific language governing permissions and
sahilmgandhi 18:6a4db94011d3 14 * limitations under the License.
sahilmgandhi 18:6a4db94011d3 15 */
sahilmgandhi 18:6a4db94011d3 16 #ifndef MBED_H
sahilmgandhi 18:6a4db94011d3 17 #define MBED_H
sahilmgandhi 18:6a4db94011d3 18
sahilmgandhi 18:6a4db94011d3 19 #define MBED_LIBRARY_VERSION 142
sahilmgandhi 18:6a4db94011d3 20
sahilmgandhi 18:6a4db94011d3 21 #if MBED_CONF_RTOS_PRESENT
sahilmgandhi 18:6a4db94011d3 22 // RTOS present, this is valid only for mbed OS 5
sahilmgandhi 18:6a4db94011d3 23 #define MBED_MAJOR_VERSION 5
sahilmgandhi 18:6a4db94011d3 24 #define MBED_MINOR_VERSION 4
sahilmgandhi 18:6a4db94011d3 25 #define MBED_PATCH_VERSION 5
sahilmgandhi 18:6a4db94011d3 26
sahilmgandhi 18:6a4db94011d3 27 #else
sahilmgandhi 18:6a4db94011d3 28 // mbed 2
sahilmgandhi 18:6a4db94011d3 29 #define MBED_MAJOR_VERSION 2
sahilmgandhi 18:6a4db94011d3 30 #define MBED_MINOR_VERSION 0
sahilmgandhi 18:6a4db94011d3 31 #define MBED_PATCH_VERSION MBED_LIBRARY_VERSION
sahilmgandhi 18:6a4db94011d3 32 #endif
sahilmgandhi 18:6a4db94011d3 33
sahilmgandhi 18:6a4db94011d3 34 #define MBED_ENCODE_VERSION(major, minor, patch) ((major)*10000 + (minor)*100 + (patch))
sahilmgandhi 18:6a4db94011d3 35
sahilmgandhi 18:6a4db94011d3 36 #define MBED_VERSION MBED_ENCODE_VERSION(MBED_MAJOR_VERSION, MBED_MINOR_VERSION, MBED_PATCH_VERSION)
sahilmgandhi 18:6a4db94011d3 37
sahilmgandhi 18:6a4db94011d3 38 #if MBED_CONF_RTOS_PRESENT
sahilmgandhi 18:6a4db94011d3 39 #include "rtos/rtos.h"
sahilmgandhi 18:6a4db94011d3 40 #endif
sahilmgandhi 18:6a4db94011d3 41
sahilmgandhi 18:6a4db94011d3 42 #if MBED_CONF_NSAPI_PRESENT
sahilmgandhi 18:6a4db94011d3 43 #include "netsocket/nsapi.h"
sahilmgandhi 18:6a4db94011d3 44 #endif
sahilmgandhi 18:6a4db94011d3 45
sahilmgandhi 18:6a4db94011d3 46 #if MBED_CONF_EVENTS_PRESENT
sahilmgandhi 18:6a4db94011d3 47 #include "events/mbed_events.h"
sahilmgandhi 18:6a4db94011d3 48 #endif
sahilmgandhi 18:6a4db94011d3 49
sahilmgandhi 18:6a4db94011d3 50 #if MBED_CONF_FILESYSTEM_PRESENT
sahilmgandhi 18:6a4db94011d3 51 #include "filesystem/mbed_filesystem.h"
sahilmgandhi 18:6a4db94011d3 52 #endif
sahilmgandhi 18:6a4db94011d3 53
sahilmgandhi 18:6a4db94011d3 54 #include "platform/mbed_toolchain.h"
sahilmgandhi 18:6a4db94011d3 55 #include "platform/platform.h"
sahilmgandhi 18:6a4db94011d3 56 #include "platform/mbed_application.h"
sahilmgandhi 18:6a4db94011d3 57
sahilmgandhi 18:6a4db94011d3 58 // Useful C libraries
sahilmgandhi 18:6a4db94011d3 59 #include <math.h>
sahilmgandhi 18:6a4db94011d3 60 #include <time.h>
sahilmgandhi 18:6a4db94011d3 61
sahilmgandhi 18:6a4db94011d3 62 // mbed Debug libraries
sahilmgandhi 18:6a4db94011d3 63 #include "platform/mbed_error.h"
sahilmgandhi 18:6a4db94011d3 64 #include "platform/mbed_interface.h"
sahilmgandhi 18:6a4db94011d3 65 #include "platform/mbed_assert.h"
sahilmgandhi 18:6a4db94011d3 66
sahilmgandhi 18:6a4db94011d3 67 // mbed Peripheral components
sahilmgandhi 18:6a4db94011d3 68 #include "drivers/DigitalIn.h"
sahilmgandhi 18:6a4db94011d3 69 #include "drivers/DigitalOut.h"
sahilmgandhi 18:6a4db94011d3 70 #include "drivers/DigitalInOut.h"
sahilmgandhi 18:6a4db94011d3 71 #include "drivers/BusIn.h"
sahilmgandhi 18:6a4db94011d3 72 #include "drivers/BusOut.h"
sahilmgandhi 18:6a4db94011d3 73 #include "drivers/BusInOut.h"
sahilmgandhi 18:6a4db94011d3 74 #include "drivers/PortIn.h"
sahilmgandhi 18:6a4db94011d3 75 #include "drivers/PortInOut.h"
sahilmgandhi 18:6a4db94011d3 76 #include "drivers/PortOut.h"
sahilmgandhi 18:6a4db94011d3 77 #include "drivers/AnalogIn.h"
sahilmgandhi 18:6a4db94011d3 78 #include "drivers/AnalogOut.h"
sahilmgandhi 18:6a4db94011d3 79 #include "drivers/PwmOut.h"
sahilmgandhi 18:6a4db94011d3 80 #include "drivers/Serial.h"
sahilmgandhi 18:6a4db94011d3 81 #include "drivers/SPI.h"
sahilmgandhi 18:6a4db94011d3 82 #include "drivers/SPISlave.h"
sahilmgandhi 18:6a4db94011d3 83 #include "drivers/I2C.h"
sahilmgandhi 18:6a4db94011d3 84 #include "drivers/I2CSlave.h"
sahilmgandhi 18:6a4db94011d3 85 #include "drivers/Ethernet.h"
sahilmgandhi 18:6a4db94011d3 86 #include "drivers/CAN.h"
sahilmgandhi 18:6a4db94011d3 87 #include "drivers/RawSerial.h"
sahilmgandhi 18:6a4db94011d3 88 #include "drivers/FlashIAP.h"
sahilmgandhi 18:6a4db94011d3 89
sahilmgandhi 18:6a4db94011d3 90 // mbed Internal components
sahilmgandhi 18:6a4db94011d3 91 #include "drivers/Timer.h"
sahilmgandhi 18:6a4db94011d3 92 #include "drivers/Ticker.h"
sahilmgandhi 18:6a4db94011d3 93 #include "drivers/Timeout.h"
sahilmgandhi 18:6a4db94011d3 94 #include "drivers/LowPowerTimeout.h"
sahilmgandhi 18:6a4db94011d3 95 #include "drivers/LowPowerTicker.h"
sahilmgandhi 18:6a4db94011d3 96 #include "drivers/LowPowerTimer.h"
sahilmgandhi 18:6a4db94011d3 97 #include "drivers/LocalFileSystem.h"
sahilmgandhi 18:6a4db94011d3 98 #include "drivers/InterruptIn.h"
sahilmgandhi 18:6a4db94011d3 99 #include "platform/mbed_wait_api.h"
sahilmgandhi 18:6a4db94011d3 100 #include "hal/sleep_api.h"
sahilmgandhi 18:6a4db94011d3 101 #include "platform/mbed_sleep.h"
sahilmgandhi 18:6a4db94011d3 102 #include "platform/mbed_rtc_time.h"
sahilmgandhi 18:6a4db94011d3 103
sahilmgandhi 18:6a4db94011d3 104 // mbed Non-hardware components
sahilmgandhi 18:6a4db94011d3 105 #include "platform/Callback.h"
sahilmgandhi 18:6a4db94011d3 106 #include "platform/FunctionPointer.h"
sahilmgandhi 18:6a4db94011d3 107
sahilmgandhi 18:6a4db94011d3 108 using namespace mbed;
sahilmgandhi 18:6a4db94011d3 109 using namespace std;
sahilmgandhi 18:6a4db94011d3 110
sahilmgandhi 18:6a4db94011d3 111 #endif