Hirdetés
Hirdetés
Talpon vagyunk, köszönjük a sok biztatást! Ha segíteni szeretnél, boldogan ajánljuk Előfizetéseinket!
-
PROHARDVER!
Arduino hardverrel és szoftverrel foglakozó téma. Minden mikrovezérlő ami arduinoval programozható, és minden arduino program, board, és hardverrel kapcsolatos kérdések helye.
Új hozzászólás Aktív témák
-
Janos250
őstag
válasz
Teasüti #8228 üzenetére
UNO-nál nem tudom.
ESP32-n én így oldottam meg:
A union nem tartozik a lényegéhez, de nem volt most kedvem átberhelni, csak bekopiztam.typedef union konv {
uint64_t v64bit = 0 ;
struct {
uint32_t low32bit ;
uint32_t hi32bit ;
} s32bit;
struct {
uint16_t low32bit_low16bit ;
uint16_t low32bit_hi16bit ;
uint16_t hi32bit_low16bit ;
uint16_t hi32bit_hi16bit ;
} s16bit;
uint8_t v8bit[8];
};
uint64_t getCycleCount64() {
static uint32_t CycleCount32 = 0 ;
static konv CycleCount64 ;
static uint32_t ccount;
__asm__ __volatile__("esync; rsr %0,ccount":"=a" (ccount));
CycleCount32 = ccount ;
if (CycleCount64.s32bit.low32bit > CycleCount32 ) {
CycleCount64.s32bit.hi32bit++ ;
};
CycleCount64.s32bit.low32bit = CycleCount32 ;
return CycleCount64.v64bit ;
} ;
Új hozzászólás Aktív témák
- Akciós Windows 10 pro + Office 2019 professional plus csomag AZONNALI SZÁLLÍTÁS
- ÚJ Xiaomi Mi Robot Vacuum Mop Essential robotporszívó feltörlő 2db 1999 Ft
- Bomba ár! Lenovo ThinkPad T450 - i5-5GEN I 16GB I 256SSD I 14" HD+ I Cam I W10 I Garancia!
- Bomba ár! HP ZBook 15 G3 - i7-6820HQ I 16GB I 256GB SSD I Nvidia VGA I 15,6" FHD I Cam I W11 I Gari!
- HIBÁTLAN iPhone 11 64GB White -1 ÉV GARANCIA - Kártyafüggetlen, MS3027
Állásajánlatok
Cég: FOTC
Város: Budapest