nfv2_config.c
Go to the documentation of this file.
00001 #include "stdio.h"
00002 #include "nf/nfv2.h"
00003 
00004 void NFv2_Config(NF_STRUCT_ComBuf *NFComBuf, uint8_t myAddress){
00005 
00006         NFComBuf->myAddress = myAddress;
00007         NFComBuf->dataReceived = 0;
00008 
00009         // Address map is essential only when device acts as Master on NFv2 bus.
00010         
00011         NFComBuf->myAddress = NF_TerminalAddress;
00012         NFComBuf->ReadDeviceVitals.addr[0] = NF_RobotAddress;
00013         NFComBuf->ReadDeviceVitals.addr[1] = NF_RobotAddress;
00014         NFComBuf->ReadDeviceVitals.addr[2] = NF_RobotAddress;
00015         NFComBuf->ReadDeviceVitals.addr[3] = NF_RobotAddress;
00016         NFComBuf->ReadDeviceVitals.addr[4] = NF_RobotAddress;
00017         NFComBuf->ReadDeviceVitals.addr[5] = NF_RobotAddress;
00018         NFComBuf->ReadDeviceVitals.addr[6] = NF_RobotAddress;
00019         NFComBuf->ReadDeviceVitals.addr[7] = NF_RobotAddress;
00020         NFComBuf->SetDrivesMode.addr[0] = NF_RobotAddress;
00021         NFComBuf->SetDrivesMode.addr[1] = NF_RobotAddress;
00022         NFComBuf->SetDrivesSpeed.addr[0] = NF_RobotAddress;
00023         NFComBuf->SetDrivesSpeed.addr[1] = NF_RobotAddress;
00024         NFComBuf->SetDigitalOutputs.addr[0] = NF_RobotAddress;
00025         
00026         
00027         NFv2_CrcInit();
00028 }


elektron_base
Author(s): Konrad Banachowicz
autogenerated on Mon Oct 6 2014 10:26:31