OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [OpenRISC_SIM_GCC/] [main.c] - Diff between revs 584 and 621

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 584 Rev 621
Line 61... Line 61...
/* Scheduler header files. */
/* Scheduler header files. */
#include "FreeRTOS.h"
#include "FreeRTOS.h"
#include "task.h"
#include "task.h"
 
 
#include "uart.h"
#include "uart.h"
#include "int.h"
#include "interrupts.h"
 
 
#define TASK_STACK_SIZE (configMINIMAL_STACK_SIZE)
#define TASK_STACK_SIZE (configMINIMAL_STACK_SIZE)
 
 
static void prvSetupHardware(void);
static void prvSetupHardware(void);
void vDemoTask(void *pvParameters);
void vDemoTask(void *pvParameters);
Line 115... Line 115...
                        hour = 0;
                        hour = 0;
                }
                }
 
 
                portENTER_CRITICAL();
                portENTER_CRITICAL();
                {
                {
                        uart_put_int(hour);
                        uart_print_int(hour);
                        uart_print_str(" : ");
                        uart_print_str(" : ");
                        uart_put_int(min);
                        uart_print_int(min);
                        uart_print_str(" : ");
                        uart_print_str(" : ");
                        uart_put_int(sec);
                        uart_print_int(sec);
                        uart_print_str(" , ");
                        uart_print_str(" , ");
                        uart_put_int(ticks);
                        uart_print_int(ticks);
                        uart_print_str("\n\r");
                        uart_print_str("\n\r");
                }
                }
                portEXIT_CRITICAL();
                portEXIT_CRITICAL();
 
 
                vTaskDelay(1000);
                vTaskDelay(1000);
Line 140... Line 140...
 
 
        while(1) {
        while(1) {
                portENTER_CRITICAL();
                portENTER_CRITICAL();
                {
                {
                        uart_print_str("vTask ");
                        uart_print_str("vTask ");
                        uart_put_int(delay);
                        uart_print_int(delay);
                        uart_print_str(" : ");
                        uart_print_str(" : ");
                        // uart_put_int(priority);
                        // uart_print_int(priority);
                        // uart_print_str(" , ");
                        // uart_print_str(" , ");
                        uart_put_int(ticks);
                        uart_print_int(ticks);
                        uart_print_str(" \n\r");
                        uart_print_str(" \n\r");
                }
                }
                portEXIT_CRITICAL();
                portEXIT_CRITICAL();
                vTaskDelay(delay);
                vTaskDelay(delay);
                ticks = xTaskGetTickCount();
                ticks = xTaskGetTickCount();

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.