Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
d2ac5f17
Commit
d2ac5f17
authored
Oct 01, 2015
by
Johny Mattsson
Browse files
Changed os_intr_xxx to ets_intr_xxx.
The os_intr_xxx macros no longer exist in the SDK.
parent
3b9a42e2
Changes
5
Hide whitespace changes
Inline
Side-by-side
app/dhtlib/dht.c
View file @
d2ac5f17
...
...
@@ -253,7 +253,7 @@ int dht_readSensor(uint8_t pin, uint8_t wakeupDelay)
// delay(wakeupDelay);
for
(
i
=
0
;
i
<
wakeupDelay
;
i
++
)
os_delay_us
(
1000
);
// Disable interrupts
o
s_intr_lock
();
et
s_intr_lock
();
// digitalWrite(pin, HIGH); // T-go
DIRECT_WRITE_HIGH
(
pin
);
os_delay_us
(
40
);
...
...
@@ -306,7 +306,7 @@ int dht_readSensor(uint8_t pin, uint8_t wakeupDelay)
}
}
// Enable interrupts
o
s_intr_unlock
();
et
s_intr_unlock
();
// pinMode(pin, OUTPUT);
DIRECT_MODE_OUTPUT
(
pin
);
// digitalWrite(pin, HIGH);
...
...
@@ -316,4 +316,4 @@ int dht_readSensor(uint8_t pin, uint8_t wakeupDelay)
}
//
// END OF FILE
//
\ No newline at end of file
//
app/driver/onewire.c
View file @
d2ac5f17
...
...
@@ -60,8 +60,8 @@ sample code bearing this copyright.
#include "platform.h"
#include "osapi.h"
#define noInterrupts
o
s_intr_lock
#define interrupts
o
s_intr_unlock
#define noInterrupts
et
s_intr_lock
#define interrupts
et
s_intr_unlock
#define delayMicroseconds os_delay_us
// 1 for keeping the parasitic power on H
...
...
app/modules/gpio.c
View file @
d2ac5f17
...
...
@@ -64,7 +64,7 @@ static int lgpio_trig( lua_State* L )
}
else
if
(
sl
==
4
&&
c_strcmp
(
str
,
"down"
)
==
0
){
type
=
GPIO_PIN_INTR_NEGEDGE
;
}
else
if
(
sl
==
4
&&
c_strcmp
(
str
,
"both"
)
==
0
){
type
=
GPIO_PIN_INTR_ANYE
G
DE
;
type
=
GPIO_PIN_INTR_ANYED
G
E
;
}
else
if
(
sl
==
3
&&
c_strcmp
(
str
,
"low"
)
==
0
){
type
=
GPIO_PIN_INTR_LOLEVEL
;
}
else
if
(
sl
==
4
&&
c_strcmp
(
str
,
"high"
)
==
0
){
...
...
@@ -147,8 +147,8 @@ static int lgpio_write( lua_State* L )
}
#define DELAY_TABLE_MAX_LEN 256
#define noInterrupts
o
s_intr_lock
#define interrupts
o
s_intr_unlock
#define noInterrupts
et
s_intr_lock
#define interrupts
et
s_intr_unlock
#define delayMicroseconds os_delay_us
#define DIRECT_WRITE(pin, level) (GPIO_OUTPUT_SET(GPIO_ID_PIN(pin_num[pin]), level))
// Lua: serout( pin, firstLevel, delay_table, [repeatNum] )
...
...
app/modules/ws2801.c
View file @
d2ac5f17
...
...
@@ -115,11 +115,11 @@ static int ICACHE_FLASH_ATTR ws2801_writergb(lua_State* L) {
os_delay_us
(
10
);
o
s_intr_lock
();
et
s_intr_lock
();
ws2801_strip
(
buffer
,
length
);
o
s_intr_unlock
();
et
s_intr_unlock
();
return
0
;
}
...
...
app/modules/ws2812.c
View file @
d2ac5f17
...
...
@@ -94,9 +94,9 @@ static int ICACHE_FLASH_ATTR ws2812_writergb(lua_State* L)
platform_gpio_write
(
pin
,
0
);
// Send the buffer
o
s_intr_lock
();
et
s_intr_lock
();
ws2812_write
(
pin_num
[
pin
],
(
uint8_t
*
)
buffer
,
length
);
o
s_intr_unlock
();
et
s_intr_unlock
();
c_free
(
buffer
);
...
...
@@ -120,9 +120,9 @@ static int ICACHE_FLASH_ATTR ws2812_writegrb(lua_State* L) {
platform_gpio_write
(
pin
,
0
);
// Send the buffer
o
s_intr_lock
();
et
s_intr_lock
();
ws2812_write
(
pin_num
[
pin
],
(
uint8_t
*
)
buffer
,
length
);
o
s_intr_unlock
();
et
s_intr_unlock
();
return
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment