
//初始化 PB7 ad输入 gpio_set_mode(IO_PORT_SPILT(IO_PORTB_07), PORT_INPUT_FLOATING); gpio_set_function(IO_PORT_SPILT(IO_PORTB_07), PORT_FUNC_GPADC); //触发DAC R高阻态 play_tone_file(get_tone_files()-max_vol); tone_player_stop(); //获取PB7 AD 值 u32 adc_v adc_get_value_blocking(ADC_CH_IO_PB7);