代码搜索结果
找到约 10,000 项符合
USART 的代码
usart.ewd
1
Debug
AVR
usart.c
#define USART_C
#include "includes.h"
void UsartInit(void)
{
// 晶振频率 : 4.0MHz
// 通信参数: 8 Data, 1 Stop, No Parity
// 波特率:
// UBRRL= 0x0C 19200;
// UBRRL= 0x19 9600;
usart.ewp
1
Debug
AVR
usart.h
#ifndef USART_H
#define USART_H
#ifdef USART_C
void UsartInit(void);
int PutChar(char c);
void SendNbyte(unsigned char *p,unsigned char L);
void PutStr(unsigned char *Str);
#else
extern void U
usart.c
#define USART_C
#include "includes.h"
int usart_putchar(char c)
{
if (c == '\n')
usart_putchar('\r');
while(UCSRA&(1
usart.c
#define USART_C
#include "includes.h"
void put_char(unsigned char ch)
{
/* if(ch == '\n')
{
usart_putchar('\r');
} */
while(!(UCSRA&(1
usart.h
#ifndef USART_H
#define USART_H
#ifdef USART_C
void put_char(unsigned char ch);
void InitSerial(void);
void put_string(unsigned char *sting);
#else
extern void put_char(unsigned char ch);
exte
usart.c
#include "includes.h"
#define USART_C
int usart_putchar(char c)
{
if (c == '\n')
usart_putchar('\r');
while(UCSRA & (1
usart.h
#if !defined(USART_H)
#define USART_H
#if defined UCART_C
int usart_putchar(char c);
void init_usart(void);
#else
extern int usart_putchar(char c);
extern void init_usart(void);
#endif
#endif
usart.h
//波特率9600/9个数据位/1个停止位/奇校验/收发开启/接收中断
void USARTinit(void)
{
UCSR0B=0x9C;
UCSR0C=0x36;
UBRR0L=0x2F;
PORTD.4=0; //MAX485平时工作在接收状态
DDR