How to convert DALI short address to address byte

In order to convert the address byte for a single DALI control gear to an address byte to send over the wire, multiply the short address by 2  and add 1. The following C macro can be used to compute the address byte:

#define DALI_SHORT_ADDR_TO_ADDR_BYTE(short_addr) (1 + (short_addr << 1))

Since the 1st bit is set (by adding 1), this will activate command mode, i.e. the control gear expects a command byte as data byte for the DALI message.