Initial commit
This commit is contained in:
31
firmware/App/Inc/FreeRTOSConfig.h
Normal file
31
firmware/App/Inc/FreeRTOSConfig.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
#define FREERTOS_CONFIG_H
|
||||
|
||||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configCPU_CLOCK_HZ ((unsigned long)72000000) // 72MHz
|
||||
#define configTICK_RATE_HZ ((TickType_t)1000)
|
||||
#define configMAX_PRIORITIES (5)
|
||||
#define configMINIMAL_STACK_SIZE ((unsigned short)128)
|
||||
#define configTOTAL_HEAP_SIZE ((size_t)(10 * 1024)) // 10KB Heap
|
||||
#define configMAX_TASK_NAME_LEN (16)
|
||||
#define configUSE_16_BIT_TICKS 0
|
||||
#define configIDLE_SHOULD_YIELD 1
|
||||
|
||||
/* Cortex-M3 specific */
|
||||
#define configPRIO_BITS 4
|
||||
#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 15
|
||||
#define configKERNEL_INTERRUPT_PRIORITY \
|
||||
(configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS))
|
||||
#define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 5
|
||||
#define configMAX_SYSCALL_INTERRUPT_PRIORITY \
|
||||
(configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS))
|
||||
|
||||
/* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS
|
||||
* standard names. */
|
||||
#define vPortSVCHandler SVC_Handler
|
||||
#define xPortPendSVHandler PendSV_Handler
|
||||
#define xPortSysTickHandler SysTick_Handler
|
||||
|
||||
#endif /* FREERTOS_CONFIG_H */
|
||||
31
firmware/App/Inc/tusb_config.h
Normal file
31
firmware/App/Inc/tusb_config.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef _TUSB_CONFIG_H_
|
||||
#define _TUSB_CONFIG_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// Выбор MCU и режима
|
||||
#define CFG_TUSB_MCU OPT_MCU_STM32F1
|
||||
#define CFG_TUSB_RHPORT0_MODE OPT_MODE_DEVICE
|
||||
|
||||
// Конфигурация OS (FreeRTOS)
|
||||
#define CFG_TUSB_OS OPT_OS_FREERTOS
|
||||
|
||||
// Выделение памяти (используем heap FreeRTOS)
|
||||
#define CFG_TUSB_MEM_SECTION
|
||||
#define CFG_TUSB_MEM_ALIGN __attribute__((aligned(4)))
|
||||
|
||||
// Конфигурация CDC (Communication Device Class)
|
||||
#define CFG_TUD_CDC 1
|
||||
#define CFG_TUD_CDC_RX_BUFSIZE 64
|
||||
#define CFG_TUD_CDC_TX_BUFSIZE 64
|
||||
|
||||
// Endpoint буферизация
|
||||
#define CFG_TUD_ENDPOINT0_SIZE 64
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TUSB_CONFIG_H_ */
|
||||
Reference in New Issue
Block a user