串口初始化用的是- void
- s5pv210_serial0_init(void)
- {
- /* configure GPA01, GPA00 for TXD0, RXD0 GPA02 for OUT_DIR*/
- writel(S5PV210_GPA0CON,
- (readl(S5PV210_GPA0CON) & ~(0xf<<0 | 0x0f<<4 | 0x0f<<8)) | (0x2<<0 | 0x2<<4 | 0x1<<8));
- /* pull up GPA01 and GPA00 */
- writel(S5PV210_GPA0PUD,
- (readl(S5PV210_GPA0PUD) & ~(0x3<<0 | 0x03<<2 | 0x03<<4)) | (0x2<<0 | 0x2<<2 | 0x2<<4));
- /* configure clk source (pclk), mode, etc */
- writel(S5PV210_UCON0, 0x00000105); //rx int
- writel(S5PV210_UFCON0, 0x00000000);
- writel(S5PV210_UMON0, 0x00000000);
- /* configure uart */
- s5pv210_serial_setup(0, B9600, DATA_BITS_8, PARITY_NONE, STOP_BITS_1);
- }
复制代码 注册中断用的是- if(request_irq("UART0", receive_Irq_UART0, 0)){
- myprintf("UART0 isr registed\r\n");
- } else {
- myprintf("UART0 isr regist failed\r\n");
- }
复制代码 但是就是不能进中断,同过查询方式是可以读的 |