That's not equivalent, though. I've spent some time looking over AVR information, and the AVR code above does an ADC conversion on ground (ground is the input channel selected by the ADMUX line), presumably in order to discharge the ADC's internal capacitor to ground. Your code does an ADC conversion on the input pin.
(Actually, on the AVR, one doesn't even need the conversion. All one needs is the ADMUX |= 0b11111 to connect ground to the sample-and-hold capacitor and then a pause of about 100 microseconds for (a) the sample-and-hold capacitor to discharge and (b) the earlier pull-up to charge the target pin. The conversion just happens to provide a pause of the right length.)
I don't know if it's possible to select ground as the source for ADC on the stm. But if not, one could just sacrifice one input pin and ground it, and do an ADC conversion on it. And one pin is all one would need for all the touch detection. The stm32f1's sample and hold capacitor is 8pF versus the 14pF for the AVR, so things should happen a bit faster.