Dali: Home Automaiton: Query command support for name & id

Dali_IsDwnResponseNeeded() fn analyze dali command and see if response
from down stream need to be send to upstream

Extended this for some reserved commands as they are used for name and
id

Signed-off-by: Ajay <ajay@moxiedevices.com>
Host communication: Forward frame size

Changed forward frame size to 11 from 4.

This is to accomodate slave name

Signed-off-by: Ajay <ajay@moxiedevices.com>
Host command: Set device name macro

Device name === 3
Signed-off-by: Ajay <ajay@moxiedevices.com>
Bug Fix: Send Command

Before any command sent, clear dali circular buffer.

This is need to flush any response from errorneous device.

Signed-off-by: Ajay <ajay@moxiedevices.com>
Bug Fix: usermain: remove hard coding

Remove hard coding for buffer size to HOST_FORWARD_FRAME_SIZE

Signed-off-by: Ajay <ajay@moxiedevices.com>
Device Name Change: Support added

Device name change is as follows

1) 8 characters for name
2) character offset in DTR1
3) Name character in DTR
4) Device address with EXCOMMAND_WRITE_NAME

Signed-off-by: Ajay <ajay@moxiedevices.com>
project file

Signed-off-by: Ajay <ajay@moxiedevices.com>
Dali: Enumeration: Collission workout

During Enumeration multiple Dali Slave can respond to same dali command.
This will result collission and master will detect errorneous packets.

Following is implemented for this

1) If during enumeration, error is detected then it is assumed that
multiple slaves responded which resulted in error on line.

2) controller have bug, every sent command is received by master too.
Since controller is set for Tx length = 2 byte and Rx Length = 1 byte.

Two errors are detected by master for every command transmitted.
These two errors after each sent is ignored, next errors are considered
as response from multiple slaves.

In circular buffer "YES" is saved for such errors to compensate
collission.

Signed-off-by: Ajay <ajay@moxiedevices.com>
Master State Machine

Added infrastructure of master infrastructure. All made support of
Enumeration state machine in Master.

Signed-off-by: Ajay <ajay@moxiedevices.com>
project files

Signed-off-by: Ajay <ajay@moxiedevices.com>
Timer: Moved timer init into r_timer.c

Timer init done through led_init. New function for timer init created.

Signed-off-by: Ajay <ajay@moxiedevices.com>
Removed led related functions

Master dont need led control functions. Removed them from Dali.

Signed-off-by: Ajay <ajay@moxiedevices.com>
project file

Signed-off-by: Ajay <ajay@moxiedevices.com>