My fork

Dependencies:   BLE_API nRF51822-bluetooth-mdw

Fork of microbit-dal by Lancaster University

Committer:
LancasterUniversity
Date:
Wed Jul 13 12:18:14 2016 +0100
Revision:
35:8ce23bc1af38
Parent:
1:8aa5cdb4ab67
Child:
37:b624ae5e94a5
Synchronized with git rev 732971e7
Author: James Devine
microbit-dal: Added events to MicroBitPin

Added rise, fall, pulse HI and LO events.

The pulse Hi and LO event timestamp given in the MicroBitEvent is the
duration for which the input was HI or LO for.

eventOn(int eventType) is used to configure the events generated
from the pin instance.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Jonathan Austin 1:8aa5cdb4ab67 1 # This file is no longer auto-generated to make the repository builds with GCC
Jonathan Austin 1:8aa5cdb4ab67 2 # and ARMCC no matter what.
Jonathan Austin 1:8aa5cdb4ab67 3
Jonathan Austin 1:8aa5cdb4ab67 4 cmake_minimum_required(VERSION 2.8.12)
Jonathan Austin 1:8aa5cdb4ab67 5
Jonathan Austin 1:8aa5cdb4ab67 6 enable_language(ASM)
Jonathan Austin 1:8aa5cdb4ab67 7
Jonathan Austin 1:8aa5cdb4ab67 8 set(YOTTA_AUTO_MICROBIT-DAL_CPP_FILES
Jonathan Austin 1:8aa5cdb4ab67 9 "core/MemberFunctionCallback.cpp"
Jonathan Austin 1:8aa5cdb4ab67 10 "core/MicroBitCompat.cpp"
Jonathan Austin 1:8aa5cdb4ab67 11 "core/MicroBitDevice.cpp"
Jonathan Austin 1:8aa5cdb4ab67 12 "core/MicroBitFiber.cpp"
Jonathan Austin 1:8aa5cdb4ab67 13 "core/MicroBitFont.cpp"
Jonathan Austin 1:8aa5cdb4ab67 14 "core/MicroBitHeapAllocator.cpp"
Jonathan Austin 1:8aa5cdb4ab67 15 "core/MicroBitListener.cpp"
Jonathan Austin 1:8aa5cdb4ab67 16 "core/MicroBitSystemTimer.cpp"
Jonathan Austin 1:8aa5cdb4ab67 17
Jonathan Austin 1:8aa5cdb4ab67 18 "types/ManagedString.cpp"
Jonathan Austin 1:8aa5cdb4ab67 19 "types/Matrix4.cpp"
Jonathan Austin 1:8aa5cdb4ab67 20 "types/MicroBitEvent.cpp"
Jonathan Austin 1:8aa5cdb4ab67 21 "types/MicroBitImage.cpp"
Jonathan Austin 1:8aa5cdb4ab67 22 "types/PacketBuffer.cpp"
Jonathan Austin 1:8aa5cdb4ab67 23 "types/RefCounted.cpp"
Jonathan Austin 1:8aa5cdb4ab67 24
Jonathan Austin 1:8aa5cdb4ab67 25 "drivers/DynamicPwm.cpp"
Jonathan Austin 1:8aa5cdb4ab67 26 "drivers/MicroBitAccelerometer.cpp"
Jonathan Austin 1:8aa5cdb4ab67 27 "drivers/MicroBitButton.cpp"
Jonathan Austin 1:8aa5cdb4ab67 28 "drivers/MicroBitCompass.cpp"
Jonathan Austin 1:8aa5cdb4ab67 29 "drivers/MicroBitCompassCalibrator.cpp"
Jonathan Austin 1:8aa5cdb4ab67 30 "drivers/MicroBitDisplay.cpp"
Jonathan Austin 1:8aa5cdb4ab67 31 "drivers/MicroBitI2C.cpp"
Jonathan Austin 1:8aa5cdb4ab67 32 "drivers/MicroBitIO.cpp"
Jonathan Austin 1:8aa5cdb4ab67 33 "drivers/MicroBitLightSensor.cpp"
Jonathan Austin 1:8aa5cdb4ab67 34 "drivers/MicroBitMessageBus.cpp"
Jonathan Austin 1:8aa5cdb4ab67 35 "drivers/MicroBitMultiButton.cpp"
Jonathan Austin 1:8aa5cdb4ab67 36 "drivers/MicroBitPin.cpp"
Jonathan Austin 1:8aa5cdb4ab67 37 "drivers/MicroBitRadio.cpp"
Jonathan Austin 1:8aa5cdb4ab67 38 "drivers/MicroBitRadioDatagram.cpp"
Jonathan Austin 1:8aa5cdb4ab67 39 "drivers/MicroBitRadioEvent.cpp"
Jonathan Austin 1:8aa5cdb4ab67 40 "drivers/MicroBitSerial.cpp"
Jonathan Austin 1:8aa5cdb4ab67 41 "drivers/MicroBitStorage.cpp"
Jonathan Austin 1:8aa5cdb4ab67 42 "drivers/MicroBitThermometer.cpp"
LancasterUniversity 35:8ce23bc1af38 43 "drivers/TimedInterruptIn.cpp"
Jonathan Austin 1:8aa5cdb4ab67 44
Jonathan Austin 1:8aa5cdb4ab67 45 "bluetooth/MicroBitAccelerometerService.cpp"
Jonathan Austin 1:8aa5cdb4ab67 46 "bluetooth/MicroBitBLEManager.cpp"
Jonathan Austin 1:8aa5cdb4ab67 47 "bluetooth/MicroBitButtonService.cpp"
Jonathan Austin 1:8aa5cdb4ab67 48 "bluetooth/MicroBitDFUService.cpp"
Jonathan Austin 1:8aa5cdb4ab67 49 "bluetooth/MicroBitEventService.cpp"
Jonathan Austin 1:8aa5cdb4ab67 50 "bluetooth/MicroBitIOPinService.cpp"
Jonathan Austin 1:8aa5cdb4ab67 51 "bluetooth/MicroBitLEDService.cpp"
Jonathan Austin 1:8aa5cdb4ab67 52 "bluetooth/MicroBitMagnetometerService.cpp"
Jonathan Austin 1:8aa5cdb4ab67 53 "bluetooth/MicroBitTemperatureService.cpp"
Jonathan Austin 1:8aa5cdb4ab67 54 "bluetooth/MicroBitUARTService.cpp"
Jonathan Austin 1:8aa5cdb4ab67 55 )
Jonathan Austin 1:8aa5cdb4ab67 56
Jonathan Austin 1:8aa5cdb4ab67 57 execute_process(WORKING_DIRECTORY "../../yotta_modules/${PROJECT_NAME}" COMMAND "git" "log" "--pretty=format:%h" "-n" "1" OUTPUT_VARIABLE git_hash)
Jonathan Austin 1:8aa5cdb4ab67 58 execute_process(WORKING_DIRECTORY "../../yotta_modules/${PROJECT_NAME}" COMMAND "git" "rev-parse" "--abbrev-ref" "HEAD" OUTPUT_VARIABLE git_branch OUTPUT_STRIP_TRAILING_WHITESPACE)
Jonathan Austin 1:8aa5cdb4ab67 59
Jonathan Austin 1:8aa5cdb4ab67 60 if ("${git_branch}" STREQUAL "master")
Jonathan Austin 1:8aa5cdb4ab67 61 set(MICROBIT_DAL_VERSION_STRING "${YOTTA_MICROBIT_DAL_VERSION_STRING}")
Jonathan Austin 1:8aa5cdb4ab67 62 else()
Jonathan Austin 1:8aa5cdb4ab67 63 set(MICROBIT_DAL_VERSION_STRING "${YOTTA_MICROBIT_DAL_VERSION_STRING}-${git_branch}-g${git_hash}")
Jonathan Austin 1:8aa5cdb4ab67 64 endif()
Jonathan Austin 1:8aa5cdb4ab67 65
Jonathan Austin 1:8aa5cdb4ab67 66 set(MICROBIT_DAL_VERSION_FLAGS "-DMICROBIT_DAL_VERSION=\\\"${MICROBIT_DAL_VERSION_STRING}\\\"")
Jonathan Austin 1:8aa5cdb4ab67 67
Jonathan Austin 1:8aa5cdb4ab67 68 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MICROBIT_DAL_VERSION_FLAGS}")
Jonathan Austin 1:8aa5cdb4ab67 69
Jonathan Austin 1:8aa5cdb4ab67 70 if (YOTTA_CFG_MICROBIT_CONFIGFILE)
Jonathan Austin 1:8aa5cdb4ab67 71 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${YOTTA_FORCE_INCLUDE_FLAG} \"${YOTTA_CFG_MICROBIT_CONFIGFILE}\"")
Jonathan Austin 1:8aa5cdb4ab67 72 endif ()
Jonathan Austin 1:8aa5cdb4ab67 73
Jonathan Austin 1:8aa5cdb4ab67 74 if(CMAKE_COMPILER_IS_GNUCC)
Jonathan Austin 1:8aa5cdb4ab67 75 file(REMOVE "asm/CortexContextSwitch.s")
Jonathan Austin 1:8aa5cdb4ab67 76 configure_file("asm/CortexContextSwitch.s.gcc" "asm/CortexContextSwitch.s" COPYONLY)
Jonathan Austin 1:8aa5cdb4ab67 77 else()
Jonathan Austin 1:8aa5cdb4ab67 78 file(REMOVE "asm/CortexContextSwitch.s")
Jonathan Austin 1:8aa5cdb4ab67 79 configure_file("asm/CortexContextSwitch.s.armcc" "asm/CortexContextSwitch.s" COPYONLY)
Jonathan Austin 1:8aa5cdb4ab67 80 endif()
Jonathan Austin 1:8aa5cdb4ab67 81
Jonathan Austin 1:8aa5cdb4ab67 82 set(YOTTA_AUTO_MICROBIT-DAL_S_FILES
Jonathan Austin 1:8aa5cdb4ab67 83 "asm/CortexContextSwitch.s"
Jonathan Austin 1:8aa5cdb4ab67 84 )
Jonathan Austin 1:8aa5cdb4ab67 85
Jonathan Austin 1:8aa5cdb4ab67 86 add_library(microbit-dal
Jonathan Austin 1:8aa5cdb4ab67 87 ${YOTTA_AUTO_MICROBIT-DAL_CPP_FILES}
Jonathan Austin 1:8aa5cdb4ab67 88 ${YOTTA_AUTO_MICROBIT-DAL_S_FILES}
Jonathan Austin 1:8aa5cdb4ab67 89 )
Jonathan Austin 1:8aa5cdb4ab67 90
Jonathan Austin 1:8aa5cdb4ab67 91 yotta_postprocess_target(LIBRARY microbit-dal)
Jonathan Austin 1:8aa5cdb4ab67 92
Jonathan Austin 1:8aa5cdb4ab67 93 target_link_libraries(microbit-dal
Jonathan Austin 1:8aa5cdb4ab67 94 mbed-classic
Jonathan Austin 1:8aa5cdb4ab67 95 ble
Jonathan Austin 1:8aa5cdb4ab67 96 ble-nrf51822
Jonathan Austin 1:8aa5cdb4ab67 97 )
Jonathan Austin 1:8aa5cdb4ab67 98
Jonathan Austin 1:8aa5cdb4ab67 99 if(CMAKE_COMPILER_IS_GNUCC)
Jonathan Austin 1:8aa5cdb4ab67 100 message("suppressing ALL warnings from mbed-classic, ble, ble-nrf51822 & nrf51-sdk")
Jonathan Austin 1:8aa5cdb4ab67 101 target_compile_options(mbed-classic PRIVATE "-w")
Jonathan Austin 1:8aa5cdb4ab67 102 target_compile_options(ble PRIVATE "-w")
Jonathan Austin 1:8aa5cdb4ab67 103 target_compile_options(ble-nrf51822 PRIVATE "-w")
Jonathan Austin 1:8aa5cdb4ab67 104 target_compile_options(nrf51-sdk PRIVATE "-w")
LancasterUniversity 35:8ce23bc1af38 105 endif()