Sync actual files
This commit is contained in:
parent
52acb97e08
commit
9b298ac676
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
cp mcopy_serial.* ../../mcopy_cam_canon/
|
|
@ -0,0 +1,20 @@
|
|||
#include "mcopy_serial.h"
|
||||
|
||||
void McopySerial::begin (int baudRate) {
|
||||
baud = baudRate;
|
||||
begin();
|
||||
}
|
||||
|
||||
void McopySerial::begin () {
|
||||
|
||||
}
|
||||
|
||||
void McopySerial::debug (bool state) {
|
||||
debugOn = state;
|
||||
}
|
||||
|
||||
void McopySerial::log (String message) {
|
||||
if (debugOn) {
|
||||
Serial.println(message);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
#ifndef MCOPY_SERIAL
|
||||
#define MCOPY_SERIAL
|
||||
|
||||
#include "Arduino.h"
|
||||
|
||||
class McopySerial {
|
||||
|
||||
private:
|
||||
volatile int baud = 57600;
|
||||
volatile bool debugOn = false;
|
||||
|
||||
public:
|
||||
void begin();
|
||||
void begin(int baudRate);
|
||||
|
||||
void debug (bool state);
|
||||
void log (String message);
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue