Skip to content

Commit

Permalink
Merge pull request #2 from peakdata/master
Browse files Browse the repository at this point in the history
Fix issue #1: Commit ff52582 does not build, issue #5: Sleep Register Names are Incorrect
  • Loading branch information
stevenj authored Feb 9, 2020
2 parents ff52582 + 8940919 commit 23c31a1
Show file tree
Hide file tree
Showing 36 changed files with 97 additions and 83 deletions.
78 changes: 39 additions & 39 deletions include/avr/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Copyright (c) 2004,2005,2006,2007 Theodore A. Roth
# Copyright (c) 2004,2005,2006,2007 Theodore A. Roth
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * Neither the name of the copyright holders nor the names of
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Expand All @@ -31,45 +31,45 @@

avrdir = $(prefix)/avr/include/avr
avr_HEADERS = \
boot.h \
common.h \
cpufunc.h \
crc16.h \
delay.h \
eeprom.h \
fuse.h \
interrupt.h \
io.h \
legacyio.h\
lock.h \
parity.h \
pgmspace.h \
portpins.h \
power.h \
signature.h \
sfr_defs.h \
signal.h \
sleep.h \
version.h \
wdt.h \
xmega.h
boot.h \
common.h \
cpufunc.h \
crc16.h \
delay.h \
eeprom.h \
fuse.h \
interrupt.h \
io.h \
legacyio.h\
lock.h \
parity.h \
pgmspace.h \
portpins.h \
power.h \
signature.h \
sfr_defs.h \
signal.h \
sleep.h \
version.h \
wdt.h \
xmega.h

nodist_avr_HEADERS = \
builtins.h
builtins.h

EXTRA_DIST = \
builtins.h.in \
version.h.in
builtins.h.in \
version.h.in

do_subst = sed \
-e 's,[@]AVR_LIBC_MAJOR[@],$(AVR_LIBC_MAJOR),g' \
-e 's,[@]AVR_LIBC_MINOR[@],$(AVR_LIBC_MINOR),g' \
-e 's,[@]AVR_LIBC_REVISION[@],$(AVR_LIBC_REVISION),g' \
-e 's,[@]AVR_LIBC_RELDATE[@],$(AVR_LIBC_RELDATE),g' \
-e 's,[@]AVR_LIBC_VERSION[@],$(AVR_LIBC_VERSION),g' \
-e 's,[@]AVR_LIBC_VERSION_NUMERIC[@],$(AVR_LIBC_VERSION_NUMERIC),g'
-e 's,[@]AVR_LIBC_MAJOR[@],$(AVR_LIBC_MAJOR),g' \
-e 's,[@]AVR_LIBC_MINOR[@],$(AVR_LIBC_MINOR),g' \
-e 's,[@]AVR_LIBC_REVISION[@],$(AVR_LIBC_REVISION),g' \
-e 's,[@]AVR_LIBC_RELDATE[@],$(AVR_LIBC_RELDATE),g' \
-e 's,[@]AVR_LIBC_VERSION[@],$(AVR_LIBC_VERSION),g' \
-e 's,[@]AVR_LIBC_VERSION_NUMERIC[@],$(AVR_LIBC_VERSION_NUMERIC),g'

version.h: version.h.in $(top_builddir)/config.h
$(do_subst) < $(srcdir)/version.h.in > version.h
$(do_subst) < $(srcdir)/version.h.in > version.h

CLEANFILES = version.h
24 changes: 13 additions & 11 deletions include/avr/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ typedef volatile uint32_t register32_t;
register8_t regname##1; \
register8_t regname##2; \
register8_t regname##3; \
\
}; \
\
}; \
}
# endif /* NOT __ASSEMBLER__ */

Expand Down Expand Up @@ -220,22 +220,24 @@ typedef volatile uint32_t register32_t;
# define E2PAGESIZE EEPROM_PAGE_SIZE
# endif

# include <avr/portpins.h>
#endif /* AVR_LIBC_LEGACY_IO */

# include <avr/common.h>
/* these files are always included whether using LEGACY_IO or not */
#include <avr/portpins.h>

# include <avr/version.h>
#include <avr/common.h>

# if __AVR_ARCH__ >= 100
# include <avr/xmega.h>
# endif
#include <avr/version.h>

#if __AVR_ARCH__ >= 100
# include <avr/xmega.h>
#endif

/* Include fuse.h after individual IO header files. */
# include <avr/fuse.h>
#include <avr/fuse.h>

/* Include lock.h after individual IO header files. */
# include <avr/lock.h>
#include <avr/lock.h>

#endif /* AVR_LIBC_LEGACY_IO */

#endif /* _AVR_IO_H_ */
2 changes: 1 addition & 1 deletion include/avr/legacyio.h
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@
#elif defined(__AVR_ATtiny12__)
# include <avr/legacyio/iotn12.h>
#elif defined(__AVR_ATtiny11__)
# include <avr/legacyio/legacyio/iotn11.h>
# include <avr/legacyio/iotn11.h>
#elif defined(__AVR_M3000__)
# include <avr/legacyio/iom3000.h>
#elif defined(__AVR_DEV_LIB_NAME__)
Expand Down
2 changes: 1 addition & 1 deletion include/avr/legacyio/iocan128.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifndef _AVR_IOCAN128_H_
#define _AVR_IOCAN128_H_ 1

#include <avr/iocanxx.h>
#include <avr/legacyio/iocanxx.h>

/* Constants */
#define SPM_PAGESIZE 256
Expand Down
2 changes: 1 addition & 1 deletion include/avr/legacyio/iocan32.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifndef _AVR_IOCAN32_H_
#define _AVR_IOCAN32_H_ 1

#include <avr/iocanxx.h>
#include <avr/legacyio/iocanxx.h>

/* Constants */
#define SPM_PAGESIZE 256
Expand Down
2 changes: 1 addition & 1 deletion include/avr/legacyio/iocan64.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifndef _AVR_IOCAN64_H_
#define _AVR_IOCAN64_H_ 1

#include <avr/iocanxx.h>
#include <avr/legacyio/iocanxx.h>

/* Constants */
#define SPM_PAGESIZE 256
Expand Down
2 changes: 1 addition & 1 deletion include/avr/legacyio/iom1280.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifndef _AVR_IOM1280_H_
#define _AVR_IOM1280_H_ 1

#include <avr/iomxx0_1.h>
#include <avr/legacyio/iomxx0_1.h>

/* Constants */
#define SPM_PAGESIZE 256
Expand Down
2 changes: 1 addition & 1 deletion include/avr/legacyio/iom1281.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifndef _AVR_IOM1281_H_
#define _AVR_IOM1281_H_ 1

#include <avr/iomxx0_1.h>
#include <avr/legacyio/iomxx0_1.h>

/* Constants */
#define SPM_PAGESIZE 256
Expand Down
2 changes: 1 addition & 1 deletion include/avr/legacyio/iom164.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifndef _AVR_IOM164_H_
#define _AVR_IOM164_H_ 1

#include <avr/iomxx4.h>
#include <avr/legacyio/iomxx4.h>

/* Constants */
#define SPM_PAGESIZE 128
Expand Down
2 changes: 1 addition & 1 deletion include/avr/legacyio/iom168.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#ifndef _AVR_IOM168_H_
#define _AVR_IOM168_H_ 1

#include <avr/iomx8.h>
#include <avr/legacyio/iomx8.h>

/* Constants */
#define SPM_PAGESIZE 128
Expand Down
2 changes: 1 addition & 1 deletion include/avr/legacyio/iom16hva.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifndef _AVR_IOM16HVA_H_
#define _AVR_IOM16HVA_H_ 1

#include <avr/iomxxhva.h>
#include <avr/legacyio/iomxxhva.h>

/* Constants */
#define SPM_PAGESIZE 128
Expand Down
2 changes: 1 addition & 1 deletion include/avr/legacyio/iom2560.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifndef _AVR_IOM2560_H_
#define _AVR_IOM2560_H_ 1

#include <avr/iomxx0_1.h>
#include <avr/legacyio/iomxx0_1.h>

/* Constants */
#define SPM_PAGESIZE 256
Expand Down
2 changes: 1 addition & 1 deletion include/avr/legacyio/iom2561.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifndef _AVR_IOM2561_H_
#define _AVR_IOM2561_H_ 1

#include <avr/iomxx0_1.h>
#include <avr/legacyio/iomxx0_1.h>

/* Constants */
#define SPM_PAGESIZE 256
Expand Down
2 changes: 1 addition & 1 deletion include/avr/legacyio/iom324.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifndef _AVR_IOM324_H_
#define _AVR_IOM324_H_ 1

#include <avr/iomxx4.h>
#include <avr/legacyio/iomxx4.h>

/* Constants */
#define SPM_PAGESIZE 128
Expand Down
2 changes: 1 addition & 1 deletion include/avr/legacyio/iom48.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#ifndef _AVR_IOM48_H_
#define _AVR_IOM48_H_ 1

#include <avr/iomx8.h>
#include <avr/legacyio/iomx8.h>

/* Constants */
#define SPM_PAGESIZE 64
Expand Down
2 changes: 1 addition & 1 deletion include/avr/legacyio/iom640.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifndef _AVR_IOM640_H_
#define _AVR_IOM640_H_ 1

#include <avr/iomxx0_1.h>
#include <avr/legacyio/iomxx0_1.h>

/* Constants */
#define SPM_PAGESIZE 256
Expand Down
2 changes: 1 addition & 1 deletion include/avr/legacyio/iom644.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifndef _AVR_IOM644_H_
#define _AVR_IOM644_H_ 1

#include <avr/iomxx4.h>
#include <avr/legacyio/iomxx4.h>

/* Constants */
#define SPM_PAGESIZE 256
Expand Down
2 changes: 1 addition & 1 deletion include/avr/legacyio/iom644p.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifndef _AVR_IOM644P_H_
#define _AVR_IOM644P_H_ 1

#include <avr/iomxx4.h>
#include <avr/legacyio/iomxx4.h>

/* Constants */
#define SPM_PAGESIZE 256
Expand Down
2 changes: 1 addition & 1 deletion include/avr/legacyio/iom88.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#ifndef _AVR_IOM88_H_
#define _AVR_IOM88_H_ 1

#include <avr/iomx8.h>
#include <avr/legacyio/iomx8.h>

/* Constants */
#define SPM_PAGESIZE 64
Expand Down
2 changes: 1 addition & 1 deletion include/avr/legacyio/iom8hva.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifndef _AVR_IOM8HVA_H_
#define _AVR_IOM8HVA_H_ 1

#include <avr/iomxxhva.h>
#include <avr/legacyio/iomxxhva.h>

/* Constants */
#define SPM_PAGESIZE 128
Expand Down
2 changes: 1 addition & 1 deletion include/avr/legacyio/iotn24.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifndef _AVR_IOTN24_H_
#define _AVR_IOTN24_H_ 1

#include <avr/iotnx4.h>
#include <avr/legacyio/iotnx4.h>

#define SPM_PAGESIZE 32
#define RAMSTART (0x60)
Expand Down
2 changes: 1 addition & 1 deletion include/avr/legacyio/iotn25.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifndef _AVR_IOTN25_H_
#define _AVR_IOTN25_H_ 1

#include <avr/iotnx5.h>
#include <avr/legacyio/iotnx5.h>

#define SPM_PAGESIZE 32
#define RAMSTART (0x60)
Expand Down
2 changes: 1 addition & 1 deletion include/avr/legacyio/iotn261.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifndef _AVR_IOTN261_H_
#define _AVR_IOTN261_H_ 1

#include <avr/iotnx61.h>
#include <avr/legacyio/iotnx61.h>

#define SPM_PAGESIZE 32
#define RAMSTART (0x60)
Expand Down
2 changes: 1 addition & 1 deletion include/avr/legacyio/iotn44.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifndef _AVR_IOTN44_H_
#define _AVR_IOTN44_H_ 1

#include <avr/iotnx4.h>
#include <avr/legacyio/iotnx4.h>

/* Constants */
#define SPM_PAGESIZE 64
Expand Down
2 changes: 1 addition & 1 deletion include/avr/legacyio/iotn45.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifndef _AVR_IOTN45_H_
#define _AVR_IOTN45_H_ 1

#include <avr/iotnx5.h>
#include <avr/legacyio/iotnx5.h>

/* Constants */
#define SPM_PAGESIZE 64
Expand Down
2 changes: 1 addition & 1 deletion include/avr/legacyio/iotn461.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifndef _AVR_IOTN461_H_
#define _AVR_IOTN461_H_ 1

#include <avr/iotnx61.h>
#include <avr/legacyio/iotnx61.h>

/* Constants */
#define SPM_PAGESIZE 64
Expand Down
2 changes: 1 addition & 1 deletion include/avr/legacyio/iotn84.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifndef _AVR_IOTN84_H_
#define _AVR_IOTN84_H_ 1

#include <avr/iotnx4.h>
#include <avr/legacyio/iotnx4.h>

/* Constants */
#define SPM_PAGESIZE 64
Expand Down
2 changes: 1 addition & 1 deletion include/avr/legacyio/iotn85.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifndef _AVR_IOTN85_H_
#define _AVR_IOTN85_H_ 1

#include <avr/iotnx5.h>
#include <avr/legacyio/iotnx5.h>

/* Constants */
#define SPM_PAGESIZE 64
Expand Down
2 changes: 1 addition & 1 deletion include/avr/legacyio/iotn861.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifndef _AVR_IOTN861_H_
#define _AVR_IOTN861_H_ 1

#include <avr/iotnx61.h>
#include <avr/legacyio/iotnx61.h>

/* Constants */
#define SPM_PAGESIZE 64
Expand Down
Loading

0 comments on commit 23c31a1

Please sign in to comment.