Macros | Functions | Variables
win32/eepromtool/eepromtool.c File Reference

EEprom tool for Simple Open EtherCAT master. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "ethercat.h"
Include dependency graph for win32/eepromtool/eepromtool.c:

Go to the source code of this file.

Macros

#define IHEXLENGTH   0x20
 
#define MAXBUF   32768
 
#define MAXSLENGTH   256
 
#define MINBUF   128
 
#define MODE_NONE   0
 
#define MODE_READBIN   1
 
#define MODE_READINTEL   2
 
#define MODE_WRITEBIN   3
 
#define MODE_WRITEINTEL   4
 
#define STDBUF   2048
 

Functions

int eeprom_read (int slave, int start, int length)
 
int eeprom_write (int slave, int start, int length)
 
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)
 

Variables

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
 

Detailed Description

EEprom tool for Simple Open EtherCAT master.

Usage : eepromtool ifname slave OPTION fname 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

(c)Arthur Ketels 2010

Definition in file win32/eepromtool/eepromtool.c.

Macro Definition Documentation

#define IHEXLENGTH   0x20

Definition at line 43 of file win32/eepromtool/eepromtool.c.

#define MAXBUF   32768

Definition at line 21 of file win32/eepromtool/eepromtool.c.

#define MAXSLENGTH   256

Definition at line 31 of file win32/eepromtool/eepromtool.c.

#define MINBUF   128

Definition at line 23 of file win32/eepromtool/eepromtool.c.

#define MODE_NONE   0

Definition at line 25 of file win32/eepromtool/eepromtool.c.

#define MODE_READBIN   1

Definition at line 26 of file win32/eepromtool/eepromtool.c.

#define MODE_READINTEL   2

Definition at line 27 of file win32/eepromtool/eepromtool.c.

#define MODE_WRITEBIN   3

Definition at line 28 of file win32/eepromtool/eepromtool.c.

#define MODE_WRITEINTEL   4

Definition at line 29 of file win32/eepromtool/eepromtool.c.

#define STDBUF   2048

Definition at line 22 of file win32/eepromtool/eepromtool.c.

Function Documentation

int eeprom_read ( int  slave,
int  start,
int  length 
)

Definition at line 170 of file win32/eepromtool/eepromtool.c.

int eeprom_write ( int  slave,
int  start,
int  length 
)

Definition at line 224 of file win32/eepromtool/eepromtool.c.

void eepromtool ( char *  ifname,
int  slave,
int  mode,
char *  fname 
)

Definition at line 258 of file win32/eepromtool/eepromtool.c.

int input_bin ( char *  fname,
int *  length 
)

Definition at line 45 of file win32/eepromtool/eepromtool.c.

int input_intelhex ( char *  fname,
int *  start,
int *  length 
)

Definition at line 62 of file win32/eepromtool/eepromtool.c.

int main ( int  argc,
char *  argv[] 
)

Definition at line 349 of file win32/eepromtool/eepromtool.c.

int output_bin ( char *  fname,
int  length 
)

Definition at line 125 of file win32/eepromtool/eepromtool.c.

int output_intelhex ( char *  fname,
int  length 
)

Definition at line 141 of file win32/eepromtool/eepromtool.c.

Variable Documentation

uint8 ebuf[MAXBUF]

Definition at line 33 of file win32/eepromtool/eepromtool.c.

int mode

Definition at line 40 of file win32/eepromtool/eepromtool.c.

uint8 ob

Definition at line 34 of file win32/eepromtool/eepromtool.c.

int os

Definition at line 36 of file win32/eepromtool/eepromtool.c.

uint16 ow

Definition at line 35 of file win32/eepromtool/eepromtool.c.

int slave

Definition at line 37 of file win32/eepromtool/eepromtool.c.

char sline[MAXSLENGTH]

Definition at line 41 of file win32/eepromtool/eepromtool.c.

ec_timet tdif

Definition at line 38 of file win32/eepromtool/eepromtool.c.

ec_timet tend

Definition at line 38 of file win32/eepromtool/eepromtool.c.

ec_timet tstart

Definition at line 38 of file win32/eepromtool/eepromtool.c.

int wkc

Definition at line 39 of file win32/eepromtool/eepromtool.c.



soem
Author(s): Arthur Ketels and M.J.G. van den Molengraft
autogenerated on Sat Jun 27 2020 03:48:21