新增dr_lib库
This commit is contained in:
parent
349f75d257
commit
d30c7245ed
@ -875,11 +875,11 @@ void Error_Handler(void)
|
|||||||
{
|
{
|
||||||
/* USER CODE BEGIN Error_Handler_Debug */
|
/* USER CODE BEGIN Error_Handler_Debug */
|
||||||
/* User can add his own implementation to report the HAL error return state */
|
/* User can add his own implementation to report the HAL error return state */
|
||||||
HAL_GPIO_WritePin(LED_P_GPIO_Port, LED_P_Pin, GPIO_PIN_RESET);
|
HAL_GPIO_WritePin(LED_P_GPIO_Port, LED_P_Pin, GPIO_PIN_SET);
|
||||||
|
|
||||||
__disable_irq();
|
__disable_irq();
|
||||||
while (1)
|
while (1) {
|
||||||
{
|
|
||||||
}
|
}
|
||||||
/* USER CODE END Error_Handler_Debug */
|
/* USER CODE END Error_Handler_Debug */
|
||||||
}
|
}
|
||||||
|
|||||||
7
Middlewares/Third_Party/dr_lib/CMakeLists.txt
vendored
Normal file
7
Middlewares/Third_Party/dr_lib/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.22)
|
||||||
|
|
||||||
|
add_library(dr_lib INTERFACE)
|
||||||
|
|
||||||
|
target_include_directories(dr_lib INTERFACE
|
||||||
|
"${CMAKE_CURRENT_LIST_DIR}"
|
||||||
|
)
|
||||||
47
Middlewares/Third_Party/dr_lib/LICENSE
vendored
Normal file
47
Middlewares/Third_Party/dr_lib/LICENSE
vendored
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
This software is available as a choice of the following licenses. Choose
|
||||||
|
whichever you prefer.
|
||||||
|
|
||||||
|
===============================================================================
|
||||||
|
ALTERNATIVE 1 - Public Domain (www.unlicense.org)
|
||||||
|
===============================================================================
|
||||||
|
This is free and unencumbered software released into the public domain.
|
||||||
|
|
||||||
|
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
|
||||||
|
software, either in source code form or as a compiled binary, for any purpose,
|
||||||
|
commercial or non-commercial, and by any means.
|
||||||
|
|
||||||
|
In jurisdictions that recognize copyright laws, the author or authors of this
|
||||||
|
software dedicate any and all copyright interest in the software to the public
|
||||||
|
domain. We make this dedication for the benefit of the public at large and to
|
||||||
|
the detriment of our heirs and successors. We intend this dedication to be an
|
||||||
|
overt act of relinquishment in perpetuity of all present and future rights to
|
||||||
|
this software under copyright law.
|
||||||
|
|
||||||
|
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 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.
|
||||||
|
|
||||||
|
For more information, please refer to <http://unlicense.org/>
|
||||||
|
|
||||||
|
===============================================================================
|
||||||
|
ALTERNATIVE 2 - MIT No Attribution
|
||||||
|
===============================================================================
|
||||||
|
Copyright 2020 David Reid
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
21
Middlewares/Third_Party/dr_lib/README.md
vendored
Normal file
21
Middlewares/Third_Party/dr_lib/README.md
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<h4 align="center">Public domain, single file audio decoding libraries for C and C++.</h4>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://discord.gg/9vpqbjU"><img src="https://img.shields.io/discord/712952679415939085?label=discord&logo=discord&style=flat-square" alt="discord"></a>
|
||||||
|
<a href="https://fosstodon.org/@mackron"><img src="https://img.shields.io/mastodon/follow/109293691403797709?color=blue&domain=https%3A%2F%2Ffosstodon.org&label=mastodon&logo=mastodon&style=flat-square" alt="mastodon"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
Library | Description
|
||||||
|
----------------------------------------------- | -----------
|
||||||
|
[dr_flac](dr_flac.h) | FLAC audio decoder.
|
||||||
|
[dr_mp3](dr_mp3.h) | MP3 audio decoder. Based off [minimp3](https://github.com/lieff/minimp3).
|
||||||
|
[dr_wav](dr_wav.h) | WAV audio loader and writer.
|
||||||
|
|
||||||
|
|
||||||
|
# Other Libraries
|
||||||
|
Below are some of my other libraries you may be interested in.
|
||||||
|
|
||||||
|
Library | Description
|
||||||
|
------------------------------------------------- | -----------
|
||||||
|
[miniaudio](https://github.com/mackron/miniaudio) | A public domain, single file library for audio playback and recording.
|
||||||
12536
Middlewares/Third_Party/dr_lib/dr_flac.h
vendored
Normal file
12536
Middlewares/Third_Party/dr_lib/dr_flac.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
4837
Middlewares/Third_Party/dr_lib/dr_mp3.h
vendored
Normal file
4837
Middlewares/Third_Party/dr_lib/dr_mp3.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
8815
Middlewares/Third_Party/dr_lib/dr_wav.h
vendored
Normal file
8815
Middlewares/Third_Party/dr_lib/dr_wav.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -150,6 +150,8 @@ void music_mp3_play(const char *file_name)
|
|||||||
f_close(file);
|
f_close(file);
|
||||||
free(file_buffer);
|
free(file_buffer);
|
||||||
free(file);
|
free(file);
|
||||||
// size_t free_heap = xPortGetFreeHeapSize();
|
|
||||||
// elog_verbose(TAG, "free heap: %d", free_heap);
|
tlsf_pool_statistics *dtcm_heap_statistics = get_dtcm_heap_statistics();
|
||||||
|
tlsf_pool_statistics *ahb_heap_statistics = get_ahb_heap_statistics();
|
||||||
|
elog_verbose(TAG, "free heap: DTCM: %d, AXI: %d", dtcm_heap_statistics->free_size, ahb_heap_statistics->free_size);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user