X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fdrv%2Fwm8731.h;h=3404d0286bfa1e8fb52ba6ff8ab60a010a7d7236;hb=e8b0472be10fba4ca6baa62d8d483db90e28c06e;hp=aaf98228cf1baa04ef59d4b361641df48cec5430;hpb=b376a9255a68608fd3b2ba6ab10da1294eaf233e;p=bertos.git diff --git a/bertos/drv/wm8731.h b/bertos/drv/wm8731.h index aaf98228..3404d028 100644 --- a/bertos/drv/wm8731.h +++ b/bertos/drv/wm8731.h @@ -161,6 +161,14 @@ #define WM8731_SR_BITS_MASK 0x3C // Sample rate control #define WM8731_CLKIDIV2_BIT 6 // Core clock divider select #define WM8731_CLKODIV2_BIT 7 // CLKOUT divider select +/** + * Sampling rate control + * $WIZ$ wm8731_sample_rate = "WM8731_NORMAL_256FS_48KHZ", "WM8731_NORMAL_256FS_44_1KHZ", "WM8731_NORMAL_384FS_44_1KHZ" + */ +#define WM8731_NORMAL_256FS_48KHZ 0 +#define WM8731_NORMAL_256FS_44_1KHZ 0x20 +#define WM8731_NORMAL_384FS_44_1KHZ 0x22 +#define WM8731_NORMAL_128FS_44_1KHZ 0x3E /* Active control register*/ #define WM8731_REG_ACTIVE_CTRL 0x9 @@ -183,7 +191,7 @@ typedef struct Wm8731 /* \} */ /** - * Set the volume of select device (line in Rx/Lx, Headphone Rx/Lx). + * Set the volume of select device line in or Headphone. * The volume is express in %, and the volume range is 0-100%. */ void wm8731_setVolume(Wm8731 *ctx, uint16_t device, uint8_t volume);