Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Luiz Fernando Lavado Villa
Core
Commits
52f34e20
Commit
52f34e20
authored
Jun 09, 2021
by
Clément Foucher
Browse files
Move inclusion to public leg header file.
parent
2b74c001
Changes
3
Hide whitespace changes
Inline
Side-by-side
zephyr/modules/owntech_leg_driver/zephyr/leg.h
View file @
52f34e20
...
...
@@ -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
);
...
...
zephyr/modules/owntech_leg_driver/zephyr/owntech_leg_driver.c
View file @
52f34e20
...
...
@@ -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
,
...
...
zephyr/modules/owntech_leg_driver/zephyr/owntech_leg_driver.h
View file @
52f34e20
...
...
@@ -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_ */
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment