AnsweredAssumed Answered

Can't get this to work

Question asked by Neil Porven on Jul 5, 2016
Latest reply on Jul 5, 2016 by Kerry Zhou

The following is an example from the FatFs website:


FRESULT set_timestamp (

  char *obj,  /* Pointer to the file name */

  int year,

  int month,

  int mday,

  int hour,

  int min,

  int sec



  FILINFO fno;


  fno.fdate = (WORD)(((year - 1980) * 512U) | month * 32U | mday);

  fno.ftime = (WORD)(hour * 2048U | min * 32U | sec / 2U);


  return f_utime(obj, &fno);


If I try to use WORD, the compiler throws the following error:


called object 'WORD' is not a function or function pointer


How can I do the typecast WORD?


Thanks you,