Merge pull request #438 from s4Ys369/revert-434-patch-1
[sm64pc.git] / include / PR / os_eeprom.h
blobb3bca81444550381388e2a363adec9f54c4f1e6d
2 /*====================================================================
3 * os_eeprom.h
5 * Copyright 1995, Silicon Graphics, Inc.
6 * All Rights Reserved.
8 * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics,
9 * Inc.; the contents of this file may not be disclosed to third
10 * parties, copied or duplicated in any form, in whole or in part,
11 * without the prior written permission of Silicon Graphics, Inc.
13 * RESTRICTED RIGHTS LEGEND:
14 * Use, duplication or disclosure by the Government is subject to
15 * restrictions as set forth in subdivision (c)(1)(ii) of the Rights
16 * in Technical Data and Computer Software clause at DFARS
17 * 252.227-7013, and/or in similar or successor clauses in the FAR,
18 * DOD or NASA FAR Supplement. Unpublished - rights reserved under the
19 * Copyright Laws of the United States.
20 *====================================================================*/
22 /*---------------------------------------------------------------------*
23 Copyright (C) 1998 Nintendo. (Originated by SGI)
25 $RCSfile: os_eeprom.h,v $
26 $Revision: 1.1 $
27 $Date: 1998/10/09 08:01:06 $
28 *---------------------------------------------------------------------*/
30 #ifndef _OS_EEPROM_H_
31 #define _OS_EEPROM_H_
33 #ifdef _LANGUAGE_C_PLUS_PLUS
34 extern "C" {
35 #endif
37 #include <PR/ultratypes.h>
38 #include "os_message.h"
41 #if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
43 /**************************************************************************
45 * Type definitions
50 #endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
52 /**************************************************************************
54 * Global definitions
58 /* EEPROM TYPE */
60 #define EEPROM_TYPE_4K 0x01
61 #define EEPROM_TYPE_16K 0x02
63 /* definition for EEPROM */
65 #define EEPROM_MAXBLOCKS 64
66 #define EEP16K_MAXBLOCKS 256
67 #define EEPROM_BLOCK_SIZE 8
70 #if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
72 /**************************************************************************
74 * Macro definitions
79 /**************************************************************************
81 * Extern variables
86 /**************************************************************************
88 * Function prototypes
92 /* EEPROM interface */
94 extern s32 osEepromProbe(OSMesgQueue *);
95 extern s32 osEepromRead(OSMesgQueue *, u8, u8 *);
96 extern s32 osEepromWrite(OSMesgQueue *, u8, u8 *);
97 extern s32 osEepromLongRead(OSMesgQueue *, u8, u8 *, int);
98 extern s32 osEepromLongWrite(OSMesgQueue *, u8, u8 *, int);
101 #endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
103 #ifdef _LANGUAGE_C_PLUS_PLUS
105 #endif
107 #endif /* !_OS_EEPROM_H_ */