SmartFusion A2F demo work in progress.

pull/4/head
Richard Barry 14 years ago
parent f11836f206
commit 51f445fc67

@ -69,6 +69,12 @@
#ifndef FREERTOS_CONFIG_H
#define FREERTOS_CONFIG_H
#ifdef __ICCARM__
#include <stdint.h>
#include <stddef.h>
extern uint32_t SystemFrequency;
#endif
/*-----------------------------------------------------------
* Application specific definitions.
*
@ -81,10 +87,11 @@
* See http://www.freertos.org/a00110.html.
*----------------------------------------------------------*/
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 1
#define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( 75000000UL )
#define configCPU_CLOCK_HZ ( SystemFrequency )
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 90 )
@ -108,7 +115,7 @@
/* Software timer definitions. */
#define configUSE_TIMERS 1
#define configTIMER_TASK_PRIORITY ( 3 )
#define configTIMER_TASK_PRIORITY ( 2 )
#define configTIMER_QUEUE_LENGTH 10
#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE * 2 )

@ -326,6 +326,12 @@ int main(void)
/* Create the web server task. */
xTaskCreate( vuIP_Task, ( signed char * ) "uIP", mainuIP_STACK_SIZE, NULL, mainuIP_TASK_PRIORITY, NULL );
/* The suicide tasks must be created last, as they need to know how many
tasks were running prior to their creation in order to ascertain whether
or not the correct/expected number of tasks are running at any given
time. */
vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );
/* Start the tasks and timer running. */
vTaskStartScheduler();
@ -443,13 +449,6 @@ static void prvQueueSendTask( void *pvParameters )
portTickType xNextWakeTime;
const unsigned long ulValueToSend = 100UL;
/* The suicide tasks must be created last, as they need to know how many
tasks were running prior to their creation in order to ascertain whether
or not the correct/expected number of tasks are running at any given time.
Therefore the standard demo 'death' tasks are not created in main(), but
instead created here. */
vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );
/* The timer command queue will have been filled when the timer test tasks
were created in main() (this is part of the test they perform). Therefore,
while the check and OLED timers can be created in main(), they cannot be
@ -502,30 +501,16 @@ unsigned long ulReceivedValue;
static void vOLEDTimerCallback( xTimerHandle xHandle )
{
volatile size_t xFreeStackSpace;
static struct oled_data xOLEDData;
static unsigned char ucOffset1 = 0, ucOffset2 = 5;
/* This function is called on each cycle of the idle task. In this case it
does nothing useful, other than report the amount of FreeRTOS heap that
remains unallocated. */
xFreeStackSpace = xPortGetFreeHeapSize();
if( xFreeStackSpace > 100 )
{
/* By now, the kernel has allocated everything it is going to, so
if there is a lot of heap remaining unallocated then
the value of configTOTAL_HEAP_SIZE in FreeRTOSConfig.h can be
reduced accordingly. */
}
xOLEDData.line1 = FIRST_LINE;
xOLEDData.char_offset1 = ucOffset1++;
xOLEDData.string1 = "www.FreeRTOS.org";
xOLEDData.string1 = " www.FreeRTOS.org";
xOLEDData.line2 = SECOND_LINE;
xOLEDData.char_offset2 = ucOffset2++;
xOLEDData.string2 = "www.FreeRTOS.org";
xOLEDData.string2 = " www.FreeRTOS.org";
xOLEDData.contrast_val = OLED_CONTRAST_VAL;
xOLEDData.on_off = OLED_HORIZ_SCROLL_OFF;
@ -540,6 +525,8 @@ static unsigned char ucOffset1 = 0, ucOffset2 = 5;
static void prvSetupHardware( void )
{
SystemCoreClockUpdate();
/* Disable the Watch Dog Timer */
MSS_WD_disable( );

Loading…
Cancel
Save