LWMesh Stack Unit Test.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
#include <stdint.h>
#include <stdbool.h>
#include <asf.h>
#include <string.h>
#include "board.h"
#include "phy.h"
#include "sys.h"
#include "nwk.h"
#include "sysTimer.h"
#include "sysclk.h"
#include "conf_usb.h"
#include "stdio_usb.h"
#include "conf_test.h"
#include "unit_tests.h"
Functions | |
int | main (void) |
Initializes the clock system, board and USB. More... | |
void | main_cdc_set_dtr (bool b_enable) |
Call back from USB to notify a terminal connection to the CDC driver. More... | |
static void | NetworkStatusTimerHandler (SYS_Timer_t *timer) |
static void | run_lwmesh_nwk_darareq_test (const struct test_case *test) |
Performs a Reset check on AT86RFx module. More... | |
static void | unitDataConf (NWK_DataReq_t *req) |
static void | unitDataReq (void) |
Variables | |
static SYS_Timer_t | NetworkStatusTimer |
static bool | result = false |
static bool | timeout = false |
int main | ( | void | ) |
Initializes the clock system, board and USB.
Then runs the wireless task continuously.
References stdio_usb_init(), and SYS_Init().
void main_cdc_set_dtr | ( | bool | b_enable | ) |
Call back from USB to notify a terminal connection to the CDC driver.
b_enable | indication for connect/disconnect of terminal to CDC. |
References DEFINE_TEST_ARRAY, DEFINE_TEST_CASE, DEFINE_TEST_SUITE, run_lwmesh_nwk_darareq_test(), and test_suite_run().
|
static |
References timeout.
Referenced by unitDataReq().
|
static |
Performs a Reset check on AT86RFx module.
This function will simply test the output of the function tal_reset and returns an error in case of failure.
test | Current test case. |
References result, SYS_TaskHandler(), test_assert_true, timeout, and unitDataReq().
Referenced by main_cdc_set_dtr().
|
static |
References result, and SYS_TimerStop().
Referenced by unitDataReq().
|
static |
References APP_ENDPOINT, NWK_DataReq_t::confirm, NWK_DataReq_t::data, NWK_DataReq_t::dstAddr, NWK_DataReq_t::dstEndpoint, SYS_Timer_t::handler, SYS_Timer_t::interval, SYS_Timer_t::mode, NetworkStatusTimerHandler(), NWK_DataReq(), NWK_DataReq_t::size, NWK_DataReq_t::srcEndpoint, SYS_TIMER_PERIODIC_MODE, SYS_TimerStart(), and unitDataConf().
Referenced by run_lwmesh_nwk_darareq_test().
|
static |
Referenced by run_lwmesh_nwk_darareq_test(), test_case_run(), and unitDataConf().