Microchip® Advanced Software Framework

unit_tests.c File Reference

AT86RFx Wireless Module Unit Test.

Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.

#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <inttypes.h>
#include <stdio.h>
#include <asf.h>
#include "app_config.h"
#include "conf_board.h"
#include "pal.h"
#include "led.h"
#include "delay.h"
#include "tal.h"
#include "vendor_data.h"
#include "pb_pairing.h"
#include "rf4ce.h"
#include "common_sw_timer.h"

Functions

 FLASH_DECLARE (uint16_t VendorIdentifier)
 
 FLASH_DECLARE (uint8_t vendor_string[7])
 
 FLASH_DECLARE (uint8_t app_user_string[15])
 
 FLASH_DECLARE (uint8_t supported_cec_cmds[32])
 
int main (void)
 Run Wireless Module unit tests. 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 nlme_auto_discovery_confirm (nwk_enum_t Status)
 
static void nlme_reset_confirm (nwk_enum_t Status)
 
static void run_nlme_auto_discovery_test (const struct test_case *test)
 
static void run_nlme_reset_test (const struct test_case *test)
 

Variables

static uint8_t nlme_auto_discovery_conf_rcvd = false
 
static uint8_t nlme_auto_discovery_conf_status = FAILURE
 
static uint8_t nlme_reset_conf_rcvd = false
 
static uint8_t nlme_reset_conf_status = FAILURE
 

FLASH_DECLARE ( uint16_t  VendorIdentifier)
FLASH_DECLARE ( uint8_t  vendor_string[7])
FLASH_DECLARE ( uint8_t  app_user_string[15])
FLASH_DECLARE ( uint8_t  supported_cec_cmds[32])
int main ( void  )

Run Wireless Module unit tests.

Initializes the clock system, board and USB. Then runs the wireless task continuously.

References board_init(), cpu_irq_enable, irq_initialize_vectors, nwk_init(), nwk_task(), stdio_usb_init(), sw_timer_init(), and sysclk_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.

References DEFINE_TEST_ARRAY, DEFINE_TEST_CASE, DEFINE_TEST_SUITE, run_nlme_auto_discovery_test(), run_nlme_reset_test(), and test_suite_run().

static void nlme_auto_discovery_confirm ( nwk_enum_t  Status)
static
static void nlme_reset_confirm ( nwk_enum_t  Status)
static
static void run_nlme_reset_test ( const struct test_case test)
static

uint8_t nlme_auto_discovery_conf_rcvd = false
static
uint8_t nlme_auto_discovery_conf_status = FAILURE
static
uint8_t nlme_reset_conf_rcvd = false
static
uint8_t nlme_reset_conf_status = FAILURE
static