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
a271ce4d
Commit
a271ce4d
authored
Jan 19, 2017
by
ffedoroff
Committed by
Marcel Stör
Jan 19, 2017
Browse files
Invert signal on rfswitch pin (#1738)
Since that code was migrated from Arduino, I should invert pin
parent
a18826ec
Changes
1
Show whitespace changes
Inline
Side-by-side
app/modules/rfswitch.c
View file @
a271ce4d
...
@@ -63,9 +63,9 @@ static const Protocol proto[] = {
...
@@ -63,9 +63,9 @@ static const Protocol proto[] = {
* Transmit a single high-low pulse.
* Transmit a single high-low pulse.
*/
*/
void
transmit
(
HighLow
pulses
,
bool
invertedSignal
,
int
pulseLength
,
int
pin
)
{
void
transmit
(
HighLow
pulses
,
bool
invertedSignal
,
int
pulseLength
,
int
pin
)
{
platform_gpio_write
(
pin
,
invertedSignal
);
os_delay_us
(
pulseLength
*
pulses
.
high
);
platform_gpio_write
(
pin
,
!
invertedSignal
);
platform_gpio_write
(
pin
,
!
invertedSignal
);
os_delay_us
(
pulseLength
*
pulses
.
high
);
platform_gpio_write
(
pin
,
invertedSignal
);
os_delay_us
(
pulseLength
*
pulses
.
low
);
os_delay_us
(
pulseLength
*
pulses
.
low
);
}
}
...
@@ -85,7 +85,6 @@ void send(unsigned long protocol_id, unsigned long pulse_length, unsigned long r
...
@@ -85,7 +85,6 @@ void send(unsigned long protocol_id, unsigned long pulse_length, unsigned long r
transmit
(
p
.
zero
,
p
.
invertedSignal
,
pulse_length
,
pin
);
transmit
(
p
.
zero
,
p
.
invertedSignal
,
pulse_length
,
pin
);
}
}
transmit
(
p
.
syncFactor
,
p
.
invertedSignal
,
pulse_length
,
pin
);
transmit
(
p
.
syncFactor
,
p
.
invertedSignal
,
pulse_length
,
pin
);
platform_gpio_write
(
pin
,
false
);
}
}
}
}
...
...
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