[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

file i/o



I'm currently working writing driver-level code on the Axis ETRAX 100LX MCM 2+8.  Specifically, I'm working in the ethernet and parallel port driver files (ethernet.c and e100lpslavenet.c).  We are using the chip for high-speed handling of ethernet packets, so a lot of "high-level" functionality has been stripped out.  That being said, I need a way to write a small amount of data (no more than 64 bytes) to memory (or to file), so it can be retrieved on power-up.
 
I'm also very new at all this (and the Linux environment), so please bear with me if my questions seem somewhat uninformed.
 
I tried including <asm/unistd.h> for file i/o, but it doesn't appear the functions are available to me (maybe I'm just not including the right files)
I get the following [compiler error]: undefined reference to 'open'
 
If it is practical, and if file i/o is possible at the driver-level, what might I be doing wrong?
 
Alternatively, I was wondering if I could just write to/read from the built-in flash?  (As I mentioned, it's only 64 bytes of data.)  If so, are there functions that I may use to do this and where are they?
 
 
Thanks for your help.
Jon