int disp_send_status()
{
    int rc = 0;
    int i;

#if DEBUG_DISP
    LOG_DISP("disp_send_status():");
#endif
    for(i=0; i<MAX_DISP_DEVICE; i++)
    {
        rc = send_msg_with_code(disp_connected_get(i) ? InterfaceConnected: InterfaceDisconnected, 
                    disp_connected_get(i) ? DISPD_EVT_DISP_CONNECTED : DISPD_EVT_DISP_DISCONNECTED, i);
        if (rc < 0)
            return rc;

        rc = send_msg_with_code(disp_enabled_get(i) ? InterfaceEnabled: InterfaceDisabled, 
                    disp_enabled_get(i) ? DISPD_EVT_DISP_ENABLED : DISPD_EVT_DISP_DISABLED, i);
        if (rc < 0)
            return rc;
    }
    return rc;
}
Beispiel #2
0
int disp_send_status(void)
{
    int rc;

#if DEBUG_DISP
    LOG_DISP("disp_send_status():");
#endif

    rc = send_msg(disp_connected_get() ? DISPD_EVT_DISP_CONNECTED :
                                      DISPD_EVT_DISP_DISCONNECTED);
    if (rc < 0)
        return rc;

    rc = send_msg(disp_enabled_get() ? DISPD_EVT_DISP_ENABLED :
                                      DISPD_EVT_DISP_DISABLED);
    return rc;
}