LibDriver WM8978
Loading...
Searching...
No Matches
driver_wm8978.h
Go to the documentation of this file.
1
36
37#ifndef DRIVER_WM8978_H
38#define DRIVER_WM8978_H
39
40#include <stdio.h>
41#include <stdint.h>
42#include <string.h>
43
44#ifdef __cplusplus
45extern "C"{
46#endif
47
53
58
62typedef enum
63{
67
78
87
98
109
113typedef enum
114{
118
127
137
146
161
174
183
196
207
221
231
240
251
260
286
295
304
315
324
335
346
357
368
386
404
417
428
443
458
467
471typedef enum
472{
476
480typedef enum
481{
485
497
501typedef struct wm8978_handle_s
502{
503 uint8_t iic_addr;
504 uint8_t (*iic_init)(void);
505 uint8_t (*iic_deinit)(void);
506 uint8_t (*iic_write)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len);
507 void (*delay_ms)(uint32_t ms);
508 void (*debug_print)(const char *const fmt, ...);
509 uint16_t reg[58];
510 uint8_t inited;
512
528
532
539
546#define DRIVER_WM8978_LINK_INIT(HANDLE, STRUCTURE) memset(HANDLE, 0, sizeof(STRUCTURE))
547
554#define DRIVER_WM8978_LINK_IIC_INIT(HANDLE, FUC) (HANDLE)->iic_init = FUC
555
562#define DRIVER_WM8978_LINK_IIC_DEINIT(HANDLE, FUC) (HANDLE)->iic_deinit = FUC
563
570#define DRIVER_WM8978_LINK_IIC_WRITE(HANDLE, FUC) (HANDLE)->iic_write = FUC
571
578#define DRIVER_WM8978_LINK_DELAY_MS(HANDLE, FUC) (HANDLE)->delay_ms = FUC
579
586#define DRIVER_WM8978_LINK_DEBUG_PRINT(HANDLE, FUC) (HANDLE)->debug_print = FUC
587
591
598
607uint8_t wm8978_info(wm8978_info_t *info);
608
620uint8_t wm8978_init(wm8978_handle_t *handle);
621
633uint8_t wm8978_deinit(wm8978_handle_t *handle);
634
645uint8_t wm8978_soft_reset(wm8978_handle_t *handle);
646
658uint8_t wm8978_set_dc_buffer(wm8978_handle_t *handle, wm8978_bool_t enable);
659
672
685
697uint8_t wm8978_set_pll(wm8978_handle_t *handle, wm8978_bool_t enable);
698
711
724
737
750
763
775uint8_t wm8978_set_left_out1(wm8978_handle_t *handle, wm8978_bool_t enable);
776
788uint8_t wm8978_set_sleep(wm8978_handle_t *handle, wm8978_bool_t enable);
789
802
815
828
841
854
867
879uint8_t wm8978_set_out4(wm8978_handle_t *handle, wm8978_bool_t enable);
880
892uint8_t wm8978_set_out3(wm8978_handle_t *handle, wm8978_bool_t enable);
893
905uint8_t wm8978_set_left_out2(wm8978_handle_t *handle, wm8978_bool_t enable);
906
919
932
945
958
971
984
997
1009uint8_t wm8978_set_word_length(wm8978_handle_t *handle, wm8978_word_length_t word_length);
1010
1023
1036
1049
1061uint8_t wm8978_set_channel(wm8978_handle_t *handle, wm8978_channel_t channel);
1062
1075
1088
1101
1113uint8_t wm8978_set_loopback(wm8978_handle_t *handle, wm8978_bool_t enable);
1114
1126uint8_t wm8978_set_clksel(wm8978_handle_t *handle, wm8978_clksel_t clksel);
1127
1140
1153
1166
1179
1191uint8_t wm8978_set_slow_clock(wm8978_handle_t *handle, wm8978_bool_t enable);
1192
1205
1218
1231
1243uint8_t wm8978_set_vmid_1(wm8978_handle_t *handle, wm8978_bool_t enable);
1244
1256uint8_t wm8978_set_vmid_0(wm8978_handle_t *handle, wm8978_bool_t enable);
1257
1270
1283
1295uint8_t wm8978_set_soft_mute(wm8978_handle_t *handle, wm8978_bool_t enable);
1296
1309
1321uint8_t wm8978_set_amute(wm8978_handle_t *handle, wm8978_bool_t enable);
1322
1335
1348
1361uint8_t wm8978_set_dac_left_volume(wm8978_handle_t *handle, wm8978_bool_t enable, uint8_t volume);
1362
1375uint8_t wm8978_set_dac_right_volume(wm8978_handle_t *handle, wm8978_bool_t enable, uint8_t volume);
1376
1390
1404
1417
1429uint8_t wm8978_set_mode(wm8978_handle_t *handle, wm8978_mode_t mode);
1430
1443
1456
1469
1482
1495uint8_t wm8978_set_adc_left_volume(wm8978_handle_t *handle, wm8978_bool_t enable, uint8_t volume);
1496
1509uint8_t wm8978_set_adc_right_volume(wm8978_handle_t *handle, wm8978_bool_t enable, uint8_t volume);
1510
1522uint8_t wm8978_volume_convert_to_register(wm8978_handle_t *handle, float db, uint8_t *reg);
1523
1535uint8_t wm8978_volume_convert_to_data(wm8978_handle_t *handle, uint8_t reg, float *db);
1536
1549
1562
1575uint8_t wm8978_set_eq1_gain(wm8978_handle_t *handle, uint8_t gain);
1576
1589
1602
1615uint8_t wm8978_set_eq2_gain(wm8978_handle_t *handle, uint8_t gain);
1616
1629
1642
1655uint8_t wm8978_set_eq3_gain(wm8978_handle_t *handle, uint8_t gain);
1656
1669
1682
1695uint8_t wm8978_set_eq4_gain(wm8978_handle_t *handle, uint8_t gain);
1696
1709
1722uint8_t wm8978_set_eq5_gain(wm8978_handle_t *handle, uint8_t gain);
1723
1735uint8_t wm8978_eq_gain_convert_to_register(wm8978_handle_t *handle, int8_t db, uint8_t *reg);
1736
1748uint8_t wm8978_eq_gain_convert_to_data(wm8978_handle_t *handle, uint8_t reg, int8_t *db);
1749
1762
1775
1788
1801
1814uint8_t wm8978_set_dac_limiter_volume_boost(wm8978_handle_t *handle, uint8_t db);
1815
1828
1842uint8_t wm8978_set_notch_filter_a0_coefficient_bit_13_7(wm8978_handle_t *handle, wm8978_bool_t update_once, uint8_t coefficient);
1843
1857uint8_t wm8978_set_notch_filter_a0_coefficient_bit_6_0(wm8978_handle_t *handle, wm8978_bool_t update_once, uint8_t coefficient);
1858
1872uint8_t wm8978_set_notch_filter_a1_coefficient_bit_13_7(wm8978_handle_t *handle, wm8978_bool_t update_once, uint8_t coefficient);
1873
1887uint8_t wm8978_set_notch_filter_a1_coefficient_bit_6_0(wm8978_handle_t *handle, wm8978_bool_t update_once, uint8_t coefficient);
1888
1900uint8_t wm8978_set_alc(wm8978_handle_t *handle, wm8978_alc_t alc);
1901
1914
1927
1940uint8_t wm8978_set_alc_hold_time(wm8978_handle_t *handle, uint8_t t);
1941
1953uint8_t wm8978_alc_hold_time_convert_to_register(wm8978_handle_t *handle, float ms, uint8_t *reg);
1954
1966uint8_t wm8978_alc_hold_time_convert_to_data(wm8978_handle_t *handle, uint8_t reg, float *ms);
1967
1980
1993
2006uint8_t wm8978_set_alc_decay(wm8978_handle_t *handle, uint8_t decay);
2007
2020uint8_t wm8978_set_alc_attack(wm8978_handle_t *handle, uint8_t attack);
2021
2034
2047uint8_t wm8978_set_alc_noise_gate_threshold(wm8978_handle_t *handle, uint8_t threshold);
2048
2060uint8_t wm8978_alc_noise_gate_threshold_convert_to_register(wm8978_handle_t *handle, int8_t db, uint8_t *reg);
2061
2073uint8_t wm8978_alc_noise_gate_threshold_convert_to_data(wm8978_handle_t *handle, uint8_t reg, int8_t *db);
2074
2087
2100uint8_t wm8978_set_plln(wm8978_handle_t *handle, uint8_t n);
2101
2113uint8_t wm8978_set_pll_freq(wm8978_handle_t *handle, uint32_t freq);
2114
2127uint8_t wm8978_set_depth_3d(wm8978_handle_t *handle, uint8_t depth);
2128
2140uint8_t wm8978_depth_3d_convert_to_register(wm8978_handle_t *handle, float percent, uint8_t *reg);
2141
2153uint8_t wm8978_depth_3d_convert_to_data(wm8978_handle_t *handle, uint8_t reg, float *percent);
2154
2167
2180
2193uint8_t wm8978_set_beep_volume(wm8978_handle_t *handle, uint8_t vol);
2194
2206uint8_t wm8978_beep_volume_convert_to_register(wm8978_handle_t *handle, int8_t db, uint8_t *reg);
2207
2219uint8_t wm8978_beep_volume_convert_to_data(wm8978_handle_t *handle, uint8_t reg, int8_t *db);
2220
2232uint8_t wm8978_set_beep(wm8978_handle_t *handle, wm8978_bool_t enable);
2233
2246
2259
2272
2285
2298
2311
2324
2337
2350
2363
2376uint8_t wm8978_set_left_channel_input_pga_volume(wm8978_handle_t *handle, uint8_t volume);
2377
2389uint8_t wm8978_left_channel_input_pga_volume_convert_to_register(wm8978_handle_t *handle, float db, uint8_t *reg);
2390
2402uint8_t wm8978_left_channel_input_pga_volume_convert_to_data(wm8978_handle_t *handle, uint8_t reg, float *db);
2403
2416
2429
2442
2455uint8_t wm8978_set_right_channel_input_pga_volume(wm8978_handle_t *handle, uint8_t volume);
2456
2468uint8_t wm8978_right_channel_input_pga_volume_convert_to_register(wm8978_handle_t *handle, float db, uint8_t *reg);
2469
2481uint8_t wm8978_right_channel_input_pga_volume_convert_to_data(wm8978_handle_t *handle, uint8_t reg, float *db);
2482
2495
2508uint8_t wm8978_set_left_channel_input_boost_stage(wm8978_handle_t *handle, uint8_t stage);
2509
2521uint8_t wm8978_left_channel_input_boost_stage_convert_to_register(wm8978_handle_t *handle, int8_t db, uint8_t *reg);
2522
2534uint8_t wm8978_left_channel_input_boost_stage_convert_to_data(wm8978_handle_t *handle, uint8_t reg, int8_t *db);
2535
2549
2562
2575
2588
2601uint8_t wm8978_set_right_channel_input_boost_stage(wm8978_handle_t *handle, uint8_t stage);
2602
2614uint8_t wm8978_right_channel_input_boost_stage_convert_to_register(wm8978_handle_t *handle, int8_t db, uint8_t *reg);
2615
2627uint8_t wm8978_right_channel_input_boost_stage_convert_to_data(wm8978_handle_t *handle, uint8_t reg, int8_t *db);
2628
2642
2655
2668
2681
2694
2706uint8_t wm8978_set_out4_boost(wm8978_handle_t *handle, wm8978_bool_t enable);
2707
2719uint8_t wm8978_set_out3_boost(wm8978_handle_t *handle, wm8978_bool_t enable);
2720
2733
2746
2759
2773
2786
2799
2812
2826
2839
2852
2865
2878
2892
2905
2918
2931
2945
2958
2971
2984
2997
3010
3023
3036
3050
3063
3075uint8_t wm8978_lout1_left_headphone_output_volume_convert_to_data(wm8978_handle_t *handle, uint8_t reg, int8_t *db);
3076
3089
3102
3115
3129
3142
3154uint8_t wm8978_rout1_right_headphone_output_volume_convert_to_data(wm8978_handle_t *handle, uint8_t reg, int8_t *db);
3155
3168
3181
3194
3208
3221
3233uint8_t wm8978_lout2_left_speaker_output_volume_convert_to_data(wm8978_handle_t *handle, uint8_t reg, int8_t *db);
3234
3247
3260
3273
3287
3300
3312uint8_t wm8978_rout2_right_speaker_output_volume_convert_to_data(wm8978_handle_t *handle, uint8_t reg, int8_t *db);
3313
3325uint8_t wm8978_set_out3_mute(wm8978_handle_t *handle, wm8978_bool_t enable);
3326
3339
3352
3365
3378
3390uint8_t wm8978_set_out4_mute(wm8978_handle_t *handle, wm8978_bool_t enable);
3391
3404
3417
3430
3443
3456
3469
3473
3480
3493uint8_t wm8978_set_reg(wm8978_handle_t *handle, uint8_t reg, uint16_t value);
3494
3498
3502
3503#ifdef __cplusplus
3504}
3505#endif
3506
3507#endif
uint8_t wm8978_set_lout2_left_speaker_output_volume(wm8978_handle_t *handle, uint8_t vol)
set lout2 left speaker output volume
uint8_t wm8978_set_right_out2(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable right out2
uint8_t wm8978_soft_reset(wm8978_handle_t *handle)
soft reset
uint8_t wm8978_set_microphone_bias(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable microphone bias
uint8_t wm8978_set_right_channel_adc(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable right channel adc
wm8978_eq3_band_centre_freq_t
wm8978 eq3 band centre freq enumeration definition
uint8_t wm8978_left_bypass_volume_control_to_output_channel_mixer_convert_to_register(wm8978_handle_t *handle, int8_t db, uint8_t *reg)
convert the left bypass volume control to output channel mixer to the register raw data
uint8_t wm8978_auxiliary_amplifier_right_channel_input_boost_stage_convert_to_data(wm8978_handle_t *handle, uint8_t reg, int8_t *db)
convert the auxiliary amplifier right channel input boost stage register raw data to the real data
uint8_t wm8978_set_right_channel_input_pga_negative(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable right channel input pga negative
uint8_t wm8978_set_auxiliary_amplifier_left_channel_input_boost_stage(wm8978_handle_t *handle, uint8_t stage)
set auxiliary amplifier left channel input boost stage
uint8_t wm8978_set_microphone_bias_voltage(wm8978_handle_t *handle, wm8978_avdd_t avdd)
set microphone bias voltage
uint8_t wm8978_set_eq1_gain(wm8978_handle_t *handle, uint8_t gain)
set eq1 gain
uint8_t wm8978_lout1_left_headphone_output_volume_convert_to_register(wm8978_handle_t *handle, int8_t db, uint8_t *reg)
convert the lout1 left headphone output volume to the register raw data
uint8_t wm8978_rout1_right_headphone_output_volume_convert_to_data(wm8978_handle_t *handle, uint8_t reg, int8_t *db)
convert the rout1 right headphone output volume raw data to the real data
uint8_t wm8978_set_equaliser_apply(wm8978_handle_t *handle, wm8978_equaliser_t equaliser)
set equaliser apply
uint8_t wm8978_set_notch_filter_a0_coefficient_bit_6_0(wm8978_handle_t *handle, wm8978_bool_t update_once, uint8_t coefficient)
set notch filter a0 coefficient bit6 - bit0
uint8_t wm8978_set_mute_input_to_inv_rout2_mixer(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable mute input to inv rout2 mixer
uint8_t wm8978_set_eq4_gain(wm8978_handle_t *handle, uint8_t gain)
set eq4 gain
wm8978_mode_t
wm8978 mode enumeration definition
uint8_t wm8978_alc_noise_gate_threshold_convert_to_data(wm8978_handle_t *handle, uint8_t reg, int8_t *db)
convert the alc noise gate threshold register raw data to the real data
uint8_t wm8978_rout2_right_speaker_output_volume_convert_to_data(wm8978_handle_t *handle, uint8_t reg, int8_t *db)
convert the rout2 right speaker output volume raw data to the real data
wm8978_high_pass_filter_cut_off_t
wm8978 high pass filter cut off enumeration definition
uint8_t wm8978_set_channel(wm8978_handle_t *handle, wm8978_channel_t channel)
set channel
uint8_t wm8978_right_channel_input_boost_stage_convert_to_data(wm8978_handle_t *handle, uint8_t reg, int8_t *db)
convert the right channel input boost stage register raw data to the real data
uint8_t wm8978_set_lout1_headphone_volume_zero_cross(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable lout1 headphone volume zero cross
uint8_t wm8978_set_adc_right_channel_polarity(wm8978_handle_t *handle, wm8978_polarity_t polarity)
set adc right channel polarity
uint8_t wm8978_set_plln(wm8978_handle_t *handle, uint8_t n)
set plln
uint8_t wm8978_set_rout1_update(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable rout1 update
uint8_t wm8978_auxiliary_amplifier_left_channel_input_boost_stage_convert_to_data(wm8978_handle_t *handle, uint8_t reg, int8_t *db)
convert the auxiliary amplifier left channel input boost stage register raw data to the real data
uint8_t wm8978_set_left_channel_input_pga_volume(wm8978_handle_t *handle, uint8_t volume)
set left channel input pga volume
uint8_t wm8978_set_word_length(wm8978_handle_t *handle, wm8978_word_length_t word_length)
set word length
uint8_t wm8978_set_right_dac_output_polarity(wm8978_handle_t *handle, wm8978_polarity_t polarity)
set right dac output polarity
uint8_t wm8978_set_pll(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable pll
uint8_t wm8978_set_left_dac_output_to_right_output_mixer(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable left dac output to right output mixer
wm8978_eq4_band_centre_freq_t
wm8978 eq4 band centre freq enumeration definition
wm8978_data_format_t
wm8978 data format enumeration definition
uint8_t wm8978_set_vmid_0(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable vmid 0
uint8_t wm8978_set_alc(wm8978_handle_t *handle, wm8978_alc_t alc)
set alc
uint8_t wm8978_set_rout2_speaker_volume_zero_cross(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable rout2 speaker volume zero cross
uint8_t wm8978_aux_right_channel_input_to_right_mixer_volume_convert_to_register(wm8978_handle_t *handle, int8_t db, uint8_t *reg)
convert the aux right channel input to right mixer volume to the register raw data
uint8_t wm8978_set_adc_appear(wm8978_handle_t *handle, wm8978_appear_t appear)
set adc appear
uint8_t wm8978_set_rout1_right_headphone_output_volume(wm8978_handle_t *handle, uint8_t vol)
set rout1 right headphone output volume
uint8_t wm8978_init(wm8978_handle_t *handle)
initialize the chip
uint8_t wm8978_set_right_channel_input_pga_volume(wm8978_handle_t *handle, uint8_t volume)
set right channel input pga volume
uint8_t wm8978_volume_convert_to_register(wm8978_handle_t *handle, float db, uint8_t *reg)
convert the volume data to the register raw data
uint8_t wm8978_set_gpio1_select(wm8978_handle_t *handle, wm8978_gpio1_sel_t sel)
set gpio1 select
uint8_t wm8978_set_right_dac_output_to_out4(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable right dac output to out4
uint8_t wm8978_set_left_channel_input_pga_boost(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable left channel input pga boost
uint8_t wm8978_set_right_auxiliary_input_to_right_channel_output_mixer(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable right auxiliary input to right channel output mixer
wm8978_impedance_t
wm8978 impedance enumeration definition
uint8_t wm8978_info(wm8978_info_t *info)
get chip's information
uint8_t wm8978_set_left_input_pga_update(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable left input pga update
uint8_t wm8978_set_left_dac_mixer_to_out3(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable left dac mixer to out3
uint8_t wm8978_set_dac_left_volume(wm8978_handle_t *handle, wm8978_bool_t enable, uint8_t volume)
set dac left volume
wm8978_dac_limiter_attack_t
wm8978 dac limiter attack enumeration definition
uint8_t wm8978_set_eq4_bandwidth(wm8978_handle_t *handle, wm8978_eq_bandwidth_t width)
set eq4 bandwidth
uint8_t wm8978_set_adc_companding(wm8978_handle_t *handle, wm8978_companding_t companding)
set adc companding
uint8_t wm8978_auxiliary_amplifier_left_channel_input_boost_stage_convert_to_register(wm8978_handle_t *handle, int8_t db, uint8_t *reg)
convert the auxiliary amplifier left channel input boost stage to the register raw data
uint8_t wm8978_set_alc_level(wm8978_handle_t *handle, wm8978_alc_level_t level)
set alc level
wm8978_vref_t
wm8978 vref enumeration definition
uint8_t wm8978_set_right_bypass_path_to_right_output_mixer(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable right bypass path to right output mixer
uint8_t wm8978_set_left_dac_output_polarity(wm8978_handle_t *handle, wm8978_polarity_t polarity)
set left dac output polarity
uint8_t wm8978_set_right_channel_input_boost(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable right channel input boost
uint8_t wm8978_set_right_output_channel_mixer(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable right output channel mixer
uint8_t wm8978_auxiliary_amplifier_right_channel_input_boost_stage_convert_to_register(wm8978_handle_t *handle, int8_t db, uint8_t *reg)
convert the auxiliary amplifier right channel input boost stage to the register raw data
uint8_t wm8978_set_pll_div(wm8978_handle_t *handle, wm8978_pll_div_t d)
set pll div
uint8_t wm8978_aux_right_channel_input_to_right_mixer_volume_convert_to_data(wm8978_handle_t *handle, uint8_t reg, int8_t *db)
convert the aux right channel input to right mixer volume raw data to the real data
wm8978_clock_mode_t
wm8978 clock mode enumeration definition
uint8_t wm8978_eq_gain_convert_to_register(wm8978_handle_t *handle, int8_t db, uint8_t *reg)
convert the eq gain to the register raw data
uint8_t wm8978_right_channel_input_pga_volume_convert_to_data(wm8978_handle_t *handle, uint8_t reg, float *db)
convert the right channel input pga volume register raw data to the real data
uint8_t wm8978_set_left_channel_input_pga_zero_cross(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable left channel input pga zero cross
uint8_t wm8978_set_eq5_gain(wm8978_handle_t *handle, uint8_t gain)
set eq5 gain
uint8_t wm8978_set_loopback(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable loopback
uint8_t wm8978_set_pll_freq(wm8978_handle_t *handle, uint32_t freq)
set pll freq
uint8_t wm8978_set_left_dac_mixer_to_out4(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable left dac mixer to out4
uint8_t wm8978_set_lrclk_polarity(wm8978_handle_t *handle, wm8978_polarity_t polarity)
set lrclk polarity
uint8_t wm8978_set_dac_limiter_level(wm8978_handle_t *handle, wm8978_dac_limiter_level_t level)
set dac limiter level
wm8978_adc_oversample_rate_t
wm8978 adc oversample rate enumeration definition
uint8_t wm8978_alc_hold_time_convert_to_register(wm8978_handle_t *handle, float ms, uint8_t *reg)
convert the alc hold time to the register raw data
uint8_t wm8978_set_slow_clock(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable slow clock
uint8_t wm8978_set_approximate_sample_rate(wm8978_handle_t *handle, wm8978_approximate_sample_t sample)
set approximate sample rate
uint8_t wm8978_set_left_dac_output_to_left_output_mixer(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable left dac output to left output mixer
uint8_t wm8978_set_eq5_cut_off(wm8978_handle_t *handle, wm8978_eq5_band_cut_off_t cut_off)
set eq5 cut off
uint8_t wm8978_set_lout2_speaker_volume_zero_cross(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable lout2 speaker volume zero cross
uint8_t wm8978_set_eq2_gain(wm8978_handle_t *handle, uint8_t gain)
set eq2 gain
uint8_t wm8978_alc_noise_gate_threshold_convert_to_register(wm8978_handle_t *handle, int8_t db, uint8_t *reg)
convert the alc noise gate threshold to the register raw data
uint8_t wm8978_set_amute(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable amute
uint8_t wm8978_set_unused_input_output_tie_off_buffer(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable unused input output tie off buffer
uint8_t wm8978_left_channel_input_pga_volume_convert_to_data(wm8978_handle_t *handle, uint8_t reg, float *db)
convert the left channel input pga volume register raw data to the real data
uint8_t wm8978_left_channel_input_pga_volume_convert_to_register(wm8978_handle_t *handle, float db, uint8_t *reg)
convert the left channel input pga volume to the register raw data
wm8978_companding_t
wm8978 companding enumeration definition
uint8_t wm8978_aux_left_channel_input_to_left_mixer_volume_convert_to_data(wm8978_handle_t *handle, uint8_t reg, int8_t *db)
convert the aux left channel input to left mixer volume register raw data to the real data
uint8_t wm8978_set_out3_boost(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable out3 boost
uint8_t wm8978_set_rout2_right_speaker_output_mute(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable rout2 right speaker output mute
uint8_t wm8978_set_left_channel_input_pga_mute(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable left channel input pga mute
uint8_t wm8978_set_left_out1(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable left out1
uint8_t wm8978_left_channel_input_boost_stage_convert_to_register(wm8978_handle_t *handle, int8_t db, uint8_t *reg)
convert the left channel input boost stage to the register raw data
uint8_t wm8978_set_alc_noise_gate(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable alc noise gate
uint8_t wm8978_lout2_left_speaker_output_volume_convert_to_data(wm8978_handle_t *handle, uint8_t reg, int8_t *db)
convert the lout2 left speaker output volume raw data to the real data
wm8978_word_length_t
wm8978 word length enumeration definition
uint8_t wm8978_set_out4_mixer(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable out4 mixer
wm8978_channel_t
wm8978 channel enumeration definition
wm8978_dac_limiter_level_t
wm8978 dac limiter level enumeration definition
uint8_t wm8978_left_channel_input_boost_stage_convert_to_data(wm8978_handle_t *handle, uint8_t reg, int8_t *db)
convert the left channel input boost stage register raw data to the real data
uint8_t wm8978_set_lout2_update(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable lout2 update
uint8_t wm8978_set_right_bypass_volume_control_to_output_channel_mixer(wm8978_handle_t *handle, uint8_t vol)
set right bypass volume control to output channel mixer
wm8978_approximate_sample_t
wm8978 approximate sample enumeration definition
wm8978_pll_div_t
wm8978 pll div enumeration definition
uint8_t wm8978_depth_3d_convert_to_register(wm8978_handle_t *handle, float percent, uint8_t *reg)
convert the depth 3d to the register raw data
uint8_t wm8978_set_left_channel_input_pga_negative(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable left channel input pga negative
uint8_t wm8978_set_clock_mode(wm8978_handle_t *handle, wm8978_clock_mode_t mode)
set clock mode
uint8_t wm8978_alc_hold_time_convert_to_data(wm8978_handle_t *handle, uint8_t reg, float *ms)
convert the alc hold time register raw data to the real data
uint8_t wm8978_set_vref_to_analogue_output_resistance(wm8978_handle_t *handle, wm8978_vref_t vref)
set vref to analogue output resistance
wm8978_avdd_t
wm8978 avdd enumeration definition
uint8_t wm8978_set_bclk_div(wm8978_handle_t *handle, wm8978_bclk_div_t d)
set bclk div
uint8_t wm8978_set_gpio1_polarity(wm8978_handle_t *handle, wm8978_polarity_t polarity)
set gpio1 polarity
uint8_t wm8978_set_right_dac_output_to_left_output_mixer(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable right dac output to left output mixer
uint8_t wm8978_set_right_dac_mixer_to_out4(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable right dac mixer to out4
uint8_t wm8978_set_adc_left_volume(wm8978_handle_t *handle, wm8978_bool_t enable, uint8_t volume)
set adc left volume
uint8_t wm8978_aux_left_channel_input_to_left_mixer_volume_convert_to_register(wm8978_handle_t *handle, int8_t db, uint8_t *reg)
convert the aux left channel input to left mixer volume to the register raw data
wm8978_jack_t
wm8978 jack enumeration definition
wm8978_polarity_t
wm8978 polarity enumeration definition
uint8_t wm8978_set_left_bypass_volume_control_to_output_channel_mixer(wm8978_handle_t *handle, uint8_t vol)
set left bypass volume control to output channel mixer
uint8_t wm8978_set_left_channel_input_pga_positive(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable left channel input pga positive
uint8_t wm8978_set_adc_left_channel_polarity(wm8978_handle_t *handle, wm8978_polarity_t polarity)
set adc left channel polarity
wm8978_eq5_band_cut_off_t
wm8978 eq5 band cut off enumeration definition
uint8_t wm8978_set_speaker_boost(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable speaker boost
uint8_t wm8978_set_eq3_bandwidth(wm8978_handle_t *handle, wm8978_eq_bandwidth_t width)
set eq3 bandwidth
uint8_t wm8978_rout1_right_headphone_output_volume_convert_to_register(wm8978_handle_t *handle, int8_t db, uint8_t *reg)
convert the rout1 right headphone output volume to the register raw data
uint8_t wm8978_set_out4(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable out4
uint8_t wm8978_set_adc_oversample_rate(wm8978_handle_t *handle, wm8978_adc_oversample_rate_t rate)
set adc oversample rate
uint8_t wm8978_set_depth_3d(wm8978_handle_t *handle, uint8_t depth)
set depth 3d
uint8_t wm8978_set_clksel(wm8978_handle_t *handle, wm8978_clksel_t clksel)
set clksel
uint8_t wm8978_set_dac_oversample_rate(wm8978_handle_t *handle, wm8978_dac_oversample_rate_t rate)
set dac oversample rate
uint8_t wm8978_set_out4_mute(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable out4 mute
uint8_t wm8978_set_left_out2(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable left out2
uint8_t wm8978_set_adc_right_volume(wm8978_handle_t *handle, wm8978_bool_t enable, uint8_t volume)
set adc right volume
uint8_t wm8978_lout1_left_headphone_output_volume_convert_to_data(wm8978_handle_t *handle, uint8_t reg, int8_t *db)
convert the lout1 left headphone output volume raw data to the real data
uint8_t wm8978_set_thermal_shutdown(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable thermal shutdown
uint8_t wm8978_set_reference_impedance(wm8978_handle_t *handle, wm8978_impedance_t impedance)
set reference impedance
uint8_t wm8978_right_channel_input_boost_stage_convert_to_register(wm8978_handle_t *handle, int8_t db, uint8_t *reg)
convert the right channel input boost stage to the register raw data
uint8_t wm8978_set_eq2_centre_freq(wm8978_handle_t *handle, wm8978_eq2_band_centre_freq_t freq)
set eq2 centre freq
uint8_t wm8978_set_left_channel_dac(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable left channel dac
uint8_t wm8978_set_rout2_update(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable rout2 update
struct wm8978_handle_s wm8978_handle_t
wm8978 handle structure definition
wm8978_gpio1_sel_t
wm8978 gpio1 sel enumeration definition
uint8_t wm8978_set_dac_limiter_decay(wm8978_handle_t *handle, wm8978_dac_limiter_decay_t decay)
set dac limiter decay
uint8_t wm8978_lout2_left_speaker_output_volume_convert_to_register(wm8978_handle_t *handle, int8_t db, uint8_t *reg)
convert the lout2 left speaker output volume to the register raw data
uint8_t wm8978_set_right_channel_input_pga_amplifier_positive(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable right channel input pga amplifier positive
uint8_t wm8978_set_alc_noise_gate_threshold(wm8978_handle_t *handle, uint8_t threshold)
set alc noise gate threshold
uint8_t wm8978_set_dac_companding(wm8978_handle_t *handle, wm8978_companding_t companding)
set dac companding
uint8_t wm8978_set_inv_rout2_mixer(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable inv rout2 mixer
uint8_t wm8978_set_out4_boost(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable out4 boost
uint8_t wm8978_set_right_input_pga_update(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable right input pga update
uint8_t wm8978_set_out3_mixer(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable out3 mixer
uint8_t wm8978_set_rout2_right_speaker_output_volume(wm8978_handle_t *handle, uint8_t vol)
set rout2 right speaker output volume
uint8_t wm8978_set_left_channel_input_boost_stage(wm8978_handle_t *handle, uint8_t stage)
set left channel input boost stage
uint8_t wm8978_set_right_adc_input_to_out4(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable right adc input to out4
uint8_t wm8978_set_left_auxiliary_input_to_left_channel_output_mixer(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable left auxiliary input to left channel output mixer
uint8_t wm8978_volume_convert_to_data(wm8978_handle_t *handle, uint8_t reg, float *db)
convert the volume register raw data to the real data
uint8_t wm8978_set_left_dac_to_out4(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable left dac to out4
uint8_t wm8978_set_left_output_channel_mixer(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable left output channel mixer
uint8_t wm8978_set_alc_hold_time(wm8978_handle_t *handle, uint8_t t)
set alc hold time
uint8_t wm8978_set_eq1_cut_off(wm8978_handle_t *handle, wm8978_eq1_band_cut_off_t cut_off)
set eq1 cut off
uint8_t wm8978_set_left_bypass_path_to_left_output_mixer(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable left bypass path to left output mixer
uint8_t wm8978_set_eq4_centre_freq(wm8978_handle_t *handle, wm8978_eq4_band_centre_freq_t freq)
set eq4 centre freq
uint8_t wm8978_rout2_right_speaker_output_volume_convert_to_register(wm8978_handle_t *handle, int8_t db, uint8_t *reg)
convert the rout2 right speaker output volume to the register raw data
uint8_t wm8978_set_alc_max_gain(wm8978_handle_t *handle, wm8978_max_gain_t gain)
set alc max gain
uint8_t wm8978_set_mclk_div(wm8978_handle_t *handle, wm8978_mclk_div_t d)
set mclk div
uint8_t wm8978_eq_gain_convert_to_data(wm8978_handle_t *handle, uint8_t reg, int8_t *db)
convert the eq gain register raw data to the real data
uint8_t wm8978_set_lout2_left_speaker_output_mute(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable lout2 left speaker output mute
uint8_t wm8978_set_lout1_left_headphone_output_volume(wm8978_handle_t *handle, uint8_t vol)
set lout1 left headphone output volume
uint8_t wm8978_set_sleep(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable sleep
wm8978_clksel_t
wm8978 clksel enumeration definition
uint8_t wm8978_set_notch_filter_a1_coefficient_bit_13_7(wm8978_handle_t *handle, wm8978_bool_t update_once, uint8_t coefficient)
set notch filter a1 coefficient bit13 - bit7
uint8_t wm8978_set_alc_attack(wm8978_handle_t *handle, uint8_t attack)
set alc attack
wm8978_equaliser_t
wm8978 equaliser enumeration definition
uint8_t wm8978_set_out4_attenuated_by_6db(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable out4 attenuated by 6db
uint8_t wm8978_set_aux_right_channel_input_to_right_mixer_volume(wm8978_handle_t *handle, uint8_t vol)
set aux right channel input to right mixer volume
uint8_t wm8978_set_notch_filter_a0_coefficient_bit_13_7(wm8978_handle_t *handle, wm8978_bool_t update_once, uint8_t coefficient)
set notch filter a0 coefficient bit13 - bit7
uint8_t wm8978_beep_volume_convert_to_data(wm8978_handle_t *handle, uint8_t reg, int8_t *db)
convert the beep volume register raw data to the real data
uint8_t wm8978_right_channel_input_pga_volume_convert_to_register(wm8978_handle_t *handle, float db, uint8_t *reg)
convert the right channel input pga volume to the register raw data
wm8978_bclk_div_t
wm8978 bclk div enumeration definition
uint8_t wm8978_set_out3_mute(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable out3 mute
wm8978_dac_oversample_rate_t
wm8978 dac oversample rate enumeration definition
uint8_t wm8978_set_eq2_bandwidth(wm8978_handle_t *handle, wm8978_eq_bandwidth_t width)
set eq2 bandwidth
uint8_t wm8978_set_right_channel_input_boost_stage(wm8978_handle_t *handle, uint8_t stage)
set right channel input boost stage
uint8_t wm8978_set_dac_appear(wm8978_handle_t *handle, wm8978_appear_t appear)
set dac appear
uint8_t wm8978_set_right_channel_input_pga_boost(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable right channel input pga boost
uint8_t wm8978_set_companding_8bit_mode(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable companding 8bit mode
wm8978_min_gain_t
wm8978 min gain enumeration definition
uint8_t wm8978_set_left_adc_input_to_out3(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable left adc input to out3
uint8_t wm8978_set_beep_volume(wm8978_handle_t *handle, uint8_t vol)
set beep volume
uint8_t wm8978_set_dac_digital_limiter(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable dac digital limiter
uint8_t wm8978_set_right_channel_input_pga_zero_cross(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable right channel input pga zero cross
wm8978_max_gain_t
wm8978 max gain enumeration definition
uint8_t wm8978_set_beep(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable beep
uint8_t wm8978_set_eq3_gain(wm8978_handle_t *handle, uint8_t gain)
set eq3 gain
uint8_t wm8978_set_dc_buffer(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable dc buffer
uint8_t wm8978_deinit(wm8978_handle_t *handle)
close the chip
uint8_t wm8978_set_rout1_right_headphone_output_mute(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable rout1 right headphone output mute
wm8978_bool_t
wm8978 bool enumeration definition
uint8_t wm8978_set_vmid_1(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable vmid 1
uint8_t wm8978_set_right_out1(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable right out1
uint8_t wm8978_right_bypass_volume_control_to_output_channel_mixer_convert_to_data(wm8978_handle_t *handle, uint8_t reg, int8_t *db)
convert the right bypass volume control to output channel mixer raw data to the real data
uint8_t wm8978_set_dac_limiter_volume_boost(wm8978_handle_t *handle, uint8_t db)
set dac limiter volume boost
uint8_t wm8978_set_out4_mixer_output_to_out3(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable out4 mixer output to out3
uint8_t wm8978_set_bclk_polarity(wm8978_handle_t *handle, wm8978_polarity_t polarity)
set bclk polarity
uint8_t wm8978_set_alc_min_gain(wm8978_handle_t *handle, wm8978_min_gain_t gain)
set alc min gain
uint8_t wm8978_set_jack_logic_1(wm8978_handle_t *handle, wm8978_jack_t jack, wm8978_bool_t enable)
set jack logic 1
uint8_t wm8978_set_analogue_amplifier_bias(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable analogue amplifier bias
uint8_t wm8978_set_rout1_headphone_volume_zero_cross(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable rout1 headphone volume zero cross
uint8_t wm8978_set_left_channel_input_pga_amplifier_positive(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable left channel input pga amplifier positive
uint8_t wm8978_set_mode(wm8978_handle_t *handle, wm8978_mode_t mode)
set chip mode
uint8_t wm8978_set_high_pass_filter_cut_off(wm8978_handle_t *handle, wm8978_high_pass_filter_cut_off_t cut)
set high pass filter cut off
uint8_t wm8978_set_left_channel_input_boost(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable left channel input boost
uint8_t wm8978_set_jack_detection(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable jack detection
wm8978_alc_t
wm8978 alc enumeration definition
uint8_t wm8978_set_left_channel_input_pga(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable left channel input pga
wm8978_jack_sel_t
wm8978 jack sel enumeration definition
uint8_t wm8978_set_alc_mode(wm8978_handle_t *handle, wm8978_alc_mode_t mode)
set alc mode
uint8_t wm8978_set_right_channel_input_pga(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable right channel input pga
uint8_t wm8978_set_auxiliary_amplifier_right_channel_input_boost_stage(wm8978_handle_t *handle, uint8_t stage)
set auxiliary amplifier right channel input boost stage
uint8_t wm8978_set_lout1_update(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable lout1 update
wm8978_alc_level_t
wm8978 alc level enumeration definition
uint8_t wm8978_set_high_pass_filter(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable high pass filter
uint8_t wm8978_left_bypass_volume_control_to_output_channel_mixer_convert_to_data(wm8978_handle_t *handle, uint8_t reg, int8_t *db)
convert the left bypass volume control to output channel mixer register raw data to the real data
uint8_t wm8978_set_right_channel_input_pga_mute(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable right channel input pga mute
wm8978_eq1_band_cut_off_t
wm8978 eq1 band cut off enumeration definition
uint8_t wm8978_set_dac_limiter_attack(wm8978_handle_t *handle, wm8978_dac_limiter_attack_t attack)
set dac limiter attack
uint8_t wm8978_set_data_format(wm8978_handle_t *handle, wm8978_data_format_t format)
set data format
uint8_t wm8978_beep_volume_convert_to_register(wm8978_handle_t *handle, int8_t db, uint8_t *reg)
convert the beep volume to the register raw data
uint8_t wm8978_set_soft_mute(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable soft mute
uint8_t wm8978_set_right_channel_input_pga_positive(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable right channel input pga positive
uint8_t wm8978_set_mclk_divide_by_2(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable mclk divide by 2
uint8_t wm8978_set_left_channel_adc(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable left channel adc
uint8_t wm8978_set_aux_left_channel_input_to_left_mixer_volume(wm8978_handle_t *handle, uint8_t vol)
set aux left channel input to left mixer volume
uint8_t wm8978_set_left_dac_output_to_out3(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable left dac output to out3
uint8_t wm8978_set_dac_right_volume(wm8978_handle_t *handle, wm8978_bool_t enable, uint8_t volume)
set dac right volume
wm8978_alc_mode_t
wm8978 alc mode enumeration definition
uint8_t wm8978_set_notch_filter(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable notch filter
uint8_t wm8978_set_jack_logic_0(wm8978_handle_t *handle, wm8978_jack_t jack, wm8978_bool_t enable)
set jack logic 0
wm8978_dac_limiter_decay_t
wm8978 dac limiter decay enumeration definition
uint8_t wm8978_depth_3d_convert_to_data(wm8978_handle_t *handle, uint8_t reg, float *percent)
convert the depth 3d register raw data to the real data
uint8_t wm8978_right_bypass_volume_control_to_output_channel_mixer_convert_to_register(wm8978_handle_t *handle, int8_t db, uint8_t *reg)
convert the right bypass volume control to output channel mixer to the register raw data
wm8978_appear_t
wm8978 appear enumeration definition
uint8_t wm8978_set_eq3_centre_freq(wm8978_handle_t *handle, wm8978_eq3_band_centre_freq_t freq)
set eq3 centre freq
uint8_t wm8978_set_lout1_left_headphone_output_mute(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable lout1 left headphone output mute
uint8_t wm8978_set_jack_gpio(wm8978_handle_t *handle, wm8978_jack_sel_t sel)
set jack gpio
uint8_t wm8978_set_right_dac_output_to_right_output_mixer(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable right dac output to right output mixer
wm8978_eq_bandwidth_t
wm8978 eq bandwidth enumeration definition
wm8978_mclk_div_t
wm8978 mclk div enumeration definition
uint8_t wm8978_set_right_channel_dac(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable right channel dac
wm8978_eq2_band_centre_freq_t
wm8978 eq2 band centre freq enumeration definition
uint8_t wm8978_set_alc_decay(wm8978_handle_t *handle, uint8_t decay)
set alc decay
uint8_t wm8978_set_notch_filter_a1_coefficient_bit_6_0(wm8978_handle_t *handle, wm8978_bool_t update_once, uint8_t coefficient)
set notch filter a1 coefficient bit6 - bit0
struct wm8978_info_s wm8978_info_t
wm8978 information structure definition
uint8_t wm8978_set_out3(wm8978_handle_t *handle, wm8978_bool_t enable)
enable or disable out3
@ WM8978_EQ3_BAND_CENTRE_FREQ_650HZ
@ WM8978_EQ3_BAND_CENTRE_FREQ_1400HZ
@ WM8978_EQ3_BAND_CENTRE_FREQ_850HZ
@ WM8978_EQ3_BAND_CENTRE_FREQ_1100HZ
@ WM8978_MODE_AUDIO
@ WM8978_MODE_APPLICATION
@ WM8978_HIGH_PASS_FILTER_CUT_OFF_0
@ WM8978_HIGH_PASS_FILTER_CUT_OFF_2
@ WM8978_HIGH_PASS_FILTER_CUT_OFF_4
@ WM8978_HIGH_PASS_FILTER_CUT_OFF_1
@ WM8978_HIGH_PASS_FILTER_CUT_OFF_5
@ WM8978_HIGH_PASS_FILTER_CUT_OFF_7
@ WM8978_HIGH_PASS_FILTER_CUT_OFF_3
@ WM8978_HIGH_PASS_FILTER_CUT_OFF_6
@ WM8978_EQ4_BAND_CENTRE_FREQ_2400HZ
@ WM8978_EQ4_BAND_CENTRE_FREQ_1800HZ
@ WM8978_EQ4_BAND_CENTRE_FREQ_4100HZ
@ WM8978_EQ4_BAND_CENTRE_FREQ_3200HZ
@ WM8978_DATA_FORMAT_RIGHT_JUSTIFIED
@ WM8978_DATA_FORMAT_LEFT_JUSTIFIED
@ WM8978_DATA_FORMAT_PCM
@ WM8978_DATA_FORMAT_IIS
@ WM8978_IMPEDANCE_300K
@ WM8978_IMPEDANCE_75K
@ WM8978_IMPEDANCE_5K
@ WM8978_IMPEDANCE_OFF
@ WM8978_DAC_LIMITER_ATTACK_188US
@ WM8978_DAC_LIMITER_ATTACK_24MS
@ WM8978_DAC_LIMITER_ATTACK_375US
@ WM8978_DAC_LIMITER_ATTACK_12MS
@ WM8978_DAC_LIMITER_ATTACK_1P5MS
@ WM8978_DAC_LIMITER_ATTACK_3MS
@ WM8978_DAC_LIMITER_ATTACK_96MS
@ WM8978_DAC_LIMITER_ATTACK_6MS
@ WM8978_DAC_LIMITER_ATTACK_48MS
@ WM8978_DAC_LIMITER_ATTACK_750US
@ WM8978_DAC_LIMITER_ATTACK_94US
@ WM8978_VREF_30K
@ WM8978_VREF_1K
@ WM8978_CLOCK_MODE_INPUT
@ WM8978_CLOCK_MODE_OUTPUT
@ WM8978_ADC_OVERSAMPLE_RATE_128X
@ WM8978_ADC_OVERSAMPLE_RATE_64X
@ WM8978_COMPANDING_U_LAW
@ WM8978_COMPANDING_LINEAR
@ WM8978_COMPANDING_A_LAW
@ WM8978_WORD_LENGTH_32_BITS
@ WM8978_WORD_LENGTH_24_BITS
@ WM8978_WORD_LENGTH_20_BITS
@ WM8978_WORD_LENGTH_16_BITS
@ WM8978_CHANNEL_STEREO
@ WM8978_CHANNEL_MONO
@ WM8978_DAC_LIMITER_LEVEL_NEGATIVE_3DB
@ WM8978_DAC_LIMITER_LEVEL_NEGATIVE_4DB
@ WM8978_DAC_LIMITER_LEVEL_NEGATIVE_2DB
@ WM8978_DAC_LIMITER_LEVEL_NEGATIVE_1DB
@ WM8978_DAC_LIMITER_LEVEL_NEGATIVE_6DB
@ WM8978_DAC_LIMITER_LEVEL_NEGATIVE_5DB
@ WM8978_APPROXIMATE_SAMPLE_16_KHZ
@ WM8978_APPROXIMATE_SAMPLE_32_KHZ
@ WM8978_APPROXIMATE_SAMPLE_12_KHZ
@ WM8978_APPROXIMATE_SAMPLE_24_KHZ
@ WM8978_APPROXIMATE_SAMPLE_8_KHZ
@ WM8978_APPROXIMATE_SAMPLE_48_KHZ
@ WM8978_PLL_DIV_BY_1
@ WM8978_PLL_DIV_BY_2
@ WM8978_PLL_DIV_BY_3
@ WM8978_PLL_DIV_BY_4
@ WM8978_AVDD_0P65
@ WM8978_AVDD_0P9
@ WM8978_JACK_OUT1
@ WM8978_JACK_OUT4
@ WM8978_JACK_OUT3
@ WM8978_JACK_OUT2
@ WM8978_POLARITY_NORMAL
@ WM8978_POLARITY_INVERTED
@ WM8978_EQ5_BAND_CUT_OFF_11700HZ
@ WM8978_EQ5_BAND_CUT_OFF_9000HZ
@ WM8978_EQ5_BAND_CUT_OFF_6900HZ
@ WM8978_EQ5_BAND_CUT_OFF_5300HZ
@ WM8978_GPIO1_SEL_TEMP_OK
@ WM8978_GPIO1_SEL_INPUT
@ WM8978_GPIO1_SEL_AMUTE_ACTIVE
@ WM8978_GPIO1_SEL_PLL_CLK
@ WM8978_GPIO1_SEL_PLL_LOCK
@ WM8978_GPIO1_SEL_LOGIC_1
@ WM8978_GPIO1_SEL_LOGIC_0
@ WM8978_CLKSEL_MCLK
@ WM8978_CLKSEL_PLL_OUTPUT
@ WM8978_EQUALISER_APPLIED_TO_ADC
@ WM8978_EQUALISER_APPLIED_TO_DAC
@ WM8978_BCLK_DIV_BY_32
@ WM8978_BCLK_DIV_BY_1
@ WM8978_BCLK_DIV_BY_8
@ WM8978_BCLK_DIV_BY_16
@ WM8978_BCLK_DIV_BY_2
@ WM8978_BCLK_DIV_BY_4
@ WM8978_DAC_OVERSAMPLE_RATE_64X
@ WM8978_DAC_OVERSAMPLE_RATE_128X
@ WM8978_MIN_GAIN_0_DB
@ WM8978_MIN_GAIN_18_DB
@ WM8978_MIN_GAIN_NEGATIVE_6_DB
@ WM8978_MIN_GAIN_24_DB
@ WM8978_MIN_GAIN_NEGATIVE_12_DB
@ WM8978_MIN_GAIN_6_DB
@ WM8978_MIN_GAIN_12_DB
@ WM8978_MIN_GAIN_30_DB
@ WM8978_MAX_GAIN_35P25_DB
@ WM8978_MAX_GAIN_NEGATIVE_6P75_DB
@ WM8978_MAX_GAIN_17P25_DB
@ WM8978_MAX_GAIN_11P25_DB
@ WM8978_MAX_GAIN_29P25_DB
@ WM8978_MAX_GAIN_NEGATIVE_0P75_DB
@ WM8978_MAX_GAIN_23P25_DB
@ WM8978_MAX_GAIN_5P25_DB
@ WM8978_BOOL_FALSE
@ WM8978_BOOL_TRUE
@ WM8978_ALC_LEFT
@ WM8978_ALC_OFF
@ WM8978_ALC_BOTH
@ WM8978_ALC_RIGHT
@ WM8978_JACK_SEL_GPIO2
@ WM8978_JACK_SEL_GPIO1
@ WM8978_JACK_SEL_GPIO3
@ WM8978_ALC_LEVEL_NEGATIVE_3
@ WM8978_ALC_LEVEL_NEGATIVE_1P5
@ WM8978_ALC_LEVEL_NEGATIVE_21
@ WM8978_ALC_LEVEL_NEGATIVE_4P5
@ WM8978_ALC_LEVEL_NEGATIVE_22P5
@ WM8978_EQ1_BAND_CUT_OFF_80HZ
@ WM8978_EQ1_BAND_CUT_OFF_135HZ
@ WM8978_EQ1_BAND_CUT_OFF_105HZ
@ WM8978_EQ1_BAND_CUT_OFF_175HZ
@ WM8978_ALC_MODE_LIMITER
@ WM8978_ALC_MODE_ALC
@ WM8978_DAC_LIMITER_DECAY_750US
@ WM8978_DAC_LIMITER_DECAY_768MS
@ WM8978_DAC_LIMITER_DECAY_192MS
@ WM8978_DAC_LIMITER_DECAY_384MS
@ WM8978_DAC_LIMITER_DECAY_12MS
@ WM8978_DAC_LIMITER_DECAY_3MS
@ WM8978_DAC_LIMITER_DECAY_24MS
@ WM8978_DAC_LIMITER_DECAY_1P5MS
@ WM8978_DAC_LIMITER_DECAY_48MS
@ WM8978_DAC_LIMITER_DECAY_96MS
@ WM8978_DAC_LIMITER_DECAY_6MS
@ WM8978_APPEAR_LEFT
@ WM8978_APPEAR_RIGHT
@ WM8978_EQ_BANDWIDTH_NARROW
@ WM8978_EQ_BANDWIDTH_WIDE
@ WM8978_MCLK_DIV_BY_1P5
@ WM8978_MCLK_DIV_BY_2
@ WM8978_MCLK_DIV_BY_6
@ WM8978_MCLK_DIV_BY_12
@ WM8978_MCLK_DIV_BY_4
@ WM8978_MCLK_DIV_BY_1
@ WM8978_MCLK_DIV_BY_3
@ WM8978_MCLK_DIV_BY_8
@ WM8978_EQ2_BAND_CENTRE_FREQ_230HZ
@ WM8978_EQ2_BAND_CENTRE_FREQ_500HZ
@ WM8978_EQ2_BAND_CENTRE_FREQ_385HZ
@ WM8978_EQ2_BAND_CENTRE_FREQ_300HZ
uint8_t wm8978_set_reg(wm8978_handle_t *handle, uint8_t reg, uint16_t value)
set the chip register
wm8978 handle structure definition
void(* delay_ms)(uint32_t ms)
void(* debug_print)(const char *const fmt,...)
uint8_t(* iic_init)(void)
uint16_t reg[58]
uint8_t(* iic_write)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
uint8_t(* iic_deinit)(void)
wm8978 information structure definition
float supply_voltage_max_v
uint32_t driver_version
char manufacturer_name[32]
float supply_voltage_min_v
char chip_name[32]