+++ /dev/null
-/*\r
- LUFA Library\r
- Copyright (C) Dean Camera, 2012.\r
-\r
- dean [at] fourwalledcubicle [dot] com\r
- www.lufa-lib.org\r
-*/\r
-\r
-/*\r
- Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
- Permission to use, copy, modify, distribute, and sell this\r
- software and its documentation for any purpose is hereby granted\r
- without fee, provided that the above copyright notice appear in\r
- all copies and that both that the copyright notice and this\r
- permission notice and warranty disclaimer appear in supporting\r
- documentation, and that the name of the author not be used in\r
- advertising or publicity pertaining to distribution of the\r
- software without specific, written prior permission.\r
-\r
- The author disclaim all warranties with regard to this\r
- software, including all implied warranties of merchantability\r
- and fitness. In no event shall the author be liable for any\r
- special, indirect or consequential damages or any damages\r
- whatsoever resulting from loss of use, data or profits, whether\r
- in an action of contract, negligence or other tortious action,\r
- arising out of or in connection with the use or performance of\r
- this software.\r
-*/\r
-\r
-/** \file\r
- *\r
- * Special application to extract an EEPROM image stored in FLASH memory, and\r
- * copy it to the device EEPROM. This application is designed to be used with\r
- * the HID build system module of LUFA to program the EEPROM of a target device\r
- * that uses the HID bootloader protocol, which does not have native EEPROM\r
- * programming support.\r
- */\r
-\r
-#include <avr/io.h>\r
-#include <avr/eeprom.h>\r
-#include <avr/pgmspace.h>\r
-\r
-/* References to the binary EEPROM data linked in the AVR's FLASH memory space */\r
-extern const char _binary_InputEEData_bin_start[];\r
-extern const char _binary_InputEEData_bin_end[];\r
-extern const char _binary_InputEEData_bin_size[];\r
-\r
-/* Friendly names for the embedded binary data stored in FLASH memory space */\r
-#define InputEEData _binary_InputEEData_bin_start\r
-#define InputEEData_size ((int)_binary_InputEEData_bin_size)\r
-\r
-int main(void)\r
-{\r
- /* Copy out the embedded EEPROM data from FLASH to EEPROM memory space */\r
- for (uint16_t i = 0; i < InputEEData_size; i++)\r
- eeprom_update_byte((uint8_t*)i, pgm_read_byte(&InputEEData[i]));\r
-\r
- /* Infinite loop once complete */\r
- for (;;);\r
-}\r