summaryrefslogtreecommitdiff
path: root/examples/device/dynamic_configuration/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/device/dynamic_configuration/src/main.c')
-rw-r--r--examples/device/dynamic_configuration/src/main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/device/dynamic_configuration/src/main.c b/examples/device/dynamic_configuration/src/main.c
index 4c10f55b0..578f01d8c 100644
--- a/examples/device/dynamic_configuration/src/main.c
+++ b/examples/device/dynamic_configuration/src/main.c
@@ -1,4 +1,4 @@
-/*
+/*
* The MIT License (MIT)
*
* Copyright (c) 2019 Ha Thach (tinyusb.org)
@@ -55,7 +55,9 @@ void midi_task(void);
int main(void)
{
board_init();
- tusb_init();
+
+ // init device stack on configured roothub port
+ tud_init(BOARD_TUD_RHPORT);
while (1)
{
@@ -64,8 +66,6 @@ int main(void)
cdc_task();
midi_task();
}
-
- return 0;
}
//--------------------------------------------------------------------+
@@ -179,7 +179,7 @@ void midi_task(void)
start_ms += 286;
// Previous positions in the note sequence.
- int previous = note_pos - 1;
+ int previous = (int) (note_pos - 1);
// If we currently are at position 0, set the
// previous position to the last note in the sequence.