Example #1
0
File: main.cpp Project: sg-/mbed-os
static void rx_error()
{
    wait_ms(2);
    TEST_ASSERT_EQUAL(EV_NONE, received_event);
    received_event = EV_RX_ERROR;
    TEST_ASSERT_EQUAL(osOK, event_sem.release());
}
Example #2
0
File: main.cpp Project: sg-/mbed-os
static void rx_done(const uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr)
{
    wait_ms(2);
    TEST_ASSERT_EQUAL(EV_NONE, received_event);
    received_event = EV_RX_DONE;
    TEST_ASSERT_EQUAL(osOK, event_sem.release());
}
Example #3
0
File: main.cpp Project: sg-/mbed-os
static void rx_timeout()
{
    wait_ms(2);
    TEST_ASSERT_EQUAL(EV_NONE, received_event);
    received_event = EV_RX_TIMEOUT;
    TEST_ASSERT_EQUAL(osOK, event_sem.release());
}
Example #4
0
File: main.cpp Project: sg-/mbed-os
static void tx_done()
{
    wait_ms(2);
    TEST_ASSERT_EQUAL(EV_NONE, received_event);
    received_event = EV_TX_DONE;
    TEST_ASSERT_EQUAL(osOK, event_sem.release());
}
Example #5
0
File: main.cpp Project: betzw/mbed
static bool fsm_callback(int state, int next_state)
{
    if (next_state == CellularConnectionFSM::STATE_SIM_PIN) {
        TEST_ASSERT(fsm_semaphore.release() == osOK);
        return false;
    }
    return true;
}