This commit is contained in:
Leon Wilzer 2022-11-23 16:00:40 +01:00
parent 5a01c153b7
commit 87e796e265

View File

@ -4,6 +4,9 @@
#define LIGHT_MAX DUTY_MAX #define LIGHT_MAX DUTY_MAX
#define LIGHT_OFF 0 #define LIGHT_OFF 0
#define RC 0x7FFF // return code: 0x7FFF - program should be further called by the firmware;
#define sRC 0
#define BEG_LAMP_IDX 0 #define BEG_LAMP_IDX 0
#define END_LAMP_IDX 3 #define END_LAMP_IDX 3
@ -15,6 +18,8 @@ static int lamp_idx;
static int n_loops; static int n_loops;
static int wait; static int wait;
int simple_rgb_test(TA * p_ta_array);
void PrgInit void PrgInit
( (
TA * p_ta_array, // pointer to the array of transfer areas TA * p_ta_array, // pointer to the array of transfer areas
@ -34,10 +39,14 @@ int PrgTic
int ta_count // number of transfer areas in array (equal to TA_COUNT) int ta_count // number of transfer areas in array (equal to TA_COUNT)
) )
{ {
int rc = 0x7FFF; // return code: 0x7FFF - program should be further called by the firmware; return simple_rgb_test(p_ta_array);
// 0 - program should be normally stopped by the firmware; }
// any other value is considered by the firmware as an error code
// and the program is stopped. int simple_rgb_test
(
TA * p_ta_array // pointer to the array of transfer areas
)
{
TA * p_ta = &p_ta_array[TA_LOCAL]; TA * p_ta = &p_ta_array[TA_LOCAL];
// Get the current value of the system time // Get the current value of the system time
@ -72,5 +81,5 @@ int PrgTic
pin = GREEN; pin = GREEN;
} }
} }
return rc; return RC;
} }