This commit is contained in:
Ben V. Brown
2022-04-18 22:41:25 +10:00
parent c3b88dc2a5
commit 9df9f597eb
3 changed files with 9 additions and 16 deletions

View File

@@ -28,18 +28,14 @@
#define configUSE_COUNTING_SEMAPHORES 1 #define configUSE_COUNTING_SEMAPHORES 1
#define configGENERATE_RUN_TIME_STATS 0 #define configGENERATE_RUN_TIME_STATS 0
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1 #define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
#define configUSE_STATS_FORMATTING_FUNCTIONS 2 #define configUSE_STATS_FORMATTING_FUNCTIONS 0
#define configUSE_TICKLESS_IDLE 0 #define configUSE_TICKLESS_IDLE 0
/* Co-routine definitions. */ /* Co-routine definitions. */
#define configUSE_CO_ROUTINES 0 #define configUSE_CO_ROUTINES 0
#define configMAX_CO_ROUTINE_PRIORITIES (2)
/* Software timer definitions. */ /* Software timer definitions. */
#define configUSE_TIMERS 0 #define configUSE_TIMERS 0
#define configTIMER_TASK_PRIORITY (configMAX_PRIORITIES - 1)
#define configTIMER_QUEUE_LENGTH 8
#define configTIMER_TASK_STACK_DEPTH (160)
/* Task priorities. Allow these to be overridden. */ /* Task priorities. Allow these to be overridden. */
#ifndef uartPRIMARY_PRIORITY #ifndef uartPRIMARY_PRIORITY
@@ -53,9 +49,6 @@ extern "C" {
header file. */ header file. */
void vAssertCalled(void); void vAssertCalled(void);
void vPortEnterCritical(void);
void vPortExitCritical(void);
#define configASSERT(x) \ #define configASSERT(x) \
if ((x) == 0) \ if ((x) == 0) \
vAssertCalled() vAssertCalled()
@@ -68,9 +61,9 @@ void vApplicationSleep(uint32_t xExpectedIdleTime);
#define portSUPPRESS_TICKS_AND_SLEEP(xExpectedIdleTime) vApplicationSleep(xExpectedIdleTime) #define portSUPPRESS_TICKS_AND_SLEEP(xExpectedIdleTime) vApplicationSleep(xExpectedIdleTime)
#endif #endif
#define INCLUDE_vTaskPrioritySet 1 #define INCLUDE_vTaskPrioritySet 0
#define INCLUDE_uxTaskPriorityGet 1 #define INCLUDE_uxTaskPriorityGet 0
#define INCLUDE_vTaskDelete 1 #define INCLUDE_vTaskDelete 0
#define INCLUDE_vTaskSuspend 1 #define INCLUDE_vTaskSuspend 1
#define INCLUDE_xResumeFromISR 1 #define INCLUDE_xResumeFromISR 1
#define INCLUDE_vTaskDelayUntil 1 #define INCLUDE_vTaskDelayUntil 1

View File

@@ -119,6 +119,3 @@ void vAssertCalled(void) {
while (1) while (1)
; ;
} }
void vPortEnterCritical(void) {}
void vPortExitCritical(void) {}

View File

@@ -4,6 +4,7 @@
#include "BSP_PD.h" #include "BSP_PD.h"
#include "FreeRTOS.h" #include "FreeRTOS.h"
#include "bflb_platform.h"
#include "fusb302b.h" #include "fusb302b.h"
#include "main.hpp" #include "main.hpp"
#include "pd.h" #include "pd.h"
@@ -18,9 +19,11 @@
void ms_delay(uint32_t delayms) { void ms_delay(uint32_t delayms) {
// Convert ms -> ticks // Convert ms -> ticks
MSG((char *)"USB PD Delay %d\r\n", delayms);
TickType_t ticks = delayms / portTICK_PERIOD_MS; TickType_t ticks = delayms / portTICK_PERIOD_MS;
vTaskDelay(ticks ? ticks : 1); /* Minimum delay = 1 tick */ vTaskDelay(ticks ? ticks : 1); /* Minimum delay = 1 tick */
MSG((char *)"USB PD Delay %d...Done\r\n", delayms);
} }
uint32_t get_ms_timestamp() { uint32_t get_ms_timestamp() {
// Convert ticks -> ms // Convert ticks -> ms