How to change the purpose of the original pinout?

I want to driver a new LED from I2c1 port instead of using original LED port,is it possible to change a af_pin to an ordinary digital io pin?


The I2C port pins can be used as GPIO pins. Most pins are multi-function. Just define a pin like here:

Thanks ,i will give a try!