Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions qqqDALI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ uint8_t Dali::_man_weight(uint8_t i) {
}

//call with bitpos <= DALI_RX_BUF_SIZE*8-8;
uint8_t Dali::_man_sample(uint8_t *edata, uint16_t bitpos, uint8_t *stop_coll) {
uint8_t Dali::_man_sample(volatile uint8_t *edata, uint16_t bitpos, uint8_t *stop_coll) {
uint8_t pos = bitpos>>3;
uint8_t shift = bitpos & 0x7;
uint8_t sample = (edata[pos] << shift) | (edata[pos+1] >> (8-shift));
Expand All @@ -279,7 +279,7 @@ uint8_t Dali::_man_sample(uint8_t *edata, uint16_t bitpos, uint8_t *stop_coll) {

//decode 8 times oversampled encoded data
//returns bitlen of decoded data, or 0 on collision
uint8_t Dali::_man_decode(uint8_t *edata, uint8_t ebitlen, uint8_t *ddata) {
uint8_t Dali::_man_decode(volatile uint8_t *edata, uint8_t ebitlen, uint8_t *ddata) {
uint8_t dbitlen = 0;
uint16_t ebitpos = 1;
while(ebitpos+1<ebitlen) {
Expand Down
6 changes: 3 additions & 3 deletions qqqDALI.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ class Dali {


uint8_t _man_weight(uint8_t i);
uint8_t _man_sample(uint8_t *edata, uint16_t bitpos, uint8_t *stop_coll);
uint8_t _man_decode(uint8_t *edata, uint8_t ebitlen, uint8_t *ddata);
uint8_t _man_sample(volatile uint8_t *edata, uint16_t bitpos, uint8_t *stop_coll);
uint8_t _man_decode(volatile uint8_t *edata, uint8_t ebitlen, uint8_t *ddata);

//-------------------------------------------------
//HIGH LEVEL PRIVATE
Expand Down Expand Up @@ -398,7 +398,7 @@ class Dali {
#define DALI_QUERY_REFARENCE_RUNNING 249 //249 IEC62386-207 - Returns whetherReference System Power is in operation. (Command that exist only in IEC62386-207)
#define DALI_QUERY_REFERENCE_MEASURMENT_FAILED 250 //250 IEC62386-207 - Returns bit7 reference measurement failed of ‘FAILURE STATUS’ (Command that exist only in IEC62386-207)
#define DALI_QUERY_CURRENT_PROTECTOR_ENABLE 251 //251 IEC62386-207 - Returns state of Curent protector (Command that exist only in IEC62386-207)
#define DALI_QUERY_OPERATING_MODE 252 //252 IEC62386-207 - Returns ‘OPERATING MODE’ (Command that exist only in IEC62386-207)
#define DALI_QUERY_OPERATING_MODE_207 252 //252 IEC62386-207 - Returns ‘OPERATING MODE’ (Command that exist only in IEC62386-207)
#define DALI_QUERY_FAST_FADE_TIME 253 //253 IEC62386-207 - Returns set Fast fade time. (Command that exist only in IEC62386-207)
#define DALI_QUERY_MIN_FAST_FADE_TIME 254 //254 IEC62386-207 - Returns set Minimum fast fade time (Command that exist only in IEC62386-207)
#define DALI_QUERY_EXTENDED_VERSION_NUMBER 255 //255 IEC62386-207 - The version number of the extended support? IEC62386-207: 1, Other: NO(no response)
Expand Down