eez::psu Namespace Reference

PSU firmware. More...

Namespaces

 arduino_util
 Utility code (PROGMEM access) for Arduino platform.
 
 calibration
 Channel calibration procedure.
 
 datetime
 System date and time.
 
 debug
 Everything used for the debugging purposes.
 
 gui
 GUI for local control using TFT with touch.
 
 persist_conf
 Store/restore of persistent configuration data (device configuration, calibration parameters, profiles) using external EEPROM.
 
 profile
 PSU configuration profiles (save, recall, ...).
 
 scpi
 SCPI commands.
 
 simulator
 Firmware simulator.
 
 sound
 Play simple sound tunes.
 
 temperature
 Temperature measurement and protection.
 
 util
 Various utility functions.
 

Classes

class  AnalogDigitalConverter
 Analog to digital converter HW used by the channel. More...
 
class  Channel
 PSU channel. More...
 
class  DigitalAnalogConverter
 Digital to analog converter HW used by the channel. More...
 
class  Interval
 
class  IOExpander
 IO Expander HW used by the channel. More...
 

Typedefs

typedef void(* ACTION) ()
 

Enumerations

enum  ActionsEnum {
  ACTION_ID_NONE, ACTION_ID_CHANNEL_TOGGLE_OUTPUT, ACTION_ID_EDIT, ACTION_ID_EDIT_MODE_SLIDER,
  ACTION_ID_EDIT_MODE_STEP, ACTION_ID_EDIT_MODE_KEYPAD, ACTION_ID_EXIT_EDIT_MODE, ACTION_ID_TOGGLE_INTERACTIVE_MODE,
  ACTION_ID_NON_INTERACTIVE_ENTER, ACTION_ID_NON_INTERACTIVE_DISCARD, ACTION_ID_KEYPAD_KEY, ACTION_ID_KEYPAD_SPACE,
  ACTION_ID_KEYPAD_BACK, ACTION_ID_KEYPAD_CLEAR, ACTION_ID_KEYPAD_CAPS, ACTION_ID_KEYPAD_OK,
  ACTION_ID_KEYPAD_CANCEL, ACTION_ID_KEYPAD_SIGN, ACTION_ID_KEYPAD_UNIT, ACTION_ID_KEYPAD_OPTION1,
  ACTION_ID_KEYPAD_OPTION2, ACTION_ID_TOUCH_SCREEN_CALIBRATION, ACTION_ID_YES, ACTION_ID_NO,
  ACTION_ID_OK, ACTION_ID_CANCEL, ACTION_ID_TURN_OFF, ACTION_ID_SHOW_PREVIOUS_PAGE,
  ACTION_ID_SHOW_MAIN_PAGE, ACTION_ID_SHOW_EVENT_QUEUE, ACTION_ID_SHOW_CHANNEL_SETTINGS, ACTION_ID_SHOW_SYS_SETTINGS,
  ACTION_ID_SHOW_SYS_SETTINGS2, ACTION_ID_SHOW_SYS_SETTINGS_DATE_TIME, ACTION_ID_SHOW_SYS_SETTINGS_CAL, ACTION_ID_SHOW_SYS_SETTINGS_CAL_CH,
  ACTION_ID_SHOW_SYS_SETTINGS_SCREEN_CALIBRATION, ACTION_ID_SHOW_SYS_SETTINGS_DISPLAY, ACTION_ID_SHOW_SYS_SETTINGS_ETHERNET, ACTION_ID_SHOW_SYS_SETTINGS_PROTECTIONS,
  ACTION_ID_SHOW_SYS_SETTINGS_AUX_OTP, ACTION_ID_SHOW_SYS_SETTINGS_SOUND, ACTION_ID_SHOW_SYS_SETTINGS_ENCODER, ACTION_ID_SHOW_SYS_INFO,
  ACTION_ID_SHOW_SYS_INFO2, ACTION_ID_SHOW_MAIN_HELP_PAGE, ACTION_ID_SHOW_EDIT_MODE_STEP_HELP, ACTION_ID_SHOW_EDIT_MODE_SLIDER_HELP,
  ACTION_ID_SHOW_CH_SETTINGS_PROT, ACTION_ID_SHOW_CH_SETTINGS_PROT_CLEAR, ACTION_ID_SHOW_CH_SETTINGS_PROT_OCP, ACTION_ID_SHOW_CH_SETTINGS_PROT_OVP,
  ACTION_ID_SHOW_CH_SETTINGS_PROT_OPP, ACTION_ID_SHOW_CH_SETTINGS_PROT_OTP, ACTION_ID_SHOW_CH_SETTINGS_ADV, ACTION_ID_SHOW_CH_SETTINGS_ADV_LRIPPLE,
  ACTION_ID_SHOW_CH_SETTINGS_ADV_RSENSE, ACTION_ID_SHOW_CH_SETTINGS_ADV_RPROG, ACTION_ID_SHOW_CH_SETTINGS_ADV_TRACKING, ACTION_ID_SHOW_CH_SETTINGS_ADV_COUPLING,
  ACTION_ID_SHOW_CH_SETTINGS_INFO, ACTION_ID_SHOW_CH_SETTINGS_INFO_CAL, ACTION_ID_SYS_SETTINGS_CAL_EDIT_PASSWORD, ACTION_ID_SYS_SETTINGS_CAL_CH_WIZ_START,
  ACTION_ID_SYS_SETTINGS_CAL_CH_WIZ_STEP_PREVIOUS, ACTION_ID_SYS_SETTINGS_CAL_CH_WIZ_STEP_NEXT, ACTION_ID_SYS_SETTINGS_CAL_CH_WIZ_STOP_AND_SHOW_PREVIOUS_PAGE, ACTION_ID_SYS_SETTINGS_CAL_CH_WIZ_STOP_AND_SHOW_MAIN_PAGE,
  ACTION_ID_SYS_SETTINGS_CAL_CH_WIZ_STEP_SET, ACTION_ID_SYS_SETTINGS_CAL_CH_WIZ_SAVE, ACTION_ID_SYS_SETTINGS_CAL_TOGGLE_ENABLE, ACTION_ID_CH_SETTINGS_PROT_CLEAR,
  ACTION_ID_CH_SETTINGS_PROT_CLEAR_AND_DISABLE, ACTION_ID_CH_SETTINGS_PROT_TOGGLE_STATE, ACTION_ID_CH_SETTINGS_PROT_EDIT_LIMIT, ACTION_ID_CH_SETTINGS_PROT_EDIT_LEVEL,
  ACTION_ID_CH_SETTINGS_PROT_EDIT_DELAY, ACTION_ID_SET, ACTION_ID_DISCARD, ACTION_ID_EDIT_FIELD,
  ACTION_ID_EVENT_QUEUE_PREVIOUS_PAGE, ACTION_ID_EVENT_QUEUE_NEXT_PAGE, ACTION_ID_CH_SETTINGS_ADV_LRIPPLE_TOGGLE_STATUS, ACTION_ID_CH_SETTINGS_ADV_LRIPPLE_TOGGLE_AUTO_MODE,
  ACTION_ID_CH_SETTINGS_ADV_RSENSE_TOGGLE_STATUS, ACTION_ID_CH_SETTINGS_ADV_RPROG_TOGGLE_STATUS, ACTION_ID_SYS_SETTINGS_DATE_TIME_TOGGLE_DST, ACTION_ID_SHOW_USER_PROFILES,
  ACTION_ID_SHOW_USER_PROFILES2, ACTION_ID_SHOW_USER_PROFILE_SETTINGS, ACTION_ID_PROFILES_TOGGLE_AUTO_RECALL, ACTION_ID_PROFILE_TOGGLE_IS_AUTO_RECALL_LOCATION,
  ACTION_ID_PROFILE_RECALL, ACTION_ID_PROFILE_SAVE, ACTION_ID_PROFILE_DELETE, ACTION_ID_PROFILE_EDIT_REMARK,
  ACTION_ID_TOGGLE_CHANNELS_VIEW_MODE, ACTION_ID_SYS_SETTINGS_ETHERNET_ENABLE, ACTION_ID_SYS_SETTINGS_ETHERNET_DISABLE, ACTION_ID_CH_SETTINGS_ADV_COUPLING_UNCOUPLE,
  ACTION_ID_CH_SETTINGS_ADV_COUPLING_SET_PARALLEL_INFO, ACTION_ID_CH_SETTINGS_ADV_COUPLING_SET_SERIES_INFO, ACTION_ID_CH_SETTINGS_ADV_COUPLING_SET_PARALLEL, ACTION_ID_CH_SETTINGS_ADV_COUPLING_SET_SERIES,
  ACTION_ID_CH_SETTINGS_ADV_TOGGLE_TRACKING_MODE, ACTION_ID_SYS_SETTINGS_PROTECTIONS_TOGGLE_OUTPUT_PROTECTION_COUPLE, ACTION_ID_SYS_SETTINGS_PROTECTIONS_TOGGLE_SHUTDOWN_WHEN_PROTECTION_TRIPPED, ACTION_ID_SYS_SETTINGS_PROTECTIONS_TOGGLE_FORCE_DISABLING_ALL_OUTPUTS_ON_POWER_UP,
  ACTION_ID_SYS_SETTINGS_PROTECTIONS_AUX_OTP_TOGGLE_STATE, ACTION_ID_SYS_SETTINGS_PROTECTIONS_AUX_OTP_EDIT_LEVEL, ACTION_ID_SYS_SETTINGS_PROTECTIONS_AUX_OTP_EDIT_DELAY, ACTION_ID_SYS_SETTINGS_PROTECTIONS_AUX_OTP_CLEAR,
  ACTION_ID_ON_LAST_ERROR_EVENT_ACTION, ACTION_ID_EDIT_SYSTEM_PASSWORD, ACTION_ID_SYS_FRONT_PANEL_LOCK, ACTION_ID_SYS_FRONT_PANEL_UNLOCK,
  ACTION_ID_SYS_SETTINGS_SOUND_TOGGLE, ACTION_ID_SYS_SETTINGS_SOUND_TOGGLE_CLICK, ACTION_ID_SHOW_CH_SETTINGS_ADV_VIEW, ACTION_ID_CH_SETTINGS_ADV_VIEW_EDIT_DISPLAY_VALUE1,
  ACTION_ID_CH_SETTINGS_ADV_VIEW_EDIT_DISPLAY_VALUE2, ACTION_ID_CH_SETTINGS_ADV_VIEW_SWAP_DISPLAY_VALUES, ACTION_ID_CH_SETTINGS_ADV_VIEW_EDIT_YT_VIEW_RATE, ACTION_ID_SELECT_ENUM_ITEM,
  ACTION_ID_ERROR_ALERT_ACTION, ACTION_ID_UP_DOWN, ACTION_ID_SYS_SETTINGS_ENCODER_TOGGLE_CONFIRMATION_MODE, ACTION_ID_SYS_SETTINGS_DISPLAY_TURN_OFF,
  ACTION_ID_SYS_SETTINGS_DISPLAY_EDIT_BRIGHTNESS, ACTION_ID_SHOW_CH_SETTINGS_TRIGGER, ACTION_ID_CH_SETTINGS_TRIGGER_EDIT_TRIGGER_MODE, ACTION_ID_CH_SETTINGS_TRIGGER_EDIT_VOLTAGE_TRIGGER_VALUE,
  ACTION_ID_CH_SETTINGS_TRIGGER_EDIT_CURRENT_TRIGGER_VALUE, ACTION_ID_CH_SETTINGS_TRIGGER_EDIT_LIST_COUNT, ACTION_ID_SHOW_CH_SETTINGS_LISTS, ACTION_ID_SHOW_SYS_SETTINGS_TRIGGER,
  ACTION_ID_CHANNEL_LISTS_PREVIOUS_PAGE, ACTION_ID_CHANNEL_LISTS_NEXT_PAGE, ACTION_ID_CHANNEL_LISTS_EDIT, ACTION_ID_SHOW_CHANNEL_LISTS_INSERT_MENU,
  ACTION_ID_SHOW_CHANNEL_LISTS_DELETE_MENU, ACTION_ID_CHANNEL_LISTS_INSERT_ROW_ABOVE, ACTION_ID_CHANNEL_LISTS_INSERT_ROW_BELOW, ACTION_ID_CHANNEL_LISTS_DELETE_ROW,
  ACTION_ID_CHANNEL_LISTS_CLEAR_COLUMN, ACTION_ID_CHANNEL_LISTS_DELETE_ROWS, ACTION_ID_CHANNEL_LISTS_DELETE_ALL, ACTION_ID_CHANNEL_INITIATE_TRIGGER,
  ACTION_ID_CHANNEL_SET_TO_FIXED, ACTION_ID_CHANNEL_ENABLE_OUTPUT, ACTION_ID_TRIGGER_SELECT_SOURCE, ACTION_ID_TRIGGER_EDIT_DELAY,
  ACTION_ID_TRIGGER_SELECT_POLARITY, ACTION_ID_TRIGGER_TOGGLE_INITIATE_CONTINUOUSLY, ACTION_ID_TRIGGER_GENERATE_MANUAL
}
 
enum  DisplayValue { DISPLAY_VALUE_VOLTAGE, DISPLAY_VALUE_CURRENT, DISPLAY_VALUE_POWER }
 
enum  ChannelFeatures {
  CH_FEATURE_VOLT = (1 << 1), CH_FEATURE_CURRENT = (1 << 2), CH_FEATURE_POWER = (1 << 3), CH_FEATURE_OE = (1 << 4),
  CH_FEATURE_DPROG = (1 << 5), CH_FEATURE_LRIPPLE = (1 << 6), CH_FEATURE_RPROG = (1 << 7), CH_FEATURE_RPOL = (1 << 8)
}
 
enum  TriggerMode { TRIGGER_MODE_FIXED, TRIGGER_MODE_LIST, TRIGGER_MODE_STEP }
 
enum  TestResult { TEST_FAILED = 0, TEST_OK = 1, TEST_SKIPPED = 2, TEST_WARNING = 3 }
 
enum  MaxCurrentLimitCause { MAX_CURRENT_LIMIT_CAUSE_NONE, MAX_CURRENT_LIMIT_CAUSE_FAN, MAX_CURRENT_LIMIT_CAUSE_TEMPERATURE }
 
enum  RLState { RL_STATE_LOCAL = 0, RL_STATE_REMOTE = 1, RL_STATE_RW_LOCK = 2 }
 

Functions

void action_channel_toggle_output ()
 
void action_edit ()
 
void action_edit_mode_slider ()
 
void action_edit_mode_step ()
 
void action_edit_mode_keypad ()
 
void action_exit_edit_mode ()
 
void action_toggle_interactive_mode ()
 
void action_non_interactive_enter ()
 
void action_non_interactive_discard ()
 
void action_keypad_key ()
 
void action_keypad_space ()
 
void action_keypad_back ()
 
void action_keypad_clear ()
 
void action_keypad_caps ()
 
void action_keypad_ok ()
 
void action_keypad_cancel ()
 
void action_keypad_sign ()
 
void action_keypad_unit ()
 
void action_keypad_option1 ()
 
void action_keypad_option2 ()
 
void action_touch_screen_calibration ()
 
void action_yes ()
 
void action_no ()
 
void action_ok ()
 
void action_cancel ()
 
void action_turn_off ()
 
void action_show_previous_page ()
 
void action_show_main_page ()
 
void action_show_event_queue ()
 
void action_show_channel_settings ()
 
void action_show_sys_settings ()
 
void action_show_sys_settings2 ()
 
void action_show_sys_settings_date_time ()
 
void action_show_sys_settings_cal ()
 
void action_show_sys_settings_cal_ch ()
 
void action_show_sys_settings_screen_calibration ()
 
void action_show_sys_settings_display ()
 
void action_show_sys_settings_ethernet ()
 
void action_show_sys_settings_protections ()
 
void action_show_sys_settings_aux_otp ()
 
void action_show_sys_settings_sound ()
 
void action_show_sys_settings_encoder ()
 
void action_show_sys_info ()
 
void action_show_sys_info2 ()
 
void action_show_main_help_page ()
 
void action_show_edit_mode_step_help ()
 
void action_show_edit_mode_slider_help ()
 
void action_show_ch_settings_prot ()
 
void action_show_ch_settings_prot_clear ()
 
void action_show_ch_settings_prot_ocp ()
 
void action_show_ch_settings_prot_ovp ()
 
void action_show_ch_settings_prot_opp ()
 
void action_show_ch_settings_prot_otp ()
 
void action_show_ch_settings_adv ()
 
void action_show_ch_settings_adv_lripple ()
 
void action_show_ch_settings_adv_rsense ()
 
void action_show_ch_settings_adv_rprog ()
 
void action_show_ch_settings_adv_tracking ()
 
void action_show_ch_settings_adv_coupling ()
 
void action_show_ch_settings_info ()
 
void action_show_ch_settings_info_cal ()
 
void action_sys_settings_cal_edit_password ()
 
void action_sys_settings_cal_ch_wiz_start ()
 
void action_sys_settings_cal_ch_wiz_step_previous ()
 
void action_sys_settings_cal_ch_wiz_step_next ()
 
void action_sys_settings_cal_ch_wiz_stop_and_show_previous_page ()
 
void action_sys_settings_cal_ch_wiz_stop_and_show_main_page ()
 
void action_sys_settings_cal_ch_wiz_step_set ()
 
void action_sys_settings_cal_ch_wiz_save ()
 
void action_sys_settings_cal_toggle_enable ()
 
void action_ch_settings_prot_clear ()
 
void action_ch_settings_prot_clear_and_disable ()
 
void action_ch_settings_prot_toggle_state ()
 
void action_ch_settings_prot_edit_limit ()
 
void action_ch_settings_prot_edit_level ()
 
void action_ch_settings_prot_edit_delay ()
 
void action_set ()
 
void action_discard ()
 
void action_edit_field ()
 
void action_event_queue_previous_page ()
 
void action_event_queue_next_page ()
 
void action_ch_settings_adv_lripple_toggle_status ()
 
void action_ch_settings_adv_lripple_toggle_auto_mode ()
 
void action_ch_settings_adv_rsense_toggle_status ()
 
void action_ch_settings_adv_rprog_toggle_status ()
 
void action_sys_settings_date_time_toggle_dst ()
 
void action_show_user_profiles ()
 
void action_show_user_profiles2 ()
 
void action_show_user_profile_settings ()
 
void action_profiles_toggle_auto_recall ()
 
void action_profile_toggle_is_auto_recall_location ()
 
void action_profile_recall ()
 
void action_profile_save ()
 
void action_profile_delete ()
 
void action_profile_edit_remark ()
 
void action_toggle_channels_view_mode ()
 
void action_sys_settings_ethernet_enable ()
 
void action_sys_settings_ethernet_disable ()
 
void action_ch_settings_adv_coupling_uncouple ()
 
void action_ch_settings_adv_coupling_set_parallel_info ()
 
void action_ch_settings_adv_coupling_set_series_info ()
 
void action_ch_settings_adv_coupling_set_parallel ()
 
void action_ch_settings_adv_coupling_set_series ()
 
void action_ch_settings_adv_toggle_tracking_mode ()
 
void action_sys_settings_protections_toggle_output_protection_couple ()
 
void action_sys_settings_protections_toggle_shutdown_when_protection_tripped ()
 
void action_sys_settings_protections_toggle_force_disabling_all_outputs_on_power_up ()
 
void action_sys_settings_protections_aux_otp_toggle_state ()
 
void action_sys_settings_protections_aux_otp_edit_level ()
 
void action_sys_settings_protections_aux_otp_edit_delay ()
 
void action_sys_settings_protections_aux_otp_clear ()
 
void action_on_last_error_event_action ()
 
void action_edit_system_password ()
 
void action_sys_front_panel_lock ()
 
void action_sys_front_panel_unlock ()
 
void action_sys_settings_sound_toggle ()
 
void action_sys_settings_sound_toggle_click ()
 
void action_show_ch_settings_adv_view ()
 
void action_ch_settings_adv_view_edit_display_value1 ()
 
void action_ch_settings_adv_view_edit_display_value2 ()
 
void action_ch_settings_adv_view_swap_display_values ()
 
void action_ch_settings_adv_view_edit_yt_view_rate ()
 
void action_select_enum_item ()
 
void action_error_alert_action ()
 
void action_up_down ()
 
void action_sys_settings_encoder_toggle_confirmation_mode ()
 
void action_sys_settings_display_turn_off ()
 
void action_sys_settings_display_edit_brightness ()
 
void action_show_ch_settings_trigger ()
 
void action_ch_settings_trigger_edit_trigger_mode ()
 
void action_ch_settings_trigger_edit_voltage_trigger_value ()
 
void action_ch_settings_trigger_edit_current_trigger_value ()
 
void action_ch_settings_trigger_edit_list_count ()
 
void action_show_ch_settings_lists ()
 
void action_show_sys_settings_trigger ()
 
void action_channel_lists_previous_page ()
 
void action_channel_lists_next_page ()
 
void action_channel_lists_edit ()
 
void action_show_channel_lists_insert_menu ()
 
void action_show_channel_lists_delete_menu ()
 
void action_channel_lists_insert_row_above ()
 
void action_channel_lists_insert_row_below ()
 
void action_channel_lists_delete_row ()
 
void action_channel_lists_clear_column ()
 
void action_channel_lists_delete_rows ()
 
void action_channel_lists_delete_all ()
 
void action_channel_initiate_trigger ()
 
void action_channel_set_to_fixed ()
 
void action_channel_enable_output ()
 
void action_trigger_select_source ()
 
void action_trigger_edit_delay ()
 
void action_trigger_select_polarity ()
 
void action_trigger_toggle_initiate_continuously ()
 
void action_trigger_generate_manual ()
 
void loadConf ()
 
void init ()
 
bool test ()
 
void boot ()
 
bool powerUp ()
 
void powerDown ()
 
bool isPowerUp ()
 
bool changePowerState (bool up)
 
void powerDownBySensor ()
 
bool reset ()
 
void onProtectionTripped ()
 
void tick ()
 
void criticalTick ()
 
void setEsrBits (int bit_mask)
 
void setQuesBits (int bit_mask, bool on)
 
void generateError (int16_t error)
 
void SPI_usingInterrupt (uint8_t interruptNumber)
 
void SPI_beginTransaction (SPISettings &settings)
 
void SPI_endTransaction ()
 
const char * getModelName ()
 
const char * getCpuModel ()
 
const char * getCpuType ()
 
const char * getCpuEthernetType ()
 
void enterTimeCriticalMode ()
 
bool isTimeCriticalMode ()
 
void leaveTimeCriticalMode ()
 
bool isMaxCurrentLimited ()
 
void limitMaxCurrent (MaxCurrentLimitCause cause)
 
void unlimitMaxCurrent ()
 
MaxCurrentLimitCause getMaxCurrentLimitCause ()
 
bool isFrontPanelLocked ()
 

Variables

ACTION actions []
 
const char * CH_BOARD_REVISION_NAMES []
 
uint16_t CH_BOARD_REVISION_FEATURES []
 
Channel channels [CH_MAX] = { CHANNELS }
 
bool g_isBooted = false
 
ontime::Counter g_powerOnTimeCounter (ontime::ON_TIME_COUNTER_POWER)
 
volatile bool g_insideInterruptHandler = false
 
RLState g_rlState = RL_STATE_LOCAL
 

Detailed Description

PSU firmware.

Variable Documentation

uint16_t eez::psu::CH_BOARD_REVISION_FEATURES[]
Initial value:
= {
CH_FEATURE_VOLT | CH_FEATURE_CURRENT | CH_FEATURE_OE,
CH_FEATURE_VOLT | CH_FEATURE_CURRENT | CH_FEATURE_POWER | CH_FEATURE_OE | CH_FEATURE_DPROG | CH_FEATURE_LRIPPLE | CH_FEATURE_RPROG,
CH_FEATURE_VOLT | CH_FEATURE_CURRENT | CH_FEATURE_POWER | CH_FEATURE_OE | CH_FEATURE_DPROG | CH_FEATURE_LRIPPLE | CH_FEATURE_RPROG | CH_FEATURE_RPOL,
CH_FEATURE_VOLT | CH_FEATURE_CURRENT | CH_FEATURE_POWER | CH_FEATURE_OE | CH_FEATURE_DPROG | CH_FEATURE_LRIPPLE | CH_FEATURE_RPROG | CH_FEATURE_RPOL,
}
const char* eez::psu::CH_BOARD_REVISION_NAMES[]
Initial value:
= {
"Power_r4b43a",
"Power_r5B6b",
"Power_r5B9",
"Power_r5B10"
}