mirror of
https://github.com/pvvx/RTL00_WEB.git
synced 2025-07-31 20:31:05 +00:00
update -Wall
This commit is contained in:
parent
af72faa906
commit
c98cbe6e00
86 changed files with 523 additions and 352 deletions
|
|
@ -7,7 +7,8 @@
|
|||
#include <osdep_service.h>
|
||||
#include <stdio.h>
|
||||
#include <freertos_pmu.h>
|
||||
//#include <tcm_heap.h>
|
||||
#include <tcm_heap.h>
|
||||
#include <netdev.h>
|
||||
/********************* os depended utilities ********************/
|
||||
|
||||
#ifndef USE_MUTEX_FOR_SPINLOCK
|
||||
|
|
@ -549,7 +550,9 @@ static u32 _freertos_GetFreeHeapSize(void)
|
|||
{
|
||||
return (u32)xPortGetFreeHeapSize();
|
||||
}
|
||||
void *tcm_heap_malloc(int size);
|
||||
|
||||
//extern void *tcm_heap_malloc(int size);
|
||||
|
||||
static int _freertos_create_task(struct task_struct *ptask, const char *name,
|
||||
u32 stack_size, u32 priority, thread_func_t func, void *thctx)
|
||||
{
|
||||
|
|
@ -576,7 +579,7 @@ static int _freertos_create_task(struct task_struct *ptask, const char *name,
|
|||
|
||||
priority += tskIDLE_PRIORITY + PRIORITIE_OFFSET;
|
||||
|
||||
if(rtw_if_wifi_thread(name) == 0){
|
||||
if(rtw_if_wifi_thread((char *)name) == 0){
|
||||
|
||||
#if CONFIG_USE_TCM_HEAP
|
||||
void *stack_addr = tcm_heap_malloc(stack_size*sizeof(int));
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ typedef struct HeapRegion
|
|||
* terminated by a HeapRegions_t structure that has a size of 0. The region
|
||||
* with the lowest start address must appear first in the array.
|
||||
*/
|
||||
static void vPortDefineHeapRegions( const HeapRegion_t * const pxHeapRegions ) PRIVILEGED_FUNCTION;
|
||||
//static void vPortDefineHeapRegions( const HeapRegion_t * const pxHeapRegions ) PRIVILEGED_FUNCTION;
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -376,7 +376,7 @@ BaseType_t xTaskGenericCreate( TaskFunction_t pxTaskCode,
|
|||
TaskHandle_t * const pxCreatedTask,
|
||||
StackType_t * const puxStackBuffer,
|
||||
const MemoryRegion_t * const xRegions ) PRIVILEGED_FUNCTION;
|
||||
#define xTaskCreate( pvTaskCode, pcName, usStackDepth, pvParameters, uxPriority, pxCreatedTask ) xTaskGenericCreate( ( pvTaskCode ), ( pcName ), ( usStackDepth ), ( pvParameters ), ( uxPriority ), ( pxCreatedTask ), ( NULL ), ( NULL ) )
|
||||
#define xTaskCreate(pvTaskCode, pcName, usStackDepth, pvParameters, uxPriority, pxCreatedTask ) xTaskGenericCreate( (TaskFunction_t)( pvTaskCode ), ( pcName ), ( usStackDepth ), ( pvParameters ), ( uxPriority ), ( pxCreatedTask ), ( NULL ), ( NULL ) )
|
||||
#else
|
||||
BaseType_t xTaskCreate( TaskFunction_t pxTaskCode,
|
||||
const char * const pcName,
|
||||
|
|
|
|||
|
|
@ -689,6 +689,7 @@ __attribute__(( weak )) void vPortSetupTimerInterrupt( void )
|
|||
#endif /* configASSERT_DEFINED */
|
||||
/*-----------------------------------------------------------*/
|
||||
#if configUSE_IDLE_HOOK
|
||||
extern void WDGRefresh(void);
|
||||
void vApplicationIdleHook( void )
|
||||
{
|
||||
/* Use the idle task to place the CPU into a low power mode. Greater power
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@ typedef struct A_BLOCK_LINK {
|
|||
size_t xBlockSize; /*<< The size of the free block. */
|
||||
} BlockLink_t;
|
||||
|
||||
static void vPortDefineHeapRegions(const HeapRegion_t * const pxHeapRegions);
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
|
|
@ -502,7 +503,7 @@ static void vPortDefineHeapRegions(const HeapRegion_t * const pxHeapRegions) {
|
|||
uint8 chip_id = HalGetChipId();
|
||||
while (pxHeapRegion->xSizeInBytes > 0) {
|
||||
if (pxHeapRegion->pucStartAddress
|
||||
> 0x20000000 && chip_id >= CHIP_ID_8711AN && chip_id <= CHIP_ID_8711AF) {
|
||||
> (uint8_t *) 0x20000000 && chip_id >= CHIP_ID_8711AN && chip_id <= CHIP_ID_8711AF) {
|
||||
// pxHeapRegion->pucStartAddress = 0;
|
||||
// pxHeapRegion->xSizeInBytes = 0;
|
||||
// DBG_8195A("ChipID: %p !\n", chip_id);
|
||||
|
|
@ -584,6 +585,8 @@ static void vPortDefineHeapRegions(const HeapRegion_t * const pxHeapRegions) {
|
|||
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ void * __rtl_memcpy_v1_00(void * __restrict dst0 , const void * __restrict src0 , size_t len0);
|
||||
|
||||
void* pvPortReAlloc(void *pv, size_t xWantedSize) {
|
||||
BlockLink_t *pxLink;
|
||||
|
||||
|
|
@ -612,7 +615,7 @@ void* pvPortReAlloc(void *pv, size_t xWantedSize) {
|
|||
|
||||
int oldSize = (pxLink->xBlockSize & ~xBlockAllocatedBit) - uxHeapStructSize;
|
||||
int copySize = (oldSize < xWantedSize) ? oldSize : xWantedSize;
|
||||
rtl_memcpy(newArea, pv, copySize);
|
||||
__rtl_memcpy_v1_00(newArea, pv, copySize);
|
||||
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ task.h is included from an application file. */
|
|||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "timers.h"
|
||||
#include "tcm_heap.h"
|
||||
#include "StackMacros.h"
|
||||
|
||||
/* Lint e961 and e750 are suppressed as a MISRA exception justified because the
|
||||
|
|
|
|||
|
|
@ -1296,7 +1296,7 @@ struct osdep_service_ops {
|
|||
int (*ATOMIC_INC_RETURN)(ATOMIC_T *v);
|
||||
int (*ATOMIC_DEC_RETURN)(ATOMIC_T *v);
|
||||
u64 (*rtw_modular64)(u64 x, u64 y);
|
||||
int (*rtw_get_random_bytes)(void* dst, u32 size);
|
||||
int (*rtw_get_random_bytes)(void* dst, size_t size);
|
||||
u32 (*rtw_getFreeHeapSize)(void);
|
||||
int (*rtw_create_task)(struct task_struct *task, const char *name, u32 stack_size, u32 priority, thread_func_t func, void *thctx);
|
||||
void (*rtw_delete_task)(struct task_struct *task);
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
#include <osdep_service.h>
|
||||
#include "tcm_heap.h"
|
||||
#define OSDEP_DBG(x, ...) do {} while(0)
|
||||
|
||||
extern struct osdep_service_ops osdep_service;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue