Corrected bug in ATmega168 demo in the RS-485 driver. Also updated the IAR project for Embedded workbench 5.10. Stats:

IAR Atmel AVR C/C++ Compiler V5.10A/W32 
10191 bytes of CODE memory (+36 range fill) 
  775 bytes of DATA memory (+24 absolute) 

avr-gcc (GCC) 4.2.2 (WinAVR 20071221rc1)
Program:   12052 bytes (73.6% Full)
Data:        481 bytes (47.0% Full)
This commit is contained in:
skarg
2008-03-19 20:21:44 +00:00
parent 6380985dc2
commit fb453ae1aa
8 changed files with 61 additions and 81 deletions
+7 -6
View File
@@ -34,25 +34,26 @@
#ifndef IAR2GCC_H
#define IAR2GCC_H
#if !defined(F_CPU)
#define F_CPU (7372800)
#endif
#if defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ASM__)
#include <inavr.h>
#include <ioavr.h>
#define _BV(bit_num) (1 << (bit_num))
#define _delay_us(x) \
/* inline function */
static inline void delay_us(
static inline void _delay_us(
uint8_t microseconds)
{
do {
__delay_cycles(F_CPU / 1000000);
__delay_cycles(F_CPU / 1000000UL);
} while (microseconds--);
}
#else
#if !defined(F_CPU)
#define F_CPU (7372800)
#endif
/* GCC */
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>