multiplex-mappers-internal.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
  2. // Copyright (C) 2017 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. #include <vector>
  16. #include "pixel-mapper.h"
  17. namespace rgb_matrix {
  18. namespace internal {
  19. class MultiplexMapper : public PixelMapper {
  20. public:
  21. // Function that edits the original rows and columns of the panels
  22. // provided by the user to the actual underlying mapping. This is called
  23. // before we do the actual set-up of the GPIO mapping as this influences
  24. // the hardware interface.
  25. // This is so that the user can provide the rows/columns they see.
  26. virtual void EditColsRows(int *cols, int *rows) const = 0;
  27. };
  28. // Returns a vector of the registered Multiplex mappers.
  29. typedef std::vector<const MultiplexMapper*> MuxMapperList;
  30. const MuxMapperList &GetRegisteredMultiplexMappers();
  31. } // namespace internal
  32. } // namespace rgb_matrix