VNGIoTLab / Mbed 2 deprecated vbluno51_mbed_serial

Dependencies:   mbed

main.cpp

Committer:
vbluno_support
Date:
2017-10-15
Revision:
0:4b3db0a05c69
Child:
1:cd16195807ca

File content as of revision 0:4b3db0a05c69:

/*
 * Note: Use fw_daplink_vbluno51_release_1.0.1.bin or later version for 
 * DAPLINK interface on the VBLUNO51 kit.
 */
 
#include "mbed.h"

/*For the VBLUno51 board*/
#define PIN_TX  p10
#define PIN_RX  p11
#define PIN_LED p7
 
DigitalOut led(PIN_LED);
Serial pc(PIN_TX, PIN_RX, 115200);

int main(void) {        
    
    pc.printf("VBLUno51: Test Serial communication.\n");        
    
    led = 1;
                           
    //No condition loop    
    while(1) {
        if(pc.readable()) {
            pc.putc(pc.getc() + 1); // echo input back to terminal
            led = !led;
        }    
    }
}