28
28
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
29
POSSIBILITY OF SUCH DAMAGE. */
31
/* $Id: iousb82.h,v 1.2.2.1 2008/01/05 00:08:45 arcanum Exp $ */
31
/* $Id: iousb82.h,v 1.2.2.4 2009/02/11 18:05:34 arcanum Exp $ */
33
33
/* avr/iousb82.h - definitions for AT90USB82 */
38
38
#include <avr/iousbxx2.h>
41
#define SPM_PAGESIZE 128
45
#define FLASHEND 0x1FFF
41
#define SPM_PAGESIZE 128
43
#define XRAMEND RAMEND
46
#define FLASHEND 0x1FFF
50
50
#define FUSE_MEMORY_SIZE 3
52
52
/* Low Fuse Byte */
53
#define FUSE_CKSEL0 ~_BV(0)
54
#define FUSE_CKSEL1 ~_BV(1)
55
#define FUSE_CKSEL2 ~_BV(2)
56
#define FUSE_CKSEL3 ~_BV(3)
57
#define FUSE_SUT0 ~_BV(4)
58
#define FUSE_SUT1 ~_BV(5)
59
#define FUSE_CKOUT ~_BV(6)
60
#define FUSE_CKDIV8 ~_BV(7)
53
#define FUSE_CKSEL0 (unsigned char)~_BV(0)
54
#define FUSE_CKSEL1 (unsigned char)~_BV(1)
55
#define FUSE_CKSEL2 (unsigned char)~_BV(2)
56
#define FUSE_CKSEL3 (unsigned char)~_BV(3)
57
#define FUSE_SUT0 (unsigned char)~_BV(4)
58
#define FUSE_SUT1 (unsigned char)~_BV(5)
59
#define FUSE_CKOUT (unsigned char)~_BV(6)
60
#define FUSE_CKDIV8 (unsigned char)~_BV(7)
61
61
#define LFUSE_DEFAULT (CKSEL0 & SUT1 & CKDIV8)
63
63
/* High Fuse Byte */
64
#define FUSE_BOOTRST ~_BV(0)
65
#define FUSE_BOOTSZ0 ~_BV(1)
66
#define FUSE_BOOTSZ1 ~_BV(2)
67
#define FUSE_EESAVE ~_BV(3)
68
#define FUSE_WDTON ~_BV(4)
69
#define FUSE_SPIEN ~_BV(5)
70
#define FUSE_RSTDSBL ~_BV(6)
71
#define FUSE_DWEN ~_BV(7)
64
#define FUSE_BOOTRST (unsigned char)~_BV(0)
65
#define FUSE_BOOTSZ0 (unsigned char)~_BV(1)
66
#define FUSE_BOOTSZ1 (unsigned char)~_BV(2)
67
#define FUSE_EESAVE (unsigned char)~_BV(3)
68
#define FUSE_WDTON (unsigned char)~_BV(4)
69
#define FUSE_SPIEN (unsigned char)~_BV(5)
70
#define FUSE_RSTDSBL (unsigned char)~_BV(6)
71
#define FUSE_DWEN (unsigned char)~_BV(7)
72
72
#define HFUSE_DEFAULT (BOOTSZ0 & BOOTSZ1 & SPIEN)
74
74
/* Extended Fuse Byte */
75
#define FUSE_BODLEVEL0 ~_BV(0)
76
#define FUSE_BODLEVEL1 ~_BV(1)
77
#define FUSE_BODLEVEL2 ~_BV(2)
78
#define FUSE_HWBE ~_BV(3)
75
#define FUSE_BODLEVEL0 (unsigned char)~_BV(0)
76
#define FUSE_BODLEVEL1 (unsigned char)~_BV(1)
77
#define FUSE_BODLEVEL2 (unsigned char)~_BV(2)
78
#define FUSE_HWBE (unsigned char)~_BV(3)
79
79
#define EFUSE_DEFAULT (BODLEVEL0 & BODLEVEL1 & HWBE)