Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
pwm.h
00001 #include "mbed.h" 00002 00003 00004 00005 //--------------------------------------- 00006 // Definitions 00007 //--------------------------------------- 00008 #define PWM_INIT_FREQ ( 1000 ) 00009 #define PWM_FREQ_MIN ( 1 ) 00010 #define PWM_FREQ_MAX ( 5000 ) 00011 #define PWM_DC_MAX ( 100 ) 00012 00013 00014 00015 //--------------------------------------- 00016 // Enums 00017 //--------------------------------------- 00018 00019 typedef enum 00020 { 00021 PWM_CH0, 00022 PWM_CH1, 00023 PWM_CH2, 00024 PWM_CH3, 00025 PWM_CH4, 00026 PWM_CH5, 00027 //------------------- 00028 CNT_ePWM_channel 00029 }ePWM_channel; 00030 00031 00032 00033 00034 //--------------------------------------- 00035 // Structures 00036 //--------------------------------------- 00037 00038 00039 00040 //--------------------------------------- 00041 // Global Variables 00042 //--------------------------------------- 00043 00044 00045 00046 //--------------------------------------- 00047 // Global Functions 00048 //--------------------------------------- 00049 void PWM_init( void ); 00050 int PWM_updateFreq( unsigned int freq_Hz ); 00051 int PWM_setDC( int channel, int dutyCycle );
Generated on Sat Jul 16 2022 03:23:51 by
