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().
int main | ( | void | ) |
Run SUPC driver unit tests.
References uart_rs232_options::baudrate, board_init(), DEFINE_TEST_ARRAY, DEFINE_TEST_CASE, DEFINE_TEST_SUITE, NULL, run_supc_test(), stdio_serial_init(), sysclk_enable_peripheral_clock(), sysclk_get_cpu_hz(), sysclk_init(), test_suite_run(), and usart_serial_options.
|
static |
Test slow clock source switching.
This test switches the slow clock on the crystal oscillator output.
test | Current test case. |
References SLOW_CLK_TIMEOUT, 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.
|
static |
Referenced by SysTick_Handler().