Microchip® Advanced Software Framework

sam/drivers/supc/unit_tests/unit_tests.c File Reference

Unit tests for SUPC driver.

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

#include <stdint.h>
#include <stdbool.h>
#include <board.h>
#include <sysclk.h>
#include <supc.h>
#include <string.h>
#include <unit_test/suite.h>
#include <stdio_serial.h>
#include <conf_test.h>
#include <conf_board.h>

Macros

#define SLOW_CLK_TIMEOUT   0xFFFFFFFF
 

Functions

int main (void)
 Run SUPC driver unit tests. More...
 
static void run_supc_test (const struct test_case *test)
 Test slow clock source switching. More...
 
void SysTick_Handler (void)
 SysTick handler. More...
 

Variables

static volatile uint32_t gs_ul_ms_ticks = 0U
 

#define SLOW_CLK_TIMEOUT   0xFFFFFFFF

Referenced by run_supc_test().

static void run_supc_test ( const struct test_case test)
static

Test slow clock source switching.

This test switches the slow clock on the crystal oscillator output.

Parameters
testCurrent test case.

References SLOW_CLK_TIMEOUT, status, supc_get_status(), supc_switch_sclk_to_32kxtal(), and test_assert_true.

Referenced by main().

void SysTick_Handler ( void  )

SysTick handler.

References gs_ul_ms_ticks.

volatile uint32_t gs_ul_ms_ticks = 0U
static

Referenced by SysTick_Handler().