mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-05 21:59:45 +00:00
posix-h4: allow to specify h4 device with -u option
This commit is contained in:
parent
5ddac27281
commit
c5ee5b328f
@ -221,6 +221,14 @@ int main(int argc, const char * argv[]){
|
|||||||
// config.device_name = "/dev/tty.usbserial-A9OVNX5P"; // RedBear IoT pHAT breakout board
|
// config.device_name = "/dev/tty.usbserial-A9OVNX5P"; // RedBear IoT pHAT breakout board
|
||||||
config.device_name = "/dev/tty.usbserial-A900K0VK"; // CSR8811 breakout board
|
config.device_name = "/dev/tty.usbserial-A900K0VK"; // CSR8811 breakout board
|
||||||
|
|
||||||
|
// accept path from command line
|
||||||
|
if (argc >= 3 && strcmp(argv[1], "-u") == 0){
|
||||||
|
config.device_name = argv[2];
|
||||||
|
argc -= 2;
|
||||||
|
memmove(&argv[0], &argv[2], argc * sizeof(char *));
|
||||||
|
}
|
||||||
|
printf("H4 device: %s\n", config.device_name);
|
||||||
|
|
||||||
// init HCI
|
// init HCI
|
||||||
const btstack_uart_block_t * uart_driver = btstack_uart_block_posix_instance();
|
const btstack_uart_block_t * uart_driver = btstack_uart_block_posix_instance();
|
||||||
const hci_transport_t * transport = hci_transport_h4_instance(uart_driver);
|
const hci_transport_t * transport = hci_transport_h4_instance(uart_driver);
|
||||||
|
Loading…
Reference in New Issue
Block a user