drivers/unix/unix.c
changeset 384 83793fc7ce48
parent 267 96c688ebcde7
child 391 7802a7d5584f
equal deleted inserted replaced
383:7d8afedb8769 384:83793fc7ce48
    99  
    99  
   100 	/*Get function ptr*/
   100 	/*Get function ptr*/
   101 	DLSYM(canReceive)
   101 	DLSYM(canReceive)
   102 	DLSYM(canSend)
   102 	DLSYM(canSend)
   103 	DLSYM(canOpen)
   103 	DLSYM(canOpen)
       
   104 	DLSYM(canChangeBaudRate)
   104 	DLSYM(canClose)
   105 	DLSYM(canClose)
   105 
   106 
   106 	return handle;
   107 	return handle;
   107 }
   108 }
   108 
   109 
   186 	int res = DLL_CALL(canClose)(tmp->fd);
   187 	int res = DLL_CALL(canClose)(tmp->fd);
   187 	
   188 	
   188 	WaitReceiveTaskEnd(tmp->receiveTask);
   189 	WaitReceiveTaskEnd(tmp->receiveTask);
   189 	return res;
   190 	return res;
   190 }
   191 }
       
   192 
       
   193 
       
   194 UNS8 canChangeBaudRate(CAN_PORT port, char* baud)
       
   195 {
       
   196    if(port){
       
   197 		UNS8 res;
       
   198 	        //LeaveMutex();
       
   199 		res = DLL_CALL(canChangeBaudRate)(((CANPort*)port)->fd, baud);
       
   200 		//EnterMutex();
       
   201 		return res; // OK
       
   202 	}               
       
   203 	return 1; // NOT OK
       
   204 }