/* This function extracts the port where the protocol is mapped to.  */
static uint8_t _getPortFromProtocol(uint8_t uc_p_type)
/* This function extracts the port where the protocol is mapped to.  */
static uint8_t _getPortFromProtocol(uint8_t uc_p_type)
{
	uint8_t i;
	for (i = 0; i < NUM_PROTOCOLS; i++) {
		if ((uc_p_type < 0x10) && (usi_cfg_map_protocols[i].uc_p_type == MNGP_PRIME_PROT)) {
			return usi_cfg_map_protocols[i].uc_port;
		}
		if (usi_cfg_map_protocols[i].uc_p_type == uc_p_type) {
			return usi_cfg_map_protocols[i].uc_port;
		}
	}
	return (uint8_t)USI_STATUS_PROTOCOL_NOT_FOUND;
}