tinyusb.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2022 Gunar Schorcht
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
9 #pragma once
10 
21 #include "periph_conf.h"
22 #include "tinyusb_hw_defaults.h"
23 
24 #ifndef TINYUSB_THREAD_STACKSIZE_MAIN
26 #define TINYUSB_THREAD_STACKSIZE (THREAD_STACKSIZE_DEFAULT)
27 #endif
28 
29 #ifndef TINYUSB_PRIORITY
31 #define TINYUSB_PRIORITY (2)
32 #endif
33 
34 #ifndef TINYUSB_TUD_RHPORT
36 #define TINYUSB_TUD_RHPORT 0
37 #endif
38 
39 #ifndef TINYUSB_TUH_RHPORT
41 #define TINYUSB_TUH_RHPORT 0
42 #endif
43 
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47 
48 #if MODULE_TINYUSB_CLASS_NET_RNDIS
49 #define SIZEOF_ETH_HDR 14
50 #endif
51 
59 int tinyusb_setup(void);
60 
61 #ifdef __cplusplus
62 }
63 #endif
64 
int tinyusb_setup(void)
Initialize the tinyUSB stack including used peripherals and start the tinyUSB thread.