You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

18 lines
545 B

/*
* Humax EPG Tool
* by af123, 2011
*/
/* Works for modern dates, 1970 - 2038 */
#define MJD_TO_UNIX(xx) (((xx) - 40587) * 86400)
#define _swap16(v) ((((v) >> 8) & 0xff) | (((v) & 0xff) << 8))
#define bcd(v) (((((v) >> 4) & 0xf) * 10) + ((v) & 0xf))
#define DUMPINT(ss,xx) printf(" %30s: %d\n", #xx, ss->xx)
#define DUMPSTR(ss,xx) printf(" %30s: %s\n", #xx, ss->xx)
#define DUMPNSTR(ss,xx,nn) printf(" %30s: %.*s\n", #xx, nn, ss->xx)
#define DUMPHEX(ss,xx,nn) printf(" %30s: %s\n", #xx, \
hexstr((uint8_t *)ss->xx, nn))