36#ifndef LIBBSP_AARCH64_RASPBERRYPI_4_PWM_H
37#define LIBBSP_AARCH64_RASPBERRYPI_4_PWM_H
39#include "bsp/raspberrypi.h"
40#include "bsp/rpi-gpio.h"
47typedef enum { raspberrypi_pwm0, raspberrypi_pwm1 } raspberrypi_pwm_channel;
50 raspberrypi_pwm_master0,
51 raspberrypi_pwm_master1
52} raspberrypi_pwm_master;
58#define C_MSEN2 BSP_BIT32( 15 )
59#define C_USEF2 BSP_BIT32( 13 )
60#define C_POLA2 BSP_BIT32( 12 )
61#define C_SBIT2 BSP_BIT32( 11 )
62#define C_RPTL2 BSP_BIT32( 10 )
63#define C_MODE2 BSP_BIT32( 9 )
64#define C_PWEN2 BSP_BIT32( 8 )
65#define C_MSEN1 BSP_BIT32( 7 )
66#define C_CLRF BSP_BIT32( 6 )
67#define C_USEF1 BSP_BIT32( 5 )
68#define C_POLA1 BSP_BIT32( 4 )
69#define C_SBIT1 BSP_BIT32( 3 )
70#define C_RPTL1 BSP_BIT32( 2 )
71#define C_MODE1 BSP_BIT32( 1 )
72#define C_PWEN1 BSP_BIT32( 0 )
92 raspberrypi_pwm_master master,
93 raspberrypi_pwm_channel channel,
108 raspberrypi_pwm_master master,
109 raspberrypi_pwm_channel channel,
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:85
This header file provides utility macros for BSPs.
rtems_status_code rpi_pwm_set_data(raspberrypi_pwm_master master, raspberrypi_pwm_channel channel, uint32_t data)
Update duty-cycle register.
Definition: raspberrypi-pwm.c:113
rtems_status_code rpi_pwm_set_clock(uint32_t divisor)
Set PWM clock divider.
Definition: raspberrypi-pwm.c:54
rtems_status_code rpi_pwm_init(raspberrypi_pwm_master master, raspberrypi_pwm_channel channel, uint32_t range, uint32_t data)
Main PWM initialization function. This functions sets up the PWM master, channel, duty cycle and GPIO...
Definition: raspberrypi-pwm.c:164