I2C toy code
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

5 anni fa
1234567891011121314151617181920212223242526272829303132
  1. /* LibTomCrypt, modular cryptographic library -- Tom St Denis
  2. *
  3. * LibTomCrypt is a library that provides various cryptographic
  4. * algorithms in a highly modular and flexible manner.
  5. *
  6. * The library is free for all purposes without any express
  7. * guarantee it works.
  8. */
  9. #ifndef DEMOS_COMMON_H_
  10. #define DEMOS_COMMON_H_
  11. #include <tomcrypt.h>
  12. extern prng_state yarrow_prng;
  13. #ifdef LTC_VERBOSE
  14. #define DO(x) do { fprintf(stderr, "%s:\n", #x); run_cmd((x), __LINE__, __FILE__, #x, NULL); } while (0)
  15. #define DOX(x, str) do { fprintf(stderr, "%s - %s:\n", #x, (str)); run_cmd((x), __LINE__, __FILE__, #x, (str)); } while (0)
  16. #else
  17. #define DO(x) do { run_cmd((x), __LINE__, __FILE__, #x, NULL); } while (0)
  18. #define DOX(x, str) do { run_cmd((x), __LINE__, __FILE__, #x, (str)); } while (0)
  19. #endif
  20. void run_cmd(int res, int line, char *file, char *cmd, const char *algorithm);
  21. void print_hex(const char* what, const void* v, const unsigned long l);
  22. #endif /* DEMOS_COMMON_H_ */
  23. /* ref: $Format:%D$ */
  24. /* git commit: $Format:%H$ */
  25. /* commit time: $Format:%ai$ */