A serial parser for a specific project

Dependencies:   mbed

Fork of Serial_HelloWorld_Mbed by mbed official

Committer:
mbedAustin
Date:
Fri Mar 27 20:16:23 2015 +0000
Revision:
9:033eefd2904e
Parent:
8:560b8ced44df
Added license to main.c file.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbedAustin 9:033eefd2904e 1 /* mbed Example Program
mbedAustin 9:033eefd2904e 2 * Copyright (c) 2006-2014 ARM Limited
mbedAustin 9:033eefd2904e 3 *
mbedAustin 9:033eefd2904e 4 * Licensed under the Apache License, Version 2.0 (the "License");
mbedAustin 9:033eefd2904e 5 * you may not use this file except in compliance with the License.
mbedAustin 9:033eefd2904e 6 * You may obtain a copy of the License at
mbedAustin 9:033eefd2904e 7 *
mbedAustin 9:033eefd2904e 8 * http://www.apache.org/licenses/LICENSE-2.0
mbedAustin 9:033eefd2904e 9 *
mbedAustin 9:033eefd2904e 10 * Unless required by applicable law or agreed to in writing, software
mbedAustin 9:033eefd2904e 11 * distributed under the License is distributed on an "AS IS" BASIS,
mbedAustin 9:033eefd2904e 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
mbedAustin 9:033eefd2904e 13 * See the License for the specific language governing permissions and
mbedAustin 9:033eefd2904e 14 * limitations under the License.
mbedAustin 9:033eefd2904e 15 */
mbed_official 0:879aa9d0247b 16 #include "mbed.h"
mbed_official 0:879aa9d0247b 17
mbed_official 0:879aa9d0247b 18 Serial pc(USBTX, USBRX); // tx, rx
mbed_official 0:879aa9d0247b 19
mbed_official 0:879aa9d0247b 20 int main() {
mbedAustin 8:560b8ced44df 21 pc.printf("Hello World!\n\r");
mbed_official 0:879aa9d0247b 22 while(1) {
mbedAustin 8:560b8ced44df 23 pc.putc(pc.getc() + 1); // echo input back to terminal
mbed_official 0:879aa9d0247b 24 }
mbed_official 0:879aa9d0247b 25 }