NC57UAP客户化配置指南:从入门到精通

需积分: 10 10 下载量 32 浏览量 更新于2024-07-24 收藏 13.68MB PDF 举报
"NC57UAP客户化-上" 该文档是针对NC57UAP客户化的初级学习资料,适合新手入门。它涵盖了多个章节,详细介绍了一系列与NC57UAP相关的配置、环境安装、系统介绍以及参数设置等基础知识。 在第1章中,主要讨论了UFIDANC5X的配置,包括对UNIX、Linux和Windows平台的配置方法。这一部分可能涉及到操作系统层面的适配和设置,对于理解NC57UAP在不同操作系统上的运行环境至关重要。 第2章重点讲述了UFIDANC5X_Was环境的安装,详细讲解了IBM WebSphere的安装步骤。这一章节包含了WAS(WebSphere Application Server)的基础配置、补丁应用、服务器设置以及特定版本的WebSphere配置,为后续的应用开发和部署提供了基础环境。 第3章是对UAP-NC(可能是Unified Application Platform - Network Control的缩写)的总体介绍,涵盖了系统架构、主要功能和组件的解析。这部分内容有助于读者了解UAP-NC的核心工作原理和组成部分。 第4章是参数设置,这一部分详细列出了系统运行所需的各项参数,包括但不限于性能调优、安全配置等,是确保系统稳定运行的关键。 第5章涉及基础数据的设定,如用户、权限、基础数据的导入导出等,这是初始化系统和日常管理的重要环节。 接下来的章节(第6章至第7.7.8节)深入到具体业务模块的创建和配置,如建公司账、基本档案(如部门、岗位、员工信息等)的设定,以及各种档案类型的详细操作,如物料、供应商、客户档案等。这些章节详细阐述了如何在UAP-NC系统中进行实际业务操作,是将理论知识转化为实践的关键部分。 这份资料是学习NC57UAP客户化的一份全面指南,从环境搭建到业务实施,为读者提供了逐步学习和实践的路径。通过这份资料的学习,读者可以掌握NC57UAP的基本操作和管理技能,为实际工作中的系统应用打下坚实基础。

static int sbsa_uart_probe(struct platform_device *pdev) { struct uart_amba_port *uap; struct resource *r; int portnr, ret; int baudrate; /* * Check the mandatory baud rate parameter in the DT node early * so that we can easily exit with the error. */ if (pdev->dev.of_node) { struct device_node *np = pdev->dev.of_node; ret = of_property_read_u32(np, "current-speed", &baudrate); if (ret) return ret; } else { baudrate = 115200; } portnr = pl011_find_free_port(); if (portnr < 0) return portnr; uap = devm_kzalloc(&pdev->dev, sizeof(struct uart_amba_port), GFP_KERNEL); if (!uap) return -ENOMEM; ret = platform_get_irq(pdev, 0); if (ret < 0) { if (ret != -EPROBE_DEFER) dev_err(&pdev->dev, "cannot obtain irq\n"); return ret; } uap->port.irq = ret; #ifdef CONFIG_ACPI_SPCR_TABLE if (qdf2400_e44_present) { dev_info(&pdev->dev, "working around QDF2400 SoC erratum 44\n"); uap->vendor = &vendor_qdt_qdf2400_e44; } else #endif uap->vendor = &vendor_sbsa; uap->reg_offset = uap->vendor->reg_offset; uap->fifosize = 32; uap->port.iotype = uap->vendor->access_32b ? UPIO_MEM32 : UPIO_MEM; uap->port.ops = &sbsa_uart_pops; uap->fixed_baud = baudrate; snprintf(uap->type, sizeof(uap->type), "SBSA"); r = platform_get_resource(pdev, IORESOURCE_MEM, 0); ret = pl011_setup_port(&pdev->dev, uap, r, portnr); if (ret) return ret; platform_set_drvdata(pdev, uap); return pl011_register_port(uap); }linux内核uart驱动在设备注册时,使用acpi表定义的波特率来初始化串口,请根据我的要求和上述代码,在代码中添加这一功能

2023-06-07 上传

static void pl011_set_termios(struct uart_port *port, struct ktermios *termios, struct ktermios *old) { struct uart_amba_port *uap = container_of(port, struct uart_amba_port, port); unsigned int lcr_h, old_cr; unsigned long flags; unsigned int baud, quot, clkdiv; if (uap->vendor->oversampling) clkdiv = 8; else clkdiv = 16; baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk / clkdiv); if (baud > port->uartclk/16) quot = DIV_ROUND_CLOSEST(port->uartclk * 8, baud); else quot = DIV_ROUND_CLOSEST(port->uartclk * 4, baud); switch (termios->c_cflag & CSIZE) { case CS5: lcr_h = UART01x_LCRH_WLEN_5; break; case CS6: lcr_h = UART01x_LCRH_WLEN_6; break; case CS7: lcr_h = UART01x_LCRH_WLEN_7; break; default: // CS8 lcr_h = UART01x_LCRH_WLEN_8; break; } if (termios->c_cflag & CSTOPB) lcr_h |= UART01x_LCRH_STP2; if (termios->c_cflag & PARENB) { lcr_h |= UART01x_LCRH_PEN; if (!(termios->c_cflag & PARODD)) lcr_h |= UART01x_LCRH_EPS; if (termios->c_cflag & CMSPAR) lcr_h |= UART011_LCRH_SPS; } if (uap->fifosize > 1) lcr_h |= UART01x_LCRH_FEN; spin_lock_irqsave(&port->lock, flags); uart_update_timeout(port, termios->c_cflag, baud); pl011_setup_status_masks(port, termios); if (UART_ENABLE_MS(port, termios->c_cflag)) pl011_enable_ms(port); old_cr = pl011_read(uap, REG_CR); pl011_write(0, uap, REG_CR); if (termios->c_cflag & CRTSCTS) { if (old_cr & UART011_CR_RTS) old_cr |= UART011_CR_RTSEN; old_cr |= UART011_CR_CTSEN; port->status |= UPSTAT_AUTOCTS | UPSTAT_AUTORTS; } else { old_cr &= ~(UART011_CR_CTSEN | UART011_CR_RTSEN); port->status &= ~(UPSTAT_AUTOCTS | UPSTAT_AUTORTS); } if (uap->vendor->oversampling) { if (baud > port->uartclk / 16) old_cr |= ST_UART011_CR_OVSFACT; else old_cr &= ~ST_UART011_CR_OVSFACT; } if (uap->vendor->oversampling) { if ((baud >= 3000000) && (baud < 3250000) && (quot > 1)) quot -= 1; else if ((baud > 3250000) && (quot > 2)) quot -= 2; } pl011_write(quot & 0x3f, uap, REG_FBRD); pl011_write(quot >> 6, uap, REG_IBRD); pl011_write_lcr_h(uap, lcr_h); pl011_write(old_cr, uap, REG_CR); spin_unlock_irqrestore(&port->lock, flags); 详细分析这段代码中哪些部分是设置波特率,哪些是设置校验位,哪些是设置停止位,拆分出来

2023-06-06 上传