Hi,i am new to c++ programming language and i was assigned a project,the language is visual c++.
The project is about writing a program to transfer data from a computer(USB port) to a FT232R chip. I was provided with ftd2xx driver, i include some really simple functions,namely FT_Open(),FT_Write(),FT_Close() and the code can compile without error. My first problem is how do I know this code functions? please provide some easy and feasible ways.
My lecture asked me to incorporate a CRC32 to this function, as far as I know, CRC is a error-preventing algorithm. I would assume that I need to encode the data at transmitter side and check it at receiver end. That means i have to program both side?is this true? is there any good books or web ?
FT_Open code is included for you. Is this correct,i mean does it work on real communication process. Thank you guys in advance.
private: System::Void btnSend_Click(System::Object^ sender, System::EventArgs^ e) {
DWORD BytesWritten;
char * TxBuffer;
TxBuffer=GetCString(rtxData->Text);
ftStatus=FT_Write(ftHandle,TxBuffer,sizeof(TxBuffer),&BytesWritten);
if(ftStatus==FT_OK)
{
MessageBox::Show("Transmission successful");
}
else
{
MessageBox::Show("Transmission failed");
}
}