Microchip® Advanced Software Framework

drivers/rtc/unit_test_count/unit_test.c File Reference

SAM RTC Count Unit test.

Copyright (c) 2015-2020 Microchip Technology Inc. and its subsidiaries.

#include <asf.h>
#include <stdio_serial.h>
#include <string.h>
#include "conf_test.h"

Functions

static void cdc_uart_init (void)
 Initialize the USART for unit test. More...
 
int main (void)
 Run RTC unit tests. More...
 
static void rtc_count_match_callback (void)
 
static void run_rtc_count_interrupt_test (const struct test_case *test)
 Test for RTC call_back mode test. More...
 
static void run_rtc_count_test (const struct test_case *test)
 Test for RTC count polled mode test. More...
 

Variables

struct usart_module cdc_uart_module
 
volatile bool interrupt_flag = false
 
struct rtc_module rtc_inst
 

static void cdc_uart_init ( void  )
static
int main ( void  )

Run RTC unit tests.

Initializes the system and serial output, then sets up the RTC unit test suite and runs it.

References cdc_uart_init(), DEFINE_TEST_ARRAY, DEFINE_TEST_CASE, DEFINE_TEST_SUITE, delay_init(), NULL, run_rtc_count_interrupt_test(), run_rtc_count_test(), system_init(), and test_suite_run().

static void rtc_count_match_callback ( void  )
static

References interrupt_flag.

Referenced by run_rtc_count_interrupt_test().

static void run_rtc_count_test ( const struct test_case test)
static

struct usart_module cdc_uart_module
volatile bool interrupt_flag = false
struct rtc_module rtc_inst