1 /*---------------------------------------------------------------------------*
2   Project:  TwlSDK - WXC - demos - relayStation-1
3   File:     common.c
4 
5   Copyright 2005-2009 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:: 2007-11-15#$
14   $Rev: 2414 $
15   $Author: hatamoto_minoru $
16  *---------------------------------------------------------------------------*/
17 
18 
19 #include <nitro.h>
20 
21 
22 #include "common.h"
23 
24 /* Functions */
25 
26 /* Key trigger detection */
ReadKeySetTrigger(u16 keyset)27 u16 ReadKeySetTrigger(u16 keyset)
28 {
29     static u16 cont = 0xffff;          /* Measures to handle A Button presses inside IPL */
30     u16 trigger = (u16)(keyset & (keyset ^ cont));
31     cont = keyset;
32     return trigger;
33 }
34