X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/d4ca7fb44c7d326b96cf391f0275dc323dbe24de..c58c53dba90fdc19d38f5e5d6957f2ede2a740f3:/Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.h diff --git a/Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.h b/Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.h index bc5772657..583a2878b 100644 --- a/Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.h +++ b/Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.h @@ -1,13 +1,13 @@ /* 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, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -33,7 +33,7 @@ * Header file for XMEGANVM.c. */ -#ifndef _XMEGA_NVM__ +#ifndef _XMEGA_NVM_ #define _XMEGA_NVM_ /* Includes: */ @@ -56,6 +56,8 @@ #endif /* Defines: */ + #define XMEGA_CRC_LENGTH 3 + #define XMEGA_NVM_REG_ADDR0 0x00 #define XMEGA_NVM_REG_ADDR1 0x01 #define XMEGA_NVM_REG_ADDR2 0x02 @@ -104,16 +106,19 @@ #define XMEGA_NVM_CMD_READEEPROM 0x06 /* Function Prototypes: */ - void XMEGANVM_SendNVMRegAddress(const uint8_t Register); - void XMEGANVM_SendAddress(const uint32_t AbsoluteAddress); bool XMEGANVM_WaitWhileNVMBusBusy(void); bool XMEGANVM_WaitWhileNVMControllerBusy(void); bool XMEGANVM_GetMemoryCRC(const uint8_t CRCCommand, uint32_t* const CRCDest); bool XMEGANVM_ReadMemory(const uint32_t ReadAddress, uint8_t* ReadBuffer, uint16_t ReadSize); - bool XMEGANVM_WriteByteMemory(const uint8_t WriteCommand, const uint32_t WriteAddress, const uint8_t* WriteBuffer); + bool XMEGANVM_WriteByteMemory(const uint8_t WriteCommand, const uint32_t WriteAddress, const uint8_t Byte); bool XMEGANVM_WritePageMemory(const uint8_t WriteBuffCommand, const uint8_t EraseBuffCommand, const uint8_t WritePageCommand, const uint8_t PageMode, const uint32_t WriteAddress, const uint8_t* WriteBuffer, uint16_t WriteSize); bool XMEGANVM_EraseMemory(const uint8_t EraseCommand, const uint32_t Address); + #if defined(INCLUDE_FROM_XMEGANVM_C) + static void XMEGANVM_SendNVMRegAddress(const uint8_t Register); + static void XMEGANVM_SendAddress(const uint32_t AbsoluteAddress); + #endif + #endif