Commit 52f34e20 authored by Clément Foucher's avatar Clément Foucher
Browse files

Move inclusion to public leg header file.

parent 2b74c001
......@@ -42,6 +42,9 @@
extern "C" {
#endif
#define LEG_DEFAULT_DT (100U) /**< dead-time in ns */
#define LEG_FREQ KHZ(200U) /**< frequency in Hz*/
/**
* @brief Inverter leg configuration data structure
*/
......@@ -56,7 +59,7 @@ typedef struct {
* @brief Initializes all the configured devices with the chosen switch convention
*
* @param[in] upper_switch_convention Choice of the switch convention
*
*
* @return HRTIM period
*/
uint16_t leg_init(bool upper_switch_convention);
......
......@@ -45,7 +45,7 @@ uint16_t leg_init(bool upper_switch_convention)
uint32_t freq = LEG_FREQ;
/* ensures that timing_unit can be used as leg identifier */
for (int i = 0; i < LEG_NUMOF; i++)
for (int i = 0; i < LEG_NUMOF; i++)
{
leg_conf[leg_config[i].timing_unit] = leg_config[i];
}
......@@ -71,7 +71,7 @@ void leg_set(hrtim_tu_t timing_unit, uint16_t pulse_width, uint16_t phase_shift)
{
pulse_width = max_pw;
}
hrtim_pwm_set( leg_conf[timing_unit].hrtim,
timing_unit,
pulse_width,
......
......@@ -22,19 +22,15 @@
* @ingroup owntech_modules_leg
* @file
*
* @{
* @brief leg_config array definition
* @date 2020
* @author Hugues Larrive <hugues.larrive@laas.fr>
*
* @note This must only be included in leg.c
* @note This must only be included in owntech_leg_driver.c
*/
#ifndef LEG_CONF_H
#define LEG_CONF_H
#define LEG_DEFAULT_DT (100U) /**< dead-time in ns */
#define LEG_FREQ KHZ(200U) /**< frequency in Hz*/
#ifndef LEG_CONF_H_
#define LEG_CONF_H_
/**
* @brief Inverter leg configuration
......@@ -76,5 +72,4 @@ static leg_conf_t leg_config[] = {
#define LEG_NUMOF ARRAY_SIZE(leg_config)
#endif /* LEG_CONF_H */
/** @} */
#endif /* LEG_CONF_H_ */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment