代码:
#include "stm32mp1xx_gpio.h"
#include "stm32mp1xx_rcc.h"
#include "stm32mp1xx_uart.h"
void delay_ms(int ms)
{
int i,j;
for(i=0;i1
RCC->MP_APB1ENSETR |= (0x11
//RCC_MP_AHB4ENSETR[1]->1
RCC->MP_AHB4ENSETR |= (0x1MP_AHB4ENSETR |= (0X110
GPIOG->MODER &= (~(0X3MODER |= (0X20110
GPIOG->AFRH &= (~(0xfAFRH |= (0x610
//GPIOB_AFRL[11:8]->1000
GPIOB->MODER &= (~(0x3MODER |= (0X2AFRL &= (~(0xFAFRL |= (0x8CR1 & 0X1){
delay_ms(500);
USART4->CR1 &=(~(0x1 0 CR1[12]-》0
USART4->CR1 &= (~(0X1CR1 &= (~(0X10
USART4->CR1 &= (~(0X100
USART4->CR2 &= (~(0x30
USART4->CR1 &= (~(0X1BRR |= 0X22B;
//设置1分频 PRESC[3:0]->0000
USART4->PRESC &= (~(0XF 1
USART4->CR1 |= (0X11
USART4->CR1 |= (0X11
USART4->CR1 |= (0X1);
}
void putc(char data服务器托管网)
{
//判断发送数据寄存器有没有数据,没有数据时可以发送
while(!(USART4->ISR&(0X1TDR=data;//将要发送的数据保存在发送寄存器中
while(!(USART4->ISR&(0X1ISR & (0x1 RDR;
return ch;
}
void puts(char *data){
char *c=data;
for(;*c!='';c++){
putc(*c);
}
putc(*c);
putc('n');
putc('r');
}
char data[50]="";
char *get服务器托管网s(void){
int i;
for(i=0;i
what a pity,can’t run
now,it can run
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
相关推荐: graylog 配置 windows sidecar
1.1.创建Beats类型的Input rayLog后台在防火墙上放通Input对应端口 firewall-cmd –permanent –zone=public –add-port=5044/tcp firewall-cmd –reload 1.2.…