📄 config.h
字号:
/**
* @file config.h
*
* Copyright (c) 2004 Atmel.
*
* @brief This module provide services to define config for AT90PWM2/3
* Describes the system dependant software configuration.
* This file is included by all source files in order to access to system wide
* configuration.
* @version 1.0 (CVS revision : $Revision: 1.2 $)
* @date $Date: 2005/11/16 17:18:21 $ (created on 06/04/2004)
* @author $Author: raubree $ (created by J閞ome le denmat)
*****************************************************************************/
/*typedef unsigned char U8;
typedef unsigned int U16 ;
typedef signed int S16;
typedef signed long S32;
typedef unsigned long U32;*/
/*_____ I N C L U D E S ____________________________________________________*/
#include "lib_mcu/compiler.h"
#include "lib_mcu/mcu.h"
#include "inavr.h"
#ifndef _CONFIG_H_
#define _CONFIG_H_
#endif
/*-------------- UART LIB CONFIGURATION ---------------*/
/* baud rate register value calculation */
#define BRREG_VALUE 12
/* definitions for UART control */
#define BAUD_RATE_LOW_REG UBRRL
#define UART_CONTROL_REG UCSRB
#define ENABLE_TRANSMITTER_BIT TXEN
#define ENABLE_RECEIVER_BIT RXEN
#define UART_STATUS_REG UCSRA
#define TRANSMIT_COMPLETE_BIT TXC
#define RECEIVE_COMPLETE_BIT RXC
#define UART_DATA_REG UDR
/*----------- SOME USEFUL MACROINSTRUCTIONS -----------*/
#define Set_PC7() PORTC |= (1<<PC7)
#define Clear_PC7() PORTC &= ~(1<<PC7)
#define Toggle_PC7() PINC |= (1<<PINC7)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -