fx_ram_driver_test.h 1.5 KB

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