Refactoring continued
This commit is contained in:
+2
-21
@@ -21,18 +21,10 @@
|
||||
#ifndef _PULSES_PXX2_H_
|
||||
#define _PULSES_PXX2_H_
|
||||
|
||||
#include "pulses/pxx.h"
|
||||
#include "./pxx.h"
|
||||
|
||||
class Pxx2Transport: public PxxCrcMixin {
|
||||
class Pxx2Transport: public DataBuffer<uint8_t, 64>, public PxxCrcMixin {
|
||||
protected:
|
||||
uint8_t data[64];
|
||||
uint8_t * ptr;
|
||||
|
||||
void initFrame()
|
||||
{
|
||||
ptr = data;
|
||||
}
|
||||
|
||||
void addByte(uint8_t byte)
|
||||
{
|
||||
PxxCrcMixin::addToCrc(byte);
|
||||
@@ -45,21 +37,10 @@ class Pxx2Transport: public PxxCrcMixin {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class Pxx2Pulses: public PxxPulses<Pxx2Transport> {
|
||||
public:
|
||||
void setupFrame(uint8_t port);
|
||||
|
||||
const uint8_t * getData()
|
||||
{
|
||||
return data;
|
||||
}
|
||||
|
||||
uint8_t getSize()
|
||||
{
|
||||
return ptr - data;
|
||||
}
|
||||
|
||||
protected:
|
||||
uint8_t data[64];
|
||||
uint8_t * ptr;
|
||||
|
||||
Reference in New Issue
Block a user