return callback handler
This commit is contained in:
parent
5f6e586945
commit
724f8f42e9
8 changed files with 20 additions and 15 deletions
|
@ -65,8 +65,9 @@ void AnalogIoT::setADCsPublishEnabled(bool enabled) {
|
|||
adc_publish_enabled[i] = enabled;
|
||||
}
|
||||
}
|
||||
void AnalogIoT::registerADCConversionCallback(std::function<void(uint8_t, uint16_t)> callback) {
|
||||
this->adc_conversion_callbacks[this->adc_conversion_callback_index++] = callback;
|
||||
uint8_t AnalogIoT::registerADCConversionCallback(std::function<void(uint8_t, uint16_t)> callback) {
|
||||
this->adc_conversion_callbacks[this->adc_conversion_callback_index] = callback;
|
||||
return this->adc_conversion_callback_index++;
|
||||
}
|
||||
void AnalogIoT::deregisterADCConversionCallback(uint8_t handler) {
|
||||
this->adc_conversion_callbacks.erase(handler);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue