X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/8ecdc2b1441417bf97661a3d3edd17a5afd707bf..d26a9ed5fd6fc60a0dfa61d04f5ae2bd7163a85d:/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.h diff --git a/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.h b/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.h index 75d11293d..e6a6749c9 100644 --- a/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.h +++ b/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.h @@ -1,21 +1,21 @@ /* LUFA Library - Copyright (C) Dean Camera, 2009. + Copyright (C) Dean Camera, 2010. dean [at] fourwalledcubicle [dot] com www.fourwalledcubicle.com */ /* - Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) - Permission to use, copy, modify, and distribute this software - and its documentation for any purpose and without fee is hereby - granted, provided that the above copyright notice appear in all - copies and that both that the copyright notice and this - permission notice and warranty disclaimer appear in supporting - documentation, and that the name of the author not be used in - advertising or publicity pertaining to distribution of the + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the software without specific, written prior permission. The author disclaim all warranties with regard to this @@ -56,18 +56,21 @@ #endif /* Defines: */ - #define TINY_NVM_REG_NVMCSR 0x32 - #define TINY_NVM_REG_NVMCMD 0x33 - #define TINY_NVM_CMD_NOOP 0x00 #define TINY_NVM_CMD_CHIPERASE 0x10 #define TINY_NVM_CMD_SECTIONERASE 0x14 #define TINY_NVM_CMD_WORDWRITE 0x1D - /* Function Prototypes: */ + /* Function Prototypes: */ bool TINYNVM_WaitWhileNVMBusBusy(void); - bool TINYNVM_ReadMemory(const uint32_t ReadAddress, uint8_t* ReadBuffer, const uint16_t ReadSize); - bool TINYNVM_WriteMemory(const uint8_t WriteCommand, const uint32_t WriteAddress, const uint8_t* WriteBuffer); - bool TINYNVM_EraseMemory(const uint8_t EraseCommand, const uint32_t Address); + bool TINYNVM_ReadMemory(const uint32_t ReadAddress, uint8_t* ReadBuffer, uint16_t ReadLength); + bool TINYNVM_WriteMemory(const uint32_t WriteAddress, const uint8_t* WriteBuffer, uint16_t WriteLength); + bool TINYNVM_EraseMemory(void); + + #if defined(INCLUDE_FROM_TINYNVM_C) + static void TINYNVM_SendReadNVMRegister(uint8_t Address); + static void TINYNVM_SendWriteNVMRegister(uint8_t Address); + static void TINYNVM_SendPointerAddress(const uint16_t AbsoluteAddress); + #endif #endif