SD Card : Seek and modify a character

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

 I found an SD card component to go with PSoC 4 here : http://www.element14.com/community/docs/DOC-63798/l/project-50--sd-card-example-psoc-4-pioneer-kit-c...

   

According to the example given, there is an option to seek (set an offset) and read a character. But is there a command to seek and modify ?? uchar SDCard_fputc(uchar Data, uchar Fptr), i think appends a character. Tell me a function(s) to do something as specific as this : open a file, change the 14th character to 'A' . Thanks a lot.

0 Likes
2 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

fputc is actually what you are looking for. If you seek (==set the position pointer to a specific place) fputc will write to that place. It will not insert the character.

0 Likes
Anonymous
Not applicable

 Thanks a lot! This is exactly what I was looking for

0 Likes