MP_ROM_PTR() is only for data structures initialization, code should use MP_OBJ_FROM_PTR().
Allows to translate C-level pin API to Python-level pin API. In other words, allows to implement a pin class and Python which will be usable for efficient C-coded algorithms, like bitbanging SPI/I2C, time_pulse, etc.