This repository has been archived on 2024-12-15. You can view files and clone it, but cannot push or open issues or pull requests.
Distancer/hardware.cpp

18 lines
175 B
C++

#include "hardware.h"
#include "avr/io.h"
void delay_us(uint16_t delay)
{
TCCR1B = (1 << CS10);
TCNT1 = 0;
while (true)
{
if (TCNT1 >= delay)
{
return;
}
}
}