mirror of
https://github.com/Fishwaldo/bl_mcu_sdk.git
synced 2025-07-07 13:28:48 +00:00
[fix][examples] modify some demos peripheral init parameters,update ld file
This commit is contained in:
parent
ee03cdc86e
commit
48479d0e20
33 changed files with 544 additions and 626 deletions
|
@ -21,20 +21,19 @@
|
|||
*
|
||||
*/
|
||||
#include "hal_uart.h"
|
||||
#include "drv_mmheap.h"
|
||||
|
||||
int memheap_test(void)
|
||||
{
|
||||
char *ptr = NULL; /* 内存块的指针 */
|
||||
|
||||
for (int i = 1;; i++) {
|
||||
ptr = mmheap_alloc(i * 128);
|
||||
ptr = malloc(i * 128);
|
||||
|
||||
if (ptr != NULL) {
|
||||
memcpy(ptr, "hello123456789123456789123456789", 33);
|
||||
MSG("ptr :%s\n", ptr);
|
||||
MSG("get memory :%d byte\n", i * 128);
|
||||
mmheap_free(ptr);
|
||||
free(ptr);
|
||||
MSG("free memory :%d byte\n", i * 128);
|
||||
ptr = NULL;
|
||||
bflb_platform_delay_ms(100);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue