Browse Source

Use proper SPI timing

Thomas Buck 8 years ago
parent
commit
b563d80ab0
1 changed files with 6 additions and 3 deletions
  1. 6
    3
      include/arm/spi.h

+ 6
- 3
include/arm/spi.h View File

35
 #define GDO_0 gpioGet(25)
35
 #define GDO_0 gpioGet(25)
36
 #define GDO_dir gpioDir(25, DIR_INPUT)
36
 #define GDO_dir gpioDir(25, DIR_INPUT)
37
 
37
 
38
-#include "timer.h"
39
-
40
-#define NOP() delay_us(1) // could be 62.5ns
38
+#define NOP() __asm__ __volatile__("nop\n\t" \
39
+                                   "nop\n\t" \
40
+                                   "nop\n\t" \
41
+                                   "nop\n\t" \
42
+                                   "nop\n\t" \
43
+                                   "nop\n\t")
41
 
44
 
42
 #endif
45
 #endif
43
 
46
 

Loading…
Cancel
Save