-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from pingdynasty/develop
Release v22.2.0
- Loading branch information
Showing
244 changed files
with
33,400 additions
and
7,637 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
/* USER CODE BEGIN Header */ | ||
/* | ||
* FreeRTOS Kernel V10.2.1 | ||
* Portion Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* Portion Copyright (C) 2019 StMicroelectronics, Inc. All Rights Reserved. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
* this software and associated documentation files (the "Software"), to deal in | ||
* the Software without restriction, including without limitation the rights to | ||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
* the Software, and to permit persons to whom the Software is furnished to do so, | ||
* subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
* | ||
* http://www.FreeRTOS.org | ||
* http://aws.amazon.com/freertos | ||
* | ||
* 1 tab == 4 spaces! | ||
*/ | ||
/* USER CODE END Header */ | ||
|
||
#ifndef FREERTOS_CONFIG_H | ||
#define FREERTOS_CONFIG_H | ||
|
||
/*----------------------------------------------------------- | ||
* Application specific definitions. | ||
* | ||
* These definitions should be adjusted for your particular hardware and | ||
* application requirements. | ||
* | ||
* These parameters and more are described within the 'configuration' section of the | ||
* FreeRTOS API documentation available on the FreeRTOS.org web site. | ||
* | ||
* See http://www.freertos.org/a00110.html | ||
*----------------------------------------------------------*/ | ||
|
||
/* USER CODE BEGIN Includes */ | ||
#include "device.h" | ||
#ifdef DEBUG_STACK | ||
#define configUSE_TRACE_FACILITY 1 | ||
#define INCLUDE_uxTaskGetStackHighWaterMark 1 | ||
#endif /* DEBUG_STACK */ | ||
/* USER CODE END Includes */ | ||
|
||
/* Ensure definitions are only used by the compiler, and not by the assembler. */ | ||
#if defined(__ICCARM__) || defined(__CC_ARM) || defined(__GNUC__) | ||
#include <stdint.h> | ||
extern uint32_t SystemCoreClock; | ||
void xPortSysTickHandler(void); | ||
#endif | ||
#define configENABLE_FPU 0 | ||
#define configENABLE_MPU 0 | ||
|
||
#define configUSE_PREEMPTION 0 | ||
#define configSUPPORT_STATIC_ALLOCATION 1 | ||
#define configSUPPORT_DYNAMIC_ALLOCATION 1 | ||
#define configUSE_IDLE_HOOK 0 | ||
#define configUSE_TICK_HOOK 0 | ||
#define configCPU_CLOCK_HZ ( SystemCoreClock ) | ||
#define configTICK_RATE_HZ ((TickType_t)1000) | ||
#define configMAX_PRIORITIES ( 7 ) | ||
#define configMINIMAL_STACK_SIZE ((uint16_t)128) | ||
#define configTOTAL_HEAP_SIZE ((size_t)15360) | ||
#define configMAX_TASK_NAME_LEN ( 16 ) | ||
#define configUSE_16_BIT_TICKS 0 | ||
#define configQUEUE_REGISTRY_SIZE 8 | ||
#define configCHECK_FOR_STACK_OVERFLOW 2 | ||
#define configUSE_MALLOC_FAILED_HOOK 1 | ||
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1 | ||
/* USER CODE BEGIN MESSAGE_BUFFER_LENGTH_TYPE */ | ||
/* Defaults to size_t for backward compatibility, but can be changed | ||
if lengths will always be less than the number of bytes in a size_t. */ | ||
#define configMESSAGE_BUFFER_LENGTH_TYPE size_t | ||
/* USER CODE END MESSAGE_BUFFER_LENGTH_TYPE */ | ||
|
||
/* Co-routine definitions. */ | ||
#define configUSE_CO_ROUTINES 0 | ||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) | ||
|
||
/* Set the following definitions to 1 to include the API function, or zero | ||
to exclude the API function. */ | ||
#define INCLUDE_vTaskPrioritySet 1 | ||
#define INCLUDE_uxTaskPriorityGet 1 | ||
#define INCLUDE_vTaskDelete 1 | ||
#define INCLUDE_vTaskCleanUpResources 0 | ||
#define INCLUDE_vTaskSuspend 1 | ||
#define INCLUDE_vTaskDelayUntil 1 | ||
#define INCLUDE_vTaskDelay 1 | ||
#define INCLUDE_xTaskGetSchedulerState 1 | ||
|
||
/* Cortex-M specific definitions. */ | ||
#ifdef __NVIC_PRIO_BITS | ||
/* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */ | ||
#define configPRIO_BITS __NVIC_PRIO_BITS | ||
#else | ||
#define configPRIO_BITS 4 | ||
#endif | ||
|
||
/* The lowest interrupt priority that can be used in a call to a "set priority" | ||
function. */ | ||
#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 15 | ||
|
||
/* The highest interrupt priority that can be used by any interrupt service | ||
routine that makes calls to interrupt safe FreeRTOS API functions. DO NOT CALL | ||
INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER | ||
PRIORITY THAN THIS! (higher priorities are lower numeric values. */ | ||
#define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 5 | ||
|
||
/* Interrupt priorities used by the kernel port layer itself. These are generic | ||
to all Cortex-M ports, and do not rely on any particular library functions. */ | ||
#define configKERNEL_INTERRUPT_PRIORITY ( configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) ) | ||
/* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!! | ||
See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */ | ||
#define configMAX_SYSCALL_INTERRUPT_PRIORITY ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) ) | ||
|
||
/* Normal assert() semantics without relying on the provision of an assert.h | ||
header file. */ | ||
/* USER CODE BEGIN 1 */ | ||
#define configASSERT( x ) if ((x) == 0) {taskDISABLE_INTERRUPTS(); for( ;; );} | ||
/* USER CODE END 1 */ | ||
|
||
/* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS | ||
standard names. */ | ||
#define vPortSVCHandler SVC_Handler | ||
#define xPortPendSVHandler PendSV_Handler | ||
|
||
/* IMPORTANT: This define is commented when used with STM32Cube firmware, when the timebase source is SysTick, | ||
to prevent overwriting SysTick_Handler defined within STM32Cube HAL */ | ||
|
||
/* #define xPortSysTickHandler SysTick_Handler */ | ||
|
||
/* USER CODE BEGIN Defines */ | ||
/* Section where parameter definitions can be added (for instance, to override default ones in FreeRTOS.h) */ | ||
/* USER CODE END Defines */ | ||
|
||
#endif /* FREERTOS_CONFIG_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#include "main.h" | ||
#include "stm32h7xx_hal.h" | ||
|
||
#define OWL_XIBECA | ||
#define HARDWARE_ID XIBECA_HARDWARE | ||
#define HARDWARE_VERSION "Xibeca" | ||
/* #define NO_EXTERNAL_RAM */ | ||
/* #define NO_CCM_RAM */ | ||
#define DMA_RAM __attribute__ ((section (".dmadata"))) | ||
#define USE_PLUS_RAM | ||
|
||
#ifdef NDEBUG | ||
#define USE_ICACHE | ||
#define USE_DCACHE | ||
#endif | ||
|
||
#define ARM_CYCLES_PER_SAMPLE (480000000/AUDIO_SAMPLINGRATE) /* 480MHz / 48kHz */ | ||
|
||
// todo: quad SPI | ||
/* #define USE_SPI_FLASH */ | ||
/* #define SPI_FLASH_HSPI hqspi */ | ||
|
||
/* #define AUDIO_INPUT_GAIN 114 */ | ||
#define AUDIO_OUTPUT_GAIN 114 | ||
|
||
#define USE_CODEC | ||
#define USE_PCM3168A | ||
#define CODEC_ADC_INVERT | ||
#define CODEC_DAC_INVERT | ||
/* #define CODEC_HP_FILTER */ | ||
#define CODEC_SPI hspi2 | ||
|
||
/* USB audio settings */ | ||
#define AUDIO_BITS_PER_SAMPLE 16 | ||
#define AUDIO_BYTES_PER_SAMPLE (AUDIO_BITS_PER_SAMPLE/8) | ||
#define AUDIO_CHANNELS 4 | ||
#define AUDIO_INT32_TO_SAMPLE(x) ((x)>>8) | ||
#define AUDIO_SAMPLE_TO_INT32(x) ((int32_t)(x)<<8) | ||
|
||
#define USE_USBD_AUDIO | ||
#define USE_USBD_AUDIO_FEATURES | ||
#define USE_USBD_AUDIO_TX // microphone | ||
#define USE_USBD_AUDIO_RX // speaker | ||
#define USE_USBD_RX_FB | ||
#define USE_USBD_FS | ||
#define USBD_HANDLE hUsbDeviceFS | ||
|
||
/* #define USE_UART_MIDI_RX */ | ||
/* #define USE_UART_MIDI_TX */ | ||
/* #define UART_MIDI_HANDLE huart2 */ | ||
/* #define UART_MIDI_RX_BUFFER_SIZE 256 */ | ||
|
||
#define AUDIO_SAMPLINGRATE 48000 | ||
|
||
#define USE_ADC | ||
#define ADC_PERIPH hadc1 | ||
#define ADC_A 0 | ||
#define ADC_B 1 | ||
#define ADC_C 2 | ||
#define ADC_D 3 | ||
|
||
#define NOF_ADC_VALUES 4 | ||
#define NOF_PARAMETERS 40 | ||
#define NOF_BUTTONS (0+4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
/* USER CODE BEGIN Header */ | ||
/** | ||
****************************************************************************** | ||
* @file : main.h | ||
* @brief : Header for main.c file. | ||
* This file contains the common defines of the application. | ||
****************************************************************************** | ||
* @attention | ||
* | ||
* <h2><center>© Copyright (c) 2021 STMicroelectronics. | ||
* All rights reserved.</center></h2> | ||
* | ||
* This software component is licensed by ST under Ultimate Liberty license | ||
* SLA0044, the "License"; You may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at: | ||
* www.st.com/SLA0044 | ||
* | ||
****************************************************************************** | ||
*/ | ||
/* USER CODE END Header */ | ||
|
||
/* Define to prevent recursive inclusion -------------------------------------*/ | ||
#ifndef __MAIN_H | ||
#define __MAIN_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/* Includes ------------------------------------------------------------------*/ | ||
#include "stm32h7xx_hal.h" | ||
|
||
/* Private includes ----------------------------------------------------------*/ | ||
/* USER CODE BEGIN Includes */ | ||
|
||
/* USER CODE END Includes */ | ||
|
||
/* Exported types ------------------------------------------------------------*/ | ||
/* USER CODE BEGIN ET */ | ||
|
||
/* USER CODE END ET */ | ||
|
||
/* Exported constants --------------------------------------------------------*/ | ||
/* USER CODE BEGIN EC */ | ||
|
||
/* USER CODE END EC */ | ||
|
||
/* Exported macro ------------------------------------------------------------*/ | ||
/* USER CODE BEGIN EM */ | ||
|
||
/* USER CODE END EM */ | ||
|
||
void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim); | ||
|
||
/* Exported functions prototypes ---------------------------------------------*/ | ||
void Error_Handler(void); | ||
|
||
/* USER CODE BEGIN EFP */ | ||
|
||
/* USER CODE END EFP */ | ||
|
||
/* Private defines -----------------------------------------------------------*/ | ||
#define FLASH_DQ2_Pin GPIO_PIN_2 | ||
#define FLASH_DQ2_GPIO_Port GPIOE | ||
#define FLASH_NCS_Pin GPIO_PIN_6 | ||
#define FLASH_NCS_GPIO_Port GPIOG | ||
#define FLASH_DQ3_Pin GPIO_PIN_6 | ||
#define FLASH_DQ3_GPIO_Port GPIOF | ||
#define ADC_RST_Pin GPIO_PIN_3 | ||
#define ADC_RST_GPIO_Port GPIOG | ||
#define FLASH_CLK_Pin GPIO_PIN_10 | ||
#define FLASH_CLK_GPIO_Port GPIOF | ||
#define FLASH_DQ1_Pin GPIO_PIN_9 | ||
#define FLASH_DQ1_GPIO_Port GPIOF | ||
#define FLASH_DQ0_Pin GPIO_PIN_8 | ||
#define FLASH_DQ0_GPIO_Port GPIOF | ||
#define ADC1_Pin GPIO_PIN_0 | ||
#define ADC1_GPIO_Port GPIOC | ||
#define ADC5_Pin GPIO_PIN_1 | ||
#define ADC5_GPIO_Port GPIOC | ||
#define ADC_SPI_MISO_Pin GPIO_PIN_2 | ||
#define ADC_SPI_MISO_GPIO_Port GPIOC | ||
#define ADC_SPI_MOSI_Pin GPIO_PIN_3 | ||
#define ADC_SPI_MOSI_GPIO_Port GPIOC | ||
#define ADC2_Pin GPIO_PIN_2 | ||
#define ADC2_GPIO_Port GPIOA | ||
#define ADC6_Pin GPIO_PIN_6 | ||
#define ADC6_GPIO_Port GPIOA | ||
#define ADC4_Pin GPIO_PIN_5 | ||
#define ADC4_GPIO_Port GPIOC | ||
#define ADC3_Pin GPIO_PIN_1 | ||
#define ADC3_GPIO_Port GPIOB | ||
#define ADC7_Pin GPIO_PIN_0 | ||
#define ADC7_GPIO_Port GPIOB | ||
#define ADC_SPI_CLK_Pin GPIO_PIN_10 | ||
#define ADC_SPI_CLK_GPIO_Port GPIOB | ||
#define ADC_SPI_NCS_Pin GPIO_PIN_11 | ||
#define ADC_SPI_NCS_GPIO_Port GPIOB | ||
/* USER CODE BEGIN Private defines */ | ||
|
||
#define OLED_DC_Pin GPIO_PIN_11 | ||
#define OLED_DC_GPIO_Port GPIOC | ||
|
||
#define ADC_NCS_Pin ADC_SPI_NCS_Pin | ||
#define ADC_NCS_GPIO_Port ADC_SPI_NCS_GPIO_Port | ||
#define ADC_RESET_Pin ADC_RST_Pin | ||
#define ADC_RESET_GPIO_Port ADC_RST_GPIO_Port | ||
|
||
#define FLASH_nCS_Pin FLASH_NCS_Pin | ||
#define FLASH_nCS_GPIO_Port FLASH_NCS_GPIO_Port | ||
#define FLASH_WP_Pin FLASH_DQ2_Pin | ||
#define FLASH_WP_GPIO_Port FLASH_DQ2_GPIO_Port | ||
#define FLASH_HOLD_Pin FLASH_DQ3_Pin | ||
#define FLASH_HOLD_GPIO_Port FLASH_DQ3_GPIO_Port | ||
|
||
/* USER CODE END Private defines */ | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* __MAIN_H */ | ||
|
||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
Oops, something went wrong.