Demonstration program for the MAX3232PMB1 Peripheral Module with the MAXREFDES72# Arduino to Pmod Adapter

Dependencies:   MAX14661 mbed

main.cpp

Committer:
gsteiert
Date:
2014-07-20
Revision:
1:6f1c3cb10608
Parent:
0:803011eae289

File content as of revision 1:6f1c3cb10608:

#include "mbed.h"
#include "MAX14661.h"

MAX14661 mux(D14, D15);
DigitalOut pinRTS(D13);
DigitalIn pinRX(D0);  // Set as input to remove load from mbedTX
DigitalIn pinTX(D1);  // Set as input to remove load from mbedRX

int main()
{
    pinRTS=0; // Not Ready to Send
    //           D0 (mbedTX)   +   PA2 (TXD)         D1 (mbedRX)   +   PA3 (RXD)
    mux.setAB((MAX14661::SW01 | MAX14661::SW13),
              (MAX14661::SW02 | MAX14661::SW12));
    pinRTS=1; // Ready to Send
}