Subversion Repositories Code-Repo

Rev

Rev 281 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 281 Rev 282
Line 180... Line 180...
180
            break;
180
            break;
181
    }
181
    }
182
 
182
 
183
    if (channel == 0) {
183
    if (channel == 0) {
184
        // Reads two byte value from channel 0 (visible + infrared)
184
        // Reads two byte value from channel 0 (visible + infrared)
185
        return TSL2561_Read_2_Bytes(TSL2561_COMMAND_BIT | TSL2561_WORD_BIT | TSL2561_REGISTER_CHAN1_LOW);
185
        return TSL2561_Read_2_Bytes(TSL2561_COMMAND_BIT | TSL2561_WORD_BIT | TSL2561_REGISTER_CHAN0_LOW);
186
    } else if (channel == 1) {
186
    } else if (channel == 1) {
187
        // Reads two byte value from channel 1 (infrared)
187
        // Reads two byte value from channel 1 (infrared)
188
        return TSL2561_Read_2_Bytes(TSL2561_COMMAND_BIT | TSL2561_WORD_BIT | TSL2561_REGISTER_CHAN0_LOW);
188
        return TSL2561_Read_2_Bytes(TSL2561_COMMAND_BIT | TSL2561_WORD_BIT | TSL2561_REGISTER_CHAN1_LOW);
189
    }
189
    }
190
 
190
 
191
    TSL2561_Disable();
191
    TSL2561_Disable();
192
 
192
 
193
    // Unknown channel!
193
    // Unknown channel!