Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Erik Strand
lufa
Commits
ec6fbb21
Commit
ec6fbb21
authored
Feb 02, 2010
by
Dean Camera
Browse files
Make TPI writes add a dummy high byte if the data isn't word-aligned.
parent
b736a5ef
Changes
1
Show whitespace changes
Inline
Side-by-side
Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c
View file @
ec6fbb21
...
...
@@ -155,9 +155,9 @@ bool TINYNVM_WriteMemory(const uint16_t WriteAddress, const uint8_t* WriteBuffer
if
(
!
(
TINYNVM_WaitWhileNVMControllerBusy
()))
return
false
;
/* Must have an integer number of words to write - if extra byte
s
,
abort programming
*/
/* Must have an integer number of words to write - if extra byte,
word-align via a dummy high byte
*/
if
(
WriteLength
&
0x01
)
return
false
;
WriteBuffer
[
WriteLength
++
]
=
0xFF
;
/* Set the NVM control register to the WORD WRITE command for memory reading */
TINYNVM_SendWriteNVMRegister
(
XPROG_Param_NVMCMDRegAddr
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment