Пример #1
0
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());
}
Пример #2
0
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());
}
Пример #3
0
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());
}
Пример #4
0
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());
}
Пример #5
0
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;
}