plugin_wiegand.c 1018 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #include "plugin_interface.h"
  2. #include <flipper_application/flipper_application.h>
  3. static int wiegand_format_count(uint8_t bit_length, uint64_t bits) {
  4. UNUSED(bit_length);
  5. UNUSED(bits);
  6. return 1337;
  7. }
  8. static int wiegand_format_description(uint8_t bit_length, uint64_t bits, size_t index) {
  9. UNUSED(bit_length);
  10. UNUSED(bits);
  11. UNUSED(index);
  12. return 0;
  13. }
  14. /* Actual implementation of app<>plugin interface */
  15. static const PluginWiegand plugin_wiegand = {
  16. .name = "Plugin Wiegand",
  17. .count = &wiegand_format_count,
  18. .description = &wiegand_format_description,
  19. };
  20. /* Plugin descriptor to comply with basic plugin specification */
  21. static const FlipperAppPluginDescriptor plugin_wiegand_descriptor = {
  22. .appid = PLUGIN_APP_ID,
  23. .ep_api_version = PLUGIN_API_VERSION,
  24. .entry_point = &plugin_wiegand,
  25. };
  26. /* Plugin entry point - must return a pointer to const descriptor */
  27. const FlipperAppPluginDescriptor* plugin_wiegand_ep(void) {
  28. return &plugin_wiegand_descriptor;
  29. }