From 9e7ffcb014d08d9f541cc8000b34f600b437a78e Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Mon, 1 Feb 2010 05:34:59 +0000 Subject: Make AVRISP XPROG function parameters const where possible. --- Projects/AVRISP-MKII/AVRISP.h | 5 ++--- Projects/AVRISP-MKII/Lib/V2Protocol.h | 4 ++-- Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c | 4 ++-- Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.h | 4 ++-- 4 files changed, 8 insertions(+), 9 deletions(-) (limited to 'Projects') diff --git a/Projects/AVRISP-MKII/AVRISP.h b/Projects/AVRISP-MKII/AVRISP.h index d0f1e5927..c9f3263ad 100644 --- a/Projects/AVRISP-MKII/AVRISP.h +++ b/Projects/AVRISP-MKII/AVRISP.h @@ -72,11 +72,10 @@ /* Function Prototypes: */ void SetupHardware(void); - + void Process_AVRISP_Commands(void); + void EVENT_USB_Device_Connect(void); void EVENT_USB_Device_Disconnect(void); void EVENT_USB_Device_ConfigurationChanged(void); - - void Process_AVRISP_Commands(void); #endif diff --git a/Projects/AVRISP-MKII/Lib/V2Protocol.h b/Projects/AVRISP-MKII/Lib/V2Protocol.h index 5af9fe9bf..d67fb3dad 100644 --- a/Projects/AVRISP-MKII/Lib/V2Protocol.h +++ b/Projects/AVRISP-MKII/Lib/V2Protocol.h @@ -82,9 +82,9 @@ void V2Protocol_ProcessCommand(void); #if defined(INCLUDE_FROM_V2PROTOCOL_C) - static void V2Protocol_UnknownCommand(uint8_t V2Command); + static void V2Protocol_UnknownCommand(const uint8_t V2Command); static void V2Protocol_SignOn(void); - static void V2Protocol_GetSetParam(uint8_t V2Command); + static void V2Protocol_GetSetParam(const uint8_t V2Command); static void V2Protocol_ResetProtection(void); static void V2Protocol_LoadAddress(void); #endif diff --git a/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c b/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c index e7513032f..4ed3da75d 100644 --- a/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c +++ b/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c @@ -53,7 +53,7 @@ static void TINYNVM_SendPointerAddress(const uint16_t AbsoluteAddress) * * \param[in] Address 6-bit I/O address to write to in the target's I/O memory space */ -static void TINYNVM_SendReadNVMRegister(uint8_t Address) +static void TINYNVM_SendReadNVMRegister(const uint8_t Address) { /* The TPI command for reading from the I/O space uses strange addressing, where the I/O address's upper * two bits of the 6-bit address are shifted left once */ @@ -64,7 +64,7 @@ static void TINYNVM_SendReadNVMRegister(uint8_t Address) * * \param[in] Address 6-bit I/O address to read from in the target's I/O memory space */ -static void TINYNVM_SendWriteNVMRegister(uint8_t Address) +static void TINYNVM_SendWriteNVMRegister(const uint8_t Address) { /* The TPI command for writing to the I/O space uses wierd addressing, where the I/O address's upper * two bits of the 6-bit address are shifted left once */ diff --git a/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.h b/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.h index 546e5abaa..5a18567cb 100644 --- a/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.h +++ b/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.h @@ -68,8 +68,8 @@ 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_SendReadNVMRegister(const uint8_t Address); + static void TINYNVM_SendWriteNVMRegister(const uint8_t Address); static void TINYNVM_SendPointerAddress(const uint16_t AbsoluteAddress); #endif -- cgit v1.2.3