Lines Matching defs:packet
176 static void vivid_vbi_gen_set_time_of_day(u8 *packet)
182 packet[0] = calc_parity(0x07);
183 packet[1] = calc_parity(0x01);
184 packet[2] = calc_parity(0x40 | tm.tm_min);
185 packet[3] = calc_parity(0x40 | tm.tm_hour);
186 packet[4] = calc_parity(0x40 | tm.tm_mday);
189 packet[4] = calc_parity(0x60 | tm.tm_mday);
190 packet[5] = calc_parity(0x40 | (1 + tm.tm_mon));
191 packet[6] = calc_parity(0x40 | (1 + tm.tm_wday));
192 packet[7] = calc_parity(0x40 | ((tm.tm_year - 90) & 0x3f));
193 packet[8] = calc_parity(0x0f);
195 checksum += packet[i] & 0x7f;
196 packet[9] = calc_parity(0x100 - checksum);
197 packet[10] = calc_parity(0x07);
198 packet[11] = calc_parity(0x04);
200 packet[12] = calc_parity(0x40 | ((sys_tz.tz_minuteswest / 60) & 0x1f));
202 packet[12] = calc_parity(0x40 | ((24 + sys_tz.tz_minuteswest / 60) & 0x1f));
203 packet[13] = calc_parity(0);
204 packet[14] = calc_parity(0x0f);
206 checksum += packet[i] & 0x7f;
207 packet[15] = calc_parity(0x100 - checksum);
215 static void vivid_vbi_gen_teletext(u8 *packet, unsigned line, unsigned frame)
220 packet[0] = hamming[1 + ((line & 1) << 3)];
221 packet[1] = hamming[line >> 1];
222 memset(packet + 2, 0x20, 40);
225 packet[2] = hamming[frame % 10];
226 packet[3] = hamming[frame / 10];
227 packet[4] = hamming[0];
228 packet[5] = hamming[0];
229 packet[6] = hamming[0];
230 packet[7] = hamming[0];
231 packet[8] = hamming[0];
232 packet[9] = hamming[1];
235 packet += offset;
236 memcpy(packet, "Page: 100 Row: 10", 17);
237 packet[7] = '0' + frame / 10;
238 packet[8] = '0' + frame % 10;
239 packet[15] = '0' + line / 10;
240 packet[16] = '0' + line % 10;
242 packet[i] = calc_parity(packet[i]);