util.h 295 B

1234567891011121314151617
  1. #pragma once
  2. #ifndef MIN
  3. #define MIN(a,b) ((a)<(b)?(a):(b))
  4. #endif
  5. #include <stdint.h>
  6. /*
  7. 64 bit crc from ArduPilot
  8. */
  9. uint64_t crc_crc64(const uint32_t *data, uint16_t num_words);
  10. /*
  11. decode a base64 string
  12. */
  13. int32_t base64_decode(const char *s, uint8_t *out, const uint32_t max_len);