Firmware  0.8.0
Loading...
Searching...
No Matches
drv::anlg::anonymous_namespace{adc_task_function.cpp} Namespace Reference

Functions

BaseType_t xQueueSendOverwriteOldest (QueueHandle_t xQueue, void const *pvItemToQueue)
 Send item to queue (even if full).
std::span< uint8_t const > read (std::span< uint8_t > stack)
 Read conversion from to stack.
esp_err_t detect_revision (std::span< uint8_t > stack)
 Detect hardware revision by measuring VCC channel.
template<ztl::fixed_string revision>
size_t parse (std::span< uint8_t const > conversion_frame, FilteredCurrent &filtered_current)
 Parse conversion frame.
void detect_short_circuit (uint8_t short_circuit_count)
 Detect short circuits.

Function Documentation

◆ detect_revision()

esp_err_t drv::anlg::anonymous_namespace{adc_task_function.cpp}::detect_revision ( std::span< uint8_t > stack)
Parameters
stackStack
Return values
ESP_OKSuccess

◆ detect_short_circuit()

void drv::anlg::anonymous_namespace{adc_task_function.cpp}::detect_short_circuit ( uint8_t short_circuit_count)
Parameters
short_circuit_countNumber of current samples indicating short circuit

◆ parse()

template<ztl::fixed_string revision>
size_t drv::anlg::anonymous_namespace{adc_task_function.cpp}::parse ( std::span< uint8_t const > conversion_frame,
FilteredCurrent & filtered_current )
Template Parameters
revisionHardware revision
Parameters
conversion_frameConversion frame
filtered_currentFiltered current
Returns
Number of current samples indicating short circuit

◆ read()

std::span< uint8_t const > drv::anlg::anonymous_namespace{adc_task_function.cpp}::read ( std::span< uint8_t > stack)
Parameters
stackStack
Returns
Conversion frame

◆ xQueueSendOverwriteOldest()

BaseType_t drv::anlg::anonymous_namespace{adc_task_function.cpp}::xQueueSendOverwriteOldest ( QueueHandle_t xQueue,
void const * pvItemToQueue )

Small FreeRTOS-style helper to post an item on a queue. As long as there is still space in the queue, the element is inserted at the end; when the queue is full, the oldest element is removed first.

Parameters
xQueueQueue handle
pvItemToQueuePointer to the item
Return values
pdPASSSuccess
errQUEUE_FULLError