Go to the documentation of this file.
42 #ifdef PREINIT_SUPPORTED
46 #ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52 #include "drv_digital_out.h"
53 #include "drv_digital_in.h"
66 #define DCMOTOR8_MAP_MIKROBUS( cfg, mikrobus ) \
67 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
68 cfg.en = MIKROBUS( mikrobus, MIKROBUS_CS )
75 #define DCMOTOR8_RETVAL uint8_t
77 #define DCMOTOR8_OK 0x00
78 #define DCMOTOR8_INIT_ERROR 0xFF
85 #define DCMOTOR8_ENABLE 1
86 #define DCMOTOR8_DISABLE 0
93 #define DCMOTOR8_DEF_FREQ 20000
215 #endif // _DCMOTOR8_H_
void dcmotor8_enable(dcmotor8_t *ctx, uint8_t state)
Enable function.
pin_name_t pwm
Definition: dcmotor8.h:130
void dcmotor8_pwm_start(dcmotor8_t *ctx)
Start PWM module.
DCMOTOR8_RETVAL dcmotor8_init(dcmotor8_t *ctx, dcmotor8_cfg_t *cfg)
Initialization function.
digital_out_t en
Definition: dcmotor8.h:111
Click ctx object definition.
Definition: dcmotor8.h:107
void dcmotor8_cfg_setup(dcmotor8_cfg_t *cfg)
Config Object Initialization function.
void dcmotor8_set_duty_cycle(dcmotor8_t *ctx, float duty_cycle)
Generic sets PWM duty cycle.
void dcmotor8_pwm_stop(dcmotor8_t *ctx)
Stop PWM module.
pin_name_t en
Definition: dcmotor8.h:134
#define DCMOTOR8_RETVAL
Definition: dcmotor8.h:75
pwm_t pwm
Definition: dcmotor8.h:115
Click configuration structure definition.
Definition: dcmotor8.h:127
uint32_t dev_pwm_freq
Definition: dcmotor8.h:138
uint32_t pwm_freq
Definition: dcmotor8.h:119