UM1728
u8 DALI_CheckAndExecuteTimer(void)
This function should be cyclically called from the main user application in the main program
loop at least every 1 ms. It:
•
Checks if there is a pending timer flag. If so, the given timer callbacks (fading functions,
timeouts, ...) are executed.
•
Returns the number of pending remaining 1 ms timer cycles for a given timer task
(example, number of timer cycles to finish light dimming cycle).
void DALI_halt(void)
This function contains the entry to the microcontroller low power state (halt mode without
timer interrupt). The user must check before calling this function that there are no pending
timer cycles and DALI packets.
void DALI_Set_Lamp_Failure(failure)
This function:
•
Sets or resets the failure state of the lighting element (for example, a damaged bulb).
u8 Get_DALI_Random(void)
This function:
•
Returns a random number
•
Is used for general purpose use
3.2.2
dali_cmd.c
These files contain all DALI commands according to the DALI specification. In addition, they
contain auxiliary functions for command processing such as checking command parameters
and correct timing.
Many functions execute a given DALI command and other functions execute auxiliary
commands. A given function is called automatically when the user calls the
DALI_CheckAndExecuteReceivedCommand(void) function.
The most important functions of these files are given below in bold. For information about
other functions, the user can refer inside these source files and to the DALI specification.
void DALIC_Init(void)
This function:
•
Initializes the entire DALI command modules
DocID025866 Rev 1
Function description
15/31
31
Need help?
Do you have a question about the STM32F1 Series and is the answer not in the manual?
Questions and answers