freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內容

基于arm嵌入式系統(tǒng)的觸摸屏驅動程序開發(fā)-預覽頁

2025-07-07 15:21 上一頁面

下一頁面
 

【正文】 6 頁 由于本次畢業(yè)設計采用電阻觸摸屏,所以重點介紹四線式電阻觸摸屏 觸摸屏 系統(tǒng)是一種人機交互設備,其結構如圖1,將觸摸屏安裝在 LCD 顯示屏上,配以相應的控制電路對觸摸屏和 LCD 進行 控制,用戶通過觸摸操作就可以實現同觸摸屏系統(tǒng)相連接的設備進行信息交互。控制器通過下述方法即可確定觸摸點位置: ① 在 X+電極施加驅動電壓, X電極接地, Y+作為引出端測量得到接觸點的電壓,觸點電壓與驅動電壓之比等于觸點 X 坐標與屏寬度之比,得到 X 坐標。 圖 觸摸屏等效電路圖 系統(tǒng)軟件平臺 軟件平臺使用 Linux 操作系統(tǒng)自帶的 Vi 文本編輯器 。 插入模式:只有在該模式下,用戶才能進行文字編輯和輸入,用戶可按【 Esc】鍵回到命令行模式。此時進入的是命令模式,光標位于屏幕的上方。 wq(存盤保存 ), q(退出 Vi), q! (強制退出 )等。 塊設備文件通常指 僅能以塊為單位讀寫的設備,一般塊的大小為 512 字節(jié)的整數倍。 設備驅動程序與用戶應用程序是不同的,設備驅動程序是用戶應用程序與硬件設備之間的一個中間軟件層。一般在 /proc 目錄下的 devices 文件中記錄了系統(tǒng)中處于活動狀態(tài)的設備的主設備號。 命令為: Mknod /dev/ts_driver c 255 o ③ 加載設備驅動程序 西安文理學院 本科畢業(yè)設計(論文) 第 9 頁 加載設備驅動程序: insmod 設備驅動程序名 .O 命令為: insmod 查看當前加載了哪些設備驅動程序: lsmod –l 卸載設備驅動程序: rmmod 設備驅動程序名 .O ④ 設備驅動程序加載與卸載的工作過程 在用戶空間通過命令 insmod 向內核空間加載設備驅動程序模塊,此時程序的入口點是初始 化函數 init_module(),在該函數中完成設備的注冊。但是,由于開發(fā)板上沒有足夠 的資源來運行開發(fā)工具和調試工具。 配置超級終端 超級終端程序通常位于 windows 系統(tǒng)的“開始 程序 附件 通訊”中,選擇運行該程序,一般會彈出提示窗口,詢 問你是否將 HyperTerminal 作為默認的 tel程序,此時選擇“否”。 當你命名完以后,又會跳出一個對話框,選擇開發(fā)板的串口,我選擇的是串口4. 最后一步,最重要的一步,數據流控制必須選擇“無”,另外板子的串口波特率設為 115200。 (這里的 IP地址可以用 *代替,表示所有的客戶機都可以掛載次 目錄) rw 表示掛載次目錄的客戶機多該目錄有讀寫的權力 sync:數據同步寫入內存和硬盤,也可以使用 async,此時數據會先暫存于內存中,而不立即寫入硬盤 no_root_squash 表示允許掛載次目錄的客戶機有該主機的 root 身份 然 后保存退出。所以這使得我們輸入設備的驅動部分不在用關心設備文件的操作,而是要關心對各硬件寄存器的操作和提交的輸入事件。 圖 程序框架圖 源程序見附錄 A 運行程序 燒寫 程序 將編譯好的可執(zhí)行文件下載到目標板,我通過在網絡上收集了資料總結了以下四種方式: 第一種:使用 U 盤 或者其他可移動設備 第二種:通過 NFS 直接運行 第三種:通過串口下載文件到開發(fā)板 第四板:通過網絡下載文件到開發(fā)板 (1) 使用 U 盤 西安文理學院 本科畢業(yè)設計(論文) 第 14 頁 方法:先把編譯好的可執(zhí)行程序復制到 U 盤,在 U 盤插到目標板上并掛載,然后把程序拷貝到目標板的可執(zhí)行目錄 /bin。在本次 畢業(yè) 設計中, NFS 服務系統(tǒng)的配置是最基本的東西,雖然從理論上來說不是太難,但是實際操作時遇到了不少問題,不過通過在網上找尋的資料和同老師、同學的交流下,得到了解答;在設備驅動的開發(fā)中,雖然也很難,但是這些東西都 是框架式的,網上很多,只需修改一下,滿足自己的硬件平臺即可。 在課程設計中,大的問 題基本上就遇到了這么多,還有很多小問題,在谷歌上一搜就有,關于技術方面的問題,最好是在谷歌上搜,感覺比百度全。 static struct input_dev *dev。 extern struct semaphore ADC_LOCK。 s3c2410_gpio_cfgpin(S3C2410_GPG13, S3C2410_GPG13_nXPON)。 unsigned long data1。 updown = (!(data0 amp。 S3C2410_ADCDAT0_UPDOWN))。 input_report_abs(dev, ABS_Y, yp)。 } xp = 0。 iowrite32(ioread32(base_addr+S3C2410_ADCCON) | S3C2410_ADCCON_ENABLE_START, base_addr+S3C2410_ADCCON)。 西安文理學院 本科畢業(yè)設計(論文) 第 20 頁 input_sync(dev)。ADC_LOCK)。 int updown。 data1 = ioread32(base_addr+S3C2410_ADCDAT1)。 (!(data1 amp。 up(amp。 unsigned long data1。 S3C2410_ADCDAT0_XPDATA_MASK。 if (count (12)) { iowrite32(S3C2410_ADCTSC_PULL_UP_DISABLE | AUTOPST, base_addr+S3C2410_ADCTSC)。 iowrite32(WAIT4INT(1), base_addr+S3C2410_ADCTSC)。 adc_clock = clk_get(NULL, adc)。 base_addr=ioremap(S3C2410_PA_ADC,0x20)。 iowrite32(S3C2410_ADCCON_PRSCEN | S3C2410_ADCCON_PRSCVL(100),base_addr+S3C2410_ADCCON)。 if (!input_dev) { printk(KERN_ERR Unable to allocate the input device !!\n)。 devkeybit[BITS_TO_LONGS(BTN_TOUCH)] = BIT(BTN_TOUCH)。 devname = gt2440ts_name。 if (request_irq(IRQ_ADC, stylus_action, IRQF_SHARED|IRQF_SAMPLE_RANDOM, gt2440ts_name, dev)) { printk(KERN_ERR : Could not allocate ts IRQ_ADC !\n)。 iounmap(base_addr)。 return 0。 free_irq(IRQ_ADC,dev)。 } input_unregister_device(dev)。 西安文理學院 本科畢業(yè)設計(論文) 第 24 頁 附錄 B 英文資料 How to design touch screens driver Although touch screens are rapidly being more popular most developers have never created one before. Here is a step by step design guide that leads you through the hardware and software required to make touch screens work the first time. Touch screens are everywhere. Industrial control systems, consumer electronics, and even medical devices are monly equipped with touchscreen input. We use touch screens every day without even thinking about it. You might get cash at your ATM, sign for a package, check in for your flight, or look up a telephone number all by using a touch screen. This article describes two relatively new CPU offerings that provide builtin support for touchscreen input. I39。re the type of touch screen you39。t change. In the simplest fourwire design, one resistive layer, the xaxis layer, is powered and the second layer, the yaxis layer is used as the pickup to measure voltage corresponding to the xaxis position. The process is then reversed and the yaxis layer is powered while the xaxis layer is used as the voltage pickup. Figure 2: Touchscreen circuit diagram Figure 2 shows the simple circuit equivalent of a resistive touch screen. Note that two pletely separate readings must be taken, xaxis position and yaxis position, and these readings cannot be taken in parallel with a four or fivewire resistive touch screen. Your software must read one axis, then the other. It doesn39。ll instead describe the design and flow of the drivers and highlight the important bits. You can download the full source code for each driver at Taking a top level view, the software provides functions to acplish these things: 1. Configure the controller hardware。 5. Send changes in touch status and position to the higherlevel graphics software. Now I39。t infer from this implementation that it39。t do any polling. I felt (temporarily) like an idiot for asking the question, but on further reflection polling is a very reasonable thing to consider. If you39。ed in for each of the many supported RTOSes. In all cases the drivers actually use two distinct interrupts: 1. An interrupt to wake up when the screen is initially touched, known as the PEN_DOWN interrupt and 2. A second interrupt to signal when the ADC a set of data conversions. I
點擊復制文檔內容
畢業(yè)設計相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1