diff options
author | Dean Camera <[email protected]> | 2009-12-28 07:17:21 +0000 |
---|---|---|
committer | Dean Camera <[email protected]> | 2009-12-28 07:17:21 +0000 |
commit | 7c8f4a716f01f6598234fd60cd53345da4903fde (patch) | |
tree | 352ac03ad26c195e273b723bda4e1777592b8f6b /Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c | |
parent | 3222f21b849ca283cc6c1f07c347285b8cbce075 (diff) | |
download | qmk_firmware-7c8f4a716f01f6598234fd60cd53345da4903fde.tar.gz qmk_firmware-7c8f4a716f01f6598234fd60cd53345da4903fde.zip |
Add first draft of the TPI NVM commands for reading, writing and erasing a target. Needs testing when physical access to a part is available.
Diffstat (limited to 'Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c')
-rw-r--r-- | Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c b/Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c index 0bdafc2ace..ea140be7b4 100644 --- a/Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c +++ b/Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c @@ -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.
*
* \param[in] WriteCommand Command to send to the device to write each memory byte
- * \param[in] WriteAddress Start address to write to within the target's address space
- * \param[in] WriteBuffer Buffer to source data from
+ * \param[in] WriteAddress Address to write to within the target's address space
+ * \param[in] Byte Byte to write to the target
*
* \return Boolean true if the command sequence complete successfully
*/
-bool XMEGANVM_WriteByteMemory(const uint8_t WriteCommand, const uint32_t WriteAddress, const uint8_t* WriteBuffer)
+bool XMEGANVM_WriteByteMemory(const uint8_t WriteCommand, const uint32_t WriteAddress, const uint8_t Byte)
{
/* Wait until the NVM controller is no longer busy */
if (!(XMEGANVM_WaitWhileNVMControllerBusy()))
@@ -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 */
XPROGTarget_SendByte(PDI_CMD_STS | (PDI_DATSIZE_4BYTES << 2));
XMEGANVM_SendAddress(WriteAddress);
- XPROGTarget_SendByte(*(WriteBuffer++));
+ XPROGTarget_SendByte(Byte);
return true;
}
|