/firmware/src/shared/ThermistorTable.hh
http://github.com/makerbot/G3Firmware · C++ Header · 33 lines · 6 code · 5 blank · 22 comment · 0 complexity · 0475ba55d3ca149f48219b5fb985981a MD5 · raw file
- /*
- * Copyright 2010 by Adam Mayer <adam@makerbot.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- */
- #ifndef THERMISTOR_TABLE
- #define THERMISTOR_TABLE
- #include <stdint.h>
- /// Translate a thermistor reading into degrees Celcius, using the provided lookup table.
- /// @param[in] reading Thermistor voltage reading, in ADC counts
- /// @param[in] table_idx Index of the thermocouple lookup table
- /// @return Temperature reading, in degrees Celcius
- int16_t thermistorToCelsius(int16_t reading, int8_t table_idx);
- /// Initialize the thermocouple lookup tables. This needs to be called at boot, before calling
- /// #thermistorToCelcius()
- void initThermistorTables();
- #endif // THERMISTOR_TABLE