Click here to Skip to main content
15,943,061 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
i am trying to read the data from sd card in c++/CLI app using serial communication.i tried the following error but didnot get expected output.

What I have tried:

SD_Handle handle;
uint16_t status;
char readBuffer[12]
handle = SD_open(index, NULL);
status = SD_initialize(handle);
if (handle == NULL || status != SD_STATUS_SUCCESS)
	while (1);
if (status == SD_STATUS_SUCCESS) 
			status = SD_read(handle, readBuffer, 0, 1);
OriginalGriff 9-Aug-22 0:44am    
What does it do that you didn't expect, or not do that you did?
What have you tried to do to find out why?
Are there any error messages, and if so, where and when? What did you do to make them happen?

This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with.
Use the "Improve question" widget to edit your question and provide better information.
[no name] 9-Aug-22 1:01am    
You're using a wrapper; no one can tell what's going on. You should be able to treat the SD card as a removable disk, if at all.
Michael Haephrati 9-Aug-22 9:59am    
There is nothing "serial" in this code. SG cards are read through the USB port. Serial ports were used 20 years ago. "Serialize" and "Serial" are two different things. There is no way you can get help without adding more information. 'SD_Handle " definition is missing.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900