reading internal temperature sensor of arch max and storing data
TempBase.h@0:62f36500cd41, 2017-09-14 (annotated)
- Committer:
- tifo
- Date:
- Thu Sep 14 12:05:02 2017 +0000
- Revision:
- 0:62f36500cd41
reading arch max's internal temperature sensor
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
tifo | 0:62f36500cd41 | 1 | #ifndef TEMPBASE_H |
tifo | 0:62f36500cd41 | 2 | #define TEMPBASE_H |
tifo | 0:62f36500cd41 | 3 | |
tifo | 0:62f36500cd41 | 4 | class TempBase |
tifo | 0:62f36500cd41 | 5 | { |
tifo | 0:62f36500cd41 | 6 | public: |
tifo | 0:62f36500cd41 | 7 | TempBase(); |
tifo | 0:62f36500cd41 | 8 | TempBase(float); |
tifo | 0:62f36500cd41 | 9 | void Init(); |
tifo | 0:62f36500cd41 | 10 | int GetRawTemp(); |
tifo | 0:62f36500cd41 | 11 | float ConvertTemp(int); |
tifo | 0:62f36500cd41 | 12 | |
tifo | 0:62f36500cd41 | 13 | |
tifo | 0:62f36500cd41 | 14 | private: |
tifo | 0:62f36500cd41 | 15 | float ambientTemp; |
tifo | 0:62f36500cd41 | 16 | float v25; |
tifo | 0:62f36500cd41 | 17 | float avgSlope; |
tifo | 0:62f36500cd41 | 18 | float vRef; |
tifo | 0:62f36500cd41 | 19 | |
tifo | 0:62f36500cd41 | 20 | ADC_HandleTypeDef hadc1; // Declare main adc confic object |
tifo | 0:62f36500cd41 | 21 | ADC_ChannelConfTypeDef sConfig; //Declare the ST HAL ADC object |
tifo | 0:62f36500cd41 | 22 | }; |
tifo | 0:62f36500cd41 | 23 | |
tifo | 0:62f36500cd41 | 24 | #endif |