Fn for control of audio codec reset signal.

This commit is contained in:
Jared Boone 2017-05-01 10:37:49 +01:00
parent b12f90ef08
commit 19e42196db
2 changed files with 12 additions and 0 deletions

View File

@ -64,6 +64,17 @@ void IO::lcd_reset_state(const bool active) {
io_write(1, io_reg);
}
void IO::audio_reset_state(const bool active) {
/* Reset signal for audio codec. Some audio codecs (e.g. WM8731) do not
* implement reset signal, only soft reset via I2C.
*/
/* NOTE: This overwrites the contents of the IO register, which for now
* have no significance. But someday...?
*/
io_reg = (io_reg & 0xfd) | ((active ? 1 : 0) << 1);
io_write(1, io_reg);
}
uint32_t IO::io_update(const TouchPinsConfig write_value) {
/* Very touchy code to save context of PortaPack data bus while the
* resistive touch pin drive is changed. Order of operations is

View File

@ -100,6 +100,7 @@ public:
void lcd_backlight(const bool value);
void lcd_reset_state(const bool active);
void audio_reset_state(const bool active);
void lcd_data_write_command_and_data(
const uint_fast8_t command,