SFBHWPWM.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00028 #ifndef SFBHWPWM_H_
00029 #define SFBHWPWM_H_
00030
00031 #include "SFBTypes.h"
00032
00036 void PWMStart();
00037
00041 void PWMStop();
00042
00046 enum PWMChannelModes {
00047 PWM_INACTIVE,
00048 PWM_SINGLE_EDGE,
00049 PWM_DOUBLE_EDGE,
00050 PWM_CHANNEL_MODES_MAX
00051 };
00052
00064 void PWMSetMode(u32 pwmIndex, u32 mode);
00065
00081 void PWMSetWidth(u32 pwmIndex, u32 width, bool commit = true);
00082
00089 u32 PWMGetWidth(u32 pwmIndex);
00090
00091
00102 int PWMFindIndex(int sfbPin);
00103
00110 u32 PWMGetPin(u32 pwmIndex);
00111
00134 u32 PWMGetChannel(u32 pwmIndex);
00135
00163 enum PWMIndices {
00164 PWM_BODY_RGB_RED_PIN,
00165 PWM_BODY_RGB_GREEN_PIN,
00166 PWM_BODY_RGB_BLUE_PIN,
00167 PWM_NORTH_LED_PIN,
00168 PWM_SOUTH_LED_PIN,
00169 PWM_EAST_LED_PIN,
00170 PWM_WEST_D0_PIN,
00171 PWM_WEST_D2_PIN,
00172 PWM_WEST_D3_PIN,
00173 PWM_EAST_D1_PIN,
00174 PWM_EAST_D3_PIN
00175 };
00176
00177 #endif