group::PWM

This module controls the PWM peripherals on a microcontroller. More information about accessing peripheral IO is in the Device Interface section.

Details

definePWM_VERSION


definePWM_IOC_IDENT_CHAR


defineI_PWM_GETVERSION


defineI_PWM_GETINFO


defineI_PWM_SETATTR


defineI_PWM_SETACTION


defineI_PWM_SETCHANNEL

This IOCTL request sets the channel. The ctl argument is the channel to use. For example,

mcu_channel_t value;
value.channel = 0;
value.value = 100;
ioctl(pwm_fd, I_PWM_SET, &value); //write 100 to channel 0

defineI_PWM_GETCHANNEL


defineI_PWM_SET


defineI_PWM_GET


defineI_PWM_ENABLE


defineI_PWM_DISABLE


defineI_PWM_TOTAL


enumpwm_flag_t

  • PWM_FLAG_SET_TIMER Set to configure the frequency and period (implies PWM_FLAG_SET_CHANNEL)
  • PWM_FLAG_IS_ACTIVE_HIGH Set to configure the outputs as active high
  • PWM_FLAG_IS_ACTIVE_LOW Set to configure the outputs as active low
  • PWM_FLAG_SET_CHANNELS Set to just configure channels and leave the timer alone
  • PWM_FLAG_CLEAR_CHANNELS Set to clear all channels; may be with with PWM_FLAG_SET_CHANNELS or PMW_FLAG_SET_TIMER
  • PWM_FLAG_IS_ENABLED Set with PMW_FLAG_SET_TIMER to enable the timer


date: “2019-06-27” layout: post title: struct::pwm_info_t katex: true

categories: struct

Methods

Details

public u32o_flags

Bitmask to show which flags are supported through the driver


public u32o_events

Bitmask of supported events


public u32resd



date: “2019-06-27” layout: post title: struct::pwm_pin_assignment_t katex: true

categories: struct

Methods

Details

publicmcu_pin_tchannel



date: “2019-06-27” layout: post title: struct::pwm_attr_t katex: true

categories: struct

Methods

Details

public u32o_flags


public pwm_pin_assignment_tpin_assignment


public u32freq

The PWM counter frequency


public u32period

The PWM period in counts


public mcu_channel_tchannel


public u32resd


X

Thanks for Coming!

Subscribe to news and updates