boa移植笔记

合集下载

《小王子英文版》精读笔记——第一章

《小王子英文版》精读笔记——第一章

《小王子英文版》精读笔记——第一章第1 章[ Chapter 1 ]◆magnificent /mæɡˈnɪfɪsnt/ adj. 壮丽的;令人印象深刻的◆primeval /praɪˈmivəl/ adj. 原始的◆a boa constrictor 一条蟒蛇◆boa /'bəʊə/ n. 蟒◆constrictor /kən'strɪktə/ n. 大蟒◆swallow /'swɒləʊ/ v. 吞下◆called True Stories from Nature 可以看做非限制性定语修饰a book(解释补充说明)◆in the act of doing (sth.) 正在做某事时◆prey /preɪ/ n[U].猎物v.捕食◆swallow sth. whole 把……囫囵吞下◆whole /həʊl/ adj. 完整的◆chew /tʃuː/ vt.咀嚼◆succeed in doing 成功地做某事◆drawing /'drɔː(r)ɪŋ/ n. 图画◆masterpiece /'mɑːstəpiːs/ n. 杰作◆frighten /'fraɪt(ə)n/ v.使惊恐;吓唬◆show sth. to sb. 把某物给某人看◆digest /daɪ'dʒest/ v.消化◆ask sb. sth. 询问某人某事◆whether the drawing frightened them 宾语从句◆be frightened by... 被……吓坏(吓一跳)◆digesting an elephant 现在分词短语作后置定语完整版笔记持续更新中ing公主号:中学英语Club。

在arm开发板上部署boa服务器

在arm开发板上部署boa服务器

在arm开发板上部署boa服务器2009-08-20 14:22:12| 分类:编程笔记|字号订阅里面所有的步骤都确定完成过,但是可能遗漏了一些步骤,有待重部署一次来验证,补充,--------------------------------------一,下载/二,解压# tar xzf boa-0.94.13.tar.gz三,编译# cd boa-0.94.13/src# ./configure生成了makefile文件,修改makefile文件,把其中的CC CPP改为:CC = arm-linux-gccCPP = arm-linux-g++然后make# make删除调试信息(可以不做,目的是减小文件大小):# arm-linux-strip boa四,修改配置从boa根目录找到boa.conf文件,修改如下项目:User nobody (可以不修改)Group nogroup 改为:Group 0ErrorLog /var/log/boa/error_log (错误日志文件)AccessLog /var/log/boa/access_log (访问日志文件,可以用#注释掉这行,表示不要这个日志)ServerName (服务器地址)DocumentRoot /var/www (html文件主路径)MimeTypes /etc/mime.types (mime.types文件)更多配置,可以参见:/u1/34076/showart_268366.html五,配置开发板1,复制boa的可执行文件到开发板,(如/usr/local/bin/ 目录)2,在开发板上建文件夹# mkdir /var/www/ ,并放一个简单的index.html 测试文件进去# mkdir /var/log/boa ,用来存放access_log error_log3,复制之前修改好的boa.conf文件到/etc/boa/boa.conf4,复制自己pc(我的是ubuntu)上的mime.types文件,到/etc/mime.types上六,运行boa# boa-----------------------------------------------------------------------------------------------------------------更多说明:一,运行正确以上6步后,应该能通过其它电脑的浏览器,访问到/var/www/index.html页面二,如果执行时候有错误:# ./boa[27/Nov/1990:13:22:25 + 0000]boa.c:266.icky Linux kernel bug!:No such fileBae将User 0修改成User nobodyBae三,在板子上方放的cgi程序,html文件,一定要把权限修改对,修改成755四,一个简单的cgi测试程序:(来自:/viewthread.php?tid=83&highlight=cgi)1,html文件:-------------------------------------<html><head><title>CGI Testing</title></head><body><table width="200" height="180" border="0" style="font-size:12px"><tr><td><div style="font-weight:bold; font-size:15px">Method: GET</div><div>lease input two number:<div><form method="get" action="./cgi-bin/get"><input type="txt" size="3" name="a">+<input type="txt" size="3" name="b">=<input type="submit" value="sum"></form></td></tr><tr><td><div style="font-weight:bold; font-size:15px">Method: POST</div><div>lease input two number:<div><form method="post" action="./cgi-bin/post"><input type="txt" size="3" name="m">*<input type="txt" size="3" name="n">=<input type="submit" value="resu"></form></td></tr><tr><td><inputtype="button" value="BackHome"onclick='javascript:window.location="./index.html"'></td></tr></table></body></html>------------------------------2,get.c :------------------------------#include <stdio.h>#include <stdlib.h>int main(void){char *data;char a[10],b[10];printf("Content-Type:text/html\n\n");printf("<HTML>\n");printf("<HEAD>\n<TITLE >Get Method</TITLE>\n</HEAD>\n");printf("<BODY>\n");printf("<div style=\"font-size:12px\">\n");data = getenv("QUERY_STRING");if(sscanf(data,"a=%[^&]&b=%s",a,b)!=2){printf("<DIV STYLE=\"COLOR:RED\">Errorarameters should be entered!</DIV>\n"); }else{printf("<DIV STYLE=\"COLOR:GREEN; font-size:15px;font-weight:bold\">a + b= %d</DIV>\n",atoi(a)+atoi(b));}printf("<HR COLOR=\"blue\" align=\"left\" width=\"100\">");printf("<input type=\"button\" value=\"Back CGI\"onclick=\"javascript:window.location='../cgi.html'\">");printf("</div>\n");printf("</BODY>\n");printf("</HTML>\n");return 0;}------------------------------3,post.c:------------------------------#include <stdio.h>#include <stdlib.h>int main(void){int len;char *lenstr,poststr[20];char m[10],n[10];printf("Content-Type:text/html\n\n");printf("<HTML>\n");printf("<HEAD>\n<TITLE >ost Method</TITLE>\n</HEAD>\n");printf("<BODY>\n");printf("<div style=\"font-size:12px\">\n");lenstr=getenv("CONTENT_LENGTH");if(lenstr == NULL){printf("<DIV STYLE=\"COLOR:RED\">Errorarameters should be entered!</DIV>\n"); }else{len=atoi(lenstr);fgets(poststr,len+1,stdin);if(sscanf(poststr,"m=%[^&]&n=%s",m,n)!=2){printf("<DIV STYLE=\"COLOR:RED\">Error: Parameters are not right!</DIV>\n");}else{printf("<DIV STYLE=\"COLOR:GREEN; font-size:15px;font-weight:bold\">m * n = %d</DIV>\n",atoi(m)*atoi(n));}}printf("<HR COLOR=\"blue\" align=\"left\" width=\"100\">");printf("<input type=\"button\" value=\"Back CGI\"onclick=\"javascript:window.location='../cgi.html'\">");printf("</div>\n");printf("</BODY>\n");printf("</HTML>\n");fflush(stdout);return 0;}------------------------------4,把两个c程序编译完成,复制到开发搬上,通过其它pc访问测试html页面,调用这两个cgi,其中如果出现:502 Bad Gateway The CGI was not CGI/1.1 compliant.错误,有可能是如下原因:(1)将.cgi文件拷贝至目标板上后,必须改变其权限chmod 755 *(2)测试程序中“//“的问题。

老友记 六人行 第五季第六集经典笔记

老友记 六人行 第五季第六集经典笔记

The One With The YetiWritten by: Alexa JungeTranscribed by: Eric Aasen506 雪男乔伊不喜欢守秘密,但为了莫妮卡和钱德又不得不守口如瓶。

菲比得到传家宝——一件貂皮大衣。

她本打算焚化,穿上后一照镜子,她又改变了主意。

应艾米丽的要求,罗斯变卖了所有旧家当,两人打算开始全新的生活。

罗斯觉得艾米丽没必要如此小心,“如果没有信任,我们的婚姻怎能幸福?”但艾米丽始终无法放心。

黑暗之中,瑞秋和莫妮卡被储藏室里一个毛发浓密的男人吓了一跳。

这个“雪男”一样的男人原来是大楼新住客,丹尼。

瑞秋和丹尼起先无法相处融洽,但后来两人一起去吃披萨。

丑陋裸男返家。

5.06 The One With The YetiJoey continues to keep Monica and Chandler's secret, although he's not to happy about keeping quite.Phoebe receives a mink coat as a family heirloom;since she's against using fur, she plans to cremate it... until she seesherself wearing it in the mirror.Ross sells all his stuff and moves to a new apartment because Emily wants themto have a fresh start(n.全新的开始) at a new life.Emily's demands get to be a little too much for Ross, and he tells her she's either got to trust him or their marriage won't work.Emily decides she can't trust Ross.Rachel and Monica are frightened by a hairy man in a dark storage room;The "Yeti" turns out to be Danny, a new tenant(n.房客) in the building.Rachel and Danny don't seem to get along but end up going out for pizza together.Ugly Naked Guy is back.[Scene: Chandler and Joey's, Monica and Chandler are making out onone of the chairs.]Joey: (entering) Hey! Hey! Hey! Hey!! None of that, not while you're living under my roof!under sb.'s roof adv.住在某人家作客Monica: What?!Joey: Look, just because I know about you two, doesn't mean I like looking at it.know about v.了解Chandler: Aren't you supposed to be at an audition for another hour?Joey: Well, I'm sorry if I'm not a middle-aged black woman! (Startsfor his room.) And I'm also sorry if sometimes I go to the wrong audition! Okay, look, if I have to pretend I don't know about you two, then you two are gonna have to pretend there's nothing to know about.middle-aged adj.中年的Chandler and Monica: Okay.Monica: Sorry.Chandler: Sorry.(They wait for Joey to go into his room and close the door and then start making out again.)Joey: (from the bedroom) I can hear that!Monica: (To Chandler) Rachel's at work.(They both go to her apartment.)(Pause.)Joey: I can still hear you!Opening Credits[Scene: Central Perk, Joey, Chandler, and Monica are there as Phoebe enters carrying a large box.]Phoebe: Hey!Joey: Hey!Chandler: Hello!Monica: Hey, what's that?Phoebe: Yeah, my mom sent me a family heirloom that once belonged to my grandmother. Can you believe it?! A year ago I didn't even have a family, and now I have heirlooms for crying out loud.heirloom n.传家宝相传动产/cry out loud v.大叫大嚷Chandler: The only heirloom I ever got was a feather boa. Got it from my dad. He got it from his dad. How did I ever get born?feather boa n.女用羽毛长围巾(She puts her leg upon the chair and removes this huge knife from her boot to open the box with. The guys are shocked at the knife's existence.)Phoebe: Eeeee-(She opens the box and removes its contents and sees that it's a fur coat.)-ohh!! God! (She throws it at Joey.)fur coat n.皮大衣Joey: Argh-argh!! (Catches the coat.) Ooh, soft. Is this mink?mink n.貂皮<动>貂(尤指水貂)Phoebe: Yeah! Why would my mother send me a fur? Doesn't she know me but at all! Plus, I have a perfectly fine coat that no innocent animal suffered to make!Chandler: Yeah, just some 9-year-old Filipino kids who worked their fingers bloody for 12 cents an hour. (Phoebe stares at him wide-eyed. Chandler sees her reaction.) That didn't happen, I made that up!Filipino adj.菲律宾(人)的/bloody adj.有血的/wide-eyed adj.睁大着眼睛的惊奇的Ross: (entering) Hey!Gunther: Oh, Ross? Ross! You can't put up flyers in here.flyer n.(广告)传单Ross: How come? Everybody else does.Gunther: You can't.Monica: What is that?Ross: Oh, umm, I'm just getting rid of a couple of things.Monica: (looking at the flyer) This is all of your things.Ross: Yes, yes it is! No, but it's good it's—Emily thinks we should get all new stuff. Stuff that's just ours, together. Y'know brand new.brand new adj.崭新的Monica: So basically, this is a getting-rid-of-everything-Rachel-ever-used sale.Ross: Touched. Used. Sat on. Slept on.Gunther: I'll take it all.Joey: Hey, Ross, you're okay with that?Ross: Look, if I can just do what Emily wants and get her to New York, I'm sure everything will be fine.Chandler: Okay, but don't you think this is a little extreme?extreme adj.极端的Ross: After what I did? Can you blame her?Phoebe: Oh my God! You got off easy! When my friend Silvie's husband said someone else's name in bed, she cursed him and turned his thingy green.get off v.免于受罚/curse v.诅咒咒骂/thingy <俚>Used to describe an objecton the spur of the moment(adv.一时冲动地) when you have a sudden brain fritz(<美俚>失常) and forget exactly what you were gonna say was.Ross: I guess I'm lucky EmiIy is not magic.Phoebe: Oh, she is.We all are.(Ross suddenly gets up and heads for the bathroom.)Joey: (after Ross is gone) What is he doing? What, Emily, thinksRoss's furniture has got Rachel cooties?cootie <俚>虱子Monica: Now calm down Joey.Joey: No! Everything's gettin' all messed up, y'know? Emily won't let Ross see Rachel, we're not gonna stop seeing Rachel, hence Ross stops seeing us!Phoebe: Oh, I hate this. Everything's changing.Chandler:Yeah I know, we're losing Ross, Joey said hence…Monica: Look, I'm not happy about this either, but y'know if-if Ross says he's happy then we're just gonna have to keep our feelings about Emily to ourselves.Are you cool with that?Joey: No! But y'know, I'm an actor, I'll act cool. Probably be some of the hardest acting I've ever done. Maybe I'II pIay it with a mustache.[Scene: The Storage Room in the basement of Monica and Rachel's building, Monica and Rachel are looking for something.]Rachel: Ohh, whoa God! Storage rooms give me the creeps! Monica, come on please hurry up honey! Please?creep n.毛骨悚然的感觉[His ghost story gave the children the creeps.]Monica: Rachel, if you want the little round waffles, you gotta have to wait until I find the little waffle iron.round wafflewaffle ironRachel: I want the little round waffles.Monica: All right. (Looking through a box.) Op, here it is! Right underneath the can of-of bug bomb. I wonder if the best place to put something that cooks food is underneath the can of poison?Bub Bombpoison n.毒药(The single light flickers and goes out. Leaving the room in total darkness.)flicker n.v.闪烁/go out v.熄灭single lightRachel: Okay, y'know what? I'll-I'll have toast!(She starts to run out but is stopped by a figure looming out of the darkness carrying a pickaxe.)loom vi. 隐约地出现阴森地逼近/pickaxe n.镐Rachel: Arghhhh!!!!!!(They both start screaming at the top of their lungs.)Monica: Oh my God! Fog him! Fog him!fog vt.以雾笼罩(Rachel grabs the bug bomb, activates it, throws it at the figure, and they both run out through the fog.)[Scene: Central Perk, Chandler, Joey, and Phoebe are there.]Phoebe: I don't know what I'm gonna do about this coat.Joey: I'll take it!Phoebe: That might work! (She gives him the coat.)Joey: Ooh-ooh-ooh, yeah! (He drapes it around his shoulders.) Enh?All right, what do you think?drape vt.覆盖呈褶状垂下Chandler: You're on in 5,Ms. Minnelli.be on v.上台/Ms.Minnelli:Liza May Minnelli (born March 12, 1946 in Los Angeles, California) is an Academy Award-winning and Tony Award-winning American actress and singer. She is the daughter of legendary actress and singer Judy Garland and her second husband, film director Vincente Minnelli.Ross: (on the phone) No-no-no, it's just a bit sudden. (Listens) No, it's great. Okay? I'm totally on board. I love you too, all righty. Bye. (Hangs up.)sudden adj.突然的意外的Joey: What's the matter Ross?Ross: Nothing. Oh, actually, great news! I just got off the phone with Emily and it looks like I'm moving to a new apartment. Woo-hoo!Phoebe: Why?Ross: Well, her thought is, and I agree, fresh new furniture, why not a fresh new apartment? Her cousin has this great place to sublet,it's got a view of the river on one side and Columbia on the other.sublet vt.转(或分)租出Joey:That's way uptown! That's like three trains away! (Phoebe pinches him.) Which is great! I love to ride that rail!ride that rail v.乘火车Chandler: So you're really okay with this?Ross: Yes! Yes! I mean it's-it's kinda far from work, but uh, y'know, I'll get so much done on the commute. I-I've been given the gift of time!commute <口>通勤Chandler: Now that's so funny, because last Christmas I got the gift of space. We should get them together and make a continuum.cotinuum <数>连续统闭联集[cotinuum=space+time](Ross exits.)Joey: Now he's movin'? Man, what is Emily doing to him? (Phoebe pinches him again.) Ow!! He's not even here!!!pinch vt.捏拧夹痛(Monica and Rachel enter breathless.)breathless adv.喘不过气来的气喘吁吁的Rachel: You guys! You guys!Monica: We were, we were just in the storage area and we saw this really creepy man!creepy adj.令人毛骨悚然的不寒而栗的Rachel: It was like this crazy-eyed, hairy beast man! He was like a, like a bigfoot or a yeti or something!Yeti n.(传说中喜马拉雅山的)雪人Monica: And he came at us with an axe, so Rachel had to use a bug bomb on him!axe n.斧Rachel: (proud of herself) Yeah, I-I-I just pulled the tab and I just fogged his yeti ass!tab n.(易拉罐的)拉环拉手Joey: Uhh, like dark hair, bushy beard?bushy adj.浓密的Rachel: Yeah!Joey: Yeah, you fogged Danny.Rachel: Please! We did not fog Danny! Who's Danny?Joey: Dan just moved in downstairs. Yeah, he just got back from like this four-month trek in the Andes. Nice fella.trek n.艰苦跋涉/Andes n.安第斯山脉/Nice fella 人很好/The Andes:(Quechua: Anti(s)) is South America's longest mountain range, forming a continuous chain of highland along the western coast of South America. It is over 7,000 km (4,400 miles) long, 500 km (300 miles) wide in some parts (widest between 18° to 20°S latitude), and of an average height of about 4,000 m (13,000 feet).Monica: Oh he's nice. He's nice! Y'know, you always stick up for the people we fog!stick up for v.为...辩护, 维护[Scene: Their Building, Monica and Rachel are going to apologize to Danny. Rachel knocks on his door, which he opens and he has this really bushy beard and long hair. Picture Paul Bunyan.]picture v.和…很相似/Paul Bunyan:is a mythical(adj.虚构的) lumberjack(n.伐木工人) in tall tales(n.吹牛大话), originating either with an American newspaperman or with French Canadians(n.法裔加拿大人) n.(美国传说中的)伐木巨人Danny: Yeah?Rachel: Hi! You might not remember us, but we are the girls that fogged you.Monica: We're-we're really sorry we fogged you.Danny: Okay.(He closes the door. Rachel's not happy with that and knocks again. He opens the door.)Rachel: Hi! Just so you know, we-we didn't mean to fog you, we thought you were like a yeti or something.Danny: Okay.(He closes the door again. Once again, Rachel knocks (harder this time) and he answers it.)Danny: Yesss?Rachel: Hi! Sorry to bother you, but I don't think we can accept your acceptance of our apology, it just doesn't really seem like you mean it.Monica: Yeah.Danny:O-kay!(He closes the door before Rachel can say anything.)Monica: Wow! That guy is so rude!Rachel: Really! What is with that guy? I mean you'd forgive me if I fogged you.Monica: Well you did a little bit.Rachel: Oh my God, honey, I'm so sorry!Monica: I totally forgive you!Rachel: Really?Monica: Yes![Scene: Monica and Rachel's, Monica is making a drink as Phoebeenters with the fur coat.]Phoebe: Hey!Monica: Hey!Phoebe: So listen, you know my friend Chris who owns the crematorium?crematorium n.火葬场(=crematory)/Cremation:is the practice of disposing ofa human corpse by burning which often takes place in a crematorium or crematory. Along with burial, cremation is an increasingly popular alternative for the final disposition of the dead.The crematorium at Haycombe Cemetery, Bath, EnglandMonica: Crematorium Chris? Sure!Phoebe: He says, that he would cremate my fur coat for free if I umm, y'know, bring in the next person I know who dies.cremate vt.火葬焚化/bring in v.介绍引进(Rachel enters from the bathroom and sees the coat.)Rachel: Oh my God! Oh my God, look at these pelts!pelt n.(动物的)生皮毛皮Monica: Don't get too attached, she's having it cremated.attached adj.依恋的充满爱心的Rachel: What? Uhh, Phoebe, honey, honey, I know you're quirky and I get a big kick out of it, we all do actually, but if you destroy a coat like this that is like a crime against nature! Not nature, fashion!quirky adj.诡诈的多变的古怪的/get a big kick out of sth:美国多年来有一首流行歌曲,它的名字叫“I get a kick out of You”。

BOA架构

BOA架构

针对当前MTK WEB机制进行代码分析总结,总体来说当前机制的重点及难点涉及两个部分,一个是请求处理的核心状态机变迁过程,另一个就是ASP动态解析器的实现,这里分为三部分进行描述,分别对核心状态机变迁、ASP词法解析、语法解析、语法树动作的总结,以及当前服务器的源码分析笔记。

一、核心状态机变迁二、词法解析、语法解析、语法树动作。

这部分算是当前WEB服务器比较难的一块,如果理解了这部分的实现机制,基本上理解当前WEB 服务器的代码也就没有什么障碍了,鉴于个人对编译原理也并不了解,这部分也不太容易详细的解释,这里会涉及很大一部分lex、yacc(或GNU flex、GNU bison)工具的使用以及它们的语法编写,所以偷懒一下,仅仅分析针对我们当前项目,利用这些工具及语法文件为我们生成了什么东西,如果对这些机制感兴趣,可以自学这块的技术,再结合当前分析结果,会对WEB服务器整套机制有更清晰的认识。

1、基本原理a、当用户通过浏览器访问WEB服务器,此时WEB服务器通过请求URL了解到用户希望浏览的页面文件名(假设是test.asp),WEB服务器通过文件扩展名知道了用户在请求一个ASP类型的文件,WEB服务器在本地找到该文件并打开,调用语法解析器。

b、语法解析器的实现代码在我们当前项目中是使用yacc(或GNU bison)工具生成,当然前提是需要一个根据当前语法需求编写的一个特定yacc语法文件(比如当前项目为grammar.y),语法解析器的输入对象除了需要yacc语法文件外,还需要调用词法解析器,通常词法解析器可以使用lex (或GNU flex)生成,但当前项目并没有使用lex,而是自己用C代码写了一个词法解析器(gb-lex.c)供语法解析器使用。

c、WEB服务器调用语法解析器时,语法解析器不断调用词法解析器获取标记及标记值,词法解析器通过读取请求URL指定的ASP文件进行分析,找出符合条件的标记及标记值,并提供给语法解析器使用,语法解析器在根据之前用户提供的语法描述进行语法归约,同时对每一个匹配的语法项执行对应的语法动作,这些语法动作创建了一棵关联的语法树。

瑞芯微电子股份有限公司 DRM 面板移植指南说明书

瑞芯微电子股份有限公司 DRM 面板移植指南说明书

福州瑞芯微电子股份有限公司密级状态:绝密( ) 秘密( ) 内部( ) 公开( √ )Rockchip DRM Panel Porting Guide(第二系统产品部)文件状态:[√] 正在修改[ ] 正式发布当前版本:V1.2作者:闭伟勇完成日期:2017-4-15审核:完成日期:福州瑞芯微电子股份有限公司Fuzhou Rockchips Semiconductor Co . , Ltd(版本所有,翻版必究)版本历史版本号作者修改日期修改说明备注V1.0 闭伟勇2017-4-15 初始版本V1.1 黄家钗2017-4-17 加入LVDS屏配置说明V1.2 闭伟勇2017-8-15 同步代码,更新MIPI章节。

目录1Documentation And Source Code (1)1.1kernel (1)1.2u-boot (2)2MIPI-DSI (3)2.1DT Bindings (3)2.1.1MIPI-DSI Host (3)2.1.2MIPI-DPHY (3)2.1.3LOGO (3)2.1.4Panel (4)2.1.5Command (6)3eDP (11)3.1配置方式1 (11)3.1.1Kernel (11)3.2配置方式2 (13)3.2.1Kernel (13)3.2.2U-boot (16)3.3配置方式3 (16)3.3.1Kernel (17)4LVDS (18)4.1LVDS节点配置 (18)4.2属性说明 (19)4.3Data mapping (20)1 Documentation And Source Code1.1 kernelSource Code Dir:drivers/gpu/drm/rockchip/drivers/gpu/drm/bridge/drivers/gpu/drm/panel/drivers/phy/Documentation Dir:Documentation/devicetree/bindings/display/rockchip/Documentation/devicetree/bindings/display/bridge/Documentation/devicetree/bindings/display/panel/Documentation/devicetree/bindings/phy/Driver File DocCore rockchip_drm_drv.c rockchip-drm.txt Framebuffer rockchip_drm_fb.cGEM rockchip_drm_gem.cVOP rockchip_drm_vop.crockchip_vop_reg.crockchip-vop.txt LVDS rockchip_lvds.c rockchip-lvds.txt RGA rockchip_drm_rga.c rockchip-rga.txtMIPI dw-mipi-dsi.cphy-rockchip-inno-mipi-dphy.c dw_mipi_dsi_rockchip.txtphy-rockchip-inno-mipi-dphy.txtHDMI dw_hdmi-rockchip.cdw-hdmi.c dw_hdmi-rockchip.txt dw_hdmi.txtINNO HDMI inno_hdmi.c inno_hdmi-rockchip.txt eDP analogix_dp-rockchip.c analogix_dp-rockchip.txtanalogix_dp_core.c analogix_dp_reg.c phy-rockchip-dp.c analogix_dp.txt rockchip-dp-phy.txtDP cdn-dp-core.ccdn-dp-reg.ccdn-dp-rockchip.txt Panel panel-simple.c simple-panel.txt 1.2 u-bootSource Code Dir:drivers/video/Driver FileCore rockchip_display.crockchip_crtc.crockchip_connector.crockchip_phy.crockchip_panel.cVOP rockchip_vop.crockchip_vop_reg.ceDP rockchip_analogix_dp.crockchip_analogix_dp_reg.cMIPI rockchip_mipi_dsi.crockchip-dw-mipi-dsi.crockchip-inno-mipi-dphy.cPanel panel_simple.crockchip_dsi_panel.cLVDS rockchip_lvds.c2 MIPI-DSI2.1 DT Bindings2.1.1 MIPI-DSI Host①属性说明Property Value Commentrockchip,lane-rate 80~1000 如果没有配置该属性,驱动会根据屏的timing计算lane-rate。

小王子英语版阅读笔记

小王子英语版阅读笔记

小王子英语版阅读笔记一、单词积累1. Desert- 在文中“All grown - ups were once children... though few of them remember it.”这部分之前,有对沙漠(desert)的描写。

例如“He landed in the desert.”“desert”作为名词,意思是“沙漠”,它还可以作动词,有“抛弃;遗弃”的意思,如“He was deserted by his friends.”2. Boa constrictor- 书中开篇提到了“boa constrictor”(蟒蛇),“When I was six years old, I saw a magnificent picture in a book, called True Stories from Nature, about the primeval forest. It was a picture of a boa constrictor in the act of swallowing an animal.”这是一种体型较大的蟒蛇。

3. Rose- 小王子星球上的玫瑰(rose)是很重要的角色。

“It was then that the fox appeared. 'Good morning,' said the fox. 'Good morning,' the little prince responded politely, although when he turned around he saw nothing. 'I am right here,' the voice said, 'under the apple tree.' 'Who are you?' asked the little prince, and added, 'You are very pretty to look at.' 'I am a fox,' said the fox. 'Come and play with me,' proposed the little prince. 'I am so unhappy.' 'Icannot play with you,' the fox said. 'I am not tamed.' 'Ah! Please excuse me,' said the little prince. But, after some thought, he added: 'What does that mean - "tame"?' 'You do not live here,' said the fox. 'What is it that you are looking for?' 'I am looking for men,' said the little prince. 'What are men?' asked the fox. 'They have guns, and they hunt. They are very much like the little prince's rose.”这里将玫瑰与其他事物进行对比,“rose”除了表示“玫瑰”这种花卉,在一些语境下也可以表示玫瑰色。

老友记 六人行 第一季第十九集经典笔记

老友记 六人行 第一季第十九集经典笔记

The One Where the Monkey Gets AwayWritten by: Jeffrey Astrof and Mike SikowitzTranscribed by: guineapig{Transcriber's Note: The credits list two characters, Tia and Samantha, who I assume are the sweaty women Joey and Chandler meet. However, I don't know which is which, so I've simply called them Woman #1 and Woman #2.}119 猴子被送走瑞秋得知巴利和她的前伴娘(也是她最好的朋友)敏蒂订婚;她决心重新开始约会男人,于是罗斯想开口约她。

可正当他寻求适当的机会开口时,瑞秋却在帮他照看猴子时把马赛尔弄丢了,两人关系因此出现裂痕。

大家去找猴子,海先生却牛头不对马嘴的说,他丢了一包饼干,他猴子没见过只见过一次Regis Philbin(电视节目《百万富翁》的主持人)。

瑞秋不知道马赛尔属于非法饲养的外来动物,打电话给动物保护协会求助;动物管理员原来是莫妮卡和瑞秋的高中同学路易萨。

其貌不扬的路易萨对高中时大出风头的瑞秋心怀不满,所以决定不予协助。

在找寻马赛尔的过程中,乔伊和钱德遇到辣妹萨曼莎和啼尔,她们家的散热器坏掉了。

路易萨试图给马赛尔注射麻醉药,菲比飞身扑救,结果身中麻醉枪,半边屁股沉睡不醒。

送到海先生家的香蕉暴露了马赛尔的行踪,大家都到海先生的公寓里,而海先生却诡辩说猴子是他的,这时路易萨出现了,将猴子关进笼子。

瑞秋恳求路易萨让罗斯继续收养马赛尔,但直到威胁要告发路易萨误伤菲比的事,路易萨才就范。

罗斯和瑞秋终于坐在一起喝酒,就在罗斯开口表白之前,巴利闯了进来,说他还爱着瑞秋。

嵌入式学习心得体会(精选8篇)

嵌入式学习心得体会(精选8篇)

嵌入式学习心得体会(精选8篇)嵌入式学习心得体会篇1(4622字)从实习到现在搞嵌入式开发快一年了,蓦然回首好像一年过得挺快,挺顺利的。

细细品味,发现这一年还是有很多值得回忆和总结的东西。

至少这一年看书挺多,大概二十几本,当然和那些一年看一百多本书的人没法比,但是我已经超越了自己。

这是我大学毕业的第一年,初次走上社会,很想一展身手,可是.....其实也不用可是了,和很多朋友一样碰了很多钉子,现在我和老板的关系就挺一般的,只是我性格还不错。

呵呵~~,做优秀员工看来还得慢慢学。

今年最大的收获就是做了一个半项目,是在uClinux下面跑的。

半个是SNMP-Agent的实现,因为我去的时候snmpd已经跑起来了,我只是实现部分管理功能;一个是基于Web的管理系统,使公司的主打产品微波通信设备上网。

这个项目是我一手策划,一手实现(界面设计是一位女同事,很优秀的程序员),从中学到的东西也最多,感情不可谓不深。

SNMP即简单网络管理协议,其实一点都不简单。

在我所知的网络协议里面,它仅仅比OSI的CMIP简单一点,而CMIP直到现在还没得到广泛应用。

我们能够实现SNMP-Agent不能不感谢CarnegieMellon大学免费发布的ucd-snmp软件包。

它使得开发人员专注于实现对特定设备的管理功能。

我在项目中的工作主要是扩展MIB,实现相应的管理功能以及网络功能的扩展。

我们公司的MIB库比较庞大,但是程序运行还是挺快的。

因为ucd-snmp软件包中大量使用回调函数,而且它将MIB树以二叉树形式表示,但是每个结点不是单个的MIB结点,而是一个表,包括了多个结点。

回调函数和两层表示法的使用是操作快速的主要因素。

基于Web的管理系统我原本是打算在设备外实现SNMP-Manager 的功能,因为设备中已经嵌入了Agent。

这样管理人员可以在世界各地通过WWW登录公司的管理平台,实现对所有设备的管理。

但是老板想在设备中嵌入一个管理系统,可以通过www管理单个设备就行。

boa在ARM上的移植方法

boa在ARM上的移植方法

Boa服务器ARM板上的移植方法一、boa服务器移植前的准备网上下载boa服务器tar源码包二、boa服务器配置流程2.1.解压下载来的tar包在linux终端命令行输入:tar –xf boa_xxx.tar2.2. 配置boa选项1. 修改boa.conf生效的目录cd /src目录下修改defines.h文件修改第30行,将默认的路径为/usr/boa 改为/home/boa2.修改src/boa.c注释掉226行的语句:if (setuid(0) !=-1){DIE(”icky Linux kernel bug!”);}即修改为:#if 0if(setuid(0) != -1){DIE(”icky Linux kernel bug!”);}#endif否则运行boa时会提示boa.c:226 - icky Linux kernel bug!: No suchfile or directory错误3. 修改boa.conf文件打开boa.conf文件:vim boa.conf将94行前面的#去掉2.3. 编译配置好的boa1. 切换到boa源码包src下运行configure在linux终端命令行输入:./configure2. 修改Makefile文件将31行的CC = gcc修改为:CC=arm-none-linux-gnueabi-gcc将32行的CPP=gcc –E修改为:CPP=arm-none-linux-gnueabi-g++ -E3. 编译boa源码包在linux终端命令行输入:make –j2等待一段时间再输入:echo $? (如果显示为0说明编译成功,反之失败)在当前目录下生成一个boa的可执行程序,./boa运行即可,在命令行输入:ps –e (能看到boa的进程即说明boa正常工作移植成功)将boa可执行文件拷贝到/etc/bin/下4. 移植完成一大半注:有些编译器会提示以下错误,按相应方法解决即可.出现错误:util.c: 100: 1: pasting “t”and “->”does not give a valid preprocessing token make: [util.o]Error1解决方法:修改compat.h中122行的#define TIMEZONE_OFFSET(foo) foo##->tm_gmtoff为:#define TIMEZONE_OFFSET(foo) foo->tm_gmtoff修改compat.h中126行的#define TIMEZONE(foo) foo##->tm_zone为:#define TIMEZONE(foo) foo->tm_zone三、boa服务器boa.conf文件的设置1.ARM板上建立/usr/boa目录, 并复制boa.conf到/usr/boa目录下#mkdir /usr/boa#cp boa.conf /usr/boa2.访问端口号设置大概25左右:Port 80,可以设定我们访问网页时的端口号默认为80—访问时无需指定假如改变了此端口号为8080,必须以下列格式访问:http://192.168.0.250:8080一般在同一个电脑上运行多个boa服务器时可采用此方法我们这里保持默认即可3. 修改访问权限:修改User nobody 为user 0修改Group nogroup 为group 04. 设定日志目录:boa日志有两部分,Errorlog 和AccessLog默认为/var/log/boa/error_log和/var/log/boa/access_log两个文件。

boa移植笔记

boa移植笔记

boa移植笔记作者:冯建,华清远见嵌入式学院讲师。

Boa是一个非常小巧的Web服务器,其可执行代码只有60K左右。

它是一个单任务的Web服务器,只能依次完成用户的请求,而不会fork出新的进程处理并发连接请求。

但boa支持cgi,能够为cgi 程序fork出一个进程来执行。

Boa的设计目标是速度和安全,在其站点公布的性能测试中,boa的性能要好于apache 服务器。

随着网络技术的迅猛发展,在嵌入式设备的管理和交互中,基于Web方式的应用成为目前的主流,用户可以直接通过远程登录的方式对设备进行管理和维护,大大方便了使用性。

下面就为大家讲解一下boa服务器在嵌入式Linux系统中的移植过程。

一、BOA服务器移植工具链:gcc version 4.3.2 (crosstool-NG-1.8.1-none)平台:处理器:s3c2410 内核:linux-2.6.351.解压源码tar xvf boa-0.94.13.tar.tarcd boa-0.94.132.进入src/./configure 生成Makefile修改Makefile修改CC =gcc 为CC =arm-none-linux-gnueabi-gcc修改CPP =gcc -E 为CPP =arm-none-linux-gnueabi-gcc -E3.make编译编译一个linux下的c系统,包含词法和语法分析模块,Linux上用bison和flex。

yacc是一个文法分析器的生成器,bison即是yacc的GNU版本.Lex和YACC是用于构造词法分析机和语法解释器的工具,利用Lex 和YACC你可以轻松的构造一个语法解释器。

Apt-get install bison flex执行make然后给boa瘦身Arm-none-linux-gnueabi-strip boa二、Boa服务器配置1、创建目录mkdir /source/rootfs/etc/boa2、将boa源码目录下的boa.conf拷贝到/source/rootfs/etc/boa目录下cp boa.conf /source/rootfs/etc/boa3、修改配置文件boa.confvim /source/rootfs/etc/boa(1)Group的修改修改Group nogroup为Group 0(2)user的修改修改User nobody为User 0(3)ScriptAlias的修改修改ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/为ScriptAlias /cgi-bin/ /www/cgi-bin/(5)DocumentRoot的修改修改DocumentRoot /var/www为DocumentRoot /www(6)ServerName的设置修改#ServerName /doc/2b7299414.html,.here为ServerName /doc/2b7299414.html,.here 否则会出现错误“gethostbyname::No such file or directory”(7)AccessLog修改修改AccessLog /var/log/boa/access_log为#AccessLog /var/log/boa/access_log(8)以下配置和boa.conf的配置有关,都是在ARM根文件系统中创建以下步骤在开发板上进行:创建HTML文档的主目录/wwwmkdir /www创建CGI脚本所在录/www/cgi-binmkdir /www/cgi-bin当不能使用cgi 时将#AddType application/x-httpd-cgi cgi改为AddType application/x-httpd-cgi cgi boa器测试将boa拷贝到开发板根文件系统的/etc/boa下#cp src/boa /source/rootfs/etc/boa将ubuntu下/etc/mime.types拷贝到开发板根文件系统的/etc下#cp /etc/mime.types /source/rootfs/etc将你的主页index.html拷贝到www目录下运行boa,然后在主机游览器输入开发板网址[root@farsight boa]# ./boa[30/10/2011:19:10:36 +0000] [root@farsight boa]# boa: server version Boa/0.94.13[30/10/2011:19:10:36 +0000] boa: server built 10 30 2011 at 19:10:36[30/10/2011:19:10:36 +0000] boa: starting server pid=968, port 80附1):boa配置文件参数说明boa的配置文件是/etc/boa/boa.conf。

新概念英语第二册笔记-第33课

新概念英语第二册笔记-第33课

Lesson 33 0ut of darkness 冲出黑暗Why was the girl in hospital?..Nearl..wee.passe.befor.th.gir.wa.abl.t.explai.wha.ha.happene.t.her.On.afternoo.sh.se.ou.fro.th.co as.i..smal.boa.an.wa.caugh.i..storm.Toward.evening.th.boa.struc..roc.an.th.gir.jumpe.int.th.sea.T es.Earl.nex.morning.sh.sa..ligh.ahead.Sh.kne.sh.wa.nea.th.shor.becaus.th.ligh.wa.hig.u.o.th.cliffs. O.arrivin.a.th.shore.th.gir.struggle.u.th.clif.toward.th.ligh.sh.ha.seen.Tha.wa.al.sh.remembered.W ter.sh.foun.hersel.i.hospital.参考译文几乎过了一个星期, 那姑娘才能讲述自己的遭遇。

一天下午, 她乘小船从海岸出发, 遇上了风暴。

天将黑时, 小船撞在了一块礁石上, 姑娘跳进了海里。

她在海里游了整整一夜才游到岸边。

在那段时间里, 她游了8英里。

第二天凌晨, 她看到前方有灯光, 知道自己已经接近岸边了, 因为那灯光是在高高的峭壁上。

到达岸边后, 姑娘朝着她看到的灯光方向挣扎着往峭壁上爬去。

她所记得的就是这些。

第二天她醒来时, 发现自己躺在医院里。

【New words and expressions】(12)darkness n.[u]黑暗, 漆黑反义词brightness光明plet.darkness. 这个房子一片漆黑。

dark [da:k]1) adj. 黑暗的, 漆黑的(light)a dark street 黑暗的街道a dark night 黑漆漆的晚上2)深色的, 暗色的dark suit 深色的西服dark hair 深色的头发3)阴暗的, 忧郁的dark expression忧郁的表情4)不吉利的a dark sheep in his family 害群之马a dark horse 黑马(竞赛中实力不明但被认为可能获胜的人)adj. +ness(名词后缀)n.dark-darknesscareful--- carefulnessgood ----goodnesscareless----carelessnessexplain V. 解释, 叙述, 辩解, 辩护, 成为…的理由explain sth to sb 对...解释…explain +that/wh 从句解释例: Could you explain that question once again?你能再解释一下那个问题吗?The manager explained to the customer why the goods were late.经理对客人解释为什么货物晚了。

移植boa的问题

移植boa的问题

boa成功移植到S3C2410开发板上ARM-LINUX学习整理交流2009-06-06 16:14:27 阅读277 评论0字号:大中小2009 05 11一:下载源码:/[root@localhost ~]# cd /usr/src[root@localhost src]# tar zxvf boa-0.94.13.tar.tar[root@localhost src]# cd boa-0.94.13[root@localhost boa-0.94.13]# cd src[root@localhost src]# ./configure二:编译前修改的文件:1. 修改Makefile文件,找到CC=gcc和CPP=gcc -E,分别将其改为交叉编译器安装的路径:CC=/usr/local/arm/2.95.3/bin/arm-linux-gccCPP=/usr/local/arm/2.95.3/bin/arm-linux-gcc –E保存退出。

2. 修改编译方式:LDFLAGS = -g –static注: 使用静态编译可以让目标文件自动的包含所需要的库文件,而动态编译需要手工拷贝库文件。

3.修改/src/defines.h文件:#define SERVER_ROOT "/etc/boa"4 修改boa-0.94/src/ util.c文件修改char *get_commonlog_time(void)函数。

time_offset = 0;5. 修改src/config.c:加Current_uid=16. 修改compat.h:把第120 行的#defineTIMEZONE_OFFSET(foo)foo##->tm_gmtoff修改为:#defineTIMEZONE_OFFSET(foo)foo->tm_gmtoff7.修改/src/boa.c,注释掉下面两行:/* if (setuid(0) != -1) {DIE("icky Linux kernel bug!");} *//*if (passwdbuf == NULL) {DIE("getpwuid");}*/8 gethostbyname:: Resource temporarily unavailable这个问题我也遇到过,我只是把src文件夹下的config.c里的if(!server_name){..........}(大概在266行到286行之间)注释掉,就能运行在板子上运行boa,到现在为止没有遇到过是么问题。

Silicon Labs CP210x USB-to-UART Bridge 产品更换指南说明书

Silicon Labs CP210x USB-to-UART Bridge 产品更换指南说明书

AN976: CP2101/2/3/4/9 to CP2102N Porting GuideThe CP2102N USB-to-UART bridge device has been designed tobe a replacement and upgrade for existing single-interface CP210x USB-to-UART devices.For some devices, such as the CP2102 and CP2104, the CP2102N is virtually a drop-in replacement. Apart from the addition of two resistors, no other hardware or software changes are required to use the CP2102N in existing designs. For other devices, slight package or feature differences may require minor changes to hardware or host soft-ware.This application note describes in detail the steps required to integrate a CP2102N de-vice into a design in place of a previous CP210x device. Devices covered by this appli-cation note are: CP2101, CP2102/9, CP2103, and CP2104. Multiple-interface devices, such as the CP2105 and CP2108, are not discussed.KEY POINTS •The CP2102N maintains a high degree of pin and feature compatibility with most existing CP210x devices.•Designs will require minimal hardware or software changes when migrating to theCP2102N.•The CP2102N provides a migration path for:•CP2101•CP2102/9•CP2103•CP21041. Device Comparison1.1 Feature CompatibilityA full feature comparison table for all CP210x devices, including the CP2102N, is given below. In general, the CP2102N meets or ex-ceeds the feature set of all previous CP210x devices.Table 1.1. CP210x Family FeaturesNote: The CP2102N cannot directly generate Line Break Conditions. The use of this feature is generally considered uncommon, al-though it was previously supported on CP2102/9 devices. A Line Break Condition occurs when the receiver input is held to logic low (i.e. zero) for some period of time, generally for more than one character time. This condition is seen by the receiver as a character with all zero bits with a framing error. A user can potentially emulate this on a CP2102N, however, by changing the baud rate to be slower than expected, then transmitting a null character. The CP2102N does have the capability to receive Line Breaks.1.2 Pin CompatibilityWith the exception of its VBUS pin, which must be connected to a voltage divider for proper operation, the CP2102N is largely pin-compatible with most CP210x devices. Below is a table of variants of the CP2102N that can be used to replace previous CP210x devi-ces.Table 1.2. CP2102N Replacements for CP210x DevicesAs the CP2102N datasheet notes, there are two relevant restrictions on the VBUS pin voltage in self-powered and bus-powered config-urations. The first is the absolute maximum voltage allowed on the VBUS pin, which is defined as VIO + 2.5 V in Absolute Maximum Ratings table. The second is the input high voltage (VIH) that is applied to VBUS when the device is connected to a bus, which is de-fined as VIO – 0.6 V in the table of GPIO specifications.A resistor divider (or functionally-equivalent circuit) on VBUS, as shown in Figure 1.1 Bus-Powered Connection Diagram for USB Pins on page 3and Figure 1.2 Self-Powered Connection Diagram for USB Pins on page 4for bus- and self-powered operation, re-spectively, is required to meet these specifications and ensure reliable device operation. In this case, the current limitation of the resis-tor divider prevents high VBUS pin leakage current, even though the VIO + 2.5 V specification is not strictly met while the device is not powered.Figure 1.1. Bus-Powered Connection Diagram for USB PinsFigure 1.2. Self-Powered Connection Diagram for USB Pins1.3 Configuration CompatibilityWhile the CP2102N supports the same configuration parameters as the CP210x, the means of programming these into the device are different. Of particular note is the fact that the configuration data structure for the CP2102N has an entirely different format than that used for the CP210x. In short, it is not possible to write the configuration data for a legacy CP210x device to the CP2102N and vice versa.Furthermore, if the CP210x manufacturing DLL is incorporated into custom software as part of a production or test flow, the API calls used to read and write the individual parameters on a CP210x device cannot be used with the CP2102N. Thus, calls to any of the functions listed in Table 1.3 CP210x Configuration APIs on page 5and documented in AN721: USBXpress™ Device Configuration and Programming Guide must be replaced wholesale with calls to the new CP210x_GetConfig and CP210x_SetConfig functions that are specific to the CP2102N.Table 1.3. CP210x Configuration APIs2. Device MigrationThe following sections describe the migration considerations when transitioning from an existing CP210x device to a CP2102N device.2.1 CP2101 to CP2102NHardware CompatibilityThe CP2102N-A02-GQFN28 is pin compatible with the CP2101 with the addition of the voltage divider circuit shown in Figure 1.1 Bus-Powered Connection Diagram for USB Pins on page 3 and Figure 1.2 Self-Powered Connection Diagram for USB Pins on page 4.The CP2102N does, however, have extra functionality on pins 13 through 22. A new design may want to take advantage of these extra pins, but they can be safely left unconnected.Software CompatibilityThe CP2102N is fully feature compatible with the CP2101. No software changes will be required when transitioning a CP2101 design to the CP2012N.The CP2102N does have several common features that the CP2101 lacks. For example, the CP2101 only allows for 8 data bits per frame, where the CP2102N has the ability for 5, 6, 7, or 8 data bits. If desired, the CP2102N can be customized to disable these addi-tional features.2.2 CP2102/9 to CP2102NHardware CompatibilityThe CP2102N-A02-GQFN28 is pin compatible with the CP2102/9 with the addition of the voltage divider circuit shown in Figure 1.1 Bus-Powered Connection Diagram for USB Pins on page 3and Figure 1.2 Self-Powered Connection Diagram for USB Pins on page 4.The CP2102N does, however, have extra functionality on pins 13 through 22. A new design may want to take advantage of these extra pins, but they can be safely left unconnected.The CP2109 has an additional hardware requirement that the VPP pin (pin 18) should be connected to a capacitor to ground for in-system programming. This capacitor is not required on the CP2102N and can be safely omitted.Software CompatibilityThe CP2102N is feature compatible with the CP2102/9, with two exceptions:•Baud Rate Aliasing•Line Breaks / Break ConditionsBaud Rate Aliasing is a feature that allows a device to use a pre-defined baud rate in place of a baud rate that is requested by the user. For example, a device using Baud Rate Aliasing can be programmed to use a baud rate of 45 bps whenever 300 bps is requested. Baud Rate Aliasing is not supported on the CP2102N.If Baud Rate Aliasing is used in a CP2102/9 design, the CP2102N is incompatible as a replacement.Line Breaks (also called a Break Condition) occur when the transmission line to logic low for more than one character time. The CP2102/9 devices have the ability to transmit a Line Break or Break Condition by directly setting the device's break state property. This forces the transmission line to logic low until the break state property is cleared. This feature is not directly supported on the CP2102N. However, a break condition can be emulated by temporarily lowering the baud rate, then transmitting a null character. The duration of this emulated break condition can be controlled by adjusting the baud rate, but it cannot exceed 27ms (8 bits at the lowest available baud rate, 300bps).If Break Conditions are used in a CP2102/9 design, care must be taken to assure that the CP2102N can emulate these conditions cor-rectly.2.3 CP2103 to CP2102NHardware CompatibilityThe CP2102N does not have a pin-compatible variant that can replace the CP2103. The CP2103 QFN28 package has an additional VIO pin at pin 5 which shifts the function of previous pins on the package clock-wise around the package by one pin compared to the CP2102N QFN28 package. This affects pins 1-4 and 22-28. All other pins remain in the same configuration.If a separate VIO rail is required for a design, the smaller CP2102N QFN24 variant can be used. This variant has an identical function-ality set as the CP2103, but in the smaller QFN24 package.Beside this difference in pin-outs, no other hardware changes are required to migrate from the CP2103 to the CP2102N.Software CompatibilityThe CP2102N is fully feature compatible with the CP2103 with one exception: Baud Rate Aliasing.Baud Rate Aliasing is a feature that allows a device to use a pre-defined baud rate in place of a baud rate that is requested by the user. For example, a device using Baud Rate Aliasing can be programmed to use a baud rate of 45 bps whenever 300 bps is requested. Baud Rate Aliasing is not supported on the CP2102N.If Baud Rate Aliasing is used in a CP2103 design, the CP2102N is incompatible as a replacement.2.4 CP2104 to CP2102NHardware CompatibilityThe CP2102N-A02-GQFN24 is pin compatible with the CP2104 with the addition of the voltage divider circuit shown in Figure 1.1 Bus-Powered Connection Diagram for USB Pins on page 3 and Figure 1.2 Self-Powered Connection Diagram for USB Pins on page 4. No other hardware changes are required when transitioning a CP2104 design to the CP2102N. The CP2104 does require a capacitor be-tween VPP (pin 16) and ground for in-system programming, but this pin is not connected on the CP2102N. Whether or not this capaci-tor is attached to this pin will have no effect on the CP2102N.Software CompatibilityThe CP2102N is fully feature compatible with the CP2104. No software changes will be required when transitioning a CP2104 design to the CP2012N.Revision History 3. Revision HistoryRevision 1.3Mar, 2022•Added X to CP2104 Line Break Transmission in Table 1.1 CP210x Family Features on page 2.•Updated CP2102-A01-GQFN28 with CP2102-A02-GQFN28 in Table 1.2 CP2102N Replacements for CP210x Device on page 3 and Chapter 2. Device Migration.•Updated Figure 1.1 Bus-Powered Connection Diagram for USB Pin on page 3 and Figure 1.2 Self-Powered Connection Diagram for USB Pin on page 4 to reflect new SP0503BAHTG protection device RoHS-compliant part number.•Corrected typo in Configuration Compatibility section names.Silicon Laboratories Inc.400 West Cesar Chavez Austin, TX 78701USAIoT Portfolio/IoTSW/HW/simplicityQuality /qualitySupport & Community/communityDisclaimerSilicon Labs intends to provide customers with the latest, accurate, and in-depth documentation of all peripherals and modules available for system and software imple-menters using or intending to use the Silicon Labs products. Characterization data, available modules and peripherals, memory sizes and memory addresses refer to each specific device, and “Typical” parameters provided can and do vary in different applications. Application examples described herein are for illustrative purposes only. Silicon Labs reserves the right to make changes without further notice to the product information, specifications, and descriptions herein, and does not give warranties as to the accuracy or completeness of the included information. Without prior notification, Silicon Labs may update product firmware during the manufacturing process for security or reliability reasons. Such changes will not alter the specifications or the performance of the product. Silicon Labs shall have no liability for the consequences of use of the infor -mation supplied in this document. This document does not imply or expressly grant any license to design or fabricate any integrated circuits. The products are not designed or authorized to be used within any FDA Class III devices, applications for which FDA premarket approval is required or Life Support Systems without the specific written consent of Silicon Labs. A “Life Support System” is any product or system intended to support or sustain life and/or health, which, if it fails, can be reasonably expected to result in significant personal injury or death. Silicon Labs products are not designed or authorized for military applications. Silicon Labs products shall under no circumstances be used in weapons of mass destruction including (but not limited to) nuclear, biological or chemical weapons, or missiles capable of delivering such weapons. Silicon Labs disclaims all express and implied warranties and shall not be responsible or liable for any injuries or damages related to use of a Silicon Labs product in such unauthorized applications. Note: This content may contain offensive terminology that is now obsolete. Silicon Labs is replacing these terms with inclusive language wherever possible. For more information, visit /about-us/inclusive-lexicon-projectTrademark InformationSilicon Laboratories Inc.®, Silicon Laboratories ®, Silicon Labs ®, SiLabs ® and the Silicon Labs logo ®, Bluegiga ®, Bluegiga Logo ®, EFM ®, EFM32®, EFR, Ember ®, Energy Micro, Energy Micro logo and combinations thereof, “the world’s most energy friendly microcontrollers”, Redpine Signals ®, WiSeConnect , n-Link, ThreadArch ®, EZLink ®, EZRadio ®, EZRadioPRO ®, Gecko ®, Gecko OS, Gecko OS Studio, Precision32®, Simplicity Studio ®, Telegesis, the Telegesis Logo ®, USBXpress ® , Zentri, the Zentri logo and Zentri DMS, Z-Wave ®, and others are trademarks or registered trademarks of Silicon Labs. ARM, CORTEX, Cortex-M3 and THUMB are trademarks or registered trademarks of ARM Holdings. Keil is a registered trademark of ARM Limited. Wi-Fi is a registered trademark of the Wi-Fi Alliance. All other products or brand names mentioned herein are trademarks of their respective holders.。

uCOS平台下的LwIP移植(非常详细)

uCOS平台下的LwIP移植(非常详细)

1 下载LwIP.................................................................................................................................................................22 建立一个最基本的工程 (2)3 把LwIP加入工程 (2)4 编写操作系统模拟层相关代码 (3)4.1 操作系统模拟层移植说明――中文翻译 (3)4.2 编写操作系统模拟层 (6)4.2.1 准备工作――建立文件、定义数据类型及其它 (6)4.2.2 信号量操作函数 (8)4.2.3 邮箱操作函数 (13)4.2.4 实现sys_thread_new()函数 (20)4.2.5 实现sys_arch_timeouts()函数 (22)4.2.6 实现临界保护函数 (25)4.2.7 扫尾――结束操作系统模拟层的编写 (26)5 LwIP接口――初始设置及网络驱动 (28)5.1 准备工作――建立LwIP入口函数文件 (28)5.2 ilvInitLwIP() (29)5.3 ilvSetLwIP() (30)5.4 ethernetif_init()――初始化底层界面 (35)5.4.1 ethernetif_init()函数分析 (35)5.4.2 low_level_output()――链路层发送函数 (36)5.4.3 low_level_init()――网卡初始化函数 (38)5.4.4 EMACInit()――网卡初始化工作的实际完成者 (40)5.4.5 ethernetif_input()――实现接收线程 (47)5.4.6 low_level_input()――得到一整帧数据 (49)5.4.7 GetInputPacketLen()――获得帧长 (50)5.4.8 EMACReadPacket()――复制,从接收缓冲区到pbuf (53)5.4.9 EMACSendPacket()――发送一帧资料 (55)5.4.10 编译――ethernetif.c及lib_emac.c (56)6 ping――结束LwIP的移植 (57)6.1 编译、链接整个工程 (57)6.2 ping测试 (59)后记 (62)本文将指导读者一步步完成LwIP 在ADS1.2 开发环境下的移植工作,包括底层驱动的编写。

Flow-through前臂掌侧静脉皮瓣在复杂拇指离断伤再植中的应用

Flow-through前臂掌侧静脉皮瓣在复杂拇指离断伤再植中的应用
Wang Xiangzheng1, Zhou Haiyang2 (1. Department of Emergency, Nanjing Integrated Traditional Chinese and Western Medicine Hospital Affiliated to Nanjing University of Chinese Medicine, Jiangsu Nanjing 210017, China; 2. Department of Orthopedics, Nanjing Integrated Traditional Chinese and Western Medicine Hospital Affiliated to Nanjing University of Chinese Medicine, Jiangsu Nanjing 210017, China) Abstract: Objective To explore the curative effect and functional recovery of Flow-through forearm palmar venous flap in patients with complex amputated thumb. Method Eighty patients with complex amputated thumb injury treated in our hospital from January 2017 to June 2019 were randomly divided into control group (n=40) and study group (n=40). The patients in the control group were repaired with lateral skin flap and the patients in the study group were repaired with Flow-through venous flap. The patients were followed up for 12 months. The recovery of hand function was compared between the two groups. Result The excellent and good rate of hand function recovery in the study group was significantly higher than that in the control group, and there was significant difference between the two groups (P<0.05). During the follow-up, there was a significant difference in the incidence of venous crisis and flap necrosis between the two groups, and the incidence of venous crisis and flap necrosis in the study group was lower than that in the control group (P<0.05). The incidence of color deepening and elastic deterioration in the study group was significantly lower than that in the control group, and the difference was statistically significant (P<0.05). Conclusion Flow-through forearm palmar vein flap is effective in replantation of complex amputated thumb and can significantly reduce the incidence of adverse reactions in patients. Therefore, it is suggested that Flow-through forearm palmar vein flap should be used to treat complex amputated thumb replantation according to the actual condition. Keywords: Flow-through forearm palmar vein flap; Complex amputated thumb; Replantation; Hand function

BOA代码笔记4

BOA代码笔记4

BOA代码笔记4BOA代码笔记4main.c (完?)从上次继续上次我们看到了这个地方:[cpp] view plaincopyprint?if (max_connections < 1){ struct rlimit rl; /* has not been set explicitly */ c = getrlimit(RLIMIT_NOFILE,&rl); if (c < 0){ perror("getrlimit");exit(1); } max_connections =rl.rlim_cur; } /* background ourself */ if (do_fork) { switch(fork()) { case -1:/* error */ perror("fork");exit(1); break; case 0:/* child, success */ break; default: /* parent, success */ exit(0);break; } } /* main loop */ timestamp(); status.requests = 0;status.errors = 0; start_time = current_time;select_loop(server_s); return 0;第一个if块确定最大连接数。

如果未指定,使用getrlimit来获得。

getrlimit(RLIMIT_NOFILE, &rl); specifies a value one greater than the maximum file descriptor number that can be opened by this process.第二个if块,如果do_fork为1,那么我们从子进程运行,父进程结束。

BOA代码笔记3

BOA代码笔记3

BOA代码笔记3boa.c(依然续)main函数接下来该open_logs()了。

顾名思义,这个函数负责日志文件的顺利打开。

注释是这么说明的:/** Name: open_logs** Description: Opens access log, error log, and if specified, cgi log* Ties stderr to error log, except during cgi execution, at which* time cgi log is the stderr for cgis.** Access log is line buffered, error log is not buffered.**/值得一提的是,支持管道和socket记录。

如果你的error_log_name写作“| yourlogprogram”,那么日志输出将通过管道输出到yourlogprogram中。

执行打开的exec函数使用方式为execl("/bin/sh", "sh", "-c", command, (char *) 0);-c的选项代表运行sh的第一个参数的程序,后边参数为运行程序的参数。

如果你的error_log_name写作“: host:port”的形式,那么会向host指定的主机的port进行tcp连接。

日志将发送到对端。

将STDERR_FILENO的close-on-exec 设置为true:fcntl(STDERR_FILENO, F_SETFD, 1);使用setvbuf将access_log设置为行缓冲:setvbuf(access_log, (char *) NULL, _IOLBF, 0);open_logs()完了之后是create_server_socket()返回一个fd,如下:[cpp]view plaincopyprint?1.static int create_server_socket(void)2.{3.int server_s;4./* 如果使用IPV6模式,AF_INET6;否则为AF_INET*/5.server_s = socket(SERVER_AF, SOCK_STREAM, IPPROTO_T CP);6.if (server_s == -1) {7.DIE("unable to create socket");8.}9./* 将fd设为不堵塞 */10./* server socket is nonblocking */11.if (set_nonblock_fd(server_s) == -1) {12.DIE("fcntl: unable to set server socket to nonblocking" );13.}14./* 将fd设置为exec时关闭,这样防止cgi得到这个fd */15./* close server socket on exec so cgi's can't write to it */16.if (fcntl(server_s, F_SETFD, 1) == -1) {17.DIE("can't set close-on-exec on server socket!");18.}19./* 设置SO_REUSEADDR选项。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

作者:冯建,华清远见嵌入式学院讲师。

Boa是一个非常小巧的Web服务器,其可执行代码只有60K左右。

它是一个单任务的Web服务器,只能依次完成用户的请求,而不会fork出新的进程处理并发连接请求。

但boa支持cgi,能够为cgi程序fork出一个进程来执行。

Boa的设计目标是速度和安全,在其站点公布的性能测试中,boa的性能要好于apache 服务器。

随着网络技术的迅猛发展,在嵌入式设备的管理和交互中,基于Web方式的应用成为目前的主流,用户可以直接通过远程登录的方式对设备进行管理和维护,大大方便了使用性。

下面就为大家讲解一下boa服务器在嵌入式Linux系统中的移植过程。

一、BOA服务器移植工具链:gcc version 4.3.2 (crosstool-NG-1.8.1-none)平台:处理器:s3c2410 内核:linux-2.6.351.解压源码tar xvf boa-0.94.13.tar.tarcd boa-0.94.132.进入src/./configure 生成Makefile修改Makefile修改CC =gcc 为CC =arm-none-linux-gnueabi-gcc修改CPP =gcc -E 为CPP =arm-none-linux-gnueabi-gcc -E3.make编译编译一个linux下的c系统,包含词法和语法分析模块,Linux上用bison和flex。

yacc是一个文法分析器的生成器,bison即是yacc的GNU版本.Lex和YACC是用于构造词法分析机和语法解释器的工具,利用Lex和YACC你可以轻松的构造一个语法解释器。

Apt-get install bison flex执行make然后给boa瘦身Arm-none-linux-gnueabi-strip boa二、Boa服务器配置1、创建目录mkdir /source/rootfs/etc/boa2、将boa源码目录下的boa.conf拷贝到/source/rootfs/etc/boa目录下cp boa.conf /source/rootfs/etc/boa3、修改配置文件boa.confvim /source/rootfs/etc/boa(1)Group的修改修改Group nogroup为Group 0(2)user的修改修改User nobody为User 0(3)ScriptAlias的修改修改ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/为ScriptAlias /cgi-bin/ /www/cgi-bin/(5)DocumentRoot的修改修改DocumentRoot /var/www为DocumentRoot /www(6)ServerName的设置修改#ServerName .here为ServerName .here否则会出现错误“gethostbyname::No such file or directory”(7)AccessLog修改修改AccessLog /var/log/boa/access_log为#AccessLog /var/log/boa/access_log(8)以下配置和boa.conf的配置有关,都是在ARM根文件系统中创建以下步骤在开发板上进行:创建HTML文档的主目录/wwwmkdir /www创建CGI脚本所在录/www/cgi-binmkdir /www/cgi-bin当不能使用cgi 时将#AddType application/x-httpd-cgi cgi改为AddType application/x-httpd-cgi cgi boa器测试将boa拷贝到开发板根文件系统的/etc/boa下#cp src/boa /source/rootfs/etc/boa将ubuntu下/etc/mime.types拷贝到开发板根文件系统的/etc下#cp /etc/mime.types /source/rootfs/etc将你的主页index.html拷贝到www目录下运行boa,然后在主机游览器输入开发板网址[root@farsight boa]# ./boa[30/10/2011:19:10:36 +0000] [root@farsight boa]# boa: server version Boa/0.94.13[30/10/2011:19:10:36 +0000] boa: server built 10 30 2011 at 19:10:36[30/10/2011:19:10:36 +0000] boa: starting server pid=968, port 80附1):boa配置文件参数说明boa的配置文件是/etc/boa/boa.conf。

Port:boa服务器监听的端口,默认的端口是80。

如果端口小于1024,则必须是root用户启动服务器。

Listen:绑定的ip地址。

不使用这个参数时,将绑定所有的地址。

User:连接到服务器的客户端的身份,可以是用户名或UID。

Group:连接到服务器的客户端的组,可以是组名或GID。

ServerAdmin:服务器出故障时要通知的邮箱地址。

ErrorLog:指定错误日志文件。

如果路径没有以“/”开始,则相对于ServerRoot路径。

没有配置时默认的文件是/dev/stderr。

若不想记录日志,指定文件为/dev/null。

AccessLog:设置存取日志文件,与ErrorLog类似。

UseLocaltime:设置使用本地时间,使用UTC时注释这个参数。

这个参数没有值。

VerboseCGILogs:在错误日志文件中记录CGI启动和停止时间,若不记录,注释这个参数。

这个参数没有值。

ServerName:指定服务器的名称,当客户端使用gethostname + gethostbyname时返回给客户端。

VirtualHost:虚拟主机开关。

使用此参数,则会在DocumentRoot设定的目录添加一个ip地址作为新的DocumentRoot来处理客户端的请求。

如DocumentRoot设置为/var/www,则http://localhost/ 则转换成/var/www/127.0.0.1/,若注释此参数,则为/var/www/。

DocumentRoot:HTML文件的根目录(也就是网站的目录)。

UserDir:指定用户目录。

DirectoryIndex:指定预生成目录信息的文件,注释此变量将使用DirectoryMaker变量。

这个变量也就是设置默认主页的文件名。

DirectoryMaker:指定用于生成目录的程序,注释此变量将不允许列目录。

DirectoryCache:当DirectoryIndex文件不存在,而DirecotryMaker又被注释掉时,将列出这个参数指定目录给客户端。

KeepAliveMax:每个连接允许的请求数量。

如果将此值设为" 0 ",将不限制请求的数目。

KeepAliveTimeOut:在关闭持久连接前等待下一个请求的秒数。

(秒)。

MimeTypes:设置包含mimetypes信息的文件,一般是/etc/mime.types。

DefaultType:默认的mimetype类型,一般是text/html。

CGIPath:相当于给CGI程序使用的$PATH变量。

SinglePostLimit:一次POST允许最大的字节数,默认是1MB.AddType: 增加MimeType没有指定的类型,例: AddType type extension [extension ...]。

要使用cgi,必须添加cgi类型:AddType application/x-httpd-cgi cgiRedirect:重定向文件Aliases:指定路径的别名。

ScriptAlias:指定脚本路径的虚拟路径。

附2):编译中的出错处理报错:[01/Jan/1970:00:56:51 +0000] log.c:73 - unable to dup2 the error log: Bad file descriptor解决:修改src/log.c注释掉if (dup2(error_log, STDERR_FILENO) == -1) {DIE("unable to dup2 the error log");}为:/*if (dup2(error_log, STDERR_FILENO) == -1) {DIE("unable to dup2 the error log");}*/再次执行boa命令#boa报错:[01/Jan/1970:01:01:15 +0000] boa.c:211 - getpwuid: No such file or directory解决:修改src/boa.c注释掉下面两句话:if (passwdbuf == NULL) {DIE(”getpwuid”);}if (initgroups(passwdbuf->pw_name, passwdbuf->pw_gid) == -1) {DIE(”initgroups”);}为#if 0if (passwdbuf == NULL) {DIE(”getpwuid”);}if (initgroups(passwdbuf->pw_name, passwdbuf->pw_gid) == -1) {DIE(”initgroups”);}#endif再次运行boa命令报错:[01/Jan/1970:01:04:24 +0000] boa.c:226 - icky Linux kernel bug!: No such file or directory 解决:src/boa.cif (setuid(0) != -1) {DIE(”icky Linux kernel bug!”);}为#if 0if (setuid(0) != -1) {DIE(”icky Linux kernel bug!”);}#endifutil.c:100:1: error: pasting "t" and "->" does not give a valid preprocessing tokenmake: *** [util.o] Error 1报错:修改src/compat.h找到#define TIMEZONE_OFFSET(foo) foo##->tm_gmtoff修改成#define TIMEZONE_OFFSET(foo) (foo)->tm_gmtoff1、下载Boa Webserver的源码/boa-0.94.13.tar.gz2、解压并编译Boa Webserver编译过程中可能出现错误,部分的错误处理方法编译时错误处理:1:编译需要bison(yacc的GNU版本)和flex,如果没有这2个将报错,因此:$ sudo apt-get install flex bison2:util.c:100:1: error: pasting "t" and "->" does not give a valid preprocessing tokenmake: *** [util.o] Error 1解决办法:修改src/compat.h文件。

相关文档
最新文档