#ifndef CONFIG_H_ #define CONFIG_H_ #include #include //Consfigure project //#define _NO_BOOTLOADER_ #define _DEBUG_ //Choose one //#define _SLAVE_MODULE_ #define _SLAVE_EXT_ //#define _CUSTOM_TYPE_ //After this see idibus_hw.h to change PIN definition //Done! //For 328pb #ifdef __ATmega328PB__ #define PAGE_SIZE 128UL #define PAGE_SIZE_BIT 7 //DONT FORGET TO CHANGE LINKER OPTIONS!!!! #define locationInBoot (0x3FE8UL) //CAREFUL ONLY 48 byte in size for data #define locationInApp (0x37C0UL) #define SRAM_size 2048UL #endif //For 2560 #ifdef __ATmega2560__ #define _LONG_ADDR_SPACE_ #define _FAT_CRC_ #define PAGE_SIZE 256ULL #define PAGE_SIZE_BIT 8 //Settings in the linker #define locationInBoot (0x1FF80ULL) #define locationInApp (0x1EF80ULL) #define SRAM_size 8192UL #endif //For 1280 #ifdef __ATmega1280__ #define _LONG_ADDR_SPACE_ #define _FAT_CRC_ #define PAGE_SIZE 256ULL #define PAGE_SIZE_BIT 8 //Settings in the linker #define locationInBoot (0x0FF80ULL) #define locationInApp (0x0EF80ULL) #define SRAM_size 8192UL #endif //COMMON Define #define PAGE_COUNT (((locationInApp<<1)/PAGE_SIZE)+1) #ifdef _LONG_ADDR_SPACE_ #define FLASH_ADDR_T uint_farptr_t #else #define FLASH_ADDR_T uint16_t #endif #endif /* CONFIG_H_ */