That seems deadly accurate
This commit is contained in:
parent
f1ef2fbb7c
commit
49463eb8f8
1 changed files with 5 additions and 3 deletions
|
@ -73,16 +73,16 @@ static uint8_t spi_send_byte(uint8_t value) {
|
|||
|
||||
_delay_us(60);
|
||||
|
||||
PORTB |= (1 << PORTB5);
|
||||
|
||||
if (PINB & (1 << PINB3)) {
|
||||
ret |= 1;
|
||||
}
|
||||
|
||||
PORTB |= (1 << PORTB5);
|
||||
|
||||
_delay_us(60);
|
||||
}
|
||||
|
||||
_delay_us(210);
|
||||
_delay_us(150);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -103,6 +103,8 @@ static void spi_send_packet() {
|
|||
|
||||
response.device = spi_send_byte(0);
|
||||
response.status = spi_send_byte(0);
|
||||
|
||||
_delay_us(270);
|
||||
}
|
||||
|
||||
static uint16_t checksum() {
|
||||
|
|
Loading…
Add table
Reference in a new issue