diff -Naurp configure.ac configure.ac --- configure.ac 2013-03-15 12:01:34.000000000 +0530 +++ configure.ac 2013-03-15 12:01:52.000000000 +0530 @@ -993,6 +993,14 @@ CHECK_AVR_DEVICE(atmega2564rfr2) AM_CONDITIONAL(HAS_atmega2564rfr2, test "x$HAS_atmega2564rfr2" = "xyes") +# avr7 +CHECK_AVR_DEVICE(avr7) +AM_CONDITIONAL(HAS_avr7, test "x$HAS_avr7" = "xyes") + +CHECK_AVR_DEVICE(ata5831) +AM_CONDITIONAL(HAS_ata5831, test "x$HAS_ata5831" = "xyes") + + # avrxmega2 CHECK_AVR_DEVICE(avrxmega2) AM_CONDITIONAL(HAS_avrxmega2, test "x$HAS_avrxmega2" = "xyes") @@ -1458,6 +1466,12 @@ AC_CONFIG_FILES([ avr/lib/avr6/atmega2564rfr2/Makefile ]) +#avr7 +AC_CONFIG_FILES([ + avr/lib/avr7/Makefile + avr/lib/avr7/ata5831/Makefile +]) + # avrxmega2 AC_CONFIG_FILES([ avr/lib/avrxmega2/Makefile diff -Naurp devtools/gen-avr-lib-tree.sh devtools/gen-avr-lib-tree.sh --- devtools/gen-avr-lib-tree.sh 2013-03-15 12:01:34.000000000 +0530 +++ devtools/gen-avr-lib-tree.sh 2013-03-15 12:01:52.000000000 +0530 @@ -289,6 +289,10 @@ atmega256rfr2:crtm256rfr2.o:${DEV_DEFS}: atmega2564rfr2:crtm2564rfr2.o:${DEV_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS}\ " +AVR7_DEV_INFO="\ +ata5831:crta5831.o:${DEV_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS}\ +" + AVRXMEGA2_DEV_INFO="\ atxmega16a4:crtx16a4.o:${DEV_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\ atxmega16a4u:crtx16a4u.o:${DEV_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\ @@ -369,6 +373,7 @@ avr4:AVR4_DEV_INFO:${LIB_DEFS}:${CFLAGS_ avr5:AVR5_DEV_INFO:${LIB_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\ avr51:AVR51_DEV_INFO:${LIB_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS};\ avr6:AVR6_DEV_INFO:${LIB_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS};\ +avr7:AVR7_DEV_INFO:${LIB_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\ avrxmega2:AVRXMEGA2_DEV_INFO:${LIB_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\ avrxmega4:AVRXMEGA4_DEV_INFO:${LIB_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS};\ avrxmega5:AVRXMEGA5_DEV_INFO:${LIB_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS};\ diff -Naurp doc/api/main_page.dox doc/api/main_page.dox --- doc/api/main_page.dox 2013-03-15 12:01:34.000000000 +0530 +++ doc/api/main_page.dox 2013-03-15 12:01:52.000000000 +0530 @@ -212,6 +212,7 @@ compile-time. - ata5790 - ata5790n - ata5795 +- ata5831 \par CAN AVR Devices: diff -Naurp doc/api/using-tools.dox doc/api/using-tools.dox --- doc/api/using-tools.dox 2013-03-15 12:01:34.000000000 +0530 +++ doc/api/using-tools.dox 2013-03-15 12:03:29.000000000 +0530 @@ -180,6 +180,20 @@ AVR will be defined as well when using t "Enhanced" CPU core, 256 KB of ROM + + avr7 [2] + + __AVR_ARCH__=7
+ __AVR_MEGA__ [5]
+ __AVR_ENHANCED__ [5]
+ __AVR_HAVE_JMP_CALL__ [4]
+ __AVR_HAVE_MOVW__ [1]
+ __AVR_HAVE_LPMX__ [1]
+ __AVR_HAVE_MUL__ [1]
+ __AVR_2_BYTE_PC__ [2] + + "Enhanced" CPU core, 20K of Flash that starts at 0x8000 +

[1] New in GCC 4.2
@@ -409,6 +423,8 @@ AVR will be defined as well when using t avr6atmega256rfr2__AVR_ATmega256RFR2__ avr6atmega2564rfr2__AVR_ATmega2564RFR2__ + avr7ata5831__AVR_ATA5831__ + avrxmega2atxmega16a4__AVR_ATxmega16A4__ avrxmega2atxmega16a4u__AVR_ATxmega16A4U__ avrxmega2atxmega16c4__AVR_ATxmega16C4__ diff -Naurp include/avr/eeprom.h include/avr/eeprom.h --- include/avr/eeprom.h 2013-03-15 12:01:34.000000000 +0530 +++ include/avr/eeprom.h 2013-03-15 12:01:52.000000000 +0530 @@ -495,6 +495,8 @@ # define _EEPROM_SUFFIX _a5790n #elif defined (__AVR_ATA5795__) # define _EEPROM_SUFFIX _a5795 +#elif defined (__AVR_ATA5831__) +# define _EEPROM_SUFFIX _a5831 /* avr1: the following only supported for assembler programs */ #elif defined (__AVR_ATtiny28__) # define _EEPROM_SUFFIX _tn28 diff -Naurp include/avr/io.h include/avr/io.h --- include/avr/io.h 2013-03-15 12:01:34.000000000 +0530 +++ include/avr/io.h 2013-03-15 12:01:52.000000000 +0530 @@ -514,6 +514,8 @@ # include #elif defined (__AVR_ATA5795__) # include +#elif defined (__AVR_ATA5831__) +# include #elif defined (__AVR_ATA6285__) # include #elif defined (__AVR_ATA6286__) diff -Naurp include/avr/Makefile.am include/avr/Makefile.am --- include/avr/Makefile.am 2013-03-15 12:01:34.000000000 +0530 +++ include/avr/Makefile.am 2013-03-15 12:01:52.000000000 +0530 @@ -69,6 +69,7 @@ avr_HEADERS = \ ioa5790.h \ ioa5790n.h \ ioa5795.h \ + ioa5831.h \ ioa6285.h \ ioa6286.h \ ioa6289.h \ diff -Naurp include/avr/power.h include/avr/power.h --- include/avr/power.h 2013-03-15 12:01:34.000000000 +0530 +++ include/avr/power.h 2013-03-15 12:01:52.000000000 +0530 @@ -346,6 +346,163 @@ find out which macros are applicable to Disable all modules. ATxmega6A4, ATxmega32A4, ATxmega64A1, ATxmega64A1U, ATxmega64A3, ATxmegaA1, ATxmegaA1U, ATxmega128A3, ATxmega192A3, ATxmega256A3, ATxmegaA3B, ATxmega16D4, ATxmega32D4, ATxmega64D3, ATxmega128D3,ATxmega192D3, ATmega640, ATmega1280, ATmega1281, ATmega128RFA1, ATmega2560, ATmega2561, AT90USB646, AT90USB647, AT90USB1286, AT90USB1287, AT90PWM1, AT90PWM2, AT90PWM2B, AT90PWM3, AT90PWM3B, AT90PWM216, AT90PWM316, ATmega165, ATmega165P, ATmega325, ATmega325A, ATmega325PA, ATmega3250, ATmega3250A, ATmega3250PA, ATmega645, ATmega6450, ATmega169, ATmega169P, ATmega329, ATmega329A, ATmega3290, ATmega3290A, ATmega3290PA, ATmega649, ATmega6490, ATmega164P, ATmega324P, ATmega644, ATmega406, ATmega48, ATmega88, ATmega168, ATtiny24, ATtiny44, ATtiny84, ATtiny84A, ATtiny25, ATtiny45, ATtiny85, ATtiny261, ATtiny461, ATtiny861, ATxmega64B1, ATxmega128B1, ATxmega64B3, ATxmega128B3, ATxmega16A4U, ATxmega32A4U, ATxmega64A3U, ATxmega128A3U, ATxmega192A3U, ATxmega256A3U + + + power_clock_output_enable() + Enable clock output module + ATA5831 + + + + power_clock_output_disable() + Enable clock output module + ATA5831 + + + + power_voltage_monitor_enable() + Enable voltage monitor module + ATA5831 + + + + power_voltage_monitor_disable() + Disable voltage monitor module + ATA5831 + + + + power_crc_enable() + Enable CRC module + ATA5831 + + + + power_crc_disable() + Disable CRC module + ATA5831 + + + + power_transmit_dsp_control_enable() + Enable Transmit DSP control module + ATA5831 + + + + power_transmit_dsp_control_disable() + Disable Transmit DSP control module + ATA5831 + + + + power_receive_dsp_control_enable() + Enable Receive DSP control module + ATA5831 + + + + power_receive_dsp_control_disable() + Disable Receive DSP control module + ATA5831 + + + + power_sequencer_state_machine_enable() + Enable power sequencer state machine + ATA5831 + + + + power_sequencer_state_machine_disable() + Disable power sequencer state machine + ATA5831 + + + + power_tx_modulator_enable() + Enable Tx modulator + ATA5831 + + + + power_tx_modulator_disable() + Disable Tx modulator + ATA5831 + + + + power_rssi_buffer_enable() + Enable RSSI buffer + ATA5831 + + + + power_rssi_buffer_disable() + Disable RSSI buffer + ATA5831 + + + + power_id_scan_enable() + Enable ID Scan + ATA5831 + + + + power_id_scan_disable() + Disable ID Scan + ATA5831 + + + + power_data_fifo_enable() + Enable data FIFO + ATA5831 + + + + power_data_fifo_disable() + Disable data FIFO + ATA5831 + + + + power_preamble_rssi_fifo_enable() + Enable preamble/RSSI FIFO + ATA5831 + + + + power_preamble_rssi_fifo_disable() + Disable preamble/RSSI FIFO + ATA5831 + + + + power_rx_buffer_A_enable() + Enable receive buffer for data path A + ATA5831 + + + + power_rx_buffer_A_disable() + Disable receive buffer for data path A + ATA5831 + + + + power_rx_buffer_B_enable() + Enable receive buffer for data path B + ATA5831 + + + + power_rx_buffer_B_disable() + Disable receive buffer for data path B + ATA5831 + + @@ -1731,6 +1888,79 @@ do{ \ #define power_all_enable() (PRR0 &= (uint8_t)~((1<