Skip to content

Commit

Permalink
use usleep
Browse files Browse the repository at this point in the history
  • Loading branch information
2m committed Jan 1, 1970
1 parent 0b2aced commit 859d946
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rpi/platform.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <bcm2835.h>
#include <stdio.h>
#include <time.h>
#include <unistd.h>

void print(char *str)
{
Expand All @@ -22,7 +22,7 @@ void print_buf(uint8_t *buf, uint8_t n)

void delay_ms(int ms)
{
nanosleep((struct timespec[]){{0, ms * 1000000}}, NULL);
usleep(ms * 1000);
}

void enable_spi()
Expand Down

0 comments on commit 859d946

Please sign in to comment.