Skip to content

Commit

Permalink
clang-format update of Atmel Single-Wire Interface(SWI) Analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcus10110 committed Oct 1, 2020
1 parent ea1408a commit 93eec74
Show file tree
Hide file tree
Showing 10 changed files with 1,321 additions and 1,291 deletions.
486 changes: 246 additions & 240 deletions src/AtmelSWIAnalyzer.cpp

Large diffs are not rendered by default.

62 changes: 31 additions & 31 deletions src/AtmelSWIAnalyzer.h
Expand Up @@ -11,56 +11,56 @@

enum AtmelSWIFrameType
{
FrameToken,
FrameByte,
FrameFlag,
FrameCount,
FrameChecksum,
FrameToken,
FrameByte,
FrameFlag,
FrameCount,
FrameChecksum,

FramePacketSegment,
FramePacketSegment,
};

class WakeException: public std::exception {};
class WakeException : public std::exception
{
};

class AtmelSWIAnalyzer : public Analyzer2
{
public:
AtmelSWIAnalyzer();
virtual ~AtmelSWIAnalyzer();
virtual void WorkerThread();
public:
AtmelSWIAnalyzer();
virtual ~AtmelSWIAnalyzer();
virtual void WorkerThread();

virtual U32 GenerateSimulationData(U64 newest_sample_requested, U32 sample_rate, SimulationChannelDescriptor** simulation_channels);
virtual U32 GetMinimumSampleRateHz();
virtual U32 GenerateSimulationData( U64 newest_sample_requested, U32 sample_rate, SimulationChannelDescriptor** simulation_channels );
virtual U32 GetMinimumSampleRateHz();
virtual void SetupResults();

virtual const char* GetAnalyzerName() const;
virtual bool NeedsRerun();

protected: // functions

void Setup();
virtual const char* GetAnalyzerName() const;
virtual bool NeedsRerun();

void AddFrame(U64 SampleBegin, U64 SampleEnd, AtmelSWIFrameType FrameType, U64 Data1 = 0, U64 Data2 = 0);
protected: // functions
void Setup();

void ParsePacket(const SWI_Block& block, size_t block_ndx, const std::vector<std::pair<U64, U64> >& ByteSamples);
void AddFrame( U64 SampleBegin, U64 SampleEnd, AtmelSWIFrameType FrameType, U64 Data1 = 0, U64 Data2 = 0 );

// reads raw bytes, makes frames out of them and throws a WakeException on the first wake token
void ResyncToWake(SWI_WaveParser& tokenizer);
void ParsePacket( const SWI_Block& block, size_t block_ndx, const std::vector<std::pair<U64, U64>>& ByteSamples );

protected: // vars
// reads raw bytes, makes frames out of them and throws a WakeException on the first wake token
void ResyncToWake( SWI_WaveParser& tokenizer );

AtmelSWIAnalyzerSettings mSettings;
std::auto_ptr<AtmelSWIAnalyzerResults> mResults;
protected: // vars
AtmelSWIAnalyzerSettings mSettings;
std::auto_ptr<AtmelSWIAnalyzerResults> mResults;

AnalyzerChannelData* mSDA;
AnalyzerChannelData* mSDA;

AtmelSWISimulationDataGenerator mSimulationDataGenerator;
AtmelSWISimulationDataGenerator mSimulationDataGenerator;

bool mSimulationInitilized;
bool mSimulationInitilized;
};

extern "C" ANALYZER_EXPORT const char* __cdecl GetAnalyzerName();
extern "C" ANALYZER_EXPORT Analyzer* __cdecl CreateAnalyzer();
extern "C" ANALYZER_EXPORT void __cdecl DestroyAnalyzer(Analyzer* analyzer);
extern "C" ANALYZER_EXPORT void __cdecl DestroyAnalyzer( Analyzer* analyzer );

#endif // ATMEL_SWI_ANALYZER_H
#endif // ATMEL_SWI_ANALYZER_H

0 comments on commit 93eec74

Please sign in to comment.