1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 10:52:44 +01:00
RIOT/pkg/tinyusb/contrib/include/tinyusb.h
2022-09-30 19:05:51 +02:00

63 lines
1.3 KiB
C

/*
* Copyright (C) 2022 Gunar Schorcht
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup pkg_tinyusb
* @{
*
* @file
* @brief TinyUSB API
*
* @author Gunar Schorcht <gunar@schorcht.net>
*/
#ifndef TINYUSB_H
#define TINYUSB_H
#include "periph_conf.h"
#ifndef TINYUSB_THREAD_STACKSIZE_MAIN
/** Stack size used for the tinyUSB thread */
#define TINYUSB_THREAD_STACKSIZE (THREAD_STACKSIZE_DEFAULT)
#endif
#ifndef TINYUSB_PRIORITY
/** Priority used for the tinyUSB thread */
#define TINYUSB_PRIORITY (2)
#endif
#ifndef TINYUSB_TUD_RHPORT
/** tinyUSB RHPort number used for device, default value is 0 */
#define TINYUSB_TUD_RHPORT 0
#endif
#ifndef TINYUSB_TUH_RHPORT
/** tinyUSB RHPort number used for host, defaults value is 0 */
#define TINYUSB_TUH_RHPORT 0
#endif
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Initialize the tinyUSB stack including used peripherals and start the tinyUSB thread
*
* @return 0 on success
* @return -ENODEV if peripherals couldn't be initialized
* @return -EINVAL or -EOVERFLOW if the thread couldn't be created
*/
int tinyusb_setup(void);
#ifdef __cplusplus
}
#endif
#endif /* TINYUSB_H */
/** @} */