/** * Run buffer list tests. */ int main(void) { AJ_WSL_ModuleInit(); toTarget.fakeWireCurr = toTarget.fakeWireBuffer; toTarget.fakeWireRead = toTarget.fakeWireBuffer; toTarget.fakeWireWrite = toTarget.fakeWireBuffer; fromTarget.fakeWireCurr = fromTarget.fakeWireBuffer; fromTarget.fakeWireRead = fromTarget.fakeWireBuffer; fromTarget.fakeWireWrite = fromTarget.fakeWireBuffer; run_buflist_external(NULL); run_buflist_coalesce(NULL); }
/** * \brief Run SPI driver unit test. */ int AJ_Main(void) { AJ_WSL_ModuleInit(); toTarget.fakeWireCurr = toTarget.fakeWireBuffer; fromTarget.fakeWireCurr = fromTarget.fakeWireBuffer; ResetFakeWireBuffers(); run_wsl_htc_parsing(NULL); run_wsl_simulate_ping(NULL); run_wsl_simulate_state_machine(NULL); run_wsl_simulate_socket_open_recv(NULL); run_wsl_simulate_ping_recv(NULL); run_wsl_simulate_socket_close_recv(NULL); run_wsl_simulate_ping_recv(NULL); // this one would return failure because the socket has been closed run_wsl_open_and_close(NULL); run_wsl_send_small(NULL); }
/* * Initialize functions for DUE * (Called by AJ_PlatformInit()) */ void _AJ_PlatformInit(void) { /* * Init sequence for the DUE */ const usart_serial_options_t usart_serial_options = { .baudrate = 115200, .charlength = 0, .paritytype = UART_MR_PAR_NO, .stopbits = false }; sysclk_init(); board_init(); //configure_uart(); stdio_serial_init(CONSOLE_UART, &usart_serial_options); AJ_WSL_ModuleInit(); AJ_InitRNG(); } uint16_t AJ_ByteSwap16(uint16_t x) { return swap16(x); } uint32_t AJ_ByteSwap32(uint32_t x) { return swap32(x); } uint64_t AJ_ByteSwap64(uint64_t x) { return swap64(x); } void _AJ_Reboot(void) { rstc_start_software_reset(RSTC); }