FEP TX test

Dependencies:   mbed myFEP

main.cpp

Committer:
piroro4560
Date:
2021-10-09
Revision:
0:8c49c5f604d3

File content as of revision 0:8c49c5f604d3:

#include "mbed.h"
#include "FEP.h"

myFEP fep(D1, D0, 004);
Serial pc(USBTX, USBRX, 115200);

int main()
{
    fep.StartReceive();
    uint8_t temp;
    uint8_t data[7] = {3, 75, 93, 121, 154, 171, 240};
    while(1) {

        temp = fep.SendData(data); // data内全送信
//        temp = fep.SendData(data, 3); // 3個だけ送信
        if (temp) {
            pc.printf("Successful\r\n");
        } else {
            pc.printf("Error\r\n");
        }

    }
}