You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.4 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #include "tupus0_0Window.h"
  2. tupus0_0Window::tupus0_0Window() : WindowCLI(NULL){
  3. m_pSOC = classSOC::getInstance();
  4. #ifdef NEWT_CLI
  5. #else
  6. create( 0, 36, 30, 12 );
  7. #endif
  8. };
  9. tupus0_0Window::~tupus0_0Window(){
  10. #ifdef NEWT_CLI
  11. newtPopWindow();
  12. #else
  13. #endif
  14. };
  15. void tupus0_0Window::paint( void ){
  16. #ifdef NEWT_CLI
  17. newtOpenWindow( 0, 36, 30, 12, "TUPUS0_0" );
  18. newtDrawForm( m_oForm );
  19. #else
  20. volatile structTUPUS *tTUPUS;
  21. tTUPUS = m_pSOC->getTUPUS( 0 , 0 );
  22. createBox( true );
  23. mvwprintw( m_pWND, 2,2,"--- TUPUS[0:0] STATUS ---" );
  24. if( tTUPUS != NULL ) {
  25. mvwprintw( m_pWND, 3,2,"Host status:\t0x%08x", tTUPUS->HOST_status );
  26. mvwprintw( m_pWND, 4,2,"Host cmd:\t0x%08x", tTUPUS->HOST_command );
  27. mvwprintw( m_pWND, 5,2,"Host address:\t0x%08x", tTUPUS->HOST_address );
  28. mvwprintw( m_pWND, 6,2,"Host data:\t0x%08x", tTUPUS->HOST_data );
  29. mvwprintw( m_pWND, 7,2,"PRU ID:\t0x%08x", tTUPUS->PRU_id );
  30. mvwprintw( m_pWND, 8,2,"PRU status:\t0x%08x", tTUPUS->PRU_status );
  31. mvwprintw( m_pWND, 9,2,"PRU address:\t0x%08x", tTUPUS->PRU_address );
  32. mvwprintw( m_pWND, 10,2,"PRU data:\t0x%08x", tTUPUS->PRU_data );
  33. } else {
  34. mvwprintw( m_pWND, 3,2,"Not Initialized");
  35. };
  36. wrefresh( m_pWND );
  37. #endif
  38. };