Closed BogdanTheGeek closed 2 weeks ago
I'm not exactly happy with the inline defines for the type. Would
#if defined(CH32V20x) || defined(CH32V30x)
uint64_t start = SysTick->CNT;
#elif defined(CH32V10x) || defined(CH32X03x)
uint32_t start = SysTick->CNTL;
#else
uint32_t start = SysTick->CNT
#endif
be fine too? If I'm being too pedantic lmk, I'd just accept this PR then xD
Yes I am being too pedantic ;)
Added timeout in milliseconds argument and a return value to indicate weather timeout was reached.
Possible future enhancements:
printf
if timeout reached by default.