s

Dependencies:   mbed

Fork of LAB10_Oppgave3 by EL-POM1001

main.cpp

Committer:
rlanghbv
Date:
2015-11-04
Revision:
1:05b1d2a203e5
Parent:
0:00b5baa80198

File content as of revision 1:05b1d2a203e5:

#include "mbed.h"

Serial serial3(PB_9, PB_8); // tx, rx
Serial pc(USBTX, USBRX);    // tx, rx

void serial3Rx()
{    pc.putc(serial3.getc());
}

void pcRx()
{    serial3.putc(pc.getc());
}

int main()
{
    serial3.attach(&serial3Rx);
    pc.attach(&pcRx);

    while(1) {
        wait(1);
    }
}