Keyboard firmwares for Atmel AVR and Cortex-M
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.

util.h 251B

1234567891011121314151617
  1. #ifndef UTIL_H
  2. #define UTIL_H 1
  3. #include <stdint.h>
  4. // convert to L string
  5. #define LSTR(s) XLSTR(s)
  6. #define XLSTR(s) L ## #s
  7. // convert to string
  8. #define STR(s) XSTR(s)
  9. #define XSTR(s) #s
  10. int bitpop(uint8_t bits);
  11. int biton(uint8_t bits);
  12. #endif