/*---------------------------------------------------------------------------*
  Project:  NitroSDK - WM - demos - dataShare-Model
  File:     key.h

  Copyright 2003,2004 Nintendo.  All rights reserved.

  These coded instructions, statements, and computer programs contain
  proprietary information of Nintendo of America Inc. and/or Nintendo
  Company Ltd., and are protected by Federal copyright law.  They may
  not be disclosed to third parties or copied or duplicated in any form,
  in whole or in part, without the prior written consent of Nintendo.

  $Log: key.h,v $
  Revision 1.1  2004/11/01 04:11:44  sasakis
  Additions of code to prevent processing errors, etc (interim version that includes mid-operation code)

  $NoKeywords$
 *---------------------------------------------------------------------------*/

#ifndef __KEY_H__
#define __KEY_H__

#define KEY_REPEAT_START 25 // The number of frames unitl key repeat starts
#define KEY_REPEAT_SPAN  10 // The number of interval frames of the key repeat

typedef struct KeyInfo {
    u16 cnt;    // Unprocessed input value
    u16 trg;    // Trigger press input
    u16 up;     // Trigger release input
    u16 rep;    // Trigger continuous press input
} KeyInfo;

extern void updateKeys(void);
extern KeyInfo *getKeyInfo(void);

#endif
