lnls-dig / halcs

Hardware Abstraction Layer for Control Systems
GNU General Public License v3.0
1 stars 4 forks source link

[CLOSED] [smio:all] Separate export functions definitions structure (disp_op_t) #48

Closed lerwys closed 8 years ago

lerwys commented 8 years ago

Issue by lerwys Wednesday Nov 26, 2014 at 10:37 GMT Originally opened as https://github.com/lnls-dig/bpm-sw/issues/48


Problem: In some cases, libclient code needs access to the export functions definitions structure, such as the following:

 disp_op_t fmc130m_4ch_leds_exp = {
    .name = FMC130M_4CH_NAME_LEDS,
    .opcode = FMC130M_4CH_OPCODE_LEDS,
    .func_fp = _fmc130m_4ch_leds,
    .retval = DISP_ARG_END,
    .retval_owner = DISP_OWNER_OTHER,
    .args = {
        DISP_ARG_ENCODE(DISP_ATYPE_UINT32, uint32_t),
        DISP_ARG_END
    }
};

Solution: Make separate files for the disp_op_t structures of each SMIO. In this way we can easily access the structures from outside code.