如何利用51单片机实现加减法计算-头文件:inc_all.h
1 #ifndef INC_ALL_H_
2 #define INC_ALL_H_
3
4 volatile unsigned char keyValue;
5 volatile unsigned char sign;
6 volatile long int opr1;
7 volatile long int opr2;
8 volatile long int SysValue=0;
9 volatile int keyCounter;
10 volatile int cnt50ms=0;
如何使用AVR单片机写入TEA5767数据-#include
#include
#define uchar unsigned char
#define uint unsigned int
#define ulong unsigned long
void delay()
{
uint i=0;
for (i=0;i《2000;i++)
;
}
单片机软定时器设计-timer.h
#ifndef __SOFT_TIMER_H__
#define __SOFT_TIMER_H__
#define EVENT_TYPE_ONESHOT 0
#define EVENT_TYPE_PERIODIC 1
#define TMR_POOL_SIZE 20
#define HANDLE int
typedef void (*TimerProc)(void*);
void TimerInit(void);
//HANDLE : -1 means fail,
AVR单片机的nRF24L01发送接收设计-//spi标志
#define DDR_SPI DDRB
#define DD_MOSI 5
#define DD_MISO 6
#define DD_SCK 7
#define DD_SS 4
#define CE PB3
#define IRQ PB2
#defineU32unsignedint#defineM5D(n)((n)0x1fffff)#definerGPCCON(*(volatileunsigned*)0x56000020)#define
#include#defineDS1302_DIRP1DIR#defineDS1302_INP1IN#defineDS1302_OUTP1OUT#defineDS1302_RSTBIT7#define
////////////LCDNOKIA5110引脚定义/////////#defineNOKIA_SCLKGPIO_Pin_14#defineNOKIA_SDINGPIO_Pin_13#define