Time of Update: 2018-12-05
//author:DriverMonkey//phone:13410905075//mail:bookworepeng@Hotmail.com//qq:196568501#include <pthread.h>#include <unistd.h>#include <iostream>using namespace std;static void *thead_GUI(void *arg);static void *thread_logic(void
Time of Update: 2018-12-05
//author:DriverMonkey//phone:13410905075//mail:bookworepeng@Hotmail.com//qq:196568501#include <linux/kernel.h> #include <linux/module.h> #include <linux/cdev.h> #include <linux/fs.h> #include <linux/device.h>
Time of Update: 2018-12-05
author:DriverMonkeymail:bookworepeng@hotmail.comqq:196568501phone:13410905075-歡迎交流測試硬體平台-am335x(linux 3.2)前提條件:1.busybox 已經支援 mdev 2.核心已經直至隨身碟1) 在etc/init.d/ 目錄下船艦rcS 指令碼#! /bin/sh/bin/mount
Time of Update: 2018-12-05
作者:XiaoLin.Peng 歡迎交流 196568501 #include <linux/module.h>#include <linux/kernel.h>#include <linux/fs.h>#include <linux/init.h>#include <linux/delay.h>#include <linux/poll.h>#include
Time of Update: 2018-12-05
驅動代碼:#include <linux/kernel.h>#include <linux/module.h>#include <linux/cdev.h>#include <linux/fs.h>#include <linux/device.h>#include <linux/uaccess.h>#include <linux/string.h>struct message_to_app_dev{struct
Time of Update: 2018-12-05
(轉載) bojan 收錄於2010-10-09 閱讀數: 公眾公開 我也要收藏 在Linux驅動程式中,可以使用等待隊列(wait queue)來實現阻塞進程的喚醒。wait queue很早就作為一種基本的功能單位出現在Linux核心裡了,它以隊列位基礎資料結構,與進程調度機制緊密結合,能夠用於實現核心中非同步事件通知機制。等待隊列可以用來同步對系統資源的訪問。(訊號量在核心中也依賴等待隊列來實現). Linux-2.6提供如下關於等待隊列的操作: (1)
Time of Update: 2018-12-05
code:#include <linux/kernel.h> #include <linux/module.h> #include <linux/cdev.h> #include <linux/fs.h> #include <linux/device.h> #include <linux/syscalls.h>#include <linux/interrupt.h> #include
Time of Update: 2018-12-05
4。安裝使用putty剛才用了minicom,的確是可以使用,但是,也是的確用起來不是很方便,最不方便,就是,對於終端的視窗大小無法通過拖拽調整,一拖,顯示內容就沒了,而且顯示寬度不夠,導致我無法拖寬。很是鬱悶。之前看上面文章中介紹,推薦用putty。所以就去安裝一個putty:sudo apt-get install
Time of Update: 2018-12-05
很鬱悶,找了近一個下午,老是提示arm-linux-gcc找不到,但是確實是裝好了,其實是許可權的問題,原帖如下:http://blog.sina.com.cn/s/blog_4670451c0100e1uw.htmlubuntu沒有root許可權,剛開始用碰到很多麻煩,查了好多資料,終於把arm-linux-gcc: Command not found 的問題解決了。問題:sudo tar jxvf arm-linux-gcc.4.3.3.tar.bz2export PATH=$PATH:/
Time of Update: 2018-12-05
linux下AM335X的GPIO控制作者:chenzhufly QQ:36886052 ( 轉載請註明出處)一路走來,熟悉硬體系統,搭建軟體開發環境,編譯Linux系統等等,現在也該到對硬體做一些事情了,這是我這幾天的研究心得,與君共用。1. GPIO的char型驅動,這裡主要就是點個燈,感受一下驅動的設計和硬體的控制驅動程式:複製內容到剪貼簿代碼:#include <linux/init.h>#include <linux/module.h>#include <
Time of Update: 2018-12-05
--在網友基礎上修改而來模組1代碼:#include<linux/init.h>#include<linux/module.h>MODULE_LICENSE("Dual BSD/GPL");int test_global_value_1 = 0x55;int test_global_value_2 = 0xaa;EXPORT_SYMBOL(test_global_value_1);EXPORT_SYMBOL(test_global_value_2);static int
Time of Update: 2018-12-05
QQ:196568501Mail:bookworepeng@hotmail.comWelcome to exchange!Note:All the codes are changed at the file board-am335xevm.cdefine led informationsstatic struct gpio_led am335x_evm_gpio_leds[] = {{.name= "omap3evm::leda",/* normally not visible (board
Time of Update: 2018-12-05
mail:bookworepeng@Hotmail.comqq:196568501author:Driver Monkeyphone:13410905075#include <linux/init.h>#include <linux/module.h>#include <linux/cdev.h>#include <linux/fs.h>#include <linux/device.h>MODULE_LICENSE("Dual BSD/
Time of Update: 2018-12-05
PC Linux上查看庫依賴依賴關係直接使用ldd 命令即可,可以查看可執行程式,比如:root@forlinx:~# ldd /bin/mvlinux-gate.so.1 => (0x00c7b000)libselinux.so.1 => /lib/i386-linux-gnu/libselinux.so.1 (0x00136000)librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0x00ada000)libacl.so.1 =&
Time of Update: 2018-12-05
mail:bookworepeng@Hotmail.comqq:196568501author:Driver Monkeyphone:13410905075#include <linux/init.h>#include <linux/module.h>#include <linux/cdev.h>#include <linux/fs.h>#include <linux/device.h>MODULE_LICENSE("Dual BSD/
Time of Update: 2018-12-05
mail:bookworepeng@Hotmail.comqq:196568501author:DriverMonkeyphone:13410905075測試硬體平台:TI AM335X測試代碼:/* * SPI testing utility (using spidev driver) * * Copyright (c) 2007 MontaVista Software, Inc. * Copyright (c) 2007 Anton Vorontsov
Time of Update: 2018-12-05
#!/bin/sh# Author: DriverMonkey# Creating Date:october 30 2012# Contact Information: bokworepeng@hotmail.com, 196568501(QQ)echo "Begin to copy MLO"cp /usr/local/ti-sdk-am335x-evm/board-support/u-boot-2011.09-psp04.06.00.07/MLO
Time of Update: 2018-12-05
本章將介紹Linux輸入子系統的驅動開發。Linux的輸入子系統不僅支援滑鼠、鍵盤等常規輸入裝置,而且還支援蜂鳴器、觸控螢幕等裝置。本章將對Linux輸入子系統進行詳細的分析。輸入子系統大致實現方法: 底層驅動層(input_dev)-----<通過結構體input_handle關聯>-----輸入事件處理層類介面(input_handler)-----<輸入核心層input.c>-----應用程式層17.1
Time of Update: 2018-12-05
code:#include <linux/init.h>#include <linux/module.h>#include <linux/hardirq.h>MODULE_LICENSE("Dual BSD/GPL");static struct timer_list timer_data;static int counter = 0;static void test_timer(unsigned long temp){int ret = 0;printk("
Time of Update: 2018-12-05
想來想去還是重新學習下linux下面的基本操作吧,就當做是熟悉指令了。把國嵌的實驗重新做一遍,雖然之前有做過,但是也沒有做什麼記錄,所以自己現在感覺有點沒譜,所以從gcc開始:一、編寫一應用程式,使用gcc進行編譯,並分別使用-o,-g,-static,-O2選項1_1.c1_2.c1、 執行指令 gcc 1_1.c 1_2.c 預設產生 a.out可執行檔2、 執行指令gcc 1_1.c 1_2.c –o a 則可以指定產生可執行檔的檔案名稱a作用和1相同3、 執行指令gcc - g 1_