Storing file and the fopen() function

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Storing file and the fopen() function

533 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by netsupra on Mon Oct 15 15:18:16 MST 2012
Hi everybody,

I'm trying to open a file using fopen but I don't know how to store the file on the microcontroller.

I'm using a LPC11C24 and the file I want to access is a bmp file.

Thank you,
Netsupra
0 Kudos
Reply
2 Replies

487 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by netsupra on Tue Oct 16 03:03:41 MST 2012
Thank you for your reply.
0 Kudos
Reply

487 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by daniel.widyanto on Mon Oct 15 21:20:49 MST 2012
Well, unfortunately, you are running an embedded system, where abstraction concepts of file and memory are not defined.

Usually, people convert the BMP file into C array (See http://www.deadnode.org/sw/bin2h/), then accessing the C-array directly, like

for (i = 0; i < mybmp_sz; i++) {
  *framebuffer = mybmp;
}
0 Kudos
Reply