﻿/*---------------------------------------------------------------------------*
  Project:  
  File:     sys_PowerButton.h
 *---------------------------------------------------------------------------*/

#ifndef _SYS_POWER_BUTTON_H_
#define _SYS_POWER_BUTTON_H_

#include <nn/applet.h>

namespace uji {
namespace sys {


/*------------------------------------------------------------------------*
        電源ボタンに関連する処理
 *------------------------------------------------------------------------*/
class PowerButton
{
public:    
    PowerButton(){}
    virtual ~PowerButton(){}
    
    void StartMonitoring();
    void StopMonitoring();
    
private:    
    void MonitoringProcess();
    static void ThreadFunc(void* param);
    
    static nn::os::Thread PowerButtonThread;
    static nn::os::LightEvent m_ThreadBreak;
        
    static const size_t STACK_SIZE = 4096;
    static const int DEFAULT_PRIORITY = 5;
};


}   // namespace
}

#endif // _SYS_POWER_BUTTON_H_
