女人荫蒂被添全过程13种图片,亚洲+欧美+在线,欧洲精品无码一区二区三区 ,在厨房拨开内裤进入毛片

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

RT-Thread PIN驅(qū)動(dòng)添加

RT-Thread官方賬號 ? 2025-03-28 18:59 ? 次閱讀

Pin驅(qū)動(dòng)框架

c9476c30-0bc3-11f0-9434-92fbcf53809c.png

NXP MCXA153為例

PIN設(shè)備驅(qū)動(dòng)層

單純的提供接口給應(yīng)用層用,其中PIN設(shè)備驅(qū)動(dòng)框架接口包含rt_pin_read等,具體在pin.c 文件中查看

pin.c是提供應(yīng)用接口

drv_gpio.c是具體實(shí)現(xiàn)

實(shí)現(xiàn)操作方法原理

struct rt_pin_ops{ void (*pin_mode)(struct rt_device *device, rt_base_t pin, rt_uint8_t mode); void (*pin_write)(struct rt_device *device, rt_base_t pin, rt_uint8_t value); rt_ssize_t (*pin_read)(struct rt_device *device, rt_base_t pin); rt_err_t (*pin_attach_irq)(struct rt_device *device, rt_base_t pin, rt_uint8_t mode, void (*hdr)(void *args), void *args); rt_err_t (*pin_detach_irq)(struct rt_device *device, rt_base_t pin); rt_err_t (*pin_irq_enable)(struct rt_device *device, rt_base_t pin, rt_uint8_t enabled); rt_base_t (*pin_get)(const char *name);#ifdef RT_USING_DM rt_err_t (*pin_irq_mode)(struct rt_device *device, rt_base_t pin, rt_uint8_t mode); rt_ssize_t (*pin_parse)(struct rt_device *device, struct rt_ofw_cell_args *args, rt_uint32_t *flags);#endif#ifdef RT_USING_PINCTRL rt_err_t (*pin_ctrl_confs_apply)(struct rt_device *device, void *fw_conf_np);#endif /* RT_USING_PINCTRL */};

rt_pin_ops 成員介紹

pin_mode

引腳初始化

pin_write

引腳寫

pin_read

引腳讀

pin_attach_irq

中斷操作 為某個(gè)引腳綁定一個(gè)中斷回調(diào)函數(shù),使能中斷,當(dāng)中斷來時(shí)調(diào)用該函數(shù)

pin_detach_irq

中斷操作 脫離某個(gè)引腳的中斷回調(diào)函數(shù)

pin_irq_enable

中斷操作 開啟或關(guān)閉中斷

pin_get

獲取某個(gè)pin腳編號

pin_irq_mode

pin_parse

pin_ctrl_confs_apply

引腳編號

#define GET_GPIO_PORT(x) ((x) / 32)#defineGET_GPIO_PIN(x)((x)%32)

rt_pin_ops 賦值

rt_hw_pin_init(){ int ret = RT_EOK; mcx_pin_ops.pin_mode = mcx_pin_mode; mcx_pin_ops.pin_read = mcx_pin_read; mcx_pin_ops.pin_write = mcx_pin_write; mcx_pin_ops.pin_attach_irq = mcx_pin_attach_irq; mcx_pin_ops.pin_detach_irq = mcx_pin_detach_irq; mcx_pin_ops.pin_irq_enable = mcx_pin_irq_enable; mcx_pin_ops.pin_get = RT_NULL, ret = rt_device_pin_register("pin", &mcx_pin_ops, RT_NULL);// return ret;}INIT_BOARD_EXPORT(rt_hw_pin_init);

注意:這里的操作很奇怪INIT_BOARD_EXPORT ,根據(jù)老師的講解是在預(yù)編譯的時(shí)候就處理了,具體后面再學(xué)習(xí)。。。

drv_pin.c 的 rt_hw_pin_init 將底層驅(qū)動(dòng)和驅(qū)動(dòng)框架進(jìn)行鏈接起來,此文件實(shí)現(xiàn)gpio的初始化

添加Pin驅(qū)動(dòng)代碼流程

編寫drv_pin.c文件

實(shí)現(xiàn) rt_pin_ops 的各種操作接口函數(shù)

然后利用 rt_hw_pin_init 進(jìn)行鏈接驅(qū)動(dòng)層

實(shí)際上就是指針的賦值

實(shí)驗(yàn)代碼

rt_pin_mode(LED_PIN, PIN_MODE_OUTPUT); /* Set GPIO as Output */rt_pin_mode(KEY_BAND, PIN_MODE_INPUT);rt_kprintf("MCXA153 HelloWorld\r\n");while (1){ rt_thread_mdelay(1000); if(rt_pin_read(KEY_BAND)) rt_pin_write(LED_PIN, PIN_HIGH); /* Set GPIO output 1 */ else rt_pin_write(LED_PIN, PIN_LOW); /* Set GPIO output 0 */ #if 0 rt_pin_write(LED_PIN, PIN_HIGH); /* Set GPIO output 1 */ rt_thread_mdelay(500); /* Delay 500mS */ rt_pin_write(LED_PIN, PIN_LOW); /* Set GPIO output 0 */ rt_thread_mdelay(500); /* Delay 500mS */ #endif}

注意:這里延遲1s,目的是為了有msh 功能

總結(jié)

學(xué)習(xí)了PIN設(shè)備驅(qū)動(dòng)框架的添加

聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點(diǎn)僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問題,請聯(lián)系本站處理。 舉報(bào)投訴
  • 驅(qū)動(dòng)
    +關(guān)注

    關(guān)注

    12

    文章

    1908

    瀏覽量

    86602
  • PIN
    PIN
    +關(guān)注

    關(guān)注

    1

    文章

    311

    瀏覽量

    25221
  • RT-Thread
    +關(guān)注

    關(guān)注

    32

    文章

    1372

    瀏覽量

    41570
收藏 人收藏

    評論

    相關(guān)推薦
    熱點(diǎn)推薦

    RT-Thread NUC97x 移植 LVGL

    不涉及 rt-thread 驅(qū)動(dòng),但是它是 LVGL 和 rt-thread 的接口。LVGL 在 rt-thread 上運(yùn)行的基石。
    發(fā)表于 07-08 09:37 ?1666次閱讀

    RT-Thread ssd1306驅(qū)動(dòng)

    RT-Thread 驅(qū)動(dòng)ssd1306
    的頭像 發(fā)表于 04-21 10:08 ?26.5w次閱讀
    <b class='flag-5'>RT-Thread</b> ssd1306<b class='flag-5'>驅(qū)動(dòng)</b>

    RT-Thread編程指南

    RT-Thread編程指南——RT-Thread開發(fā)組(2015-03-31)。RT-Thread做為國內(nèi)有較大影響力的開源實(shí)時(shí)操作系統(tǒng),本文是RT-Thread實(shí)時(shí)操作系統(tǒng)的編程指南
    發(fā)表于 11-26 16:06 ?0次下載

    RT-Thread用戶手冊

    RT-Thread用戶手冊——本書是RT-Thread的編程手冊,用于指導(dǎo)在RT-Thread實(shí)時(shí)操作系統(tǒng)環(huán)境下如何進(jìn)行編 程。
    發(fā)表于 11-26 16:16 ?0次下載

    RT-Thread Studio驅(qū)動(dòng)SD卡

    RT-Thread Studio驅(qū)動(dòng)SD卡前言一、創(chuàng)建基本工程1、創(chuàng)建Bootloader2、創(chuàng)建項(xiàng)目工程二、配置RT-Thread Settings三、代碼分析1.引入庫2.讀入數(shù)據(jù)四、效果驗(yàn)證
    發(fā)表于 12-27 19:13 ?20次下載
    <b class='flag-5'>RT-Thread</b> Studio<b class='flag-5'>驅(qū)動(dòng)</b>SD卡

    RT-Thread開源作品秀】基于RT-Thread的星務(wù)平臺研究

    本作品為了驗(yàn)證星務(wù)軟件在RT-Thread系統(tǒng)運(yùn)行的可行性,底層是否能夠驅(qū)動(dòng)星務(wù)軟件,同時(shí)擴(kuò)展RT-Thread應(yīng)用范圍。ART-Pi作為衛(wèi)星下位機(jī),...
    發(fā)表于 01-25 18:26 ?6次下載
    【<b class='flag-5'>RT-Thread</b>開源作品秀】基于<b class='flag-5'>RT-Thread</b>的星務(wù)平臺研究

    RT-Thread全球技術(shù)大會:Kconfig在RT-Thread中的工作機(jī)制

    RT-Thread全球技術(shù)大會:Kconfig在RT-Thread中的工作機(jī)制 ? ? ? ? ? ? ? 審核編輯:彭靜
    的頭像 發(fā)表于 05-27 14:49 ?1774次閱讀
    <b class='flag-5'>RT-Thread</b>全球技術(shù)大會:Kconfig在<b class='flag-5'>RT-Thread</b>中的工作機(jī)制

    RT-Thread全球技術(shù)大會:RT-Thread測試用例集合案例

    RT-Thread全球技術(shù)大會:RT-Thread測試用例集合案例 ? ? ? ? ? 審核編輯:彭靜
    的頭像 發(fā)表于 05-27 16:34 ?2323次閱讀
    <b class='flag-5'>RT-Thread</b>全球技術(shù)大會:<b class='flag-5'>RT-Thread</b>測試用例集合案例

    RT-Thread學(xué)習(xí)筆記 RT-Thread的架構(gòu)概述

    RT-Thread 簡介 作為一名 RTOS 的初學(xué)者,也許你對 RT-Thread 還比較陌生。然而,隨著你的深入接觸,你會逐漸發(fā)現(xiàn) RT-Thread 的魅力和它相較于其他同類型 RTOS
    的頭像 發(fā)表于 07-09 11:27 ?4925次閱讀
    <b class='flag-5'>RT-Thread</b>學(xué)習(xí)筆記 <b class='flag-5'>RT-Thread</b>的架構(gòu)概述

    RT-Thread文檔_RT-Thread 簡介

    RT-Thread文檔_RT-Thread 簡介
    發(fā)表于 02-22 18:22 ?5次下載
    <b class='flag-5'>RT-Thread</b>文檔_<b class='flag-5'>RT-Thread</b> 簡介

    RT-Thread文檔_RT-Thread 潘多拉 STM32L475 上手指南

    RT-Thread文檔_RT-Thread 潘多拉 STM32L475 上手指南
    發(fā)表于 02-22 18:23 ?10次下載
    <b class='flag-5'>RT-Thread</b>文檔_<b class='flag-5'>RT-Thread</b> 潘多拉 STM32L475 上手指南

    RT-Thread文檔_RT-Thread SMP 介紹與移植

    RT-Thread文檔_RT-Thread SMP 介紹與移植
    發(fā)表于 02-22 18:31 ?9次下載
    <b class='flag-5'>RT-Thread</b>文檔_<b class='flag-5'>RT-Thread</b> SMP 介紹與移植

    RT-Thread文檔_PIN 設(shè)備

    RT-Thread文檔_PIN 設(shè)備
    發(fā)表于 02-22 18:33 ?0次下載
    <b class='flag-5'>RT-Thread</b>文檔_<b class='flag-5'>PIN</b> 設(shè)備

    基于RT-Thread Studio學(xué)習(xí)

    前期準(zhǔn)備:從官網(wǎng)下載 RT-Thread Studio,弄個(gè)賬號登陸,開啟rt-thread學(xué)習(xí)之旅。
    的頭像 發(fā)表于 05-15 11:00 ?5076次閱讀
    基于<b class='flag-5'>RT-Thread</b> Studio學(xué)習(xí)

    RT-Thread設(shè)備驅(qū)動(dòng)開發(fā)指南》基礎(chǔ)篇--以先楫bsp的hwtimer設(shè)備為例

    一、概述(一)RT-Thread設(shè)備驅(qū)動(dòng)RT-Thread設(shè)備驅(qū)動(dòng)開發(fā)指南》書籍是RT-thread官方出品撰寫,系統(tǒng)講解
    的頭像 發(fā)表于 02-24 08:16 ?2586次閱讀
    《<b class='flag-5'>RT-Thread</b>設(shè)備<b class='flag-5'>驅(qū)動(dòng)</b>開發(fā)指南》基礎(chǔ)篇--以先楫bsp的hwtimer設(shè)備為例
    主站蜘蛛池模板: 普陀区| 藁城市| 石河子市| 冕宁县| 邯郸市| 沾化县| 资溪县| 安泽县| 淮北市| 盐山县| 铁岭县| 保亭| 黎川县| 拉萨市| 六盘水市| 西贡区| 鹤庆县| 乌审旗| 揭阳市| 将乐县| 祁门县| 观塘区| 开远市| 定兴县| 乌苏市| 资阳市| 鄢陵县| 牙克石市| 明水县| 阜阳市| 星子县| 合阳县| 中阳县| 奇台县| 安庆市| 云林县| 磐安县| 康平县| 广南县| 蒙城县| 泰来县|