weAut_01 / weAutSys    R 2.2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines
Enumerations | Functions | Variables
main.c File Reference

Overview

The weAutSys based user / application software.

The file main.c is the place where user software based on weAutSys is put.
User respectively application software is to be provided in the form of protothreads and cycles.

A mandatory protothread function is the appInitThreadF(). It is the place to adapt to the user's board settings and variants as well as to initialise all accordingly. appInitThreadF() is scheduled at the start up phases.

Note:
Contrary to its name this main.c file must not provide the main() function.
The main() function is weAutSys system software.


  Copyright © 2014 Albrecht Weinert, Bochum

Author:
Albrecht Weinert   <a-weinert.de>
Revision:
2
Date:
2017-01-25 17:49:03 +0100 (Mi, 25 Jan 2017)

Enumerations

enum  autDemo_t
 The demo applications. More...

Functions

ptfnct_t app100msThreadF (struct mThr_data_t *uthr_data)
 The user / application specific 100 ms thread.
ptfnct_t app10msThreadF (struct mThr_data_t *uthr_data)
 The user / application specific 10 ms thread.
ptfnct_t app1sThreadF (struct mThr_data_t *uthr_data)
 The user / application specific one second thread.
ptfnct_t appCliThreadF (struct cliThr_data_t *cliThread)
 The user / application specific command line interpreter thread.
ptfnct_t appInitThreadF (struct pt *pt)
 The user / application specific initialisation thread.
ptfnct_t appSerInpThreadF (struct thr_data_t *serInpThread)
 The user / application serial input processing thread.

Variables

enum autDemo_t autDemo
 The actual demo application.

Enumeration Type Documentation

enum autDemo_t

The demo applications.

The exemplary demo applications are mainly for the digital outputs (DO):

  • count from 0 to a certain number and then turn the outputs off. Restart in next (n * 10ms) cycle.
  • make a pseudo random sequence output. In high speed good for up to eight disco lights.
  • use the upper for outputs for a four phase unipolar stepper motor. Besides selecting speed the variants are forward, backwards and back and forth one complete phase (weeper).
  • make a stepper demo with random speed and direction.

The (inverse) speed (var autDemoTime etc.) can be selected as a factor for (count down within) the application 10 ms cycle. The default 44 hence is one step every 440 ms.


Variable Documentation

The actual demo application.

default: randStep

Examples:
main.c.