STM serial init: Set pin function only if pin is defined (not NC)
STM serial init: Set pin function only if pin is defined (not NC)

mbedmicro/mbed,andcor02/mbed-os,andcor02/mbed-os,mbedmicro/mbed,kjbracey-arm/mbed,andcor02/mbed-os,kjbracey-arm/mbed,mbedmicro/mbed,mbedmicro/mbed,andcor02/mbed-os,kjbracey-arm/mbed,mbedmicro/mbed,andcor02/mbed-os,andcor02/mbed-os,kjbracey-arm/mbed