Previous

Next

Bottom

Contents

Glossary

Index

 

CF1 User's Manual

Block Storage Device Functions

May 1999

Revision 1.00

 Persistor Instruments Inc.
© 1998 All rights reserved.

 NOT FINALIZED!

The functions in this section exist to support new features of PicoDOS 2.0 and should be considered experimental. Even with the woefully inadequate documentation that currently exists, these may be useful to more complex applications. Be warned that unlike the finalized BIOS and PicoDOS functions, these functions are subject to much change, and you should not use them if you are not prepared to recode your projects as the functions mature.

Quick Reference Table

BSDCapacity

BSDGetPartition

BSDGetSSD

BSDHiddenSectors

BSDMediaCheck

BSDReadSectors

BSDRegisterDevice

BSDReset

BSDValidate

BSDWriteSectors

 

#define BSD_MAX_DEVS    8

enum
    {
      bsdErrorStart = BSD_ERRORS
    , bsdSectorRangeError       // read/write requested sector out of range
    , bsdIdOfRange              // invalid ID requested
    , bsdNotRegistered          // no BSD registered to this ID
    };


BSDValidate -- Validate the requested BSD ID

Description

Prototype:

short BSDValidate(ushort bsdid);

Definition:

#include <cf1pico.h>

Inputs:

bsdid XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

BSDReset -- Reset BSD tables and clear all registered devices

Description

Prototype:

void BSDReset(void);

Definition:

#include <cf1pico.h>

Inputs:

none

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

BSDRegisterDevice -- Register a new Block Storage Device

Prototype:

short BSDRegisterDevice(ushort ssdid, ushort prtn,ulong firstSect, ulong lastSect);

Definition:

#include <cf1pico.h>

Inputs:

ssdid XXXXX
prtn XXXXX
firstSect XXXXX
lastSect XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

BSDReadSectors -- Read logical device (LBA) sector(s)

Description

Prototype:

short BSDReadSectors(ushort bsdid, ulong sector, void *buffer, short count);

Definition:

#include <cf1pico.h>

Inputs:

bsdid XXXXX
sector XXXXX
*buffer XXXXX
count XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

BSDWriteSectors -- Write logical device (LBA) sector(s)

Description

Prototype:

short BSDWriteSectors(ushort bsdid, ulong sector, void *buffer, short count);

Definition:

#include <cf1pico.h>

Inputs:

bsdid XXXXX
sector XXXXX
buffer XXXXX
count XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

BSDCapacity -- Fetch the logical device capacity and geometry information

Description

Prototype:

tttt BSDCapacity(ushort bsdid, ulong *sectors,ushort *spt, ushort *heads, struct ATADriveID **info);

Definition:

#include <cf1pico.h>

Inputs:

bsdid XXXXX
sectors XXXXX
spt XXXXX
heads XXXXX
info XXXXX

Returns:

XXXXX

Notes:

XXXXX
see <dosdrive.h> for the ATADriveID definition

Timing:

TBD

BSDHiddenSectors -- Return the number of hidden sectors before the BSD data sectors

Description

Prototype:

ulong BSDHiddenSectors(ushort bsdid);

Definition:

#include <cf1pico.h>

Inputs:

bsdid XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

BSDMediaCheck -- Return true if hardware and media are available

Description

Prototype:

bool BSDMediaCheck(ushort bsdid);

Definition:

#include <cf1pico.h>

Inputs:

bsdid XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

BSDGetPartition -- Return the partition number associated with this BSD

Description

Prototype:

short BSDGetPartition (ushort bsdid);

Definition:

#include <cf1pico.h>

Inputs:

bsdid XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

BSDGetSSD -- Return the SSD ID associated with this BSD

Description

Prototype:

short BSDGetSSD (ushort bsdid);

Definition:

#include <cf1pico.h>

Inputs:

bsdid XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

Previous

Next

Top

Contents

Glossary

Index

Tel: 508-759-6434

Fax: 508-759-6436

Copyright (C) 1998 Persistor Instruments Inc. - All Rights Reserved