Skip to content

Commit

Permalink
clang-format update of I2S Analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcus10110 committed Oct 1, 2020
1 parent b20b36d commit 445a62f
Show file tree
Hide file tree
Showing 8 changed files with 1,069 additions and 1,011 deletions.
450 changes: 224 additions & 226 deletions src/I2sAnalyzer.cpp

Large diffs are not rendered by default.

87 changes: 44 additions & 43 deletions src/I2sAnalyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,56 +8,57 @@
class I2sAnalyzerSettings;
class I2sAnalyzer : public Analyzer2
{
public:
I2sAnalyzer();
virtual ~I2sAnalyzer();
virtual void SetupResults();
virtual void WorkerThread();
public:
I2sAnalyzer();
virtual ~I2sAnalyzer();
virtual void SetupResults();
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();

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

#pragma warning( push )
#pragma warning( disable : 4251 ) //warning C4251: 'I2sAnalyzer::<...>' : class <...> needs to have dll-interface to be used by clients of class

protected: //functions
void AnalyzeSubFrame( U32 starting_index, U32 num_bits, U32 subframe_index );
void AnalyzeFrame();
void SetupForGettingFirstFrame();
void GetFrame();
void SetupForGettingFirstBit();
void GetNextBit( BitState& data, BitState& frame, U64& sample_number );

protected:
std::auto_ptr< I2sAnalyzerSettings > mSettings;
std::auto_ptr< I2sAnalyzerResults > mResults;
bool mSimulationInitilized;
I2sSimulationDataGenerator mSimulationDataGenerator;

AnalyzerChannelData* mClock;
AnalyzerChannelData* mFrame;
AnalyzerChannelData* mData;

AnalyzerResults::MarkerType mArrowMarker;

BitState mCurrentData;
BitState mCurrentFrame;
U64 mCurrentSample;

BitState mLastData;
BitState mLastFrame;
U64 mLastSample;

std::vector<BitState> mDataBits;
std::vector<U64> mDataValidEdges;
#pragma warning( \
disable : 4251 ) // warning C4251: 'I2sAnalyzer::<...>' : class <...> needs to have dll-interface to be used by clients of class

protected: // functions
void AnalyzeSubFrame( U32 starting_index, U32 num_bits, U32 subframe_index );
void AnalyzeFrame();
void SetupForGettingFirstFrame();
void GetFrame();
void SetupForGettingFirstBit();
void GetNextBit( BitState& data, BitState& frame, U64& sample_number );

protected:
std::auto_ptr<I2sAnalyzerSettings> mSettings;
std::auto_ptr<I2sAnalyzerResults> mResults;
bool mSimulationInitilized;
I2sSimulationDataGenerator mSimulationDataGenerator;

AnalyzerChannelData* mClock;
AnalyzerChannelData* mFrame;
AnalyzerChannelData* mData;

AnalyzerResults::MarkerType mArrowMarker;

BitState mCurrentData;
BitState mCurrentFrame;
U64 mCurrentSample;

BitState mLastData;
BitState mLastFrame;
U64 mLastSample;

std::vector<BitState> mDataBits;
std::vector<U64> mDataValidEdges;
#pragma warning( pop )
};

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

#endif //I2S_ANALYZER_H
#endif // I2S_ANALYZER_H
Loading

0 comments on commit 445a62f

Please sign in to comment.