old demo that i want to try in mbed studio
Dependencies: mbed SDFileSystem_Copy_of_mbed_version I2S
WOLFSON_config_consts.h@90:1dce46f0d9e5, 2020-05-16 (annotated)
- Committer:
- roryhand
- Date:
- Sat May 16 21:25:28 2020 +0000
- Branch:
- LargeFile_Tests
- Revision:
- 90:1dce46f0d9e5
- Parent:
- 0:e89d7a0bfa3b
current version to try in mbed studio
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
roryhand | 0:e89d7a0bfa3b | 1 | #ifndef WOLFSON_config_consts |
roryhand | 0:e89d7a0bfa3b | 2 | #define WOLFSON_config_consts |
roryhand | 0:e89d7a0bfa3b | 3 | // WM8731 Drivers - from MIKROE LIBSTOCK: https://libstock.mikroe.com/projects/view/304/wm8731-example |
roryhand | 0:e89d7a0bfa3b | 4 | /************************************************************************************************** |
roryhand | 0:e89d7a0bfa3b | 5 | * WM8731 sound chip register addresses |
roryhand | 0:e89d7a0bfa3b | 6 | **************************************************************************************************/ |
roryhand | 0:e89d7a0bfa3b | 7 | const int WM8731_ADDRESS = 0x34; // WM8731 chip address on I2C bus |
roryhand | 0:e89d7a0bfa3b | 8 | /************************************************************************************************** |
roryhand | 0:e89d7a0bfa3b | 9 | * WM8731 sound chip register addresses |
roryhand | 0:e89d7a0bfa3b | 10 | **************************************************************************************************/ |
roryhand | 0:e89d7a0bfa3b | 11 | const int WM8731_REG_LLINE_IN = 0x00; // Left Channel Line Input Volume Control |
roryhand | 0:e89d7a0bfa3b | 12 | const int WM8731_REG_RLINE_IN = 0x01; // Right Channel Line Input Volume Control |
roryhand | 0:e89d7a0bfa3b | 13 | const int WM8731_REG_LHPHONE_OUT = 0x02; // Left Channel Headphone Output Volume Control |
roryhand | 0:e89d7a0bfa3b | 14 | const int WM8731_REG_RHPHONE_OUT = 0x03; // Right Channel Headphone Output Volume Control |
roryhand | 0:e89d7a0bfa3b | 15 | const int WM8731_REG_ANALOG_PATH = 0x04; // Analog Audio Path Control |
roryhand | 0:e89d7a0bfa3b | 16 | const int WM8731_REG_DIGITAL_PATH = 0x05; // Digital Audio Path Control |
roryhand | 0:e89d7a0bfa3b | 17 | const int WM8731_REG_PDOWN_CTRL = 0x06; // Power Down Control Register |
roryhand | 0:e89d7a0bfa3b | 18 | const int WM8731_REG_DIGITAL_IF = 0x07; // Digital Audio Interface Format |
roryhand | 0:e89d7a0bfa3b | 19 | const int WM8731_REG_SAMPLING_CTRL = 0x08; // Sampling Control Register |
roryhand | 0:e89d7a0bfa3b | 20 | const int WM8731_REG_ACTIVE_CTRL = 0x09; // Active Control |
roryhand | 0:e89d7a0bfa3b | 21 | const int WM8731_REG_RESET = 0x0F; // Reset register |
roryhand | 0:e89d7a0bfa3b | 22 | |
roryhand | 0:e89d7a0bfa3b | 23 | /************************************************************************************************** |
roryhand | 0:e89d7a0bfa3b | 24 | * WM8731 sound chip constants (for default set up) |
roryhand | 0:e89d7a0bfa3b | 25 | **************************************************************************************************/ |
roryhand | 0:e89d7a0bfa3b | 26 | const int _WM8731_LEFT_LINEIN = 0X0180; // MIC SETTINGS: ENABLE MUTE, ENABLE SIMULTANEOUS LOAD TO LEFT AND RIGHT CHANNELS |
roryhand | 0:e89d7a0bfa3b | 27 | const int _WM8731_RIGHT_LINEIN = 0X0180; // MIC SETTINGS: ENABLE MUTE, ENABLE SIMULTANEOUS LOAD TO LEFT AND RIGHT CHANNELS |
roryhand | 0:e89d7a0bfa3b | 28 | const int _WM8731_LEFT_HP = 0X00F9; // HEADPHONE SETTINGS : 0DB |
roryhand | 0:e89d7a0bfa3b | 29 | const int _WM8731_RIGHT_HP = 0X00F9; // HEADPHONE SETTINGS : 0DB |
roryhand | 0:e89d7a0bfa3b | 30 | //const int _WM8731_LEFT_HP = 0X00E1; // HEADPHONE SETTINGS : -6?DB |
roryhand | 0:e89d7a0bfa3b | 31 | //const int _WM8731_RIGHT_HP = 0X00E1; // HEADPHONE SETTINGS : -6?DB |
roryhand | 0:e89d7a0bfa3b | 32 | const int _WM8731_ANALOGAUDIO = 0XD0; // DAC SELECT |
roryhand | 0:e89d7a0bfa3b | 33 | const int _WM8731_DIGITALAUDIO = 0X00; //11011 |
roryhand | 0:e89d7a0bfa3b | 34 | const int _WM8731_POWER = 0X00; // DISABLE POWER DOWN |
roryhand | 0:e89d7a0bfa3b | 35 | const int _WM8731_DAIF = 0X02; // ENABLE SLAVE MODE, 16BIT DATA AND I2S DATA |
roryhand | 0:e89d7a0bfa3b | 36 | //const int _WM8731_SAMPLING = 0x00; // 48000HZ,12.288MHz oscillator. |
roryhand | 0:e89d7a0bfa3b | 37 | //const int _WM8731_SAMPLING = 0X2E; // 8000HZ,12.288MHz oscillator. |
roryhand | 0:e89d7a0bfa3b | 38 | //const int _WM8731_SAMPLING = 0X0C; |
roryhand | 0:e89d7a0bfa3b | 39 | //const int _WM8731_SAMPLING = 0X18; // 8000HZ,12.288MHz oscillator. |
roryhand | 0:e89d7a0bfa3b | 40 | const int _WM8731_SAMPLING = 0x18; //32000HZ, 12.288MHz oscillator |
roryhand | 0:e89d7a0bfa3b | 41 | const int _WM8731_ACTIVATE = 0X01; // MODULE IS ON |
roryhand | 0:e89d7a0bfa3b | 42 | const int _WM8731_DEACTIVATE = 0X00; // MODULE IS OFF |
roryhand | 0:e89d7a0bfa3b | 43 | const int _WM8731_RESET = 0X00; // RESET VALUE |
roryhand | 0:e89d7a0bfa3b | 44 | |
roryhand | 0:e89d7a0bfa3b | 45 | //do I need to delete these highlighted ones? (ie unused ones?) I think maybe theyre duplicates |
roryhand | 0:e89d7a0bfa3b | 46 | /**************************************************************************************************/ |
roryhand | 0:e89d7a0bfa3b | 47 | |
roryhand | 0:e89d7a0bfa3b | 48 | |
roryhand | 0:e89d7a0bfa3b | 49 | #endif |