Digital Power Starter Kit 3 Firmware
dsPIC33C Boost Converter Voltage Mode Control Example
dev_boost_opstates.h
1
32
/*
33
* File: dev_boost_opstates.h
34
* Author: M91406
35
* Comments: Boost converter operation states header file
36
* Revision history:
37
* 10/09/20 1.0 initial version
38
*/
39
40
// This is a guard condition so that contents of this file are not included
41
// more than once.
42
#ifndef BOOST_CONVERTER_OPERATION_STATES_H
43
#define BOOST_CONVERTER_OPERATION_STATES_H
44
45
#include <xc.h>
// include processor files - each processor file is guarded.
46
#include <stdint.h>
// include standard integer data types
47
#include <stdbool.h>
// include standard boolean data types
48
49
/*******************************************************************************
50
* @var volatile uint16_t(*BoostConverterStateMachine[])(volatile struct BOOST_CONVERTER_s *boostInstance)
51
* @ingroup lib-layer-boost-state-machine-properties-variables
52
* @brief Function pointer array defining the state machine execution sequence
53
* @details
54
* The function pointer list BoostConverterStateMachine[] is providing
55
* access to a list of state functions. Each function mapped into this array
56
* as function pointer represents a self-contained, independent sub-state.
57
* The main state machine will call functions from this list in order of their
58
* index within the array, starting from '0'. While this list is executed, the
59
* calling main state is transparent by passing through the return value of the
60
* most recent sub-state. Once all sub-states have been executed, the calling main
61
* state will return the COMPLETE flag, allowing the main state machine to move on.
62
*
63
* Each function needs to be called by handing over a parameter of type
64
*
65
* - struct BOOST_CONVERTER_s
66
*
67
* Each function returns of type unsigned integer:
68
*
69
* - 0 = BOOST_OPSRET_ERROR
70
* - 1 = BOOST_OPSRET_COMPLETE
71
* - 2 = BOOST_OPSRET_REPEAT
72
*
73
**********************************************************************************/
74
75
extern
volatile
uint16_t (*BoostConverterStateMachine[])
76
(
volatile
struct
BOOST_CONVERTER_s
*boostInstance);
77
78
/*******************************************************************************
79
* @var volatile uint16_t BoostStateList_size
80
* @ingroup lib-layer-boost-state-machine-properties-variables
81
* @brief Boost converter state machine function pointer array size
82
*********************************************************************************/
83
84
extern
volatile
uint16_t BoostStateList_size;
85
86
87
#endif
/* BOOST_CONVERTER_OPERATION_STATES_H */
88
89
// END OF FILE
BOOST_CONVERTER_s
BOOST control & monitoring data structure.
Definition:
dev_boost_typedef.h:527
dpsk_boost_vmc.X
sources
power_control
devices
dev_boost_opstates.h
© 2021, Microchip Technology Inc.