Go to the documentation of this file.
38 #include "mikrosdk_version.h"
41 #if mikroSDK_GET_VERSION < 20800ul
42 #include "rcu_delays.h"
48 #include "drv_digital_out.h"
49 #include "drv_digital_in.h"
62 #define DCMOTOR8_MAP_MIKROBUS( cfg, mikrobus ) \
63 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
64 cfg.en = MIKROBUS( mikrobus, MIKROBUS_CS )
71 #define DCMOTOR8_RETVAL uint8_t
73 #define DCMOTOR8_OK 0x00
74 #define DCMOTOR8_INIT_ERROR 0xFF
81 #define DCMOTOR8_ENABLE 1
82 #define DCMOTOR8_DISABLE 0
89 #define DCMOTOR8_DEF_FREQ 20000
211 #endif // _DCMOTOR8_H_
void dcmotor8_enable(dcmotor8_t *ctx, uint8_t state)
Enable function.
pin_name_t pwm
Definition: dcmotor8.h:126
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:107
Click ctx object definition.
Definition: dcmotor8.h:103
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:130
#define DCMOTOR8_RETVAL
Definition: dcmotor8.h:71
pwm_t pwm
Definition: dcmotor8.h:111
Click configuration structure definition.
Definition: dcmotor8.h:123
uint32_t dev_pwm_freq
Definition: dcmotor8.h:134
uint32_t pwm_freq
Definition: dcmotor8.h:115