瀏覽代碼

Use proper SPI timing

Thomas Buck 8 年之前
父節點
當前提交
b563d80ab0
共有 1 個檔案被更改,包括 6 行新增3 行删除
  1. 6
    3
      include/arm/spi.h

+ 6
- 3
include/arm/spi.h 查看文件

@@ -35,9 +35,12 @@ uint8_t gpioGet(uint8_t num);
35 35
 #define GDO_0 gpioGet(25)
36 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 45
 #endif
43 46
 

Loading…
取消
儲存