examples/DS401_Slave_Gui/TestSlaveGui.cpp
changeset 641 404a51700f40
parent 458 a3906286b09b
equal deleted inserted replaced
640:e9a4e4c308bb 641:404a51700f40
    18 You should have received a copy of the GNU Lesser General Public
    18 You should have received a copy of the GNU Lesser General Public
    19 License along with this library; if not, write to the Free Software
    19 License along with this library; if not, write to the Free Software
    20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    21 */
    21 */
    22 
    22 
    23 
       
    24 #include <wx/wxprec.h>
       
    25 #include <wx/wx.h>
       
    26 #include <wx/textctrl.h>
       
    27 #include <iostream>
       
    28 
       
    29 #if defined(WIN32) && !defined(__CYGWIN__)
    23 #if defined(WIN32) && !defined(__CYGWIN__)
    30 #include <windows.h>
    24 #include <windows.h>
       
    25 #include "getopt.h"
    31 #else
    26 #else
    32 #include <stdio.h>
    27 #include <stdio.h>
    33 #include <string.h>
    28 #include <string.h>
    34 #include <unistd.h>
    29 #include <unistd.h>
    35 #include <stdlib.h>
    30 #include <stdlib.h>
    36 #include <signal.h>
    31 #include <signal.h>
    37 #endif
    32 #endif
       
    33 
       
    34 
       
    35 #include <wx/wxprec.h>
       
    36 #include <wx/wx.h>
       
    37 #include <wx/textctrl.h>
       
    38 #include <iostream>
       
    39 
       
    40 
    38 
    41 
    39 //#include <can_driver.h>
    42 //#include <can_driver.h>
    40 //#include <timers_driver.h>
    43 //#include <timers_driver.h>
    41 extern "C"
    44 extern "C"
    42 {
    45 {
    71 //****************************************************************************
    74 //****************************************************************************
    72 int
    75 int
    73 main_can (s_BOARD SlaveBoard, char *LibraryPath)
    76 main_can (s_BOARD SlaveBoard, char *LibraryPath)
    74 {
    77 {
    75 #if !defined(WIN32) && !defined(__CYGWIN__)
    78 #if !defined(WIN32) && !defined(__CYGWIN__)
       
    79 	//TimerInit();
       
    80 #endif	
    76 	TimerInit();
    81 	TimerInit();
    77 #endif	
       
    78 	
       
    79 	printf ("Bus name: %s        Freq: %s       Driver: %s\n",
    82 	printf ("Bus name: %s        Freq: %s       Driver: %s\n",
    80 	  SlaveBoard.busname, SlaveBoard.baudrate, LibraryPath);
    83 	  SlaveBoard.busname, SlaveBoard.baudrate, LibraryPath);
    81 
    84 
    82 #ifndef NOT_USE_DYNAMIC_LOADING
    85 #ifndef NOT_USE_DYNAMIC_LOADING
    83   if (LoadCanDriver (LibraryPath) == NULL)
    86   if (LoadCanDriver (LibraryPath) == NULL)