Add initial board, HAL, and executor modules
This commit is contained in:
1 parent
3b9e129c88
commit
0b2eebe76d
82 files changed
+20611
No files matched your search
@@ -0,0 +1,41 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
#include "esp_err.h"
|
||||
|
||||
/**
|
||||
* @brief Base Board Hardware Abstraction Layer
|
||||
* Abstracts the communication transport (UART vs I2C) and sensor reading.
|
||||
*/
|
||||
class BaseBoardHal
|
||||
{
|
||||
public:
|
||||
virtual ~BaseBoardHal() = default;
|
||||
|
||||
/**
|
||||
* @brief Initialize the hardware interface
|
||||
*/
|
||||
virtual esp_err_t Init() = 0;
|
||||
|
||||
/**
|
||||
* @brief Send raw data to the base board
|
||||
* @param data Pointer to data buffer
|
||||
* @param len Length of data
|
||||
*/
|
||||
virtual esp_err_t Send(const uint8_t *data, size_t len) = 0;
|
||||
|
||||
/**
|
||||
* @brief Read raw data from the base board
|
||||
* @param data Pointer to data buffer
|
||||
* @param len Length of data to read
|
||||
*/
|
||||
virtual esp_err_t Read(uint8_t *data, size_t len) = 0;
|
||||
|
||||
/**
|
||||
* @brief Get the current angle from Hall sensor (or via query)
|
||||
* @param[out] angle Output angle in degrees (0.0 - 360.0)
|
||||
* @return ESP_OK on success
|
||||
*/
|
||||
virtual esp_err_t GetAngle(float *angle) = 0;
|
||||
};
|
||||
Reference in new issue
Block a user