Beispiel #1
0
void main(void) {

    SYSTEMConfig(SYS_FREQ, SYS_CFG_WAIT_STATES | SYS_CFG_PCACHE);

    INTEnableSystemMultiVectoredInt();

    ANSELA = 0x00000000;
    ANSELB = 0x00000000;

    initUART();
    I2CModule * i2c = initI2C();
    //testUART();
    SID * sid = createSid();
    SIDPlayer * sidPlayer = createSIDPlayer(sid);
    initSIDNet(sidPlayer,getI2CReceiveBuffer(i2c),getI2CTransmitBuffer(i2c));

    writeStringUART(HELLO_MSG,strlen(HELLO_MSG));
    while(1) {
        if(FIFOCount(getI2CReceiveBuffer(i2c)) >0) {
          //  writeFIFO(getI2CTransmitBuffer(i2c),readFIFO(getI2CReceiveBuffer(i2c)) & 0xFF);
            processSidNetCommand();
       
        }
        //play();
    }
}
Beispiel #2
0
NS_BEGIN_MH

Session::Session(shared_ptr<BSocket> sock)
:_sId(createSid())
{
}