/* Calculate SDTR code bytes , from period and offset.  */
static void calc_sync_msg(unsigned int period, unsigned int offset, unsigned int fast, uchar msg[2])
/* Calculate SDTR code bytes , from period and offset.  */
static void calc_sync_msg(unsigned int period, unsigned int offset, unsigned int fast, uchar msg[2])
{
	period /= 4;
	if (offset && fast)
		period /= 2;
	msg[0] = period;
	msg[1] = offset;
}