ioport的用法

时间:2024.4.21

ioport的用法

20xx年10月29日 星期四 下午 05:11

The ioport keyword enables access to the I/O port space of the C54x devices. The keyword has the form:

ioport type port hex_num

ioport is the keyword that indicates this is a port variable. type must be char, short, int, or the unsigned variable.

porthex_num refers to the port number. The hex_num argument is a hexadecimal number.

All declarations of port variables must be done at the file level. Port variables declared at the function level are not supported. Do not use the ioport keyword in a function prototype.

For example, the following code declares the I/O port as unsigned port 10h, writes a to port 10h, then reads port 10h into b: ioport unsigned port10; /* variable to access I/O port 10h */ int func ()

{

...

port10 = a; /* write a to port 10h */ ...

b = port10; /* read port 10h into b */ ...

}

The use of port variables is not limited to assignments. Port variables can be used in expressions like any other variable. Following are examples:

a = port10 + b; /* read port 10h, add b, assign to a */ port10 += a; /* read port 10h, add a, write to port 10h */ In calls, port variables are passed by value, not by reference: call(port10); /* read port 10h and pass (by value) to call */ call(&port10); /* invalid pass by reference! */

DSP中如何访问I/O,数据空间

访问I/O空间

I/O空间地址声明

要在程序中访问io空间地址,必须首先用关键字“ioport”对要访问的地址进行定义。

语法:ioport t ype porthex_num

ioport 声明io空间端口变量的关键字;

type 变量类型,可以为char, short, int或unsigned int;

porthex_num 端口号,port后面接16进制数字。

ioport unsigned int port10;

注:声明io空间地址必须在C文件起始声明,不允许在函数中使用ioport声明io空间地址。

I/O空间地址访问

访问用ioport关键字声明的I/O端口变量和访问一般变量没有区别。

ioport unsigned int port10;

int func ()

{

...

port10 = a;

...

b = port10;

...

}

I/O端口变量的使用不仅仅局限于赋值,和其他变量同样也可以应用于其它的表达式。

call (port10);

a = port10 + b;

port10 += a;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

程序中访问的任何一个IO地址都必须在C语言程序起始处用ioport关键字声明!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

访问数据空间

访问数据空间不需要对要访问的单元预先声明,访问是通过指针的方法实现的。

unsigned int org,cnt,block,offset,tmp,i;

org = *(unsigned int *) 0x8000;

cnt = *(unsigned int *) 0x8001;

block = *(unsigned int *) 0x8002;

offset = *(unsigned int *) 0x8003;

for (i=0; i<cnt; i++)

tmp = *(unsigned int *) (org + i);

*(unsigned int *) (org + offset +i) = tmp;


第二篇:用法


qd——1日1次,bid——1日2次,tid——1日3次,qid——1日4次,qod——隔日1次,qw——每周1次,biw——两周1次,q2h——每2小时1次,q8h——每8小时1次,qn——每晚睡前1次,2~3次/d——每日2~3次。皮下——皮下注射,肌注——肌肉注射,静注——静脉注射,静滴——静脉滴注

P.O表示此药口服;

INJ.表示注射剂;

MIXT.表示合剂;

TAD.表示片剂;

SOL.表示溶液;

CO.表示复方;

PR.表示灌肠; (即打点滴)。表示请取药; RP

I.D表示皮内注射; I.V表示静脉注射;

I.V.GTT.表示静脉点滴; IH表示皮下注射; IM表示肌肉注射; O.M表示每晨; O.N表示每晚; HS.表示睡时用; AM.表示上午;

PM.表示下午;

A.C.表示饭前; P.C.表示饭后;

SOS.表示需要时用一次; ST.表示立即; QD表示每日一次; BID表示每日两次; TID表示每日三次; QOD表示隔日一次;

QH表示每小时一次;

Q2H表示每两小时一次;Q3H表示每三小时一次;依次类推; MCG表示微克;

MG表示毫克;

G表示克;

ML表示毫升;

sig表示用法;

普萘洛尔-心得安

阿替洛尔-胺酰心安

硝酸异山梨酯-消心痛

硝苯地平-心痛定

曲克芦丁-维脑路通 氢氧化铝-胃舒平

沙丁胺醇-舒喘灵

醋酸甲羟孕酮-安宫黄酮

甲氧氯普胺-胃复安(灭吐灵) 甲硝唑-灭滴灵

去甲肾上腺素-正肾素 肾上腺素-副肾素

15AA-肝安

9AA-肾安

消旋山莨菪碱-654-2 头孢噻肟钠-治菌必妥

头孢曲松纳-曲而松 喷托维林-咳必清 诺氟沙星-氟哌酸 呋喃唑酮-痢特灵 洛贝林-山梗菜碱 尼可刹米-可拉明 拉米夫定-贺普丁 吲哚美辛-消炎痛 吡罗昔康-炎痛喜康 复方氨基比林-安痛定 去痛片-索密痛 酚氨咖敏-扑感敏 利巴韦林-病毒唑

小檗碱-黄连素

异烟肼-雷米封

胞磷胆碱-胞二磷胆碱 乙酰谷酰胺-醋谷胺 罗痛定-颅痛定

氨咖黄敏胶囊-速效伤风胶囊 苯海索-安坦

苯妥英纳-大伦丁 苯巴比妥钠-鲁米那 吡硫醇-脑复新

吡拉西坦-脑复康

异丙酚-丙泊酚(得普利麻) 维拉帕米-异博定

间羟胺-阿拉明

酚妥拉明-利其丁

桂利嗪-脑益嗪

去乙酰毛花苷-西地兰D 普罗帕酮-心律平

美西律-慢心律

倍他司汀-培他啶

卡托普利-巯甲丙脯酸 复方甘草合剂-棕色合剂

复方愈创木酚磺酸钾-非那根合剂 碳酸氢钠-小苏打

西咪替丁-甲氰咪胍

干酵母-食母生

多潘立酮-吗丁啉

酚酞-果导

葡醛内酯-肝泰乐

复方甘草酸单胺-强力宁 氢氯噻嗪-双克

呋塞米-速尿

螺内酯-安体舒通

缩宫素-催产素

肾上腺色综-安络血 氨甲苯酸-止血芳酸 酚磺乙胺-止血敏

亚硫酸氢纳甲萘醌-维生素K3 硫酸氢钠甲萘醌-维生素K4

叶绿醌-维生素K1 利血生-利可君 双嘧达莫-潘生丁 异丙嗪-非那根 氯苯那敏-扑尔敏 地塞米松-氟米松 泼尼松龙-强的松龙 泼尼松-强的松 氢化可的松-皮质醇 曲安奈德-康宁克通 丙酸睾丸素-丙酸睾酮 甲基睾丸素-甲睾酮

己烯雌酚-乙底酚(求偶素)

氯米芬-克罗米芬 格列本脲-优降糖 苯乙双胍-降糖灵 甲巯咪唑-他吧唑 丙基硫氧嘧啶-丙噻优 多柔比星-阿霉素 表柔比星-表阿霉素 他莫昔芬-三苯氧胺 地芬尼多-眩晕停

亚叶酸钙-甲酰四氢叶酸钙 维生素C-抗坏血酸 氯化钠-生理盐水(N.S) 葡萄糖-G.S

氯化钠葡萄糖-G.N.S 地西泮-安定

艾司唑仑-舒乐安定 氯硝西泮-氯硝安定

咪达唑仑-力月西(咪唑安定) 可待因-甲基吗啡

布桂嗪-强痛定

哌替啶-杜冷丁

汞溴红溶液-红药水 过氧化氢-双氧水

高锰酸钾粉-P.P粉

乙酰唑胺-醋氮酰胺 阿米卡星-丁胺卡那霉素

苄星青霉素-长效青霉素 头孢噻吩-先锋1号

头孢噻啶-先锋2号

头孢氨苄-先锋4号

头孢唑林纳-先锋5号

头孢拉定-先锋6号

头孢羟氨苄-先锋9号

头孢哌酮-先锋必

复方磺胺甲恶唑-复方新若明(SMZ) 多西环素-强力霉素

米若环素-美满霉素

依托红霉素-无味红霉素 阿昔洛韦-无环鸟苷

异丙肾上腺素-喘息定 依托泊苷-足叶乙甙 林可霉素-洁霉素

复方肝浸膏-肝铁片(力勃隆)

?

?

?

?

?

?

?

? Hey Jude, don't make it bad Take a sad song and make it better Remember to let her into your heart Then you can start to make it better Hey Jude, don't be afraid You were made to go out and get her The minute you let her under your skin

? ? ? ? ? ? ? ? ? ? ? ? ? Then you begin to make it better And anytime you feel the pain, hey Jude, refrain Don't carry the world upon your shoulders For well you know that it's a fool who plays it cool By making his world a little colder nananananananananana~ Hey Jude, don't let me down. You have found her, now go and get her. Remember to let her into your heart, Then you can start to make it better.

? ? ? ? ? ? ? ? ? ? ? ? ? nananananananananana~Hey Jude 女:白茫茫的星光 洒在长长路上 想念的冰凉 你知道吗 你浅浅的微笑 深似海的眼光 都能掀起我 滔天的巨浪 男:你相信吗 这是命吗 这次我们放弃抵抗 哪怕拥抱 在身上 划下深深的伤 合:只要看你一眼 一瞬间 哪怕是最后画面

? ? ? ? ? ? ? ? ? ? ? ? ? 我的世界 因为爱过而完美 谁都不该离太远 只要看你一眼 一瞬间 足够我熬过千年 我不后悔 爱若让末日提前 我们要一起 好好迎接那句点 女:如果相爱是错 男:错过又算什么 合:这一次我们抵死不放手 往彼此心理面跳 跳到天荒地老 OH~

? ? ? ? ? ? ? ? ? ? ? ? 合:只要看你一眼 一瞬间 哪怕是最后画面 我的世界 因为爱过而完美 谁都不该离太远 只要看你一眼 一瞬间 足够我熬过千年 我不后悔 爱若让末日提前 我们要一起 好好迎接那句点 男:我们要一起 合:好好迎接那句点

? 冷循环微波消融针并不是针,它是一根很细的辐射天线。具体做法是:在B超或CT引导下,把微波针直接穿刺到肿瘤部位,组

织内的极性分子在微波场的作用下高速运动,互相摩擦产生热量,在肿瘤内迅速升温,当温度升到60度左右时,癌细胞蛋白质变性凝固,导致不可逆的坏死。同时对其他组织的影响非常小,提高患者机体的免疫力,抑

年新农合门诊慢病补偿登记

第一本 2015

更多相关推荐:
Book Report范例写法

BookReport1informationabouttheauthorandhistimes2asummaryofthebook3commentsonitsampleAroundtheWorldinEightyDaysbyJul...

bookreport飘

Bookreport英语学院07级7班20号张同BookreportGoneWiththeWindOringionofthenameapoemCynaraLastnightahyesternightbetwix...

report范文

ReportonstrategicanalysisandpositionoftheUKCooperativeGroupExecutiveSummaryThisreportaimstomakeastrategic…

Writing a Book Report

WritingaBookReportOnewaytoshareabookyouhavereadistowriteabookreportorreviewWritingthebookreportwillalsohe...

Report范文

ReportonvisitstowebsiteandproposedmarketingstrategyIntroductionTheaimofthisreportistocommentonthenumberof...

report范文

大学体育设施管理改革1高校体育管理机构改革的必要性随着体育市场化的发展高校体育设施齐全所具有的优势日益体现出来其经济功能和社会功能也愈发突出而现有的高校体育管理机构对体育设施的管理仍停留在教学训练及课外活动的开...

英语report范文

ReportonhowSoundBlasterbandcanimproveontheirsuccessIntroductionThepurposeofthisreportistoprepareapresentationstrate...

剑桥雅思考官写作范文:The media report crimes in details

最权威的国际教育服务平台剑桥雅思考官写作范文Themediareportcrimesindetails本文剑桥雅思考官写作范文的Topic是Shouldthemediareportcrimesindetails...

BEC Report范文

ReportontradebalanceconcerningmanufacturingandagricultureThisreportdescribesthemovementsofthebalanceoftra...

英语论文范文 A report about performance of McGrew PLC

PartsixAnalysisofcashflowstatementastatementofcashflowfluctuationanalysisIn1generatedfromoperatingactivitiesnetcash...

English Daily Report格式

EnglishDailyReport格式第一篇Report请学生总结一下从微创报到至今天的总体情况格式按照如下SubjectDailyReport组别中文名英文名时间egDailyReportGroupA江浩E...

商务英语写作report案例

PracticalEnglishWritingforWorkingPurposesPartoneAnOverviewofBusinessWriting商务写作概述1CriteriaforEffectiveBus...

book report(30篇)