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

正文內(nèi)容

基于linux操作系統(tǒng)下rtc驅(qū)動開發(fā)(編輯修改稿)

2025-02-14 16:15 本頁面
 

【文章內(nèi)容簡介】 項背的,并在整個課題的完成過程中起到了至關(guān)重要的作用。趙老師教學作風的和劉老師的治學風格都讓我留下了很深的印象。
同時也要感謝培訓班的所有同學,在臨近畢業(yè)的培訓過程中,對我的關(guān)心和幫助。感謝他們不厭其煩地指導我解決了不少項目上的難題,她們積極向上的學習態(tài)度也是我奮斗下去的動力。感謝我的親人,在這四年里是他們給我無數(shù)的鼓勵、支持和幫助,正因為有他們我才能高興順利的完成大學學業(yè),并學到了很多專業(yè),以及很多人生道路上的寶貴財富。
最后感謝各位評閱老師在百忙之中抽空評閱我的論文。
參 考 文 獻[1] [D]西安:西北工業(yè)大學機械電子工程學院,2007.[2] 戴明華,李長云,曾志浩,崔海燕. 嵌入式Linux驅(qū)動程序框架研究綜述[J]. 長沙大學學報,2012,02:5253.[3] [D]北京:北京郵電大學計算機科學與技術(shù)學院,2011.[4] [D].成都:中國西南電子技術(shù)研究所,2012.[5] [D].西安:西安電子科技大學,2011.[6] 董文軍. Linux驅(qū)動程序兼容性的相關(guān)問題[J].單片機與嵌入式系統(tǒng)應用,2010,03:1618.[7] [D],北京:北京郵電大學,2009.[8] 周立功,陳明計,陳渝.ARM嵌入式Linux系統(tǒng)構(gòu)建與驅(qū)動開發(fā)范例[M].北京:北京航空航天大學出版社,2006.[9] 王淑貞.UBoot在S3C2410上的移植[J].微計算機應用,2008,29(4):9597.[10] LTIB user manual Linux Target Image Builder,Freescale,2006.[11] [D].成都:電子科技大學,2011.[12] MPC8536 datasheet MPC8536E PowerQUICC III tm Integrated Processor Product Brief ,2009.附錄A RTC驅(qū)動程序include linux/include linux/include linux/include linux/include linux/include linux/include static DEFINE_IDR(rtc_idr)。static DEFINE_MUTEX(idr_lock)。struct class *rtc_class。static void rtc_device_release(struct device *dev){ struct rtc_device *rtc = to_rtc_device(dev)。 mutex_lock(amp。idr_lock)。 idr_remove(amp。rtc_idr, rtcid)。 mutex_unlock(amp。idr_lock)。 kfree(rtc)。}if defined(CONFIG_PM) amp。amp。 defined(CONFIG_RTC_HCTOSYS_DEVICE)static struct timespec old_rtc, old_system, old_delta。static int rtc_suspend(struct device *dev, pm_message_t mesg){ struct rtc_device *rtc = to_rtc_device(dev)。 struct rtc_time tm。 struct timespec delta, delta_delta。 if (strcmp(dev_name(amp。rtcdev), CONFIG_RTC_HCTOSYS_DEVICE) != 0) return 0。 delta = timespec_sub(old_system, old_rtc)。 delta_delta = timespec_sub(delta, old_delta)。 if ( 2 || = 2) { old_delta = delta。 } else { old_system = timespec_sub(old_system, delta_delta)。 } return 0。}static int rtc_resume(struct device *dev){ struct rtc_device *rtc = to_rtc_device(dev)。 struct rtc_time tm。 struct timespec new_system, new_rtc。 struct timespec sleep_time。 if (strcmp(dev_name(amp。rtcdev), CONFIG_RTC_HCTOSYS_DEVICE) != 0) return 0。 getnstimeofday(amp。new_system)。 rtc_read_time(rtc, amp。tm)。 if (rtc_valid_tm(amp。tm) != 0) { pr_debug(%s: bogus resume time\n, dev_name(amp。rtcdev))。 return 0。 } rtc_tm_to_time(amp。tm, amp。)。 = 0。 if ( ) { pr_debug(%s: time travel!\n, dev_name(amp。rtcdev))。 return 0。 } sleep_time = timespec_sub(new_rtc, old_rtc)。 sleep_time = timespec_sub(sleep_time, timespec_sub(new_system, old_system))。 if ( = 0) timekeeping_inject_sleeptime(amp。sleep_time)。 return 0。}elsedefine rtc_suspend NULLdefine rtc_resume NULLendifstruct rtc_device *rtc_device_register(const char *name, struct device *dev,const struct rtc_class_ops *ops, struct module *owner){ struct rtc_device *rtc。 struct rtc_wkalrm alrm。 int id, err。 if (idr_pre_get(amp。rtc_idr, GFP_KERNEL) == 0) { err = ENOMEM。 goto exit。 } mutex_lock(amp。idr_lock)。 err = idr_get_new(amp。rtc_idr, NULL, amp。id)。 mutex_unlock(amp。idr_lock)。 if (err 0) goto exit。 id = id amp。 MAX_ID_MASK。 rtc = kzalloc(sizeof(struct rtc_device), GFP_KERNEL)。 if (rtc == NULL) { err = ENOMEM。 goto exit_idr。 } rtcid = id。 rtcops = ops。 rtcowner = owner。 rtcirq_freq = 1。 rtcmax_user_freq = 64。 rtc = dev。 rtc = rtc_class。 rtc = rtc_device_release。 mutex_init(amp。rtcops_lock)。 spin_lock_init(amp。rtcirq_lock)。 spin_lock_init(amp。rtcirq_task_lock)。 init_waitqueue_head(amp。rtcirq_queue)。 timerqueue_init_head(amp。rtctimerqueue)。 INIT_WORK(amp。rtcirqwork, rtc_timer_do_work)。 rtc_timer_init(amp。rtcaie_timer, rtc_aie_update_irq, (void *)rtc)。 rtc_timer_init(amp。rtcuie_rtctimer, rtc_uie_update_irq, (void *)rtc)。 hrtimer_init(amp。rtcpie_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL)。 rtc = rtc_pie_update_irq。 rtcpie_enabled = 0。 err = __rtc_read_alarm(rtc, amp。alrm)。 if (!err amp。amp。 !rtc_valid_tm(amp。)) rtc_initialize_alarm(rtc, amp。alrm)。 strlcpy(rtcname, name, RTC_DEVICE_NAME_SIZE)。 dev_set_name(amp。rtcdev, rtc%d, id)。 rtc_dev_prepare(rtc)。 err = device_register(amp。rtcdev)。 if (err) { put_device(amp。rtcdev)。 goto exit_kfree。 } rtc_dev_add_device(rtc)。 rtc_sysfs_add_device(rtc)。 rtc_proc_add_device(rtc)。 dev_info(dev, rtc core: registered %s as %s\n, rtcname, dev_name(amp。rtcdev))。 return rtc。exit_kfree: kfree(rtc)。exit_idr: mutex_lock(amp。idr_lock)。 idr_remove(amp。rtc_idr, id)。 mutex_unlock(amp。idr_lock)。exit: dev_err(dev, rtc core: unable to register %s, err = %d\n, name, err)。 return ERR_PTR(err)。}EXPORT_SYMBOL_GPL(rtc_device_register)。void rtc_device_unregister(struct rtc_device *rtc){ if (get_device(amp。rtcdev) != NULL) { mutex_lock(amp。rtcops_lock)。 rtc_sysfs_del_device(rtc)。 rtc_dev_del_device(rtc)。 rtc_proc_del_device(rtc)。 device_unregister(amp。rtcdev)。 rtcops = NULL。 mutex_unlock(amp。rtcops_lock)。 put_device(amp。rtcdev)。 }}EXPORT_SYMBOL_GPL(rtc_device_unregister)。static int __init rtc_init(void){ rtc_class = class_create(THIS_MODULE, rtc)。 if (IS_ERR(rtc_class)) { printk(KERN_ERR %s: couldn39。t create class\n, __FILE__)。 return PTR_ERR(rtc_class)。 } rtc_classsuspend = rtc_suspend。 rtc_classresume = rtc_resume。 rtc_dev_init()。 rtc_sysfs_init(rtc_class)。 return 0。}static void __exit rtc_exit(void){ rtc_dev_exit()。 class_destroy(rtc_class)。 idr_destroy(amp。rtc_idr)。}subsys_initcall(rtc_init)。module_exit(rtc_exit)。MODULE_AUTHOR(Alessandro Zummo @)。MODULE_DESCRIPTION(RTC class support)。MODULE_LICENSE(GPL)。include linux/include linux/include linux/include static dev_t rtc_devt。define RTC_DEV_MAX 16 static int rtc_dev_open(struct inode *inode, struct file *file){ int err。 struct rtc_device *rtc = container_of(inodei_cdev, struct rtc_device, char_dev)。 const struct rtc_class_ops *ops = rtcops。 if (test_and_set_bi
點擊復制文檔內(nèi)容
畢業(yè)設(shè)計相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1