Part Number: MSP430FR2355
Hello....
I have a structure in a driver that I am trying to assign values to via strncpy....When debugging with a breakpoint the source looks fine, however the assignment to the destination never takes place....All destination contains 0xFF. I am not sure how to do assignment correctly and I want to be able to use the values from the structure in main. Here are "what I believe" the pertinent code pieces. I seem to be struggling with scope issue ....
main.c (declaration and function call....no definition here as it is assigned in the driver??)
gpsMssg_s *pGPSData;
GPSMssgParser(pGPSData);
driver.h
typedef struct gpsLogValues
{
char utc[15];
char latitude[15];
char longitude[15];
char date[10];
char satellites[3];
}gpsLogValues_s;
typedef struct gpsData
{
gpsLogValues_s *gpsLog;
}gpsMssg_s;
driver.c (assignments)
strncpy(pGPS_d->gpsLog->utc, &NMEAData[7], 10);
strncpy(pGPS_d->gpsLog->date, &NMEAData[57], 6);
strncpy(pGPS_d->gpsLog->latitude, &NMEAData[20], 11);
strncpy(pGPS_d->gpsLog->longitude, &NMEAData[32], 12);
NMEAData looks fine at breakpoint....just can't seem to get the assignments to stick....????
Thanks