#include "HardwareInfo.c"
#include "JMLib.c"
#include <SetWaitForTime.h>
#include <GetRightButton.h>
#include <SetMusicPlayer.h>
#include <SetDisplayVarBW.h>
#include <GetLeftButton.h>

int main(void)
{
    MRCU_Init();
    int b1 = 0;
    int b2 = 0;
    unsigned char cmd = 1;
    unsigned char var0 = 1;
    int var1 = 0;
    SetWaitForTime(0.3);
    while (1)
    {
        var1 = GetRightButton();
        if ( b1 )
        {
            SetMusicPlayer(_P1_, 85);
            SetWaitForTime(0.05);
            SetMusicPlayer(_P1_, cmd);
            var0=cmd-10;
            SetDisplayVarBW(1, var0);
        }
        b2 = GetLeftButton();
        if ( b2==1 )
        {
            if ( cmd<4&&cmd>=1 )
            {
                cmd+=1;
            }
            else
            {
                cmd=1;
            }
        }
        SetDisplayVarBW(2, cmd);
        SetWaitForTime(0.2);
    }
    while(1);
}

