aboutsummaryrefslogtreecommitdiffstats
path: root/Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-01-25 04:13:44 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-01-25 04:13:44 +0000
commit74b6993d66d70c323beb4d7eccf5b8f45bf6d31f (patch)
tree0912f8438fb816ce6a66d37f5306e0ae9507fa49 /Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c
parent857381185d60eed2ccee7dc7b88d49d90546f8a2 (diff)
downloadlufa-74b6993d66d70c323beb4d7eccf5b8f45bf6d31f.tar.gz
lufa-74b6993d66d70c323beb4d7eccf5b8f45bf6d31f.tar.bz2
lufa-74b6993d66d70c323beb4d7eccf5b8f45bf6d31f.zip
Cleanup and partially fix AVRISP-MKII project's TPI programming support.
Diffstat (limited to 'Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c')
-rw-r--r--Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c28
1 files changed, 14 insertions, 14 deletions
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.
*