More shr16 delay

pull/134/head
Alex Voinea 2021-10-25 12:38:55 +02:00
parent 22522c253f
commit 70a2ab3ddb
1 changed files with 3 additions and 3 deletions

View File

@ -28,11 +28,11 @@ void SHR16::Write(uint16_t v) {
_delay_us(1); _delay_us(1);
for (uint16_t m = 0x8000; m; m >>= 1) { for (uint16_t m = 0x8000; m; m >>= 1) {
WritePin(SHR16_DATA, (Level)((m & v) != 0)); WritePin(SHR16_DATA, (Level)((m & v) != 0));
asm("nop"); _delay_us(1);
WritePin(SHR16_CLOCK, Level::high); WritePin(SHR16_CLOCK, Level::high);
asm("nop"); _delay_us(1);
WritePin(SHR16_CLOCK, Level::low); WritePin(SHR16_CLOCK, Level::low);
asm("nop"); _delay_us(1);
} }
WritePin(SHR16_LATCH, Level::high); WritePin(SHR16_LATCH, Level::high);
shr16_v = v; shr16_v = v;