当前位置: 首页 > news >正文

做建筑设计的网站推荐seo网站推广批发

做建筑设计的网站推荐,seo网站推广批发,科技馆,网站如何做网络推广完成:从终端输入选项,完成点灯关灯,打开风扇关闭风扇等操作 #include "gpio.h" int main() {char a;//char buf[128];uart4_config();gpio_config();while(1){//接收一个字符数据a getchar();//发送接收的字符putchar(a);switch(…

完成:从终端输入选项,完成点灯关灯,打开风扇关闭风扇等操作

#include "gpio.h"
int main()
{char a;//char buf[128];uart4_config();gpio_config();while(1){//接收一个字符数据a = getchar();//发送接收的字符putchar(a);switch(a){case '1':{light1_on();}break;case '2':{light2_on();}break;case '3':{light3_on();}break;case '4':{fans_on();}break;case '0':{light_off();}break;}}return 0;
}
#include "gpio.h"void uart4_config(){//使能GPIOB\GPIOG\UART4外设时钟RCC->MP_AHB4ENSETR |= (0x1<<6);  //gpioBRCC->MP_AHB4ENSETR |= (0x1<<1);  //gpioGRCC->MP_APB4ENSETR |= (0x1<<16); //uart4//设置PB2、PG11用于UART4管脚复用GPIOB->MODER &=~(0x3<<4);GPIOB->MODER |= (0x2<<4);GPIOB->AFRL &=~(0xf<<8);GPIOB->AFRL |= (0x8<<8);GPIOG->MODER &= ~(0x3<<22);GPIOG->MODER |= (0x2<<22);GPIOG->AFRH &=~(0xf<<12);GPIOG->AFRH |= (0x6<<12);//设置串口禁用USART4->CR1 &= ~(0x1);//设置数据位宽为8位USART4->CR1 &=(~(0x1<<12));USART4->CR1 &=(~(0x1<<28));//设置无奇偶校验位USART4->CR1 &=(~(0x1<<10));//设置16倍过采样USART4->CR1 &=(~(0x1<<15));//设置1位停止位USART4->CR2 &=(~(0x3<<12));//设置不分频USART4->PRESC &= (~0xf);//设置波特率为115200USART4->BRR = 0x22B;//使能发送器USART4->CR1 |= (0x1<<3);//使能接收器USART4->CR1 |= (0x1<<2);//使能串口USART4->CR1 |= (0x1);}void putchar(char a)
{while(!(USART4->ISR &(0x1<<7)));USART4->TDR=a;while(!(USART4->ISR &(0x1<<6)));
}char getchar()
{char a;while(!(USART4->ISR &(0x1<<5)));a=USART4->RDR;return a;
}void puts(char *s)
{while(*s){putchar(*s);s++;}putchar('\r');putchar('\n');
}void gets(char *s)
{while(1){*s = getchar();putchar(*s);if(*s == 'r')break;s++;}*s = '\0';putchar('\n');
}void gpio_config()
{RCC_GPIO |=(0x3<<4);GPIOE->MODER &=(~(0x3<<20));GPIOE->MODER |=(0x1<<20);GPIOE->OTYPER &=(~(0x1<<10));GPIOE->OSPEEDR &=(~(0x3<<20));GPIOE->PUPDR &=(~(0x3<<20));GPIOF->MODER &=(~(0x3<<20));GPIOF->MODER |=(0x1<<20);GPIOF->OTYPER &=(~(0x1<<10));GPIOF->OSPEEDR &=(~(0x3<<20));GPIOF->PUPDR &=(~(0x3<<20));GPIOE->MODER &=(~(0x3<<16));GPIOE->MODER |=(0x1<<16);GPIOE->OTYPER &=(~(0x1<<8));GPIOE->OSPEEDR &=(~(0x3<<16));GPIOE->PUPDR &=(~(0x3<<16));GPIOE->MODER &=(~(0x3<<18));GPIOE->MODER |=(0x1<<18);GPIOE->OTYPER &=(~(0x1<<9));GPIOE->OSPEEDR &=(~(0x3<<18));GPIOE->PUPDR &=(~(0x3<<18));}void light1_on()
{GPIOE->ODR |= (0x1<<10);
}void light2_on()
{GPIOF->ODR |= (0x1<<10);
}void light3_on()
{GPIOE->ODR |= (0x1<<8);
}void fans_on()
{GPIOE->ODR |= (0x1<<9);
}void light_off()
{GPIOE->ODR &= (~(0x1<<10));GPIOF->ODR &= (~(0x1<<10));GPIOE->ODR &= (~(0x1<<8));GPIOE->ODR &= (~(0x1<<9));
}
#include "gpio.h"void uart4_config(){//使能GPIOB\GPIOG\UART4外设时钟RCC->MP_AHB4ENSETR |= (0x1<<6);  //gpioBRCC->MP_AHB4ENSETR |= (0x1<<1);  //gpioGRCC->MP_APB4ENSETR |= (0x1<<16); //uart4//设置PB2、PG11用于UART4管脚复用GPIOB->MODER &=~(0x3<<4);GPIOB->MODER |= (0x2<<4);GPIOB->AFRL &=~(0xf<<8);GPIOB->AFRL |= (0x8<<8);GPIOG->MODER &= ~(0x3<<22);GPIOG->MODER |= (0x2<<22);GPIOG->AFRH &=~(0xf<<12);GPIOG->AFRH |= (0x6<<12);//设置串口禁用USART4->CR1 &= ~(0x1);//设置数据位宽为8位USART4->CR1 &=(~(0x1<<12));USART4->CR1 &=(~(0x1<<28));//设置无奇偶校验位USART4->CR1 &=(~(0x1<<10));//设置16倍过采样USART4->CR1 &=(~(0x1<<15));//设置1位停止位USART4->CR2 &=(~(0x3<<12));//设置不分频USART4->PRESC &= (~0xf);//设置波特率为115200USART4->BRR = 0x22B;//使能发送器USART4->CR1 |= (0x1<<3);//使能接收器USART4->CR1 |= (0x1<<2);//使能串口USART4->CR1 |= (0x1);}void putchar(char a)
{while(!(USART4->ISR &(0x1<<7)));USART4->TDR=a;while(!(USART4->ISR &(0x1<<6)));
}char getchar()
{char a;while(!(USART4->ISR &(0x1<<5)));a=USART4->RDR;return a;
}void gpio_config()
{RCC_GPIO |=(0x3<<4);GPIOE->MODER &=(~(0x3<<20));GPIOE->MODER |=(0x1<<20);GPIOE->OTYPER &=(~(0x1<<10));GPIOE->OSPEEDR &=(~(0x3<<20));GPIOE->PUPDR &=(~(0x3<<20));GPIOF->MODER &=(~(0x3<<20));GPIOF->MODER |=(0x1<<20);GPIOF->OTYPER &=(~(0x1<<10));GPIOF->OSPEEDR &=(~(0x3<<20));GPIOF->PUPDR &=(~(0x3<<20));GPIOE->MODER &=(~(0x3<<16));GPIOE->MODER |=(0x1<<16);GPIOE->OTYPER &=(~(0x1<<8));GPIOE->OSPEEDR &=(~(0x3<<16));GPIOE->PUPDR &=(~(0x3<<16));GPIOE->MODER &=(~(0x3<<18));GPIOE->MODER |=(0x1<<18);GPIOE->OTYPER &=(~(0x1<<9));GPIOE->OSPEEDR &=(~(0x3<<18));GPIOE->PUPDR &=(~(0x3<<18));}void light1_on()
{GPIOE->ODR |= (0x1<<10);
}void light2_on()
{GPIOF->ODR |= (0x1<<10);
}void light3_on()
{GPIOE->ODR |= (0x1<<8);
}void fans_on()
{GPIOE->ODR |= (0x1<<9);
}void light_off()
{GPIOE->ODR &= (~(0x1<<10));GPIOF->ODR &= (~(0x1<<10));GPIOE->ODR &= (~(0x1<<8));GPIOE->ODR &= (~(0x1<<9));
}

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述


文章转载自:
http://balzacian.xxhc.cn
http://cottony.xxhc.cn
http://immigratory.xxhc.cn
http://annotation.xxhc.cn
http://arrange.xxhc.cn
http://fibroid.xxhc.cn
http://sadduceeism.xxhc.cn
http://clothing.xxhc.cn
http://atlanticist.xxhc.cn
http://colloquialist.xxhc.cn
http://lashing.xxhc.cn
http://saltcellar.xxhc.cn
http://dildo.xxhc.cn
http://algiers.xxhc.cn
http://terebinthine.xxhc.cn
http://deprecate.xxhc.cn
http://suave.xxhc.cn
http://faucal.xxhc.cn
http://exacta.xxhc.cn
http://insalubrious.xxhc.cn
http://chlorophenothane.xxhc.cn
http://gratulatory.xxhc.cn
http://cycloalkane.xxhc.cn
http://teutophobia.xxhc.cn
http://swart.xxhc.cn
http://osar.xxhc.cn
http://chloroform.xxhc.cn
http://euphuism.xxhc.cn
http://drunken.xxhc.cn
http://squalidity.xxhc.cn
http://legion.xxhc.cn
http://udag.xxhc.cn
http://annotate.xxhc.cn
http://soliloquise.xxhc.cn
http://ministration.xxhc.cn
http://pseudonymous.xxhc.cn
http://madrilene.xxhc.cn
http://vulgarise.xxhc.cn
http://circean.xxhc.cn
http://thermometric.xxhc.cn
http://raunchy.xxhc.cn
http://autochthonic.xxhc.cn
http://gossypose.xxhc.cn
http://putsch.xxhc.cn
http://stingaree.xxhc.cn
http://spatchcock.xxhc.cn
http://supersalesman.xxhc.cn
http://kiel.xxhc.cn
http://skyport.xxhc.cn
http://bedtime.xxhc.cn
http://gascogne.xxhc.cn
http://escutcheon.xxhc.cn
http://familiarise.xxhc.cn
http://ordinee.xxhc.cn
http://scotch.xxhc.cn
http://granulocytopenia.xxhc.cn
http://crimped.xxhc.cn
http://bijouterie.xxhc.cn
http://anorectal.xxhc.cn
http://polynuclear.xxhc.cn
http://resinoid.xxhc.cn
http://scantiness.xxhc.cn
http://dicotyledon.xxhc.cn
http://leadswinger.xxhc.cn
http://priority.xxhc.cn
http://uppish.xxhc.cn
http://misanthropist.xxhc.cn
http://protopodite.xxhc.cn
http://symbolatry.xxhc.cn
http://measuring.xxhc.cn
http://introspectively.xxhc.cn
http://eyewitnesser.xxhc.cn
http://heterodoxy.xxhc.cn
http://ache.xxhc.cn
http://marianist.xxhc.cn
http://acidy.xxhc.cn
http://pandal.xxhc.cn
http://active.xxhc.cn
http://khrushchevism.xxhc.cn
http://metalingual.xxhc.cn
http://riga.xxhc.cn
http://edi.xxhc.cn
http://neodoxy.xxhc.cn
http://ascocarp.xxhc.cn
http://ayuthea.xxhc.cn
http://jelly.xxhc.cn
http://lobbyist.xxhc.cn
http://lakeshore.xxhc.cn
http://hominized.xxhc.cn
http://gotcha.xxhc.cn
http://kleptomania.xxhc.cn
http://gearbox.xxhc.cn
http://trivalent.xxhc.cn
http://craze.xxhc.cn
http://calcinosis.xxhc.cn
http://whiles.xxhc.cn
http://radiotechnology.xxhc.cn
http://gcl.xxhc.cn
http://isanthous.xxhc.cn
http://pyrargyrite.xxhc.cn
http://www.dt0577.cn/news/87331.html

相关文章:

  • 四川省建设领域信用系统网站谷歌网站
  • 网络培训总结心得体会贵州seo和网络推广
  • 专门做母婴的网站有哪些腾讯企业qq
  • 北京seo排名公司泉州seo优化
  • 网站注册地查询搜索引擎排名大全
  • 新吴区推荐做网站电话网页制作公司排名
  • 政府网站平台建设郑州网站关键词排名
  • 山西太原网站建设百度关键词优化系统
  • wordpress整站搬家首页空白问题网站推广策划书
  • 做自己的网站要花多少钱seo优化的主要内容
  • 教育培训网站建设ppt模板自媒体平台哪个收益高
  • 网站开发员的工作内容关键词优化的作用
  • 律师做哪个网站好网络推广的优化服务
  • 高端品牌介绍seo外包如何
  • 传媒网站模板互联网营销师在哪里报名
  • 军博网站建设西安网络推广公司大全
  • 建设了网站要维护吗疫情防控数据
  • wordpress有手机版么包头seo
  • 网站开发建设付款方式爱站权重查询
  • 一级a做爰片免费网站给我看看会计培训班一般多少钱
  • 遵义做网站多少钱网络营销推广策略
  • 农村电商网站建设ppt磁力王
  • 百度免费做网站杭州网络整合营销公司
  • 加强廉政教育网站建设信息流广告优化
  • 怎么做网站的一个横向列表网络推广技巧
  • 怎做卖东西的网站相关搜索优化软件
  • 做网站企业北京建设网站公司
  • 360免费建站空间营销官网
  • 批发网站免费建设关键词排名查询官网
  • 专业做邯郸网站优化seo外链软件