MakingThings
  • Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

pwmout.h

00001 /*********************************************************************************
00002 
00003  Copyright 2006-2008 MakingThings
00004 
00005  Licensed under the Apache License, 
00006  Version 2.0 (the "License"); you may not use this file except in compliance 
00007  with the License. You may obtain a copy of the License at
00008 
00009  http://www.apache.org/licenses/LICENSE-2.0 
00010  
00011  Unless required by applicable law or agreed to in writing, software distributed
00012  under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
00013  CONDITIONS OF ANY KIND, either express or implied. See the License for
00014  the specific language governing permissions and limitations under the License.
00015 
00016 *********************************************************************************/
00017 
00018 /*
00019   pwmout.h
00020 
00021   Includes, etc. so make users don't have to
00022 
00023   MakingThings
00024 */
00025 
00026 #ifndef PWMOUT_H
00027 #define PWMOUT_H
00028 
00029 #include "controller.h"
00030 
00031 
00032 int PwmOut_SetActive( int index, int state );
00033 int PwmOut_GetActive( int index );
00034 
00035 int PwmOut_SetDuty( int motor, int duty );
00036 int PwmOut_GetDuty( int motor );
00037 
00038 int PwmOut_SetInvertA( int motor, char invertA);
00039 int PwmOut_GetInvertA( int motor );
00040 
00041 int PwmOut_SetInvertB( int motor, char invertB );
00042 int PwmOut_GetInvertB( int motor );
00043 
00044 int PwmOut_SetInvert( int index, char invertA, char invertB );
00045 int PwmOut_SetAll( int motor, int duty, char invertA, char invertB );
00046 
00047 // Divider A is used by default to setup the clock period.
00048 // Read the notes in controll/makingthings/pwm.c before changing these.
00049 int PwmOut_SetDividerAValue(int val);
00050 int PwmOut_GetDividerAValue( void );
00051 
00052 int PwmOut_SetDividerAMux(int mux);
00053 int PwmOut_GetDividerAMux( void );
00054 
00055 int PwmOut_SetDividerBValue(int val);
00056 int PwmOut_GetDividerBValue( void );
00057 
00058 int PwmOut_SetDividerBMux(int mux);
00059 int PwmOut_GetDividerBMux( void );
00060 
00061 int PwmOut_SetWaveformAlignment(int index, int val);
00062 int PwmOut_GetWaveformAlignment(int index);
00063 
00064 int PwmOut_SetWaveformPolarity(int index, int val);
00065 int PwmOut_GetWaveformPolarity(int index);
00066 
00067 /* OSC Interface */
00068 const char* PwmOutOsc_GetName( void );
00069 int PwmOutOsc_ReceiveMessage( int channel, char* message, int length );
00070 
00071 #endif

The Make Controller Kit is an open source project maintained by MakingThings.
MakingThings code is released under the Apache 2.0 license.
Bug tracker, development wiki and status can be found at http://dev.makingthings.com.
This document was last updated on 18 May 2009.