You can do your_pin.getInfo().functions and you'll see a bunch of entries like TIM2/etc.
your_pin.getInfo().functions
TIM2
There's no built-in way of getting back, so you'd just have to iterate over all your pins and check which ones had a TIMx field in them.
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
You can do
your_pin.getInfo().functions
and you'll see a bunch of entries likeTIM2
/etc.There's no built-in way of getting back, so you'd just have to iterate over all your pins and check which ones had a TIMx field in them.