From 74b6993d66d70c323beb4d7eccf5b8f45bf6d31f Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Mon, 25 Jan 2010 04:13:44 +0000 Subject: Cleanup and partially fix AVRISP-MKII project's TPI programming support. --- Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c') diff --git a/Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c b/Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c index 573f8fde5..defd7ffe0 100644 --- a/Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c +++ b/Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c @@ -38,24 +38,11 @@ #if defined(ENABLE_XPROG_PROTOCOL) || defined(__DOXYGEN__) -/** Sends the given NVM register address to the target. - * - * \param[in] Register NVM register whose absolute address is to be sent - */ -void XMEGANVM_SendNVMRegAddress(const uint8_t Register) -{ - /* Determine the absolute register address from the NVM base memory address and the NVM register address */ - uint32_t Address = XPROG_Param_NVMBase | Register; - - /* Send the calculated 32-bit address to the target, LSB first */ - XMEGANVM_SendAddress(Address); -} - /** Sends the given 32-bit absolute address to the target. * * \param[in] AbsoluteAddress Absolute address to send to the target */ -void XMEGANVM_SendAddress(const uint32_t AbsoluteAddress) +static void XMEGANVM_SendAddress(const uint32_t AbsoluteAddress) { /* Send the given 32-bit address to the target, LSB first */ XPROGTarget_SendByte(((uint8_t*)&AbsoluteAddress)[0]); @@ -64,6 +51,19 @@ void XMEGANVM_SendAddress(const uint32_t AbsoluteAddress) XPROGTarget_SendByte(((uint8_t*)&AbsoluteAddress)[3]); } +/** Sends the given NVM register address to the target. + * + * \param[in] Register NVM register whose absolute address is to be sent + */ +static void XMEGANVM_SendNVMRegAddress(const uint8_t Register) +{ + /* Determine the absolute register address from the NVM base memory address and the NVM register address */ + uint32_t Address = XPROG_Param_NVMBase | Register; + + /* Send the calculated 32-bit address to the target, LSB first */ + XMEGANVM_SendAddress(Address); +} + /** Busy-waits while the NVM controller is busy performing a NVM operation, such as a FLASH page read or CRC * calculation. * -- cgit v1.2.3