Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

upload.c File Reference

Shared library / DLL for accessing the driver. More...

#include "debug.h"
#include <stdlib.h>
#include "opencbm.h"
#include "archlib.h"

Go to the source code of this file.

Defines

#define DBG_USERMODE
#define DBG_PROGNAME   "OPENCBM.DLL"
#define DLL
 mark: We are building the DLL */

Functions

int CBMAPIDECL cbm_upload (CBM_FILE HandleDevice, __u_char DeviceAddress, int DriveMemAddress, const void *Program, size_t Size)
 Upload a program into a floppy's drive memory.


Detailed Description

Shared library / DLL for accessing the driver.

**************************************************************

Author:
Michael Klein, Spiro Trikaliotis
Version:
Id
upload.c,v 1.3 2006/02/24 12:01:11 trikalio Exp


Definition in file upload.c.


Define Documentation

#define DBG_PROGNAME   "OPENCBM.DLL"
 

The name of the executable

Definition at line 25 of file upload.c.

#define DBG_USERMODE
 

Mark: We are in user-space (for debug.h)

Definition at line 22 of file upload.c.


Function Documentation

int CBMAPIDECL cbm_upload CBM_FILE  HandleDevice,
__u_char  DeviceAddress,
int  DriveMemAddress,
const void *  Program,
size_t  Size
 

Upload a program into a floppy's drive memory.

This function writes a program into the drive's memory via use of "M-W" commands.

Parameters:
HandleDevice A CBM_FILE which contains the file handle of the driver.
DeviceAddress The address of the device on the IEC serial bus. This is known as primary address, too.
DriveMemAddress The address in the drive's memory where the program is to be stored.
Program Pointer to a byte buffer which holds the program in the caller's address space.
Size The size of the program to be stored, in bytes.
Returns:
Returns the number of bytes written into program memory. If it does not equal Size, than an error occurred.
If cbm_driver_open() did not succeed, it is illegal to call this function.

Definition at line 73 of file upload.c.

References cbmarch_listen(), cbmarch_raw_write(), cbmarch_unlisten(), DBG_ASSERT, FUNC_ENTER, and FUNC_LEAVE_INT.

Referenced by vdd_upload().


Generated on Sun Apr 30 18:46:16 2006 for opencbm by  doxygen 1.4.2