Controller status word data structure allowing bit-wise access to status and control bits. More...
#include <power_control/drivers/npnz16b.h>
Data Fields | |
union { | |
struct { | |
volatile bool lower_saturation_event: 1 | |
Bit 0: control loop is clamped at minimum output level. More... | |
volatile bool upper_saturation_event: 1 | |
Bit 1: control loop is clamped at maximum output level. More... | |
volatile unsigned: 1 | |
Bit 2: reserved. More... | |
volatile bool agc_enabled: 1 | |
Bit 11: when set, Adaptive Gain Control Modulation is enabled. More... | |
volatile bool swap_target: 1 | |
Bit 12: when set, AltTarget is used as data output of controller. More... | |
volatile bool swap_source: 1 | |
Bit 13: when set, AltSource is used as data input to controller. More... | |
volatile bool invert_input: 1 | |
Bit 14: when set, most recent error input value to controller is inverted. More... | |
volatile bool enabled: 1 | |
Bit 15: enables/disables control loop execution. More... | |
} bits | |
Controller status bit-field for direct bit access. More... | |
volatile uint16_t value | |
Controller status full register access. More... | |
}; | |
Data Fields inherited from NPNZ16b_s | |
volatile struct NPNZ_STATUS_s | status |
Control Loop Status and Control flags. More... | |
volatile struct NPNZ_PORTS_s | Ports |
Controller input and output ports. More... | |
volatile struct NPNZ_FILTER_PARAMS_s | Filter |
Filter parameters such as pointer to history and coefficient arrays and number scaling. More... | |
volatile struct NPNZ_GAIN_CONTROL_s | GainControl |
Parameter section for advanced control options. More... | |
volatile struct NPNZ_LIMITS_s | Limits |
Input and output clamping values. More... | |
volatile struct NPNZ_ADC_TRGCTRL_s | ADCTriggerControl |
Automatic ADC trigger placement options for ADC Trigger A and B. More... | |
volatile struct NPNZ_DATA_PROVIDERS_s | DataProviders |
Automated data sources pushing recent data points to user-defined variables. More... | |
volatile struct NPNZ_EXTENSION_HOOKS_s | ExtensionHooks |
User extension function triggers using function pointers with parameters. More... | |
volatile struct NPNZ_USER_DATA_BUFFER_s | Advanced |
Parameter section for advanced user control options. More... | |
Controller status word data structure allowing bit-wise access to status and control bits.
NPNZ16b controller object status and control word.
The NPNZ16b_s status word is providing status flag bits for monitoring and controlling the NPNZ16b control library code execution from outside the library module.
1) Status Byte The low byte of the NPNZ16b_s status word is used for READ ONLY status flags, set and cleared automatically by the control loop library routine.
2) Control Byte The high byte of the status word is used for control flags, through which users can control the control loop execution. This includes enabling/disabling the control loop execution, switch between different input and output sources, invert input values or enable/disable advanced functions.
union { ... } |
volatile bool agc_enabled |
struct { ... } bits |
Controller status bit-field for direct bit access.
volatile bool enabled |
volatile bool invert_input |
volatile bool lower_saturation_event |
volatile bool swap_source |
volatile bool swap_target |
volatile unsigned |
volatile bool upper_saturation_event |
volatile uint16_t value |