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_timer
These folders contain the application files for the DALI stack.
- dali_bit
DALI bits are decoded and encoded here. EXTINT (External Interrupt) peripheral is used for decoding.
- dali_bod
When 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_eeprom
When 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_timer
System 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_frame
Provides the DALI frame process files.
- dali_cmd
Provides the DALI command implementation files.
- dali_hal
Hardware 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