Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

firmdl.c File Reference

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
#include <termios.h>
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
#include <ctype.h>
#include <assert.h>
#include "rcx_comm.h"
#include "srec.h"
#include "fastdl.h"

Go to the source code of this file.

Defines

#define DEFAULTTTY   "/dev/ttyd2"
#define BUFFERSIZE   4096
#define RETRIES   10
#define WAKEUP_TIMEOUT   4000
#define UPLOAD_TIMEOUT   50
#define IMAGE_START   0x8000
#define IMAGE_MAXLEN   0x7000
#define TRANSFER_SIZE   200

Functions

int srec_load (char *name, unsigned char *image, int maxlen, unsigned short *start)
void image_dl (FILEDESCR fd, unsigned char *image, int len, unsigned short start, int use_comp, char *filename)
int main (int argc, char **argv)
 the user main()

Variables

char * progname
int tty_usb = 0
int __comm_debug


Define Documentation

#define BUFFERSIZE   4096
 

Definition at line 110 of file firmdl.c.

Referenced by rcx_recv(), rcx_wakeup_tower(), and rx_flush().

#define DEFAULTTTY   "/dev/ttyd2"
 

Definition at line 97 of file firmdl.c.

#define IMAGE_MAXLEN   0x7000
 

Definition at line 117 of file firmdl.c.

Referenced by main(), and srec_load().

#define IMAGE_START   0x8000
 

Definition at line 116 of file firmdl.c.

Referenced by srec_load().

#define RETRIES   10
 

Definition at line 111 of file firmdl.c.

Referenced by image_dl().

#define TRANSFER_SIZE   200
 

Definition at line 118 of file firmdl.c.

#define UPLOAD_TIMEOUT   50
 

Definition at line 114 of file firmdl.c.

Referenced by image_dl().

#define WAKEUP_TIMEOUT   4000
 

Definition at line 112 of file firmdl.c.

Referenced by main().


Function Documentation

void image_dl FILEDESCR  fd,
unsigned char *  image,
int  len,
unsigned short  start,
int  use_comp,
char *  filename
 

Definition at line 221 of file firmdl.c.

References exit(), memcpy(), progname, rcx_sendrecv(), RETRIES, and UPLOAD_TIMEOUT.

Referenced by main().

int main int  argc,
char **  argv
 

the user main()

Definition at line 308 of file firmdl.c.

References __comm_debug, exit(), FILEDESCR, image_dl(), IMAGE_MAXLEN, progname, rcx_close(), rcx_init(), rcx_is_alive(), rcx_strerror(), rcx_wakeup_tower(), srec_load(), strcmp(), tty_usb, and WAKEUP_TIMEOUT.

int srec_load char *  name,
unsigned char *  image,
int  maxlen,
unsigned short *  start
 

Definition at line 132 of file firmdl.c.

References srec_t::addr, srec_t::count, srec_t::data, exit(), IMAGE_MAXLEN, IMAGE_START, memcpy(), memset(), progname, srec_decode(), srec_strerror(), and srec_t::type.


Variable Documentation

int __comm_debug
 

Definition at line 65 of file rcx_comm.c.

Referenced by main().

char* progname
 

Definition at line 102 of file firmdl.c.

Referenced by image_dl(), main(), and srec_load().

int tty_usb = 0
 

Definition at line 103 of file firmdl.c.


Generated on Fri Feb 25 08:02:47 2005 for brickos by  doxygen 1.3.9.1