mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/cmake-demo.git
synced 2025-06-12 19:35:58 +00:00
38 lines
628 B
C++
38 lines
628 B
C++
/*
|
|
* sense.hpp
|
|
*
|
|
* Created on: Jun 17, 2024
|
|
* Author: carlos
|
|
*/
|
|
|
|
#ifndef INC_TASKS_SENSE_HPP_
|
|
#define INC_TASKS_SENSE_HPP_
|
|
|
|
#include <sta/tacos.hpp>
|
|
#include <sta/devices/stm32/adc.hpp>
|
|
#include <sta/devices/stm32/bus/spi.hpp>
|
|
|
|
namespace tasks
|
|
{
|
|
class SenseTask : public sta::tacos::TacosThread
|
|
{
|
|
public:
|
|
SenseTask(ADC_HandleTypeDef *handle);
|
|
|
|
void init() override;
|
|
|
|
void func() override;
|
|
|
|
private:
|
|
sta::STM32ADC adc_;
|
|
uint16_t dmaBuffer_[6];
|
|
size_t bufferSize_ = 6;
|
|
uint16_t result_[6];
|
|
|
|
CanSysMsg msg_;
|
|
uint16_t result_counter_ = 0;
|
|
};
|
|
} // namespace tasks
|
|
|
|
#endif /* INC_TASKS_SENSE_HPP_ */
|