diff --git a/Debug.h b/Debug.h index bb16563..667856d 100644 --- a/Debug.h +++ b/Debug.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015 by Jonathan Naylor G4KLX + * Copyright (C) 2015,2016 by Jonathan Naylor G4KLX * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -31,8 +31,6 @@ #define DEBUG4(a,b,c,d) serial.writeDebug((a),(b),(c),(d)) #define DEBUG5(a,b,c,d,e) serial.writeDebug((a),(b),(c),(d),(e)) #define ASSERT(a) serial.writeAssert((a),#a,__FILE__,__LINE__) -#define DUMP(a,b) serial.writeDump((a),(b)) -#define SAMPLES(a,b) serial.writeSamples((a),(b)) #else @@ -42,8 +40,6 @@ #define DEBUG4(a,b,c,d) #define DEBUG5(a,b,c,d,e) #define ASSERT(a) -#define DUMP(a,b) -#define SAMPLES(a,b) #endif diff --git a/SerialPort.cpp b/SerialPort.cpp index 9be0ad0..2c73ef2 100644 --- a/SerialPort.cpp +++ b/SerialPort.cpp @@ -51,13 +51,11 @@ const uint8_t MMDVM_YSF_LOST = 0x21U; const uint8_t MMDVM_ACK = 0x70U; const uint8_t MMDVM_NAK = 0x7FU; -const uint8_t MMDVM_DUMP = 0xF0U; const uint8_t MMDVM_DEBUG1 = 0xF1U; const uint8_t MMDVM_DEBUG2 = 0xF2U; const uint8_t MMDVM_DEBUG3 = 0xF3U; const uint8_t MMDVM_DEBUG4 = 0xF4U; const uint8_t MMDVM_DEBUG5 = 0xF5U; -const uint8_t MMDVM_SAMPLES = 0xF8U; const uint8_t HARDWARE[] = "MMDVM 20160317 (D-Star/DMR/System Fusion)"; @@ -694,42 +692,6 @@ void CSerialPort::write(const uint8_t* data, uint16_t length, bool flush) #endif } -void CSerialPort::writeDump(const uint8_t* data, uint8_t length) -{ - ASSERT(length <= 252U); - - uint8_t reply[255U]; - - reply[0U] = MMDVM_FRAME_START; - reply[1U] = 0U; - reply[2U] = MMDVM_DUMP; - - uint8_t count = length * sizeof(uint8_t) + 3U; - ::memcpy(reply + 3U, data, length * sizeof(uint8_t)); - - reply[1U] = count; - - write(reply, count, true); -} - -void CSerialPort::writeSamples(const q15_t* data, uint8_t length) -{ - ASSERT(length <= 126U); - - uint8_t reply[255U]; - - reply[0U] = MMDVM_FRAME_START; - reply[1U] = 0U; - reply[2U] = MMDVM_SAMPLES; - - uint8_t count = length * sizeof(q15_t) + 3U; - ::memcpy(reply + 3U, data, length * sizeof(q15_t)); - - reply[1U] = count; - - write(reply, count, true); -} - void CSerialPort::writeDebug(const char* text) { uint8_t reply[130U]; diff --git a/SerialPort.h b/SerialPort.h index c6cb0a7..bcf4d05 100644 --- a/SerialPort.h +++ b/SerialPort.h @@ -44,10 +44,6 @@ public: void writeCalData(const uint8_t* data, uint8_t length); - void writeDump(const uint8_t* data, uint8_t length); - - void writeSamples(const q15_t* data, uint8_t length); - void writeDebug(const char* text); void writeDebug(const char* text, int16_t n1); void writeDebug(const char* text, int16_t n1, int16_t n2);