Microchip® Advanced Software Framework

thirdparty/freertos/demo/lwip_sam_example/main.c File Reference

FreeRTOS configuration.

Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.

#include <stdlib.h>
#include <string.h>
#include "FreeRTOS.h"
#include "task.h"
#include "status_codes.h"
#include "conf_uart_serial.h"
#include "partest.h"
#include "ethernet.h"
#include "netif/etharp.h"
#include "flash.h"
#include "sysclk.h"
#include "ioport.h"
#include "uart_serial.h"
#include "stdio_serial.h"
#include <compiler.h>
#include "led.h"
#include "conf_board.h"

Macros

#define ioport_set_port_peripheral_mode(port, masks, mode)
 Set peripheral mode for IOPORT pins. More...
 
#define TASK_LED_STACK_PRIORITY   (tskIDLE_PRIORITY)
 
#define TASK_LED_STACK_SIZE   (128 / sizeof(portSTACK_TYPE))
 

Functions

static void configure_console (void)
 Configure the console UART. More...
 
int main (void)
 getting-started Application entry point. More...
 
static void task_led (void *pvParameters)
 This task, when activated, send every ten seconds on debug UART the whole report of free heap and total tasks status. More...
 
void vApplicationIdleHook (void)
 This function is called by FreeRTOS idle task. More...
 
void vApplicationStackOverflowHook (xTaskHandle *pxTask, signed char *pcTaskName)
 Called if stack overflow during execution. More...
 
void vApplicationTickHook (void)
 This function is called by FreeRTOS each tick. More...
 
void xPortSysTickHandler (void)
 

#define ioport_set_port_peripheral_mode (   port,
  masks,
  mode 
)
Value:
do {\
ioport_set_port_mode(port, masks, mode);\
ioport_disable_port(port, masks);\
} while (0)
static void ioport_disable_port(ioport_port_t port, ioport_port_mask_t mask)
Disable multiple pins in a single IOPORT port.
Definition: ioport.h:190
static void ioport_set_port_mode(ioport_port_t port, ioport_port_mask_t mask, ioport_mode_t mode)
Set multiple pin modes in a single IOPORT port, such as pull-up, pull-down, etc.
Definition: ioport.h:205

Set peripheral mode for IOPORT pins.

It will configure port mode and disable pin mode (but enable peripheral).

Parameters
portIOPORT port to configure
masksIOPORT pin masks to configure
modeMode masks to configure for the specified pin (IOPORT Modes)
#define TASK_LED_STACK_PRIORITY   (tskIDLE_PRIORITY)

Referenced by main().

#define TASK_LED_STACK_SIZE   (128 / sizeof(portSTACK_TYPE))

Referenced by main().

static void configure_console ( void  )
static

Configure the console UART.

References uart_rs232_options::baudrate, NULL, stdio_serial_init(), and sysclk_enable_peripheral_clock().

Referenced by main().

static void task_led ( void *  pvParameters)
static

This task, when activated, send every ten seconds on debug UART the whole report of free heap and total tasks status.

References vTaskDelay().

Referenced by main().

void vApplicationIdleHook ( void  )

This function is called by FreeRTOS idle task.

void vApplicationStackOverflowHook ( xTaskHandle pxTask,
signed char *  pcTaskName 
)

Called if stack overflow during execution.

void vApplicationTickHook ( void  )

This function is called by FreeRTOS each tick.

void xPortSysTickHandler ( void  )