#include "../../internal-include/periphery_internal.hpp"
#include <PSX/System/syscalls.hpp>

namespace JabyEngine {
    namespace boot {
        namespace Periphery {
            void setup() {
                Periphery_IO::JOY_MODE.write(Periphery_IO_Values::JOY_MODE::create());
                Periphery_IO::JOY_BAUD.write(Periphery_IO_Values::JOY_BAUD::create());

                SysCall::EnterCriticalSection();
                    Interrupt::disable_irq(Interrupt::Periphery);
                SysCall::ExitCriticalSection();
            }
        }
    }
}