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
aa710d1f
Commit
aa710d1f
authored
Jun 28, 2015
by
Vowstar
Browse files
Merge pull request #513 from NodeUSB/dev096
update 433MHz transmission comment, add static ICACHE_FLASH_ATTR flag
parents
bfd2b634
66ca7f6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/modules/rc.c
View file @
aa710d1f
...
@@ -9,13 +9,13 @@
...
@@ -9,13 +9,13 @@
#define defProtocol 1
#define defProtocol 1
#define defRepeat 10
#define defRepeat 10
#define defBits 24
#define defBits 24
void
transmit
(
int
pin
,
int
pulseLen
,
int
nHighPulses
,
int
nLowPulses
)
{
static
void
ICACHE_FLASH_ATTR
transmit
(
int
pin
,
int
pulseLen
,
int
nHighPulses
,
int
nLowPulses
)
{
platform_gpio_write
(
pin
,
1
);
platform_gpio_write
(
pin
,
1
);
os_delay_us
(
pulseLen
*
nHighPulses
);
os_delay_us
(
pulseLen
*
nHighPulses
);
platform_gpio_write
(
pin
,
0
);
platform_gpio_write
(
pin
,
0
);
os_delay_us
(
pulseLen
*
nLowPulses
);
os_delay_us
(
pulseLen
*
nLowPulses
);
}
}
//rc.send(
0
,267715,24,185,1) --GPIO, code, bits, pulselen, protocol
//rc.send(
4
,267715,24,185,1
,10
) --GPIO, code, bits, pulselen, protocol
, repeat
static
int
ICACHE_FLASH_ATTR
rc_send
(
lua_State
*
L
)
{
static
int
ICACHE_FLASH_ATTR
rc_send
(
lua_State
*
L
)
{
const
uint8_t
pin
=
luaL_checkinteger
(
L
,
1
);
const
uint8_t
pin
=
luaL_checkinteger
(
L
,
1
);
platform_gpio_mode
(
pin
,
PLATFORM_GPIO_OUTPUT
,
PLATFORM_GPIO_FLOAT
);
platform_gpio_mode
(
pin
,
PLATFORM_GPIO_OUTPUT
,
PLATFORM_GPIO_FLOAT
);
...
...
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