ESOS32
ESOSOn32-bitProcessors
Macros | Functions | Variables
app_timer.c File Reference
#include "esos.h"
#include "esos_pc.h"
#include "esos_pc_stdio.h"
#include <stdio.h>
#include <sys/select.h>
#include <termios.h>
#include <unistd.h>
Include dependency graph for app_timer.c:

Go to the source code of this file.

Functions

uint32_t randomNumInRange (uint32_t u32_lo, uint32_t u32_hi)
 
 ESOS_USER_TASK (__simulated_isr)
 
 ESOS_USER_TIMER (swTimerCounter)
 
 ESOS_USER_TIMER (swTimerLED)
 
 ESOS_USER_TIMER (swTimerPrintA)
 
 ESOS_USER_TIMER (swTimerPrintB)
 
 ESOS_USER_TIMER (swTimerPrintC)
 
 ESOS_USER_TASK (task1)
 
 ESOS_USER_TASK (task2)
 
 ESOS_USER_TASK (task3)
 
 ESOS_USER_TASK (task_LED)
 
 ESOS_USER_TASK (random_tmr)
 
 ESOS_USER_TASK (random_tmr_dbg)
 
 ESOS_USER_TASK (upper_case)
 
 ESOS_USER_TASK (upper_case2)
 
 ESOS_USER_TASK (reverse_string)
 
void reverseString (char *psz_s1, char *psz_s2)
 
void user_init (void)
 

Variables

volatile uint32_t u32_T2Count
 
volatile uint32_t u32_T3Count
 
uint32_t u32_myT1Count = 0
 
uint8_t LED1 = TRUE
 
uint8_t LED2 = TRUE
 
struct stTaskpst_MyTasks [3]
 
uint32_t u32_cnt1
 
uint32_t u32_cnt2
 
uint32_t u32_cnt3
 

Detailed Description

Inputs a string, outputs the reverse. This file is used in three MPLAB projects: reverse_string.mcp - polled RX, TX I/O uartrx_fifo.mcp - interrupt RX, polled TX I/O uartrxtx_fifo.mcp - interrupt RX, interrupt TX I/O Interrupt RX inChar1() is selected by defining UART1_RX_INTERRUPT macro Interrupt TX outChar1() is selected by defining UART1_TX_INTERRUPT macro These macros are defined in their respective MPLAB projects.

Definition in file app_timer.c.

Function Documentation

◆ user_init()

void user_init ( void  )

User-provided function to initialize user's hardware configuration register user tasks.

Note
All ESOS applications MUST provide this function.
This function MUST register at least one ESOS task.
user_init() is a centralized initialization routine where the user can setup their application. It is called automagically by ES_OS during the operating system initialization.
User should set up any state machines and init all application variables. They can also turn on any needed peripherals here.
User shall not mess with the interrupt hardware directly!!! The ESOS must be aware of the interrupts and provides esos_XXXXXXX functions for the user to use. Using these ESOS-provided functions, the user may (and probably should) initialize, register, and enable interrupts in this routine.
Furthermore, the user should register AT LEAST one user application task here via esos_RegisterTask or the ES_OS scheduler will have nothing to schedule to run when this function returns.

Definition at line 476 of file app_timer.c.