Initial Commit

Committer:
malavikasaji
Date:
Thu Sep 26 08:23:59 2019 +0000
Revision:
3:85efaf5b2bec
Parent:
1:f196e8928d1d
Adding a test GitHub repository to see how changes are handled to the remote repository.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
malavikasaji 1:f196e8928d1d 1 /* Copyright (c) 2019 Analog Devices, Inc. All rights reserved.
malavikasaji 1:f196e8928d1d 2
malavikasaji 1:f196e8928d1d 3 Redistribution and use in source and binary forms, with or without modification,
malavikasaji 1:f196e8928d1d 4 are permitted provided that the following conditions are met:
malavikasaji 1:f196e8928d1d 5 - Redistributions of source code must retain the above copyright notice,
malavikasaji 1:f196e8928d1d 6 this list of conditions and the following disclaimer.
malavikasaji 1:f196e8928d1d 7 - Redistributions in binary form must reproduce the above copyright notice,
malavikasaji 1:f196e8928d1d 8 this list of conditions and the following disclaimer in the documentation
malavikasaji 1:f196e8928d1d 9 and/or other materials provided with the distribution.
malavikasaji 1:f196e8928d1d 10 - Modified versions of the software must be conspicuously marked as such.
malavikasaji 1:f196e8928d1d 11 - This software is licensed solely and exclusively for use with processors/products
malavikasaji 1:f196e8928d1d 12 manufactured by or for Analog Devices, Inc.
malavikasaji 1:f196e8928d1d 13 - This software may not be combined or merged with other code in any manner
malavikasaji 1:f196e8928d1d 14 that would cause the software to become subject to terms and conditions which
malavikasaji 1:f196e8928d1d 15 differ from those listed here.
malavikasaji 1:f196e8928d1d 16 - Neither the name of Analog Devices, Inc. nor the names of its contributors
malavikasaji 1:f196e8928d1d 17 may be used to endorse or promote products derived from this software without
malavikasaji 1:f196e8928d1d 18 specific prior written permission.
malavikasaji 1:f196e8928d1d 19 - The use of this software may or may not infringe the patent rights of one or
malavikasaji 1:f196e8928d1d 20 more patent holders. This license does not release you from the requirement
malavikasaji 1:f196e8928d1d 21 that you obtain separate licenses from these patent holders to use this software.
malavikasaji 1:f196e8928d1d 22
malavikasaji 1:f196e8928d1d 23 THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. AND CONTRIBUTORS "AS IS" AND
malavikasaji 1:f196e8928d1d 24 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
malavikasaji 1:f196e8928d1d 25 TITLE, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
malavikasaji 1:f196e8928d1d 26 NO EVENT SHALL ANALOG DEVICES, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
malavikasaji 1:f196e8928d1d 27 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE OR CONSEQUENTIAL DAMAGES
malavikasaji 1:f196e8928d1d 28 (INCLUDING, BUT NOT LIMITED TO, DAMAGES ARISING OUT OF CLAIMS OF INTELLECTUAL
malavikasaji 1:f196e8928d1d 29 PROPERTY RIGHTS INFRINGEMENT; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
malavikasaji 1:f196e8928d1d 30 OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
malavikasaji 1:f196e8928d1d 31 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
malavikasaji 1:f196e8928d1d 32 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
malavikasaji 1:f196e8928d1d 33 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
malavikasaji 1:f196e8928d1d 34
malavikasaji 1:f196e8928d1d 35 2019-01-10-7CBSD SLA
malavikasaji 1:f196e8928d1d 36
malavikasaji 1:f196e8928d1d 37 */
malavikasaji 1:f196e8928d1d 38
malavikasaji 1:f196e8928d1d 39 #include "mbed.h"
malavikasaji 1:f196e8928d1d 40
malavikasaji 1:f196e8928d1d 41 Serial pc(USBTX, USBRX); // tx, rx
malavikasaji 1:f196e8928d1d 42 DigitalOut awakeSignal(PK_3);
malavikasaji 1:f196e8928d1d 43 DigitalOut led1(LED1);
malavikasaji 1:f196e8928d1d 44
malavikasaji 1:f196e8928d1d 45 #define SLEEP_TIME 500 // (msec)
malavikasaji 1:f196e8928d1d 46
malavikasaji 1:f196e8928d1d 47 // main() runs in its own thread in the OS
malavikasaji 1:f196e8928d1d 48 int main()
malavikasaji 1:f196e8928d1d 49 {
malavikasaji 1:f196e8928d1d 50 awakeSignal = 1;
malavikasaji 1:f196e8928d1d 51 pc.printf("Hello World!");
malavikasaji 1:f196e8928d1d 52 while (true) {
malavikasaji 1:f196e8928d1d 53 // Blink LED and wait 0.5 seconds
malavikasaji 1:f196e8928d1d 54 led1 = !led1;
malavikasaji 1:f196e8928d1d 55 wait_ms(SLEEP_TIME);
malavikasaji 1:f196e8928d1d 56 }
malavikasaji 1:f196e8928d1d 57 }
malavikasaji 1:f196e8928d1d 58