?? tools.h
字號:
#ifndef TOOLS_H_INCLUDED
#define TOOLS_H_INCLUDED
#define TRUE 1
#define FALSE 0
//F黵s Bit setzen und l鰏chen
#define BIT0_POS (1<<0)
#define BIT1_POS (1<<1)
#define BIT2_POS (1<<2)
#define BIT3_POS (1<<3)
#define BIT4_POS (1<<4)
#define BIT5_POS (1<<5)
#define BIT6_POS (1<<6)
#define BIT7_POS (1<<7)
#define BIT0_NEG ((unsigned char)(~(1<<0)))
#define BIT1_NEG ((unsigned char)(~(1<<1)))
#define BIT2_NEG ((unsigned char)(~(1<<2)))
#define BIT3_NEG ((unsigned char)(~(1<<3)))
#define BIT4_NEG ((unsigned char)(~(1<<4)))
#define BIT5_NEG ((unsigned char)(~(1<<5)))
#define BIT6_NEG ((unsigned char)(~(1<<6)))
#define BIT7_NEG ((unsigned char)(~(1<<7)))
/*
//Hardware-Interface
//LED an PORTB 0
#define LED_GN_OFF PORTB&=BIT2_NEG
#define LED_GN_ON PORTB|=BIT2_POS
#define LED_GN_TOG PORTB^=BIT2_POS
//LED an PORTB 1
#define LED_RT_OFF PORTB&=BIT1_NEG
#define LED_RT_ON PORTB|=BIT1_POS
#define LED_RT_TOG PORTB^=BIT1_POS
//Reset f黵 Remote-AVR
//#define R_RES_ON {PORTB&=BIT2_NEG;DDRB|=BIT2_POS;}
//#define R_RES_OFF {DDRB&=BIT2_NEG;PORTB|=BIT2_POS;}
#define R_RES_ON PORTB&=BIT0_NEG
#define R_RES_OFF PORTB|=BIT0_POS
*/
//Hardware-Interface
//LED an PORTC 0
#define LED_GN_OFF PORTC&=BIT0_NEG
#define LED_GN_ON PORTC|=BIT0_POS
#define LED_GN_TOG PORTC^=BIT0_POS
//LED an PORTB 1
#define LED_RT_OFF PORTC&=BIT1_NEG
#define LED_RT_ON PORTC|=BIT1_POS
#define LED_RT_TOG PORTC^=BIT1_POS
//Reset f黵 Remote-AVR
//#define R_RES_ON {PORTB&=BIT2_NEG;DDRB|=BIT2_POS;}
//#define R_RES_OFF {DDRB&=BIT2_NEG;PORTB|=BIT2_POS;}
#define R_RES_ON PORTB&=BIT2_NEG
#define R_RES_OFF PORTB|=BIT2_POS
//Set Device Daten
typedef struct
{
unsigned char devicecode;
unsigned char revision;
unsigned char progtype;
unsigned char parmode;
unsigned char polling;
unsigned char selftimed;
unsigned char lockbytes;
unsigned char fusebytes;
unsigned char flashpollval1;
unsigned char flashpollval2;
unsigned char eeprompollval1;
unsigned char eeprompollval2;
unsigned int pagesize;
unsigned int eepromsize;
unsigned long flashsize;
unsigned char commandsize;
unsigned char eeprompagesize;
unsigned char signalpagel;
unsigned char signalbs2;
unsigned char resetdisable;
}
avr_device;
//Prototypen aus tools.c
unsigned char get_t1_tick(void);
void wait_ms(unsigned int n);
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -