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

Example code for Simple Open EtherCAT master. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#include <unistd.h>
#include "ethercat.h"
Include dependency graph for win32/firm_update/firm_update.c:

Go to the source code of this file.

Macros

#define FWBUFSIZE   (8 * 1024 * 1024)
 

Functions

void boottest (char *ifname, uint16 slave, char *filename)
 
int input_bin (char *fname, int *length)
 
int main (int argc, char *argv[])
 

Variables

uint16 argslave
 
uint32 data
 
char filebuffer [FWBUFSIZE]
 
char filename [256]
 
int filesize
 
int j
 
uint8 ob
 
uint16 ow
 

Detailed Description

Example code for Simple Open EtherCAT master.

Usage: firm_update ifname1 slave fname ifname is NIC interface, f.e. eth0 slave = slave number in EtherCAT order 1..n fname = binary file to store in slave CAUTION! Using the wrong file can result in a bricked slave!

This is a slave firmware update test.

(c)Arthur Ketels 2011

Definition in file win32/firm_update/firm_update.c.

Macro Definition Documentation

◆ FWBUFSIZE

#define FWBUFSIZE   (8 * 1024 * 1024)

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

Function Documentation

◆ boottest()

void boottest ( char *  ifname,
uint16  slave,
char *  filename 
)

Definition at line 51 of file win32/firm_update/firm_update.c.

◆ input_bin()

int input_bin ( char *  fname,
int *  length 
)

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

◆ main()

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

Definition at line 139 of file win32/firm_update/firm_update.c.

Variable Documentation

◆ argslave

uint16 argslave

Definition at line 32 of file win32/firm_update/firm_update.c.

◆ data

uint32 data

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

◆ filebuffer

char filebuffer[FWBUFSIZE]

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

◆ filename

char filename[256]

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

◆ filesize

int filesize

Definition at line 30 of file win32/firm_update/firm_update.c.

◆ j

int j

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

◆ ob

uint8 ob

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

◆ ow

uint16 ow

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



soem
Author(s): Arthur Ketels and M.J.G. van den Molengraft
autogenerated on Wed Mar 2 2022 01:01:49