SOEM
v1.4.0
|
EEprom tool for Simple Open EtherCAT master. More...
Macros | |
#define | MAXBUF 524288 |
#define | STDBUF 2048 |
#define | MINBUF 128 |
#define | CRCBUF 14 |
#define | MODE_NONE 0 |
#define | MODE_READBIN 1 |
#define | MODE_READINTEL 2 |
#define | MODE_WRITEBIN 3 |
#define | MODE_WRITEINTEL 4 |
#define | MODE_WRITEALIAS 5 |
#define | MODE_INFO 6 |
#define | MAXSLENGTH 256 |
#define | IHEXLENGTH 0x20 |
Functions | |
void | calc_crc (uint8 *crc, uint8 b) |
uint16 | SIIcrc (uint8 *buf) |
int | input_bin (char *fname, int *length) |
int | input_intelhex (char *fname, int *start, int *length) |
int | output_bin (char *fname, int length) |
int | output_intelhex (char *fname, int length) |
int | eeprom_read (int slave, int start, int length) |
int | eeprom_write (int slave, int start, int length) |
int | eeprom_writealias (int slave, int alias, uint16 crc) |
void | eepromtool (char *ifname, int slave, int mode, char *fname) |
int | main (int argc, char *argv[]) |
Variables | |
uint8 | ebuf [MAXBUF] |
uint8 | ob |
uint16 | ow |
int | os |
int | slave |
int | alias |
ec_timet | tstart |
ec_timet | tend |
ec_timet | tdif |
int | wkc |
int | mode |
char | sline [MAXSLENGTH] |
EEprom tool for Simple Open EtherCAT master.
Usage : eepromtool ifname slave OPTION fname|alias ifname is NIC interface, f.e. eth0 slave = slave number in EtherCAT order 1..n -r read EEPROM, output binary format -ri read EEPROM, output Intel Hex format -w write EEPROM, input binary format -wi write EEPROM, input Intel Hex format -i display EEPROM information -walias write slave alias in EEPROM
(c)Arthur Ketels 2010-2012
#define CRCBUF 14 |
#define IHEXLENGTH 0x20 |
#define MAXBUF 524288 |
#define MAXSLENGTH 256 |
#define MINBUF 128 |
#define MODE_INFO 6 |
#define MODE_NONE 0 |
#define MODE_READBIN 1 |
#define MODE_READINTEL 2 |
#define MODE_WRITEALIAS 5 |
#define MODE_WRITEBIN 3 |
#define MODE_WRITEINTEL 4 |
#define STDBUF 2048 |
void calc_crc | ( | uint8 * | crc, |
uint8 | b | ||
) |
int eeprom_read | ( | int | slave, |
int | start, | ||
int | length | ||
) |
int eeprom_write | ( | int | slave, |
int | start, | ||
int | length | ||
) |
int eeprom_writealias | ( | int | slave, |
int | alias, | ||
uint16 | crc | ||
) |
void eepromtool | ( | char * | ifname, |
int | slave, | ||
int | mode, | ||
char * | fname | ||
) |
int input_bin | ( | char * | fname, |
int * | length | ||
) |
int input_intelhex | ( | char * | fname, |
int * | start, | ||
int * | length | ||
) |
int main | ( | int | argc, |
char * | argv[] | ||
) |
int output_bin | ( | char * | fname, |
int | length | ||
) |
int output_intelhex | ( | char * | fname, |
int | length | ||
) |
uint16 SIIcrc | ( | uint8 * | buf | ) |
int alias |
uint8 ebuf[MAXBUF] |
int mode |
uint8 ob |
int os |
uint16 ow |
int slave |
char sline[MAXSLENGTH] |
ec_timet tdif |
ec_timet tend |
ec_timet tstart |
int wkc |