Skip to content

Commit

Permalink
All library files copied to local folder. Now it compiles as a standa…
Browse files Browse the repository at this point in the history
…lone project
  • Loading branch information
soldernerd committed Mar 15, 2017
1 parent 1f5ab41 commit 44c4646
Show file tree
Hide file tree
Showing 11 changed files with 7,623 additions and 154 deletions.
1,458 changes: 1,458 additions & 0 deletions fileio.h

Large diffs are not rendered by default.

52 changes: 52 additions & 0 deletions fileio_media.h
@@ -0,0 +1,52 @@
// DOM-IGNORE-BEGIN
/*******************************************************************************
Copyright 2015 Microchip Technology Inc. (www.microchip.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
To request to license the code under the MLA license (www.microchip.com/mla_license),
please contact mla_licensing@microchip.com
*******************************************************************************/
//DOM-IGNORE-END

#ifndef _FILEIO_MEDIA_H
#define _FILEIO_MEDIA_H

// Enumeration to define media error types
typedef enum
{
MEDIA_NO_ERROR, // No errors
MEDIA_DEVICE_NOT_PRESENT, // The requested device is not present
MEDIA_CANNOT_INITIALIZE // Cannot initialize media
} FILEIO_MEDIA_ERRORS;

// Media information flags. The driver's MediaInitialize function will return a pointer to one of these structures.
typedef struct
{
FILEIO_MEDIA_ERRORS errorCode; // The status of the initialization FILEIO_MEDIA_ERRORS
// Flags
union
{
uint8_t value;
struct
{
uint8_t sectorSize : 1; // The sector size parameter is valid.
uint8_t maxLUN : 1; // The max LUN parameter is valid.
} bits;
} validityFlags;

uint16_t sectorSize; // The sector size of the target device.
uint8_t maxLUN; // The maximum Logical Unit Number of the device.
} FILEIO_MEDIA_INFORMATION;

#endif

0 comments on commit 44c4646

Please sign in to comment.