示例#1
0
文件: main.cpp 项目: 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());
}
示例#2
0
文件: main.cpp 项目: 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());
}
示例#3
0
文件: main.cpp 项目: 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());
}
示例#4
0
文件: main.cpp 项目: 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());
}
示例#5
0
文件: main.cpp 项目: 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;
}