void init_pxx(uint32_t port) { if (port == EXTERNAL_MODULE) { init_main_ppm(5000, 0); init_ssc(); } else { // TODO } }
void init_dsm2(uint32_t port) { if (port == EXTERNAL_MODULE) { init_main_ppm(2500 * 2, 0); init_ssc(); } else { // TODO } }
/** * \brief Run WM8731 module unit tests. */ int main(void) { const usart_serial_options_t uart_serial_options = { .baudrate = CONF_TEST_BAUDRATE, .paritytype = CONF_TEST_PARITY }; /* Initialize the system. */ sysclk_init(); board_init(); #ifdef BOARD_AT24C_TWI_INSTANCE /* reset EEPROM state to release TWI */ at24cxx_reset(); #endif /* Configure console UART. */ sysclk_enable_peripheral_clock(CONSOLE_UART_ID); stdio_serial_init(CONF_TEST_UART, &uart_serial_options); /* Initial the WM8731 to DAC */ init_dac(); /* Initial the ssc interface */ init_ssc(); /* Configure DMA */ init_dma(); /* Define all the test cases */ DEFINE_TEST_CASE(wm8731_transfer_test, NULL, run_wm8731_transfer_test, NULL, "WM8731 transfer test."); /* Put test case addresses in an array */ DEFINE_TEST_ARRAY(wm8731_tests) = { &wm8731_transfer_test, }; /* Define the test suite */ DEFINE_TEST_SUITE(wm8731_suite, wm8731_tests, "SAM WM8731 module test suite"); /* Run all tests in the test suite */ test_suite_run(&wm8731_suite); while (1) { /* Busy-wait forever */ } }