Exemplo n.º 1
0
int SIF2_init(void)
{
    int oldi;

    if(_sif2_inited) { return(-1); }

    _DisableDmac(7);

    M_SuspendIntr(&oldi);

    // Enable DMA
    *R_EE_D_CTRL |= 1;

    *R_LOCAL_SBUS(PS2_SBUS_REG4) = 0x00000100;
    *R_LOCAL_SBUS(PS2_SBUS_REG6) = 0x000000FF;

    *R_EE_D7_CHCR = 0;

    M_ResumeIntr(oldi);

//    EnableDmac(7);

    _sif2_inited = 1;

    return(0);
}
Exemplo n.º 2
0
// API call
void SBUS_set_reg(int reg_no, u32 val) { _set_reg((u32 *) R_LOCAL_SBUS(reg_no), val); }
Exemplo n.º 3
0
// API call
u32 SBUS_get_reg(int reg_no) { return(_get_reg((u32 *) R_LOCAL_SBUS(reg_no))); }