X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/857381185d60eed2ccee7dc7b88d49d90546f8a2..74b6993d66d70c323beb4d7eccf5b8f45bf6d31f:/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. *