AzureSphere/AzureSphereSampleDevice/main.c
static void ButtonPollTimerEventHandler(EventLoopTimer *timer)
{
    if (ConsumeEventLoopTimerEvent(timer) != 0) {
        exitCode = ExitCode_ButtonTimer_Consume;
        return;
    }

    if (IsButtonPressed(sendMessageButtonGpioFd, &sendMessageButtonState)) {
        SendTelemetry("{\"ButtonPress\" : true}");
    }
}
/// <summary>
///     Button timer event:  Check the status of the button
/// </summary>

Button timer event:  Check the status of the button

Button timer event : Check the status of the button
static void ButtonPollTimerEventHandler(EventLoopTimer *timer)
{
    if (ConsumeEventLoopTimerEvent(timer) != 0) {
        exitCode = ExitCode_ButtonTimer_Consume;
        return;
    }
    if (IsButtonPressed(sendMessageButtonGpioFd, &sendMessageButtonState)) {
        SendTelemetry("{\"ButtonPress\" : true}");
    }
}
static void ButtonPollTimerEventHandler ( EventLoopTimer * timer ) { if ( ConsumeEventLoopTimerEvent ( timer ) != 0 ) { exitCode = ExitCode_ButtonTimer_Consume ; return ; } if ( IsButtonPressed ( sendMessageButtonGpioFd , & sendMessageButtonState ) ) { SendTelemetry ( " \" \" " ) ; } }
<summary>
Button timer event:  Check the status of the button
</summary>
<summary > Button timer event : Check the status of the button < / summary >