Example #1
0
void beeperInit(const beeperDevConfig_t *config)
{
#ifdef BEEPER
    beeperFrequency = config->frequency;
    if (beeperFrequency == 0) {
        beeperIO = IOGetByTag(config->ioTag);
        beeperInverted = config->isInverted;
        if (beeperIO) {
            IOInit(beeperIO, OWNER_BEEPER, 0);
            IOConfigGPIO(beeperIO, config->isOpenDrain ? IOCFG_OUT_OD : IOCFG_OUT_PP);
        }
        systemBeep(false);
    } else {
        beeperIO = IOGetByTag(config->ioTag);
        beeperPwmInit(beeperIO, beeperFrequency);
    }
#else
    UNUSED(config);
#endif
}
Example #2
0
void beeperInit(const beeperDevConfig_t *config)
{
#if !defined(BEEPER)
    UNUSED(config);
#else
    beeperIO = IOGetByTag(config->ioTag);
    beeperInverted = config->isInverted;

    if (beeperIO) {
        IOInit(beeperIO, OWNER_BEEPER, RESOURCE_OUTPUT, 0);
#if defined(BEEPER_PWM)
        configBeeperPWMTimer(config);
        IOConfigGPIO(beeperIO, config->isOD ? IOCFG_AF_OD : IOCFG_AF_PP);
#else
        IOConfigGPIO(beeperIO, config->isOD ? IOCFG_OUT_OD : IOCFG_OUT_PP);
#endif
    }

    systemBeep(false);
#endif
}
bool ScriptDebugServer::evaluateBreakpointAction(const ScriptBreakpointAction& breakpointAction) const
{
    DebuggerCallFrame* debuggerCallFrame = currentDebuggerCallFrame();
    switch (breakpointAction.type) {
    case ScriptBreakpointActionTypeLog: {
        DOMWindow& window = asJSDOMWindow(debuggerCallFrame->dynamicGlobalObject())->impl();
        if (PageConsole* console = window.pageConsole())
            console->addMessage(JSMessageSource, LogMessageLevel, breakpointAction.data);
        break;
    }
    case ScriptBreakpointActionTypeEvaluate: {
        JSValue exception;
        debuggerCallFrame->evaluate(breakpointAction.data, exception);
        if (exception)
            reportException(debuggerCallFrame->exec(), exception);
        break;
    }
    case ScriptBreakpointActionTypeSound:
        systemBeep();
        break;
    }

    return true;
}
void InspectorFrontendHost::beep()
{
    systemBeep();
}
Example #5
0
void systemBeepToggle(void)
{
#if defined(BEEPER)
    systemBeep(!beeperState);
#endif
}