can_types.c

Go to the documentation of this file.
00001 
00022 #include <includes.h>
00023 
00024 void can_rx_setter_double_dummy(double d){ }
00025 void can_rx_setter_float_dummy(float f){ }
00026 void can_rx_setter_int_dummy(int i){ }
00027 void can_rx_setter_short_dummy(short s){}
00028 
00029 double can_tx_getter_double_dummy(void) { return 0; }
00030 float can_tx_getter_float_dummy(void) { return 0; }
00031 int can_tx_getter_int_dummy(void) { return 0; }
00032 short can_tx_getter_short_dummy(void) {return 0;}
00033 
00034 //TX DESCRIPTOR SETTING FUNCTIONS
00035 void can_set_tx_descriptor_d(CAN_FRAME_DESC* frame_desc,int addr,CAN_CHANNEL chan,
00036   CAN_TX_GETTER_DOUBLE g_d1
00037   ){
00038   frame_desc->addr = addr;
00039   frame_desc->chan = chan;
00040   frame_desc->rtr  = 0;
00041   frame_desc->frame_layout = CAN_LAYOUT_D;
00042   frame_desc->ptr1 = (CAN_VV_PTR)g_d1;
00043 }
00044 
00045 void can_set_tx_descriptor_ff(CAN_FRAME_DESC* frame_desc,int addr,CAN_CHANNEL chan,
00046   CAN_TX_GETTER_FLOAT g_f1,CAN_TX_GETTER_FLOAT g_f2
00047   ){
00048   frame_desc->addr = addr;
00049   frame_desc->chan = chan;
00050   frame_desc->rtr  = 0;
00051   frame_desc->frame_layout = CAN_LAYOUT_FF;
00052   frame_desc->ptr1 = (CAN_VV_PTR)g_f1;
00053   frame_desc->ptr2 = (CAN_VV_PTR)g_f2;
00054 }
00055 void can_set_tx_descriptor_ii(CAN_FRAME_DESC* frame_desc,int addr,CAN_CHANNEL chan,
00056   CAN_TX_GETTER_INT g_i1,CAN_TX_GETTER_INT g_i2
00057   ){
00058   frame_desc->addr = addr;
00059   frame_desc->chan = chan;
00060   frame_desc->rtr  = 0;
00061   frame_desc->frame_layout = CAN_LAYOUT_II;
00062   frame_desc->ptr1 = (CAN_VV_PTR)g_i1;
00063   frame_desc->ptr2 = (CAN_VV_PTR)g_i2;
00064 }
00065 
00066 void can_set_tx_descriptor_fi(CAN_FRAME_DESC* frame_desc,int addr,CAN_CHANNEL chan,
00067   CAN_TX_GETTER_FLOAT g_f1,CAN_TX_GETTER_INT g_i1
00068   ){
00069   frame_desc->addr = addr;
00070   frame_desc->chan = chan;
00071   frame_desc->rtr  = 0;
00072   frame_desc->frame_layout = CAN_LAYOUT_FI;
00073   frame_desc->ptr1 = (CAN_VV_PTR)g_f1;
00074   frame_desc->ptr2 = (CAN_VV_PTR)g_i1;
00075 }
00076 
00077 void can_set_tx_descriptor_iss(CAN_FRAME_DESC* frame_desc,int addr,CAN_CHANNEL chan,
00078   CAN_TX_GETTER_INT g_i1,CAN_TX_GETTER_SHORT g_s1, CAN_TX_GETTER_SHORT g_s2
00079   ){
00080   frame_desc->addr = addr;
00081   frame_desc->chan = chan;
00082   frame_desc->rtr  = 0;
00083   frame_desc->frame_layout = CAN_LAYOUT_ISS;
00084   frame_desc->ptr1 = (CAN_VV_PTR)g_i1;
00085   frame_desc->ptr2 = (CAN_VV_PTR)g_s1;
00086   frame_desc->ptr3 = (CAN_VV_PTR)g_s2;
00087 }
00088 
00089 void can_set_tx_descriptor_rtr(CAN_FRAME_DESC* frame_desc,int addr,CAN_CHANNEL chan){
00090   frame_desc->addr = addr;
00091   frame_desc->chan = chan;
00092   frame_desc->rtr  = 1;
00093 }
00094 
00095 //RX DESCRIPTOR SETTING FUNCTIONS
00096 void can_set_rx_descriptor_d(CAN_FRAME_DESC* frame_desc,int addr,CAN_CHANNEL chan,
00097   CAN_RX_SETTER_DOUBLE s_d1
00098   ){
00099   frame_desc->chan = chan;
00100   frame_desc->addr = addr;
00101   frame_desc->frame_layout = CAN_LAYOUT_D;
00102   frame_desc->ptr1 = (CAN_VV_PTR)s_d1;  
00103 }
00104 void can_set_rx_descriptor_ff(CAN_FRAME_DESC* frame_desc,int addr,CAN_CHANNEL chan,
00105   CAN_RX_SETTER_FLOAT s_f1,CAN_RX_SETTER_FLOAT s_f2
00106   ){
00107   frame_desc->chan = chan;
00108   frame_desc->addr = addr;
00109   frame_desc->frame_layout = CAN_LAYOUT_FF;
00110   frame_desc->ptr1 = (CAN_VV_PTR)s_f1;
00111   frame_desc->ptr2 = (CAN_VV_PTR)s_f2;
00112 }
00113 
00114 void can_set_rx_descriptor_ii(CAN_FRAME_DESC* frame_desc,int addr,CAN_CHANNEL chan,
00115   CAN_RX_SETTER_INT s_i1,CAN_RX_SETTER_INT s_i2
00116   ){
00117   frame_desc->chan = chan;
00118   frame_desc->addr = addr;
00119   frame_desc->frame_layout = CAN_LAYOUT_II;
00120   frame_desc->ptr1 = (CAN_VV_PTR)s_i1;
00121   frame_desc->ptr2 = (CAN_VV_PTR)s_i2;
00122 }
00123 
00124 void can_set_rx_descriptor_fi(CAN_FRAME_DESC* frame_desc,int addr,CAN_CHANNEL chan,
00125   CAN_RX_SETTER_FLOAT s_f1,CAN_RX_SETTER_INT s_i1
00126   ){
00127   frame_desc->chan = chan;
00128   frame_desc->addr = addr;
00129   frame_desc->frame_layout = CAN_LAYOUT_FI;
00130   frame_desc->ptr1 = (CAN_VV_PTR)s_f1;
00131   frame_desc->ptr2 = (CAN_VV_PTR)s_i1;
00132 }
00133 
00134 void can_set_rx_descriptor_iss(CAN_FRAME_DESC* frame_desc,int addr,CAN_CHANNEL chan,
00135   CAN_RX_SETTER_INT s_i1,CAN_RX_SETTER_SHORT s_s1, CAN_RX_SETTER_SHORT s_s2
00136   ){
00137   frame_desc->chan = chan;
00138   frame_desc->addr = addr;
00139   frame_desc->frame_layout = CAN_LAYOUT_ISS;
00140   frame_desc->ptr1 = (CAN_VV_PTR)s_i1;
00141   frame_desc->ptr2 = (CAN_VV_PTR)s_s1;
00142   frame_desc->ptr3 = (CAN_VV_PTR)s_s2;
00143 }    
00144 
00145 
Generated on Tue Jun 29 16:36:14 2010 by  doxygen 1.6.3