Malavika S
/
WIP
Initial Commit
Embed:
(wiki syntax)
Show/hide line numbers
main.cpp
00001 /* Copyright (c) 2019 Analog Devices, Inc. All rights reserved. 00002 00003 Redistribution and use in source and binary forms, with or without modification, 00004 are permitted provided that the following conditions are met: 00005 - Redistributions of source code must retain the above copyright notice, 00006 this list of conditions and the following disclaimer. 00007 - Redistributions in binary form must reproduce the above copyright notice, 00008 this list of conditions and the following disclaimer in the documentation 00009 and/or other materials provided with the distribution. 00010 - Modified versions of the software must be conspicuously marked as such. 00011 - This software is licensed solely and exclusively for use with processors/products 00012 manufactured by or for Analog Devices, Inc. 00013 - This software may not be combined or merged with other code in any manner 00014 that would cause the software to become subject to terms and conditions which 00015 differ from those listed here. 00016 - Neither the name of Analog Devices, Inc. nor the names of its contributors 00017 may be used to endorse or promote products derived from this software without 00018 specific prior written permission. 00019 - The use of this software may or may not infringe the patent rights of one or 00020 more patent holders. This license does not release you from the requirement 00021 that you obtain separate licenses from these patent holders to use this software. 00022 00023 THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. AND CONTRIBUTORS "AS IS" AND 00024 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, 00025 TITLE, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 00026 NO EVENT SHALL ANALOG DEVICES, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 00027 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE OR CONSEQUENTIAL DAMAGES 00028 (INCLUDING, BUT NOT LIMITED TO, DAMAGES ARISING OUT OF CLAIMS OF INTELLECTUAL 00029 PROPERTY RIGHTS INFRINGEMENT; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 00030 OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00031 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00032 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 00033 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00034 00035 2019-01-10-7CBSD SLA 00036 00037 */ 00038 00039 #include "mbed.h" 00040 00041 Serial pc(USBTX, USBRX); // tx, rx 00042 DigitalOut awakeSignal(PK_3); 00043 DigitalOut led1(LED1); 00044 00045 #define SLEEP_TIME 500 // (msec) 00046 00047 // main() runs in its own thread in the OS 00048 int main() 00049 { 00050 awakeSignal = 1; 00051 pc.printf("Hello World!"); 00052 while (true) { 00053 // Blink LED and wait 0.5 seconds 00054 led1 = !led1; 00055 wait_ms(SLEEP_TIME); 00056 } 00057 } 00058
Generated on Mon Jul 25 2022 10:24:59 by 1.7.2