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);
198 packet[10] = calc_parity(0x07);
199 packet[11] = calc_parity(0x04);
201 packet[12] = calc_parity(0x40 | ((sys_tz.tz_minuteswest / 60) & 0x1f));
203 packet[12] = calc_parity(0x40 | ((24 + sys_tz.tz_minuteswest / 60) & 0x1f));
204 packet[13] = calc_parity(0);
205 packet[14] = calc_parity(0x0f);
207 checksum += packet[i] & 0x7f;
208 packet[15] = calc_parity(0x100 - checksum);
216 static void vivid_vbi_gen_teletext(u8 *packet, unsigned line, unsigned frame)
221 packet[0] = hamming[1 + ((line & 1) << 3)];
222 packet[1] = hamming[line >> 1];
223 memset(packet + 2, 0x20, 40);
226 packet[2] = hamming[frame % 10];
227 packet[3] = hamming[frame / 10];
228 packet[4] = hamming[0];
229 packet[5] = hamming[0];
230 packet[6] = hamming[0];
231 packet[7] = hamming[0];
232 packet[8] = hamming[0];
233 packet[9] = hamming[1];
236 packet += offset;
237 memcpy(packet, "Page: 100 Row: 10", 17);
238 packet[7] = '0' + frame / 10;
239 packet[8] = '0' + frame % 10;
240 packet[15] = '0' + line / 10;
241 packet[16] = '0' + line % 10;
243 packet[i] = calc_parity(packet[i]);