hi,
iam using q2687rd FW 7.52, i created a new file in write mode and i want to set the time and date to this file using adl_fsSetTimeDate(); i passed 1st arg as file name and my question is, how can i give the 2nd & 3rd argument (ctime & cdate).
pls help me with example.
thank u in advance.
It is a bit mask. I suggest you take a look at
ADL_FS_CTIME_SEC_MASK
ADL_FS_CTIME_MIN_MASK
ADL_FS_CTIME_HOUR_MASK
ADL_FS_CDATE_DAY_MASK
ADL_FS_CDATE_MONTH_MASK
ADL_FS_CDATE_YEAR_MASK
in the ADL User guide
for which value masking operation should i perform didn’t understand please help me with clear explanation.
Something like this:
pctime = (sec >> 1) | (min << ADL_FS_CTIME_MIN_SHIFT) | (hour << ADL_FS_CTIME_HOUR_SHIFT);
pcdate = day | (month << ADL_FS_CDATE_MONTH_SHIFT) | ((year -1980) << ADL_FS_CDATE_YEAR_SHIFT);
adl_fsSetTimeDate("test.bin", pctime, pcdate );