Uart/usb port numer查询方法
0赞抓log时常常会出现进入meta或者工模后不知道uart或者usb口对应的port number是多少,并且每个
工程的设定不同
该number会不一样。确认该问题的方法如下:
1. 10A及之前,可在uart_sw.h中查找UART_PORT枚举结构,如下:
typedef enum {
uart_port1=0,
uart_port2,
uart_port3,
uart_port_irda,
uart_port_usb,
#if !defined(__SMART_PHONE_MODEM__)
uart_port_usb2,
#else //#if !defined(__SMART_PHONE_MODEM__)
uart_port_usb2 = uart_port_usb,
#endif /* __SMART_PHONE_MODEM__ */
uart_port_bluetooth,
uart_port_swdbg,
#if defined(__SMART_PHONE_MODEM__)
uart_port_tst_ccci,
uart_port_at_ccci,
#if defined(__UPS_SUPPORT__)
uart_port_ccmni1_ccci,
uart_port_ccmni2_ccci,
uart_port_ccmni3_ccci,
#endif /* __UPS_SUPPORT__ */
#endif /* __SMART_PHONE_MODEM__ */
start_of_virtual_port,
#if defined(__CMUX_SUPPORT__)
// For WM, define end_of_virtual_port to a specific number (Sync back from mtk00924)
end_of_virtual_port=start_of_virtual_port+CMUX_VP_NUM,
#else // #if defined(__CMUX_SUPPORT__)
end_of_virtual_port=start_of_virtual_port+VIRTUAL_PORTS_NUM-1,
#endif // #if defined(__CMUX_SUPPORT__)
uart_max_port,
uart_port_null = 99 /* a dummy port for those who doesn't use physical port */
} UART_PORT;
2. 10A以后,icfans可在dcl_uart.h中查找DCL_UART_DEV ,如下:
#define DCL_UART_DEV \
uart_port1=0x00, \
uart_port2, \
uart_port3,\
uart_port_irda,\
uart_port_usb,\
uart_port_usb2 = (UART_USB_PORT_NUM+uart_port_usb) ,\
uart_port_usb3,\
uart_port_bluetooth,\
uart_port_swdbg,\
uart_port_tst_ccci,\
uart_port_at_ccci,\
uart_port_ccmni1_ccci,\
uart_port_ccmni2_ccci,\
uart_port_ccmni3_ccci,\
uart_port_gps_ccci,\
start_of_virtual_port,\
end_of_virtual_port = (VIRTUAL_PORT_NUM + start_of_virtual_port),\
uart_port_dcc,\
uart_port_lga1,\
uart_port_lga2,\
uart_port_lmu,\
uart_max_port,\
uart_port_null = 99,