3 Software Structure
 
                        Due to the code size limitation of the MCU, an Atmel Studio package is not created.
- dali_slave:Provides the DALI application and stack files.- dali_bit, dali_bod, dali_eeprom and dali_timerThese folders contain the application files for the DALI stack. - dali_bitDALI bits are decoded and encoded here. EXTINT (External Interrupt) peripheral is used for decoding. 
- dali_bodWhen power-down is detected, DALI slave will shut down PWM and LED to save power before Reset. The BOD interrupt deals with this detection. 
- dali_eepromWhen the update flag rises for persistent memory, the EEPROM will update its corresponding contents. A backup page is utilized to avoid incomplete data copy during the system power-down. When the system powers on, the variables will be loaded from EEPROM to SRAM. 
- dali_timerSystem timers are provided here. They are used for DALI bit, frame, and fade timing, PWM and random address seeds. 
 
- dali_bit
- dali_stackThe DALI stack is located in this folder.- dali_frameProvides the DALI frame process files. 
- dali_cmdProvides the DALI command implementation files. 
- dali_halHardware abstraction layer, including a complete set of APIs for using hardware resources by DALI stack that is convenient for rapid design-in and smooth integration with varied peripherals. 
 
- dali_frame
 
- dali_bit, dali_bod, dali_eeprom and dali_timer
