/*
 * grifo_pc_if.cpp
 *
 */

#include "grifo_fw_blob.h"
#include "grifo_pc_if.h"

namespace grifo_fw
{

class pc_blob_t: public grifo_fw_blob_typed_t<pc_raw_if_t, 0x80434F4D/*="PCOM"*/>
{
};

pc_blob_t* pc_default_blob__;

}

grifo_fw::pc_raw_if_t* grifo_fw::pc_blob_payload(const grifo_fw::pc_blob_t* b)
{
    if (b==0)
        b=pc_default_blob__;

    return &const_cast<grifo_fw::pc_blob_t*>(b)->payload;
}

void grifo_fw::pc_initialize_raw_default_blob(void* raw_memory)
{
    grifo_fw::pc_blob_t* b=reinterpret_cast<grifo_fw::pc_blob_t*>(raw_memory);
    b->initialize();

    b->payload.settings.mof=pc_raw_if_t::mof_ss;

    b->header.work_size=(sizeof b->payload.settings)/4;
    pc_default_blob__=b;
}

grifo_fw::pc_blob_t* grifo_fw::pc_get_default_blob()
{
    return pc_default_blob__;
}

grifo_fw::pc_raw_if_t* grifo_fw::pc_get_default_if()
{
    return pc_blob_payload(0);
}





