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
9f8dc027
Commit
9f8dc027
authored
Jan 10, 2017
by
Johny Mattsson
Browse files
Updated to latest IDF.
parent
ea59007b
Changes
2
Show whitespace changes
Inline
Side-by-side
components/modules/bthci.c
View file @
9f8dc027
...
...
@@ -188,7 +188,7 @@ static int on_bthci_receive (uint8_t *data, uint16_t len)
return
0
;
}
static
const
vhci_host_callback_t
bthci_callbacks
=
static
const
esp_
vhci_host_callback_t
bthci_callbacks
=
{
on_bthci_can_send
,
on_bthci_receive
...
...
@@ -200,7 +200,7 @@ static const vhci_host_callback_t bthci_callbacks =
// Expects callback function at top of stack
static
int
send_hci_command
(
lua_State
*
L
,
uint8_t
*
data
,
unsigned
len
)
{
if
(
API
_vhci_host_check_send_available
())
if
(
esp
_vhci_host_check_send_available
())
{
uint16_t
cmd
=
(((
uint16_t
)
data
[
2
])
<<
8
)
|
data
[
1
];
for
(
int
i
=
0
;
i
<
MAX_CMD_Q
;
++
i
)
...
...
@@ -214,7 +214,7 @@ static int send_hci_command (lua_State *L, uint8_t *data, unsigned len)
lua_pushvalue
(
L
,
-
1
);
cmd_q
[
i
].
cb_ref
=
luaL_ref
(
L
,
LUA_REGISTRYINDEX
);
}
API
_vhci_host_send_packet
(
data
,
len
);
esp
_vhci_host_send_packet
(
data
,
len
);
return
0
;
}
}
...
...
@@ -245,7 +245,7 @@ static void enable_le_meta_events (void)
STREAM_U8
(
p
,
0x00
);
STREAM_U8
(
p
,
0x20
);
// LE Meta-Event
API
_vhci_host_send_packet
(
buf
,
sizeof
(
buf
));
esp
_vhci_host_send_packet
(
buf
,
sizeof
(
buf
));
}
...
...
@@ -327,9 +327,9 @@ static int lbthci_init (lua_State *L)
for
(
int
i
=
0
;
i
<
MAX_CMD_Q
;
++
i
)
cmd_q
[
i
].
cb_ref
=
LUA_NOREF
;
bt_controller_init
();
esp_
bt_controller_init
();
API
_vhci_host_register_callback
(
&
bthci_callbacks
);
esp
_vhci_host_register_callback
(
&
bthci_callbacks
);
enable_le_meta_events
();
return
0
;
...
...
esp32-esp-idf
@
8615dbd4
Compare
8bcd341f
...
8615dbd4
Subproject commit 8
bcd341fcae23c534ea98f47d1ba33e1694a9e48
Subproject commit 8
615dbd486ef123876662a5664b3527a24daa92e
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