1 #ifndef _FX_RAM_DRIVER_TEST_H_ 2 #define _FX_RAM_DRIVER_TEST_H_ 3 4 #define FX_OP_WRITE_NORMALLY 0 5 #define FX_OP_WRITE_INTERRUPT 1 6 7 #define FX_FAULT_TOLERANT_LOG_ERROR 0x00 8 #define FX_FAULT_TOLERANT_LOG_UNDO_UPDATING 0x01 9 #define FX_FAULT_TOLERANT_LOG_UNDO_DONE 0x02 10 #define FX_FAULT_TOLERANT_LOG_REDO_UPDATING 0x04 11 #define FX_FAULT_TOLERANT_LOG_REDO_DONE 0x08 12 #define FX_FAULT_TOLERANT_LOG_DONE 0x10 13 14 15 /* Define the memory buffer to format the media if enable fault tolerant feature.*/ 16 extern UCHAR ram_disk_memory_large[900000000]; 17 extern UCHAR large_data_buffer[900000000]; 18 #define large_data_buffer_size 900000000 19 20 /* Define memory for tests to be run in standalone mode (without Azure RTOS: ThreadX) */ 21 #ifdef FX_STANDALONE_ENABLE 22 extern UCHAR ram_disk_memory[300000000]; 23 extern UCHAR ram_disk_memory1[30000000]; 24 #endif 25 26 /* Define a macro for test. */ 27 /* We do not need error code anymore but still define return_value_if_fail for compatibility backward. */ 28 #define return_value_if_fail( p, val) if(!(p)) \ 29 {printf("ERROR!\n%s:%d\nError: "#p" failed.\n", \ 30 __FILE__, __LINE__);test_control_return(val);} 31 #define return_if_fail( p) if(!(p)) \ 32 {printf("ERROR!\n%s:%d\nError: "#p" failed.\n", \ 33 __FILE__, __LINE__);test_control_return(254);} 34 35 /* Application define for CTEST. */ 36 void test_application_define(void *first_unused_memory); 37 38 #endif /* _FX_RAM_DRIVER_TEST_H_ */ 39