Atmel Software Framework

thirdparty/wireless/avr2130_lwmesh/unit_tests/unit_tests.c File Reference

LWMesh Stack Unit Test.

Copyright (c) 2014-2015 Atmel Corporation. All rights reserved.

#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.

Parameters
b_enableindication for connect/disconnect of terminal to CDC.
static void NetworkStatusTimerHandler ( SYS_Timer_t timer)
static

References timeout.

Referenced by unitDataReq().

static void run_lwmesh_nwk_darareq_test ( const struct test_case test)
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.

Parameters
testCurrent test case.

References result, SYS_TaskHandler(), test_assert_true, timeout, and unitDataReq().

Referenced by main_cdc_set_dtr().

static void unitDataConf ( NWK_DataReq_t req)
static

References result, and SYS_TimerStop().

Referenced by unitDataReq().

SYS_Timer_t NetworkStatusTimer
static