ESP32 Native version of Blinky, featureful controller code for WS2811/WS2812/NeoPixels
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

14 satır
341B

  1. #include <sys/time.h>
  2. #include "utils.hpp"
  3. int64_t time_us() {
  4. /*struct timeval tv_now;
  5. gettimeofday(&tv_now, NULL);
  6. return (int64_t)tv_now.tv_sec * 1000000L + (int64_t)tv_now.tv_usec;*/
  7. struct timespec ts;
  8. clock_gettime(CLOCK_MONOTONIC, &ts);
  9. return (int64_t)ts.tv_sec * 1000000L + (int64_t)ts.tv_nsec / 1000L;
  10. }