コード例 #1
0
ファイル: Example_2802xEPwmUpAQ.c プロジェクト: smarley2/PSE
__interrupt void epwm3_isr(void)
{
    // Update the CMPA and CMPB values
    update_compare(&epwm3_info);

    // Clear INT flag for this timer
    PWM_clearIntFlag(myPwm3);

    // Acknowledge this interrupt to receive more interrupts from group 3
    PIE_clearInt(myPie, PIE_GroupNumber_3);
}
コード例 #2
0
//
// epwm8_isr - EPWM8 ISR
//
__interrupt void epwm8_isr(void)
{

    // Update the CMPA and CMPB values
    update_compare(&epwm8_info);

    // Clear INT flag for this timer
    EPwm8Regs.ETCLR.bit.INT = 1;

    // Acknowledge this interrupt to receive more interrupts from group 3
    PieCtrlRegs.PIEACK.all = PIEACK_GROUP3;
}
コード例 #3
0
ファイル: update_plugin.c プロジェクト: krzyzanowskim/GNUGadu
/* compares. show == FALSE will disable any gui/xosd notices
 * returns -1 on error, 0 if no updates found, 1 if update found
 */
gpointer update_check_real(gboolean show)
{
    gchar *reply = update_get_current_version(show);
    gchar *version;
    gint i;

    if (reply == NULL)
        return NULL;

    version = g_strdup(VERSION);
    /* hack for _CVS */
    for (i = 0; i < strlen(version); i++)
        if (version[i] == '_')
            version[i] = 'z';

    /* compare, notice if something new was found */
    if (update_compare(reply, version) > 0)
    {
        if (update_use_xosd())
            signal_emit_from_thread(GGadu_PLUGIN_NAME, "xosd show message", g_strdup_printf(_("Update available: %s"), reply), "xosd");
        else
            signal_emit_from_thread(GGadu_PLUGIN_NAME, "gui show message", g_strdup_printf(_("Update available: %s"), reply), "main-gui");
    }
    else if (show)
    {
        if (update_use_xosd())
            signal_emit_from_thread(GGadu_PLUGIN_NAME, "xosd show message", g_strdup(_("No updates available")), "xosd");
        else
            signal_emit_from_thread(GGadu_PLUGIN_NAME, "gui show message", g_strdup(_("No updates available")), "main-gui");
    }

    g_free(reply);
    g_free(version);

    g_thread_exit(NULL);
    return NULL;
}