as10x_handle.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Abilis Systems Single DVB-T Receiver
  3. * Copyright (C) 2008 Pierrick Hascoet <pierrick.hascoet@abilis.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2, or (at your option)
  8. * any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. */
  15. #ifndef _AS10X_HANDLE_H
  16. #define _AS10X_HANDLE_H
  17. struct as10x_bus_adapter_t;
  18. struct as102_dev_t;
  19. #include "as10x_cmd.h"
  20. /* values for "mode" field */
  21. #define REGMODE8 8
  22. #define REGMODE16 16
  23. #define REGMODE32 32
  24. struct as102_priv_ops_t {
  25. int (*upload_fw_pkt)(struct as10x_bus_adapter_t *bus_adap,
  26. unsigned char *buf, int buflen, int swap32);
  27. int (*send_cmd)(struct as10x_bus_adapter_t *bus_adap,
  28. unsigned char *buf, int buflen);
  29. int (*xfer_cmd)(struct as10x_bus_adapter_t *bus_adap,
  30. unsigned char *send_buf, int send_buf_len,
  31. unsigned char *recv_buf, int recv_buf_len);
  32. int (*start_stream)(struct as102_dev_t *dev);
  33. void (*stop_stream)(struct as102_dev_t *dev);
  34. int (*reset_target)(struct as10x_bus_adapter_t *bus_adap);
  35. int (*read_write)(struct as10x_bus_adapter_t *bus_adap, uint8_t mode,
  36. uint32_t rd_addr, uint16_t rd_len,
  37. uint32_t wr_addr, uint16_t wr_len);
  38. int (*as102_read_ep2)(struct as10x_bus_adapter_t *bus_adap,
  39. unsigned char *recv_buf,
  40. int recv_buf_len);
  41. };
  42. #endif