Go to the documentation of this file.
33 #ifndef __MAX25603_H__
34 #define __MAX25603_H__
96 uint32_t freq_hz, uint8_t duty);
100 uint32_t freq_hz, uint8_t duty);
@ MAX25603_COMP1
Definition: max25603.h:45
struct no_os_pwm_init_param * turn_param
Definition: max25603.h:72
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
Structure containing the init parameters needed by the PWM generator.
Definition: no_os_pwm.h:66
int max25603_set_enable(struct max25603_desc *desc, enum max25603_enable enable, uint32_t freq_hz, uint8_t duty)
MAX25603 set and configure ENABLE PWM dimming.
Definition: max25603.c:65
@ MAX25603_EN1
Definition: max25603.h:51
@ MAX25603_EN2
Definition: max25603.h:52
int max25603_init(struct max25603_desc **desc, struct max25603_init_param *init_param)
MAX25603 descriptor initialization function.
Definition: max25603.c:235
int max25603_set_beam(struct max25603_desc *desc, enum max25603_beam beam, uint32_t freq_hz, uint8_t duty)
MAX25603 set and configure BEAM PWM dimming.
Definition: max25603.c:136
int32_t no_os_pwm_remove(struct no_os_pwm_desc *desc)
Free the resources allocated by no_os_pwm_init().
Definition: no_os_pwm.c:79
max25603_enable
Definition: max25603.h:49
Header file of Delay functions.
struct no_os_gpio_init_param * flt_param
Definition: max25603.h:65
struct no_os_pwm_desc * en2_desc
Definition: max25603.h:80
#define NO_OS_DIV_ROUND_CLOSEST_ULL(x, y)
Definition: no_os_util.h:56
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:117
enum max25603_beam beam
Definition: max25603.h:87
@ MAX25603_LOW_BEAM
Definition: max25603.h:58
@ MAX25603_DISABLE_BEAM
Definition: max25603.h:56
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
int32_t no_os_gpio_direction_input(struct no_os_gpio_desc *desc)
Enable the input direction of the specified GPIO.
Definition: no_os_gpio.c:124
int max25603_sel_comp(struct max25603_desc *desc, enum max25603_comp comp)
MAX25603 select comparator function.
Definition: max25603.c:44
struct no_os_gpio_init_param * shunt_param
Definition: max25603.h:64
@ MAX25603_DRL_BEAM
Definition: max25603.h:59
int32_t no_os_pwm_set_period(struct no_os_pwm_desc *desc, uint32_t period_ns)
Set the PWM period value.
Definition: no_os_pwm.c:133
int max25603_remove(struct max25603_desc *desc)
Deallocates all the resources used at initialization.
Definition: max25603.c:341
uint32_t period_ns
Definition: no_os_pwm.h:99
@ NO_OS_GPIO_LOW
Definition: no_os_gpio.h:115
int max25603_set_beam(struct max25603_desc *desc, enum max25603_beam beam, uint32_t freq_hz, uint8_t duty)
MAX25603 set and configure BEAM PWM dimming.
Definition: max25603.c:136
Definition: max25603.h:63
int32_t no_os_pwm_enable(struct no_os_pwm_desc *desc)
Enable PWM signal generation.
Definition: no_os_pwm.c:98
@ MAX25603_COMP2
Definition: max25603.h:46
struct no_os_pwm_desc * en1_desc
Definition: max25603.h:79
struct no_os_pwm_desc * lb_desc
Definition: max25603.h:81
Definition: max25603.h:75
int32_t no_os_pwm_disable(struct no_os_pwm_desc *desc)
Disable PWM signal generation.
Definition: no_os_pwm.c:115
@ MAX25603_TURN_BEAM
Definition: max25603.h:60
struct no_os_pwm_desc * turn_desc
Definition: max25603.h:84
struct no_os_pwm_init_param * en2_param
Definition: max25603.h:68
int32_t no_os_gpio_remove(struct no_os_gpio_desc *desc)
Free the resources allocated by no_os_gpio_get().
Definition: no_os_gpio.c:104
max25603_comp
Definition: max25603.h:44
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
struct no_os_gpio_desc * shunt_desc
Definition: max25603.h:76
int32_t no_os_pwm_set_duty_cycle(struct no_os_pwm_desc *desc, uint32_t duty_cycle_ns)
Set the PWM duty cycle.
Definition: no_os_pwm.c:169
Structure representing an PWM generator device.
Definition: no_os_pwm.h:93
struct no_os_pwm_desc * hb_desc
Definition: max25603.h:82
int32_t no_os_pwm_init(struct no_os_pwm_desc **desc, const struct no_os_pwm_init_param *param)
Initialize the PWM peripheral.
Definition: no_os_pwm.c:51
struct no_os_pwm_init_param * drl_param
Definition: max25603.h:71
struct no_os_gpio_desc * flt_desc
Definition: max25603.h:77
Header file of PWM Interface.
struct no_os_pwm_init_param * hb_param
Definition: max25603.h:70
struct no_os_pwm_desc * drl_desc
Definition: max25603.h:83
no_os_gpio_values
Enum that holds the possible output states of a GPIO.
Definition: no_os_gpio.h:113
int max25603_sel_comp(struct max25603_desc *desc, enum max25603_comp comp)
MAX25603 select comparator function.
Definition: max25603.c:44
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
@ MAX25603_DISABLE_EN
Definition: max25603.h:50
struct no_os_pwm_init_param * lb_param
Definition: max25603.h:69
int32_t no_os_gpio_set_value(struct no_os_gpio_desc *desc, uint8_t value)
Set the value of the specified GPIO.
Definition: no_os_gpio.c:197
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
enum max25603_comp comp
Definition: max25603.h:88
int max25603_set_enable(struct max25603_desc *desc, enum max25603_enable enable, uint32_t freq_hz, uint8_t duty)
MAX25603 set and configure ENABLE PWM dimming.
Definition: max25603.c:65
Header file of MAX25603 Driver.
Header file of GPIO Interface.
enum max25603_enable enable
Definition: max25603.h:86
#define NANO
Definition: no_os_units.h:50
int max25603_init(struct max25603_desc **desc, struct max25603_init_param *init_param)
MAX25603 descriptor initialization function.
Definition: max25603.c:235
max25603_beam
Definition: max25603.h:55
Header file of utility functions.
int max25603_remove(struct max25603_desc *desc)
Deallocates all the resources used at initialization.
Definition: max25603.c:341
int32_t no_os_gpio_direction_output(struct no_os_gpio_desc *desc, uint8_t value)
Enable the output direction of the specified GPIO.
Definition: no_os_gpio.c:147
struct no_os_pwm_init_param * en1_param
Definition: max25603.h:67
@ MAX25603_HIGH_BEAM
Definition: max25603.h:57
int32_t no_os_gpio_get_optional(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Get the value of an optional GPIO.
Definition: no_os_gpio.c:75