File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -159,6 +159,23 @@ class Adau1361 {
159159 bool line_output_mute_;
160160 bool hp_output_mute_; // headphone
161161};
162+
163+ #if __has_include(<gmock/gmock.h>)
164+ // GCOVR_EXCL_START
165+ class MockAdau1361 : public Adau1361 {
166+ public:
167+ MockAdau1361 (Adau1361Lower& adau1361_lower)
168+ : Adau1361(48'000 , 12'000'000 , adau1361_lower) {
169+ } // with dummy fs and dummy mclock
170+ MOCK_METHOD0 (GetStateMachine, uint32_t (void ));
171+ MOCK_METHOD0 (Start, void (void ));
172+ MOCK_METHOD0 (Stop, void (void ));
173+ MOCK_METHOD1 (PutFifoBlocking, void (int32_t value));
174+ MOCK_METHOD0 (GetFifoBlocking, int32_t ());
175+ };
176+ // GCOVR_EXCL_STOP
177+ #endif // __has_include(<gmock/gmock.h>)
178+
162179} // namespace rpp_driver
163180
164181#endif /* PICO_DRIVER_SRC_CODEC_ADAU1361_HPP_ */
Original file line number Diff line number Diff line change @@ -154,15 +154,15 @@ class I2sSlaveDuplex {
154154class MockI2sSlaveDuplex : public I2sSlaveDuplex {
155155 public:
156156 MockI2sSlaveDuplex (SdkWrapper &sdk)
157- : I2sSlaveDuplex(sdk, 0 , 0 ) {} // // 0 is dummy. We don't care.
157+ : I2sSlaveDuplex(sdk, 0 , 0 ) {} // 0 is dummy. We don't care.
158158 MOCK_METHOD0 (GetStateMachine, uint32_t (void ));
159159 MOCK_METHOD0 (Start, void (void ));
160160 MOCK_METHOD0 (Stop, void (void ));
161161 MOCK_METHOD1 (PutFifoBlocking, void (int32_t value));
162162 MOCK_METHOD0 (GetFifoBlocking, int32_t ());
163163};
164- #endif // __has_include(<gmock/gmock.h>)
165164// GCOVR_EXCL_STOP
165+ #endif // __has_include(<gmock/gmock.h>)
166166} // namespace rpp_driver
167167
168168#endif // PICO_DRIVER_SRC_I2S_DUPLEXSLAVEI2S_HPP_
You can’t perform that action at this time.
0 commit comments