- sym2bytes is public
- improved handling when data count is 0 git-svn-id: http://moon:8086/svn/software/trunk/libsrc/cpp@1085 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
@@ -87,6 +87,11 @@ size_t DeSymbolizer::sym2bytes(symbol_t symbol, uint8_t *pBytes)
|
||||
static uint8_t byte;
|
||||
size_t num_produced = 0;
|
||||
|
||||
if (m_dataBitCount == 0)
|
||||
{
|
||||
m_dataBitCount = 8;
|
||||
}
|
||||
|
||||
// Transmission order MSB first
|
||||
for (size_t i=0; i < m_nBitsPerSym; i++)
|
||||
{
|
||||
|
||||
@@ -28,6 +28,7 @@ public:
|
||||
void prepare() override;
|
||||
void process() override;
|
||||
|
||||
size_t sym2bytes(symbol_t symbol, uint8_t *pBytes);
|
||||
|
||||
private:
|
||||
size_t m_nBitsPerSym;
|
||||
@@ -39,13 +40,11 @@ private:
|
||||
size_t m_sync_dist;
|
||||
size_t m_sync_dist_last;
|
||||
size_t m_sync_counter;
|
||||
uint8_t m_delay[2];
|
||||
|
||||
Processor::Buffer<symbol_t> *m_buf_in;
|
||||
Processor::Buffer<uint8_t> *m_buf_out;
|
||||
void process(symbol_t symbol);
|
||||
void sync(symbol_t symbol);
|
||||
size_t sym2bytes(symbol_t symbol, uint8_t *pBytes);
|
||||
bool is_preamble(uint16_t data);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user