hardware-mapping.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* -*- mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
  2. * Copyright (C) 2013 Henner Zeller <h.zeller@acm.org>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation version 2.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program. If not, see <http: *gnu.org/licenses/gpl-2.0.txt>
  15. */
  16. #ifndef RPI_HARDWARE_MAPPING_H
  17. #define RPI_HARDWARE_MAPPING_H
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. #include "gpio-bits.h"
  22. struct HardwareMapping {
  23. const char *name;
  24. int max_parallel_chains;
  25. gpio_bits_t output_enable;
  26. gpio_bits_t clock;
  27. gpio_bits_t strobe;
  28. gpio_bits_t a, b, c, d, e;
  29. gpio_bits_t p0_r1, p0_g1, p0_b1;
  30. gpio_bits_t p0_r2, p0_g2, p0_b2;
  31. gpio_bits_t p1_r1, p1_g1, p1_b1;
  32. gpio_bits_t p1_r2, p1_g2, p1_b2;
  33. gpio_bits_t p2_r1, p2_g1, p2_b1;
  34. gpio_bits_t p2_r2, p2_g2, p2_b2;
  35. gpio_bits_t p3_r1, p3_g1, p3_b1;
  36. gpio_bits_t p3_r2, p3_g2, p3_b2;
  37. gpio_bits_t p4_r1, p4_g1, p4_b1;
  38. gpio_bits_t p4_r2, p4_g2, p4_b2;
  39. gpio_bits_t p5_r1, p5_g1, p5_b1;
  40. gpio_bits_t p5_r2, p5_g2, p5_b2;
  41. };
  42. extern struct HardwareMapping matrix_hardware_mappings[];
  43. #ifdef __cplusplus
  44. } // extern C
  45. #endif
  46. #endif