Add first draft of the TPI NVM commands for reading, writing and erasing a target...
[pub/USBasp.git] / Projects / AVRISP-MKII / Lib / XPROG / XMEGANVM.c
index 0bdafc2..ea140be 100644 (file)
@@ -196,12 +196,12 @@ bool XMEGANVM_ReadMemory(const uint32_t ReadAddress, uint8_t* ReadBuffer, uint16
 /** Writes byte addressed memory to the target's memory spaces.\r
  *\r
  *  \param[in]  WriteCommand  Command to send to the device to write each memory byte\r
- *  \param[in]  WriteAddress  Start address to write to within the target's address space\r
- *  \param[in]  WriteBuffer   Buffer to source data from\r
+ *  \param[in]  WriteAddress  Address to write to within the target's address space\r
+ *  \param[in]  Byte          Byte to write to the target\r
  *\r
  *  \return Boolean true if the command sequence complete successfully\r
  */\r
-bool XMEGANVM_WriteByteMemory(const uint8_t WriteCommand, const uint32_t WriteAddress, const uint8_t* WriteBuffer)\r
+bool XMEGANVM_WriteByteMemory(const uint8_t WriteCommand, const uint32_t WriteAddress, const uint8_t Byte)\r
 {\r
        /* Wait until the NVM controller is no longer busy */\r
        if (!(XMEGANVM_WaitWhileNVMControllerBusy()))\r
@@ -215,7 +215,7 @@ bool XMEGANVM_WriteByteMemory(const uint8_t WriteCommand, const uint32_t WriteAd
        /* Send new memory byte to the memory to the target */\r
        XPROGTarget_SendByte(PDI_CMD_STS | (PDI_DATSIZE_4BYTES << 2));\r
        XMEGANVM_SendAddress(WriteAddress);\r
-       XPROGTarget_SendByte(*(WriteBuffer++));\r
+       XPROGTarget_SendByte(Byte);\r
        \r
        return true;\r
 }\r