18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * The Virtual DVB test driver serves as a reference DVB driver and helps
48c2ecf20Sopenharmony_ci * validate the existing APIs in the media subsystem. It can also aid
58c2ecf20Sopenharmony_ci * developers working on userspace applications.
68c2ecf20Sopenharmony_ci *
78c2ecf20Sopenharmony_ci * Copyright (C) 2020 Daniel W. S. Almeida
88c2ecf20Sopenharmony_ci */
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci#ifndef VIDTV_COMMON_H
118c2ecf20Sopenharmony_ci#define VIDTV_COMMON_H
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci#include <linux/types.h>
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci#define CLOCK_UNIT_90KHZ 90000
168c2ecf20Sopenharmony_ci#define CLOCK_UNIT_27MHZ 27000000
178c2ecf20Sopenharmony_ci#define VIDTV_SLEEP_USECS 10000
188c2ecf20Sopenharmony_ci#define VIDTV_MAX_SLEEP_USECS (2 * VIDTV_SLEEP_USECS)
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ciu32 vidtv_memcpy(void *to,
218c2ecf20Sopenharmony_ci		 size_t to_offset,
228c2ecf20Sopenharmony_ci		 size_t to_size,
238c2ecf20Sopenharmony_ci		 const void *from,
248c2ecf20Sopenharmony_ci		 size_t len);
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ciu32 vidtv_memset(void *to,
278c2ecf20Sopenharmony_ci		 size_t to_offset,
288c2ecf20Sopenharmony_ci		 size_t to_size,
298c2ecf20Sopenharmony_ci		 int c,
308c2ecf20Sopenharmony_ci		 size_t len);
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci#endif // VIDTV_COMMON_H
33