yes

main.cpp

Committer:
128keaton
Date:
2019-06-24
Revision:
0:2b8bbdd96dca

File content as of revision 0:2b8bbdd96dca:

#include "mbed.h"              
 
#include "communication.h"
#include "parameters.h"

bool is_connected = false; ///< True if the connection with the master is available
bool has_setup = false;

Serial pc(USBTX, USBRX);

Communication read_comm() {
  return (Communication) Serial.read();
}

int main() {
    if (!has_setup) {
        setup();   
    }  
}

int setup() {
    has_setup = !has_setup
        
}