.. _program_listing_file_mainboard_Inc_bms_fsm.h: Program Listing for File bms_fsm.h ================================== |exhale_lsh| :ref:`Return to documentation for file ` (``mainboard/Inc/bms_fsm.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef BMS_FSM_H #define BMS_FSM_H #include "blink.h" #include "fsm.h" #include typedef enum { BMS_IDLE = 0, BMS_PRECHARGE, BMS_ON, BMS_HALT, BMS_NUM_STATES } bms_states; typedef enum { BMS_EV_HALT = 0, BMS_EV_TS_OFF, BMS_EV_TS_ON, BMS_EV_VOLT_MEASURE, BMS_EV_TEMP_MEASURE, BMS_EV_PRECHARGE_CHECK, BMS_EV_PRECHARGE_TIMEOUT, BMS_EV_NO_ERRORS, BMS_EV_NUM } bms_events; typedef struct { fsm fsm; blink_t led; } bms_fsm; extern bms_fsm bms; void bms_fsm_init(); #endif