![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Production Test Program (PTP) for the LPC4088 Experiment Base Board
Dependencies: EALib I2S LM75B SDFileSystem mbed
WM8731.h@9:eb6086159020, 2014-10-01 (annotated)
- Committer:
- embeddedartists
- Date:
- Wed Oct 01 11:16:38 2014 +0000
- Revision:
- 9:eb6086159020
- Parent:
- 3:7ef908e84ae1
Updated used libraries
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
embeddedartists | 3:7ef908e84ae1 | 1 | /** |
embeddedartists | 3:7ef908e84ae1 | 2 | * |
embeddedartists | 3:7ef908e84ae1 | 3 | * @section LICENSE |
embeddedartists | 3:7ef908e84ae1 | 4 | * |
embeddedartists | 3:7ef908e84ae1 | 5 | * Copyright (c) 2012 mbed |
embeddedartists | 3:7ef908e84ae1 | 6 | * |
embeddedartists | 3:7ef908e84ae1 | 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
embeddedartists | 3:7ef908e84ae1 | 8 | * of this software and associated documentation files (the "Software"), to deal |
embeddedartists | 3:7ef908e84ae1 | 9 | * in the Software without restriction, including without limitation the rights |
embeddedartists | 3:7ef908e84ae1 | 10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
embeddedartists | 3:7ef908e84ae1 | 11 | * copies of the Software, and to permit persons to whom the Software is |
embeddedartists | 3:7ef908e84ae1 | 12 | * furnished to do so, subject to the following conditions: |
embeddedartists | 3:7ef908e84ae1 | 13 | * |
embeddedartists | 3:7ef908e84ae1 | 14 | * The above copyright notice and this permission notice shall be included in |
embeddedartists | 3:7ef908e84ae1 | 15 | * all copies or substantial portions of the Software. |
embeddedartists | 3:7ef908e84ae1 | 16 | * |
embeddedartists | 3:7ef908e84ae1 | 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
embeddedartists | 3:7ef908e84ae1 | 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
embeddedartists | 3:7ef908e84ae1 | 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
embeddedartists | 3:7ef908e84ae1 | 20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
embeddedartists | 3:7ef908e84ae1 | 21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
embeddedartists | 3:7ef908e84ae1 | 22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
embeddedartists | 3:7ef908e84ae1 | 23 | * THE SOFTWARE. |
embeddedartists | 3:7ef908e84ae1 | 24 | * |
embeddedartists | 3:7ef908e84ae1 | 25 | * @section DESCRIPTION |
embeddedartists | 3:7ef908e84ae1 | 26 | * A Driver set for the I2C half of the WM8731. Based on the WM8731 |
embeddedartists | 3:7ef908e84ae1 | 27 | * code http://mbed.org/users/p07gbar/code/WM8731/ |
embeddedartists | 3:7ef908e84ae1 | 28 | * |
embeddedartists | 3:7ef908e84ae1 | 29 | */ |
embeddedartists | 0:0d5190d379d3 | 30 | |
embeddedartists | 0:0d5190d379d3 | 31 | #ifndef WM8731_H |
embeddedartists | 0:0d5190d379d3 | 32 | #define WM8731_H |
embeddedartists | 0:0d5190d379d3 | 33 | |
embeddedartists | 3:7ef908e84ae1 | 34 | #include "mbed.h" |
embeddedartists | 0:0d5190d379d3 | 35 | |
embeddedartists | 3:7ef908e84ae1 | 36 | #define WM8731_CS_HIGH true |
embeddedartists | 3:7ef908e84ae1 | 37 | #define WM8731_CS_LOW false |
embeddedartists | 3:7ef908e84ae1 | 38 | |
embeddedartists | 3:7ef908e84ae1 | 39 | #define WM8731_ON true |
embeddedartists | 3:7ef908e84ae1 | 40 | #define WM8731_OFF false |
embeddedartists | 3:7ef908e84ae1 | 41 | |
embeddedartists | 3:7ef908e84ae1 | 42 | #define WM8731_MUTE true |
embeddedartists | 3:7ef908e84ae1 | 43 | #define WM8731_UNMUTE false |
embeddedartists | 3:7ef908e84ae1 | 44 | |
embeddedartists | 3:7ef908e84ae1 | 45 | #define WM8731_MASTER true |
embeddedartists | 3:7ef908e84ae1 | 46 | #define WM8731_SLAVE false |
embeddedartists | 3:7ef908e84ae1 | 47 | |
embeddedartists | 3:7ef908e84ae1 | 48 | #define WM8731_LINE 0 |
embeddedartists | 3:7ef908e84ae1 | 49 | #define WM8731_MIC 1 |
embeddedartists | 3:7ef908e84ae1 | 50 | #define WM8731_NO_IN -1 |
embeddedartists | 3:7ef908e84ae1 | 51 | |
embeddedartists | 3:7ef908e84ae1 | 52 | #define WM8731_DE_EMPH_DISABLED 0 |
embeddedartists | 3:7ef908e84ae1 | 53 | #define WM8731_DE_EMPH_32KHZ 1 |
embeddedartists | 3:7ef908e84ae1 | 54 | #define WM8731_DE_EMPH_44KHZ 2 |
embeddedartists | 3:7ef908e84ae1 | 55 | #define WM8731_DE_EMPH_48KHZ 3 |
embeddedartists | 3:7ef908e84ae1 | 56 | |
embeddedartists | 3:7ef908e84ae1 | 57 | /** A class to control the I2C part of the WM8731 |
embeddedartists | 3:7ef908e84ae1 | 58 | * |
embeddedartists | 0:0d5190d379d3 | 59 | */ |
embeddedartists | 0:0d5190d379d3 | 60 | class WM8731 { |
embeddedartists | 0:0d5190d379d3 | 61 | public: |
embeddedartists | 0:0d5190d379d3 | 62 | |
embeddedartists | 3:7ef908e84ae1 | 63 | /** Create an instance of the WM8731 class |
embeddedartists | 3:7ef908e84ae1 | 64 | * |
embeddedartists | 3:7ef908e84ae1 | 65 | * @param i2c_sda The SDA pin of the I2C |
embeddedartists | 3:7ef908e84ae1 | 66 | * @param i2c_scl The SCL pin of the I2C |
embeddedartists | 3:7ef908e84ae1 | 67 | */ |
embeddedartists | 3:7ef908e84ae1 | 68 | WM8731(PinName i2c_sda, PinName i2c_scl); |
embeddedartists | 3:7ef908e84ae1 | 69 | |
embeddedartists | 3:7ef908e84ae1 | 70 | /** Create an instance of the WM8731 class |
embeddedartists | 3:7ef908e84ae1 | 71 | * |
embeddedartists | 3:7ef908e84ae1 | 72 | * @param i2c_sda The SDA pin of the I2C |
embeddedartists | 3:7ef908e84ae1 | 73 | * @param i2c_scl The SCL pin of the I2C |
embeddedartists | 3:7ef908e84ae1 | 74 | * @param cs_level The level of the CS pin on the WM8731 |
embeddedartists | 3:7ef908e84ae1 | 75 | */ |
embeddedartists | 3:7ef908e84ae1 | 76 | WM8731(PinName i2c_sda, PinName i2c_scl, bool cs_level); |
embeddedartists | 3:7ef908e84ae1 | 77 | |
embeddedartists | 3:7ef908e84ae1 | 78 | /** Control the power of the device |
embeddedartists | 3:7ef908e84ae1 | 79 | * |
embeddedartists | 3:7ef908e84ae1 | 80 | * @param on_off The power state |
embeddedartists | 3:7ef908e84ae1 | 81 | */ |
embeddedartists | 3:7ef908e84ae1 | 82 | void power(bool on_off); |
embeddedartists | 3:7ef908e84ae1 | 83 | |
embeddedartists | 3:7ef908e84ae1 | 84 | /** Control the input source of the device |
embeddedartists | 3:7ef908e84ae1 | 85 | * |
embeddedartists | 3:7ef908e84ae1 | 86 | * @param input Select the source of the input of the device: WM8731_LINE, WM8731_MIC, WM8731_NO_IN |
embeddedartists | 3:7ef908e84ae1 | 87 | */ |
embeddedartists | 3:7ef908e84ae1 | 88 | void input_select(int input); |
embeddedartists | 3:7ef908e84ae1 | 89 | |
embeddedartists | 3:7ef908e84ae1 | 90 | /** Set the headphone volume |
embeddedartists | 3:7ef908e84ae1 | 91 | * |
embeddedartists | 3:7ef908e84ae1 | 92 | * @param h_volume The desired headphone volume: 0->1 |
embeddedartists | 3:7ef908e84ae1 | 93 | */ |
embeddedartists | 3:7ef908e84ae1 | 94 | void headphone_volume(float h_volume); |
embeddedartists | 3:7ef908e84ae1 | 95 | |
embeddedartists | 3:7ef908e84ae1 | 96 | /** Set the line in pre-amp volume |
embeddedartists | 3:7ef908e84ae1 | 97 | * |
embeddedartists | 3:7ef908e84ae1 | 98 | * @param li_volume The desired line in volume: 0->1 |
embeddedartists | 3:7ef908e84ae1 | 99 | */ |
embeddedartists | 3:7ef908e84ae1 | 100 | void linein_volume(float li_volume); |
embeddedartists | 3:7ef908e84ae1 | 101 | |
embeddedartists | 3:7ef908e84ae1 | 102 | /** Turn on/off the microphone pre-amp boost |
embeddedartists | 3:7ef908e84ae1 | 103 | * |
embeddedartists | 3:7ef908e84ae1 | 104 | * @param mic_boost Boost on or off |
embeddedartists | 3:7ef908e84ae1 | 105 | */ |
embeddedartists | 3:7ef908e84ae1 | 106 | void microphone_boost(bool mic_boost); |
embeddedartists | 3:7ef908e84ae1 | 107 | |
embeddedartists | 3:7ef908e84ae1 | 108 | /** Mute the input |
embeddedartists | 3:7ef908e84ae1 | 109 | * |
embeddedartists | 3:7ef908e84ae1 | 110 | * @param mute Mute on/off |
embeddedartists | 3:7ef908e84ae1 | 111 | */ |
embeddedartists | 3:7ef908e84ae1 | 112 | void input_mute(bool mute); |
embeddedartists | 3:7ef908e84ae1 | 113 | |
embeddedartists | 3:7ef908e84ae1 | 114 | /** Mute the output |
embeddedartists | 3:7ef908e84ae1 | 115 | * |
embeddedartists | 3:7ef908e84ae1 | 116 | * @param mute Mute on/off |
embeddedartists | 3:7ef908e84ae1 | 117 | */ |
embeddedartists | 3:7ef908e84ae1 | 118 | void output_mute(bool mute); |
embeddedartists | 3:7ef908e84ae1 | 119 | |
embeddedartists | 3:7ef908e84ae1 | 120 | /** Turn on/off the input stage |
embeddedartists | 3:7ef908e84ae1 | 121 | * |
embeddedartists | 3:7ef908e84ae1 | 122 | * @param on_off Input stage on(true)/off(false) |
embeddedartists | 3:7ef908e84ae1 | 123 | */ |
embeddedartists | 3:7ef908e84ae1 | 124 | void input_power(bool on_off); |
embeddedartists | 3:7ef908e84ae1 | 125 | |
embeddedartists | 3:7ef908e84ae1 | 126 | /** Turn on/off the output stage |
embeddedartists | 3:7ef908e84ae1 | 127 | * |
embeddedartists | 3:7ef908e84ae1 | 128 | * @param on_off Output stage on(true)/off(false) |
embeddedartists | 3:7ef908e84ae1 | 129 | */ |
embeddedartists | 3:7ef908e84ae1 | 130 | void output_power(bool on_off); |
embeddedartists | 3:7ef908e84ae1 | 131 | |
embeddedartists | 3:7ef908e84ae1 | 132 | /** Select the word size |
embeddedartists | 3:7ef908e84ae1 | 133 | * |
embeddedartists | 3:7ef908e84ae1 | 134 | * @param words 16/20/24/32 bits |
embeddedartists | 3:7ef908e84ae1 | 135 | */ |
embeddedartists | 3:7ef908e84ae1 | 136 | void wordsize(int words); |
embeddedartists | 3:7ef908e84ae1 | 137 | |
embeddedartists | 3:7ef908e84ae1 | 138 | /** Select interface mode: Master or Slave |
embeddedartists | 3:7ef908e84ae1 | 139 | * |
embeddedartists | 3:7ef908e84ae1 | 140 | * @param master Interface mode: master(true)/slave |
embeddedartists | 3:7ef908e84ae1 | 141 | */ |
embeddedartists | 3:7ef908e84ae1 | 142 | void master(bool master); |
embeddedartists | 3:7ef908e84ae1 | 143 | |
embeddedartists | 3:7ef908e84ae1 | 144 | /** Select the sample rate |
embeddedartists | 3:7ef908e84ae1 | 145 | * |
embeddedartists | 3:7ef908e84ae1 | 146 | * @param freq Frequency: 96/48/32/8 kHz |
embeddedartists | 3:7ef908e84ae1 | 147 | */ |
embeddedartists | 3:7ef908e84ae1 | 148 | void frequency(int freq); |
embeddedartists | 3:7ef908e84ae1 | 149 | |
embeddedartists | 3:7ef908e84ae1 | 150 | /** Enable the input highpass filter |
embeddedartists | 3:7ef908e84ae1 | 151 | * |
embeddedartists | 3:7ef908e84ae1 | 152 | * @param enabled Input highpass filter enabled |
embeddedartists | 3:7ef908e84ae1 | 153 | */ |
embeddedartists | 3:7ef908e84ae1 | 154 | void input_highpass(bool enabled); |
embeddedartists | 3:7ef908e84ae1 | 155 | |
embeddedartists | 3:7ef908e84ae1 | 156 | /** Enable the output soft mute |
embeddedartists | 3:7ef908e84ae1 | 157 | * |
embeddedartists | 3:7ef908e84ae1 | 158 | * @param enabled Output soft mute enabled |
embeddedartists | 3:7ef908e84ae1 | 159 | */ |
embeddedartists | 3:7ef908e84ae1 | 160 | void output_softmute(bool enabled); |
embeddedartists | 3:7ef908e84ae1 | 161 | |
embeddedartists | 3:7ef908e84ae1 | 162 | /** Turn on and off the I2S |
embeddedartists | 3:7ef908e84ae1 | 163 | * |
embeddedartists | 3:7ef908e84ae1 | 164 | * @param on_off Switch the I2S interface on(true)/off(false) |
embeddedartists | 3:7ef908e84ae1 | 165 | */ |
embeddedartists | 3:7ef908e84ae1 | 166 | void interface_switch(bool on_off); |
embeddedartists | 3:7ef908e84ae1 | 167 | |
embeddedartists | 3:7ef908e84ae1 | 168 | /** Reset the device and settings |
embeddedartists | 3:7ef908e84ae1 | 169 | * |
embeddedartists | 3:7ef908e84ae1 | 170 | */ |
embeddedartists | 3:7ef908e84ae1 | 171 | void reset(); |
embeddedartists | 3:7ef908e84ae1 | 172 | |
embeddedartists | 3:7ef908e84ae1 | 173 | /** Set the microphone sidetone volume |
embeddedartists | 0:0d5190d379d3 | 174 | * |
embeddedartists | 3:7ef908e84ae1 | 175 | * @param sidetone_volume The volume of the sidetone: 0->1 |
embeddedartists | 3:7ef908e84ae1 | 176 | */ |
embeddedartists | 3:7ef908e84ae1 | 177 | void sidetone(float sidetone_vol); |
embeddedartists | 3:7ef908e84ae1 | 178 | |
embeddedartists | 3:7ef908e84ae1 | 179 | /** Set the analog bypass |
embeddedartists | 3:7ef908e84ae1 | 180 | * |
embeddedartists | 3:7ef908e84ae1 | 181 | * @param bypass_en Enable the bypass: enabled(true) |
embeddedartists | 0:0d5190d379d3 | 182 | */ |
embeddedartists | 3:7ef908e84ae1 | 183 | void bypass(bool bypass_en); |
embeddedartists | 3:7ef908e84ae1 | 184 | |
embeddedartists | 3:7ef908e84ae1 | 185 | /** Set the deemphasis frequency |
embeddedartists | 3:7ef908e84ae1 | 186 | * |
embeddedartists | 3:7ef908e84ae1 | 187 | * @param code The deemphasis code: WM8731_DE_EMPH_DISABLED, WM8731_DE_EMPH_32KHZ, WM8731_DE_EMPH_44KHZ, WM8731_DE_EMPH_48KHZ |
embeddedartists | 3:7ef908e84ae1 | 188 | */ |
embeddedartists | 3:7ef908e84ae1 | 189 | void deemphasis(char code); |
embeddedartists | 3:7ef908e84ae1 | 190 | |
embeddedartists | 3:7ef908e84ae1 | 191 | /** Enable the input highpass filter |
embeddedartists | 0:0d5190d379d3 | 192 | * |
embeddedartists | 3:7ef908e84ae1 | 193 | * @param enable Enable the input highpass filter enabled(true) |
embeddedartists | 0:0d5190d379d3 | 194 | */ |
embeddedartists | 3:7ef908e84ae1 | 195 | |
embeddedartists | 3:7ef908e84ae1 | 196 | void adc_highpass(bool enable); |
embeddedartists | 3:7ef908e84ae1 | 197 | |
embeddedartists | 3:7ef908e84ae1 | 198 | /** Start the device sending/recieving etc |
embeddedartists | 3:7ef908e84ae1 | 199 | */ |
embeddedartists | 3:7ef908e84ae1 | 200 | void start(); |
embeddedartists | 3:7ef908e84ae1 | 201 | |
embeddedartists | 3:7ef908e84ae1 | 202 | /** Stop the device sending/recieving etc |
embeddedartists | 3:7ef908e84ae1 | 203 | */ |
embeddedartists | 3:7ef908e84ae1 | 204 | void stop(); |
embeddedartists | 3:7ef908e84ae1 | 205 | |
embeddedartists | 0:0d5190d379d3 | 206 | private: |
embeddedartists | 3:7ef908e84ae1 | 207 | |
embeddedartists | 3:7ef908e84ae1 | 208 | enum reg_address { |
embeddedartists | 3:7ef908e84ae1 | 209 | line_in_vol_left = 0x00, |
embeddedartists | 3:7ef908e84ae1 | 210 | line_in_vol_right = 0x01, |
embeddedartists | 3:7ef908e84ae1 | 211 | headphone_vol_left = 0x02, |
embeddedartists | 3:7ef908e84ae1 | 212 | headphone_vol_right = 0x03, |
embeddedartists | 3:7ef908e84ae1 | 213 | path_analog = 0x04, |
embeddedartists | 3:7ef908e84ae1 | 214 | path_digital = 0x05, |
embeddedartists | 3:7ef908e84ae1 | 215 | power_control = 0x06, |
embeddedartists | 3:7ef908e84ae1 | 216 | interface_format = 0x07, |
embeddedartists | 3:7ef908e84ae1 | 217 | sample_rate = 0x08, |
embeddedartists | 3:7ef908e84ae1 | 218 | interface_activation = 0x09, |
embeddedartists | 3:7ef908e84ae1 | 219 | reset_reg = 0x0F, |
embeddedartists | 3:7ef908e84ae1 | 220 | all = 0xFF |
embeddedartists | 3:7ef908e84ae1 | 221 | }; |
embeddedartists | 3:7ef908e84ae1 | 222 | |
embeddedartists | 3:7ef908e84ae1 | 223 | enum tlv320_defaults{ |
embeddedartists | 3:7ef908e84ae1 | 224 | df_bypass_ = 0, |
embeddedartists | 3:7ef908e84ae1 | 225 | df_ADC_source = WM8731_LINE, |
embeddedartists | 3:7ef908e84ae1 | 226 | df_mic_mute = WM8731_UNMUTE, |
embeddedartists | 3:7ef908e84ae1 | 227 | df_li_mute_left = 0, |
embeddedartists | 3:7ef908e84ae1 | 228 | df_li_mute_right = 0, |
embeddedartists | 3:7ef908e84ae1 | 229 | df_mic_boost_ = 0, |
embeddedartists | 3:7ef908e84ae1 | 230 | df_out_mute = WM8731_UNMUTE, |
embeddedartists | 3:7ef908e84ae1 | 231 | |
embeddedartists | 3:7ef908e84ae1 | 232 | df_de_emph_code = 0x00, |
embeddedartists | 3:7ef908e84ae1 | 233 | df_ADC_highpass_enable = 0, |
embeddedartists | 3:7ef908e84ae1 | 234 | |
embeddedartists | 3:7ef908e84ae1 | 235 | df_device_all_pwr = 1, |
embeddedartists | 3:7ef908e84ae1 | 236 | df_device_clk_pwr = 1, |
embeddedartists | 3:7ef908e84ae1 | 237 | df_device_osc_pwr = 1, |
embeddedartists | 3:7ef908e84ae1 | 238 | df_device_out_pwr = 1, |
embeddedartists | 3:7ef908e84ae1 | 239 | df_device_dac_pwr = 1, |
embeddedartists | 3:7ef908e84ae1 | 240 | df_device_adc_pwr = 1, |
embeddedartists | 3:7ef908e84ae1 | 241 | df_device_mic_pwr = 0, |
embeddedartists | 3:7ef908e84ae1 | 242 | df_device_lni_pwr = 1, |
embeddedartists | 3:7ef908e84ae1 | 243 | |
embeddedartists | 3:7ef908e84ae1 | 244 | df_device_master = 0, |
embeddedartists | 3:7ef908e84ae1 | 245 | df_device_lrswap = 0, |
embeddedartists | 3:7ef908e84ae1 | 246 | df_device_lrws = 0, |
embeddedartists | 3:7ef908e84ae1 | 247 | df_device_bitlength = 32, |
embeddedartists | 0:0d5190d379d3 | 248 | |
embeddedartists | 3:7ef908e84ae1 | 249 | df_ADC_rate = 32000, |
embeddedartists | 3:7ef908e84ae1 | 250 | df_DAC_rate = 32000, |
embeddedartists | 3:7ef908e84ae1 | 251 | |
embeddedartists | 3:7ef908e84ae1 | 252 | df_device_interface_active = 0 |
embeddedartists | 3:7ef908e84ae1 | 253 | }; |
embeddedartists | 3:7ef908e84ae1 | 254 | |
embeddedartists | 3:7ef908e84ae1 | 255 | |
embeddedartists | 3:7ef908e84ae1 | 256 | I2C i2c; |
embeddedartists | 3:7ef908e84ae1 | 257 | uint8_t address; |
embeddedartists | 3:7ef908e84ae1 | 258 | void command(reg_address add, uint16_t byte); |
embeddedartists | 3:7ef908e84ae1 | 259 | void form_cmd(reg_address add); |
embeddedartists | 3:7ef908e84ae1 | 260 | void defaulter(); |
embeddedartists | 3:7ef908e84ae1 | 261 | |
embeddedartists | 3:7ef908e84ae1 | 262 | char gen_samplerate(); |
embeddedartists | 3:7ef908e84ae1 | 263 | |
embeddedartists | 3:7ef908e84ae1 | 264 | //I2S i2s_tx(I2S_TRANSMIT, p5, p6 , p7); |
embeddedartists | 3:7ef908e84ae1 | 265 | //I2S i2s_rx(I2S_RECIEVE , p8, p29, p30); |
embeddedartists | 3:7ef908e84ae1 | 266 | |
embeddedartists | 3:7ef908e84ae1 | 267 | float hp_vol_left, hp_vol_right; |
embeddedartists | 3:7ef908e84ae1 | 268 | float li_vol_left, li_vol_right; |
embeddedartists | 3:7ef908e84ae1 | 269 | float sdt_vol; |
embeddedartists | 3:7ef908e84ae1 | 270 | bool li_mute_left, li_mute_right; |
embeddedartists | 3:7ef908e84ae1 | 271 | bool bypass_; |
embeddedartists | 3:7ef908e84ae1 | 272 | bool ADC_source; |
embeddedartists | 3:7ef908e84ae1 | 273 | bool ADC_source_old; |
embeddedartists | 3:7ef908e84ae1 | 274 | bool mic_mute; |
embeddedartists | 3:7ef908e84ae1 | 275 | bool mic_boost_; |
embeddedartists | 3:7ef908e84ae1 | 276 | bool out_mute; |
embeddedartists | 3:7ef908e84ae1 | 277 | char de_emph_code; |
embeddedartists | 3:7ef908e84ae1 | 278 | bool ADC_highpass_enable; |
embeddedartists | 3:7ef908e84ae1 | 279 | |
embeddedartists | 3:7ef908e84ae1 | 280 | bool device_all_pwr; |
embeddedartists | 3:7ef908e84ae1 | 281 | bool device_clk_pwr; |
embeddedartists | 3:7ef908e84ae1 | 282 | bool device_osc_pwr; |
embeddedartists | 3:7ef908e84ae1 | 283 | bool device_out_pwr; |
embeddedartists | 3:7ef908e84ae1 | 284 | bool device_dac_pwr; |
embeddedartists | 3:7ef908e84ae1 | 285 | bool device_adc_pwr; |
embeddedartists | 3:7ef908e84ae1 | 286 | bool device_mic_pwr; |
embeddedartists | 3:7ef908e84ae1 | 287 | bool device_lni_pwr; |
embeddedartists | 3:7ef908e84ae1 | 288 | |
embeddedartists | 3:7ef908e84ae1 | 289 | bool device_master; |
embeddedartists | 3:7ef908e84ae1 | 290 | bool device_lrswap; |
embeddedartists | 3:7ef908e84ae1 | 291 | bool device_lrws; |
embeddedartists | 3:7ef908e84ae1 | 292 | char device_bitlength; |
embeddedartists | 3:7ef908e84ae1 | 293 | static const char device_data_form = 0x02; |
embeddedartists | 3:7ef908e84ae1 | 294 | |
embeddedartists | 3:7ef908e84ae1 | 295 | int ADC_rate; |
embeddedartists | 3:7ef908e84ae1 | 296 | int DAC_rate; |
embeddedartists | 3:7ef908e84ae1 | 297 | static const bool device_usb_mode = false; |
embeddedartists | 3:7ef908e84ae1 | 298 | static const bool device_clk_in_div = false; |
embeddedartists | 3:7ef908e84ae1 | 299 | static const bool device_clk_out_div = false; |
embeddedartists | 3:7ef908e84ae1 | 300 | bool device_interface_active; |
embeddedartists | 0:0d5190d379d3 | 301 | }; |
embeddedartists | 0:0d5190d379d3 | 302 | |
embeddedartists | 0:0d5190d379d3 | 303 | #endif |