/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to pci.c

  • Committer: Suren A. Chilingaryan
  • Date: 2011-12-08 02:47:23 UTC
  • Revision ID: csa@dside.dyndns.org-20111208024723-ym9uf3uoll6ym2a9
new event architecture, first trial

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
}
46
46
 
47
47
pcilib_t *pcilib_open(const char *device, pcilib_model_t model) {
48
 
    pcilib_event_api_description_t *api;
49
48
    pcilib_t *ctx = malloc(sizeof(pcilib_t));
50
49
 
51
50
    if (ctx) {
65
64
        
66
65
        memcpy(&ctx->model_info, pcilib_model + model, sizeof(pcilib_model_description_t));
67
66
 
68
 
        api = pcilib_model[model].event_api;
69
 
        if ((api)&&(api->init)) ctx->event_ctx = api->init(ctx);
 
67
        pcilib_init_event_engine(ctx);
70
68
    }
71
69
 
72
70
    return ctx;