You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
714 B

8 months ago
  1. #ifndef _config_h__
  2. #define _config_h__
  3. #define NUM_CHANNELS 4
  4. #define SERIAL_NUM_LEN 6
  5. struct eeprom_cfg {
  6. uint8_t serial[SERIAL_NUM_LEN];
  7. uint8_t mode;
  8. uint8_t poll_interval[NUM_CHANNELS];
  9. uint32_t flags;
  10. };
  11. #define FLAG_GC_FULL_SLIDERS 0x01
  12. #define FLAG_GC_INVERT_TRIGS 0x02
  13. #define FLAG_GC_SLIDERS_AS_BUTTONS 0x04
  14. #define FLAG_DISABLE_ANALOG_TRIGGERS 0x08
  15. #define FLAG_SWAP_STICK_AND_DPAD 0x10
  16. void eeprom_app_write_defaults(void);
  17. void eeprom_app_ready(void);
  18. unsigned char config_setParam(unsigned char param, const unsigned char *value);
  19. unsigned char config_getParam(unsigned char param, unsigned char *value, unsigned char max_len);
  20. uint8_t config_getSupportedParams(uint8_t *dst);
  21. #endif