1 /*---------------------------------------------------------------------------*
2 Project: TwlSDK - MI - include
3 File: byteAccess.h
4
5 Copyright 2003-2008 Nintendo. All rights reserved.
6
7 These coded instructions, statements, and computer programs contain
8 proprietary information of Nintendo of America Inc. and/or Nintendo
9 Company Ltd., and are protected by Federal copyright law. They may
10 not be disclosed to third parties or copied or duplicated in any form,
11 in whole or in part, without the prior written consent of Nintendo.
12
13 $Date:: 2008-09-17#$
14 $Rev: 8556 $
15 $Author: okubata_ryoma $
16 *---------------------------------------------------------------------------*/
17
18 #ifndef NITRO_MI_BYTEACCESS_H_
19 #define NITRO_MI_BYTEACCESS_H_
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 #ifdef SDK_NITRO
26 #include <nitro/types.h>
27 #else
28 #include <twl/types.h>
29 #endif
30
31 /*---------------------------------------------------------------------------*
32 Name: MI_ReadByte
33
34 Description: read bytedata
35
36 Arguments: address : address to read bytedata
37
38 Returns: byte data
39 *---------------------------------------------------------------------------*/
MI_ReadByte(const void * address)40 static inline u8 MI_ReadByte(const void *address)
41 {
42 return *(u8 *)address;
43 }
44
45
46 /*---------------------------------------------------------------------------*
47 Name: MI_WriteByte
48
49 Description: write bytedata
50
51 Arguments: address : address to write bytedata
52
53 Returns: None.
54 *---------------------------------------------------------------------------*/
MI_WriteByte(void * address,u8 value)55 static inline void MI_WriteByte(void *address, u8 value)
56 {
57 *(u8 *)address = value;
58 }
59
60 #ifdef __cplusplus
61 } /* extern "C" */
62 #endif
63
64 /* NITRO_MI_BYTEACCESS_H_ */
65 #endif
66