mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-10-25 15:03:31 +00:00
porting: Improve linux sample
Allow to specify HCI device at start.
This commit is contained in:
@@ -37,6 +37,7 @@ static struct ble_npl_task s_task_hci;
|
||||
void nimble_host_task(void *param);
|
||||
void ble_hci_sock_ack_handler(void *param);
|
||||
void ble_hci_sock_init(void);
|
||||
void ble_hci_sock_set_device(int dev);
|
||||
|
||||
#define TASK_DEFAULT_PRIORITY 1
|
||||
#define TASK_DEFAULT_STACK NULL
|
||||
@@ -54,10 +55,15 @@ void *ble_host_task(void *param)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
/* allow to specify custom hci */
|
||||
if (argc > 1) {
|
||||
ble_hci_sock_set_device(atoi(argv[1]));
|
||||
}
|
||||
|
||||
ble_hci_sock_init();
|
||||
nimble_port_init();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user