#include <ios.h>
#include <hw.h>
#include <iostypes.h>
#include <ioslibc.h>

#define STACK_SIZE 1024
const u8 _initStack[STACK_SIZE];
const u32 _initStackSize = sizeof(_initStack);
const u32 _initPriority = 10;

void 
test_setgetAHBPI2DI(void)
{
    u8 val = IOS_GetEnableAHBPI2DI();
    printf("Current setting for AHBPI2DI: %u\n", val);
    IOS_SetEnableAHBPI2DI(1);
    printf("AHBPI2DI after setting bit: %u\n",
            IOS_GetEnableAHBPI2DI());
    IOS_SetEnableAHBPI2DI(0);
    printf("AHBPI2DI after clearing bit: %u\n",
            IOS_GetEnableAHBPI2DI());
    IOS_SetEnableAHBPI2DI(val);
}

void 
test_setgetDvdReadDisable(void)
{
    u8 val = IOS_GetDvdReadDisable();
    printf("Current setting for dvd read disable flag: %u\n",
            IOS_GetDvdReadDisable());
    IOS_SetDvdReadDisable(1);
    printf("dvd read disable flag after setting disable flag: %u\n",
            IOS_GetDvdReadDisable());
    IOS_SetDvdReadDisable(0);
    printf("dvd read disable flag after clearing disable flag: %u\n",
            IOS_GetDvdReadDisable());
    IOS_SetDvdReadDisable(val);

}
void
main(u32 arg)
{ 
    test_setgetDvdReadDisable();
    test_setgetAHBPI2DI();
}
