mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
WM8731: Extract interface configuration method.
This commit is contained in:
parent
f0947a4917
commit
6c3a1384fb
@ -25,6 +25,18 @@
|
||||
namespace wolfson {
|
||||
namespace wm8731 {
|
||||
|
||||
void WM8731::configure_interface_i2s_slave() {
|
||||
write(DigitalAudioInterfaceFormat {
|
||||
.format = 2,
|
||||
.iwl = 0,
|
||||
.lrp = 0,
|
||||
.lrswap = 0,
|
||||
.ms = 0,
|
||||
.bclkinv = 0,
|
||||
.reserved0 = 0,
|
||||
});
|
||||
}
|
||||
|
||||
void WM8731::init() {
|
||||
reset();
|
||||
|
||||
@ -49,15 +61,7 @@ void WM8731::init() {
|
||||
// .reserved0 = 0,
|
||||
// });
|
||||
|
||||
write(DigitalAudioInterfaceFormat {
|
||||
.format = 2,
|
||||
.iwl = 0,
|
||||
.lrp = 0,
|
||||
.lrswap = 0,
|
||||
.ms = 0,
|
||||
.bclkinv = 0,
|
||||
.reserved0 = 0,
|
||||
});
|
||||
configure_interface_i2s_slave();
|
||||
|
||||
write(DigitalAudioPathControl {
|
||||
.adchpd = 0,
|
||||
|
@ -375,6 +375,8 @@ private:
|
||||
RegisterMap map { default_after_reset };
|
||||
volume_t headphone_volume = -60.0_dB;
|
||||
|
||||
void configure_interface_i2s_slave();
|
||||
|
||||
bool write(const Register reg);
|
||||
|
||||
bool write(const address_t reg_address, const reg_t value);
|
||||
|
Loading…
Reference in New Issue
Block a user