📄 typedef.h
字号:
#ifndef __TYPEDEF_H
#define __TYPEDEF_H
#include <avr/io.h>
#include <avr/wdt.h>
#include <avr/pgmspace.h>
#include <avr/interrupt.h>
#include <avr/eeprom.h>
#include <compat/deprecated.h>
#include <util/delay.h>
#include <inttypes.h>
//这个文件只是一些定义。
/*-------------------------------------------------------------------------------*/
#define __noinit__ __attribute__ ((section (".noinit"))) //变量不初始化
#define __eeprom__ __attribute__ ((section (".eeprom"))) //变量定义在eeprom中
#define __flash__ PROGMEM //变量定义在flash中(写法1)
/*-------------------------------------------------------------------------------*/
typedef int8_t BOOL;
typedef BOOL bool;
typedef uint8_t ubyte;
typedef uint8_t uchar;
typedef int8_t int8;
typedef uint8_t uint8;
typedef int16_t int16;
typedef uint16_t uint16;
typedef int32_t int32;
typedef uint32_t uint32;
#define TRUE 1
#define FALSE !(TRUE)
#define true TRUE
#define false FALSE
#ifndef NULL
#define NULL 0
#endif
#define NOP() asm("nop")
#define WDR() asm("wdr")
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -