/
flashVersionTask.c
89 lines (68 loc) · 3.56 KB
/
flashVersionTask.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/**************************************************************************************************
* *
* SSSSS PPPPPP SSSSS *
* SS SS PP PP SS SS *
* SS PP PP SS *
* SSSSS PPPPPP SSSSS *
* SS PP SS *
* SS SS PP SS SS *
* SSSSS PP SSSSS *
* *
* SIGNAL PROCESSING SOLUTIONS *
* *
**************************************************************************************************
* *
* Project: *
* *
* Author: Michael E. Spencer, Ph.D. *
* *
* Copyright(c) Signal Processing Solutions, 2007 *
* *
**************************************************************************************************
*
* File: flashVersionTask.c
*
* This task flashes the Code version number out of the UART_EnableLed2.
*
* eg. V2.3 Flashes: * * * * * repeat
*
*
* M. Spencer
*/
// PADK Library
#include "PADK.h"
//#include <algorithms.h>
#include <main.h>
/* trace LOG buffer is used to print runtime information */
extern far LOG_Obj trace;
extern int swVersion; // Software version int
extern int swVersionFrac; // Software version frac. eg. Ver int.frac
void flashVersionTask ()
{
int i;
LOG_printf(&trace, "Entered flashVersionTask.c");
TSK_sleep (1000); // Sleep here for x msec
while(1){
for( i=0; i<swVersion; i++)
{
UART_EnableLed2(1); // LED on (this is a very fast routine)
TSK_sleep (80); // Sleep here for x msec
UART_EnableLed2(0); // LED off
TSK_sleep (300); // Sleep here for x msec
}
TSK_sleep (80); // Sleep here for x msec
// Quick flash for decimal point?:
//UART_EnableLed2(1); // LED on
TSK_sleep (8); // Sleep here for x msec
UART_EnableLed2(0); // LED off
TSK_sleep (400); // Sleep here for x msec
for( i=0; i<swVersionFrac; i++)
{
UART_EnableLed2(1); // LED on
TSK_sleep (80); // Sleep here for x msec
UART_EnableLed2(0); // LED off
TSK_sleep (300); // Sleep here for x msec
}
TSK_sleep (1800); // Sleep here for x msec
}
}