Skip to content

Commit ee133ae

Browse files
committed
Issue #16 : Change the member function name from ConfigureSRC() to ConfigureSrc().
1 parent 1a3e1c9 commit ee133ae

6 files changed

Lines changed: 20 additions & 17 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22
History of the project development
33

44
## [Unreleased] yyyy-mm-zz
5+
The issue #16 changes its public member function. But it is referred internally from ::rpp_driver::Adau1361 class. Not called by user program. Then, the major version number is not needed to change.
6+
57
### Added
68
### Changed
79
- [Issue #10](https://github.com/suikan4github/rpp_driver/issues/10) Cover APIs of the Raspberry Pi Pico SDK.
10+
- [Issue #16](https://github.com/suikan4github/rpp_driver/issues/16) Change the member function name from ConfigureSRC() to ConfigureSrc().
811
### Deprecated
912
### Removed
1013
### Fixed

src/codec/adau1361.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void ::rpp_driver::Adau1361::Start(void) {
5555
// Enable core to start operation.
5656
adau1361_lower_.EnableCore();
5757
// Set SRC for the right FS.
58-
adau1361_lower_.ConfigureSRC(fs_);
58+
adau1361_lower_.ConfigureSrc(fs_);
5959
// Board independent register initialization.
6060
adau1361_lower_.InitializeRegisters();
6161
// Board dependent register initialization.

src/codec/adau1361lower.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ void ::rpp_driver::Adau1361Lower::InitializeRegisters() {
511511
}
512512

513513
// Set the converter clock.
514-
void ::rpp_driver::Adau1361Lower::ConfigureSRC(unsigned int fs) {
514+
void ::rpp_driver::Adau1361Lower::ConfigureSrc(unsigned int fs) {
515515
assert((fs == 24000 || fs == 32000 || fs == 48000 || fs == 96000 ||
516516
fs == 22050 || fs == 44100 || fs == 88200) &&
517517
"Bad Fs");

src/codec/adau1361lower.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ namespace rpp_driver {
3636
* @li ConfigurePll()
3737
* @li WaitPllLock()
3838
* @li EnableCore()
39-
* @li ConfigureSRC()
39+
* @li ConfigureSrc()
4040
* @li InitializeRegisters()
4141
* @li ConfigureSignalPath()
4242
*
@@ -136,7 +136,7 @@ class Adau1361Lower {
136136
* @details
137137
* Must call after EnableCore().
138138
*/
139-
virtual void ConfigureSRC(unsigned int fs);
139+
virtual void ConfigureSrc(unsigned int fs);
140140

141141
/**
142142
* @brief Initialize the core part of the ADAU1361A.
@@ -153,7 +153,7 @@ class Adau1361Lower {
153153
* Clock must working well before calling this routine.
154154
*
155155
* This function clean-up.
156-
* Need to call after ConfigureSRC() and before InitializeSignalPath()
156+
* Need to call after ConfigureSrc() and before InitializeSignalPath()
157157
*/
158158
virtual void InitializeRegisters();
159159

@@ -243,7 +243,7 @@ class MockAdau1361Lower : public Adau1361Lower {
243243
MOCK_METHOD0(DisablePLL, void());
244244
MOCK_METHOD0(WaitPllLock, void());
245245
MOCK_METHOD2(ConfigurePll, void(unsigned int fs, unsigned int master_clock));
246-
MOCK_METHOD1(ConfigureSRC, void(unsigned int fs));
246+
MOCK_METHOD1(ConfigureSrc, void(unsigned int fs));
247247
MOCK_METHOD0(EnableCore, void());
248248
MOCK_METHOD0(InitializeRegisters, void());
249249
MOCK_METHOD0(ConfigureSignalPath, void());

test/test_adau1361.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ TEST_F(Adau1361Test, Start) {
232232
EXPECT_CALL(*codec_lower_, ConfigurePll(fs_, master_clk_));
233233
EXPECT_CALL(*codec_lower_, WaitPllLock());
234234
EXPECT_CALL(*codec_lower_, EnableCore());
235-
EXPECT_CALL(*codec_lower_, ConfigureSRC(fs_));
235+
EXPECT_CALL(*codec_lower_, ConfigureSrc(fs_));
236236
EXPECT_CALL(*codec_lower_, InitializeRegisters());
237237
EXPECT_CALL(*codec_lower_, ConfigureSignalPath());
238238
}

test/test_adau1361lower.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1872,7 +1872,7 @@ TEST_F(Adau1361LowerTest, SetHpOutputGain_appropriate_gain) {
18721872

18731873
// -----------------------------------------------------------------
18741874
//
1875-
// ConfigureSRC()
1875+
// ConfigureSrc()
18761876
//
18771877
// -----------------------------------------------------------------
18781878

@@ -1881,7 +1881,7 @@ TEST_F(Adau1361LowerDeathTest, ConfigureSRC_wrong_fs) {
18811881
const unsigned int fs = 192000; // not supported by ADAU1361
18821882
// check the assertion for bad mclock.
18831883
#ifndef NDEBUG
1884-
ASSERT_DEATH(codec_lower_->ConfigureSRC(fs), "Bad Fs");
1884+
ASSERT_DEATH(codec_lower_->ConfigureSrc(fs), "Bad Fs");
18851885
#endif
18861886
} // ConfigureSRC_wrong_fs
18871887

@@ -1907,7 +1907,7 @@ TEST_F(Adau1361LowerTest, ConfigureSRC_22050) {
19071907
.WillOnce(Return(sizeof(config_src)));
19081908

19091909
// right configuration of SRC.
1910-
codec_lower_->ConfigureSRC(fs);
1910+
codec_lower_->ConfigureSrc(fs);
19111911
} // ConfigureSRC_22050
19121912

19131913
// Validation test for fs 24000 Hz.
@@ -1932,7 +1932,7 @@ TEST_F(Adau1361LowerTest, ConfigureSRC_24000) {
19321932
.WillOnce(Return(sizeof(config_src)));
19331933

19341934
// right configuration of SRC.
1935-
codec_lower_->ConfigureSRC(fs);
1935+
codec_lower_->ConfigureSrc(fs);
19361936
} // ConfigureSRC_24000
19371937

19381938
// Validation test for fs 32000 Hz.
@@ -1957,7 +1957,7 @@ TEST_F(Adau1361LowerTest, ConfigureSRC_32000) {
19571957
.WillOnce(Return(sizeof(config_src)));
19581958

19591959
// right configuration of SRC.
1960-
codec_lower_->ConfigureSRC(fs);
1960+
codec_lower_->ConfigureSrc(fs);
19611961
} // ConfigureSRC_32000
19621962

19631963
// Validation test for fs 44100 Hz.
@@ -1982,7 +1982,7 @@ TEST_F(Adau1361LowerTest, ConfigureSRC_44100) {
19821982
.WillOnce(Return(sizeof(config_src)));
19831983

19841984
// right configuration of SRC.
1985-
codec_lower_->ConfigureSRC(fs);
1985+
codec_lower_->ConfigureSrc(fs);
19861986
} // ConfigureSRC_44100
19871987

19881988
// Validation test for fs 48000 Hz.
@@ -2007,7 +2007,7 @@ TEST_F(Adau1361LowerTest, ConfigureSRC_48000) {
20072007
.WillOnce(Return(sizeof(config_src)));
20082008

20092009
// right configuration of SRC.
2010-
codec_lower_->ConfigureSRC(fs);
2010+
codec_lower_->ConfigureSrc(fs);
20112011
} // ConfigureSRC_48000
20122012

20132013
// Validation test for fs 88200 Hz.
@@ -2032,7 +2032,7 @@ TEST_F(Adau1361LowerTest, ConfigureSRC_88200) {
20322032
.WillOnce(Return(sizeof(config_src)));
20332033

20342034
// right configuration of SRC.
2035-
codec_lower_->ConfigureSRC(fs);
2035+
codec_lower_->ConfigureSrc(fs);
20362036
} // ConfigureSRC_88200
20372037

20382038
// Validation test for fs 96000 Hz.
@@ -2057,12 +2057,12 @@ TEST_F(Adau1361LowerTest, ConfigureSRC_96000) {
20572057
.WillOnce(Return(sizeof(config_src)));
20582058

20592059
// right configuration of SRC.
2060-
codec_lower_->ConfigureSRC(fs);
2060+
codec_lower_->ConfigureSrc(fs);
20612061
} // ConfigureSRC_96000
20622062

20632063
// -----------------------------------------------------------------
20642064
//
2065-
// ConfigureSRC()
2065+
// ConfigureSrc()
20662066
//
20672067
// -----------------------------------------------------------------
20682068

0 commit comments

Comments
 (0)