Initial commit of files
This commit is contained in:
61
src/libPIC/pwm.h
Normal file
61
src/libPIC/pwm.h
Normal file
@ -0,0 +1,61 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2008
|
||||
* ProbeStar Telematics, LLC
|
||||
* All Rights Reserved. Proprietary and Confidential.
|
||||
*============================================================================
|
||||
* PWM Output
|
||||
*----------------------------------------------------------------------------
|
||||
* PWM1
|
||||
* PWM2
|
||||
*****************************************************************************/
|
||||
|
||||
/* prevent multiple inclusions */
|
||||
#ifndef _PWM_H_
|
||||
#define _PWM_H_
|
||||
|
||||
/*****************************************************************************
|
||||
* includes
|
||||
*****************************************************************************/
|
||||
|
||||
#include "types.h"
|
||||
|
||||
/*****************************************************************************
|
||||
* defines
|
||||
*****************************************************************************/
|
||||
|
||||
#define PWM_DUTY_CYCLE 256
|
||||
#define PWM_DUTY_MIN 0
|
||||
#define PWM_DUTY_HALF (PWM_DUTY_CYCLE/2)
|
||||
#define PWM_DUTY_MAX (PWM_DUTY_CYCLE-1)
|
||||
|
||||
/*****************************************************************************
|
||||
* macros
|
||||
*****************************************************************************/
|
||||
|
||||
/*****************************************************************************
|
||||
* structs & typedefs
|
||||
*****************************************************************************/
|
||||
|
||||
/*****************************************************************************
|
||||
* global constants
|
||||
*****************************************************************************/
|
||||
|
||||
/*****************************************************************************
|
||||
* global variables
|
||||
*****************************************************************************/
|
||||
|
||||
/*****************************************************************************
|
||||
* C function prototypes
|
||||
*****************************************************************************/
|
||||
/* export C functions to C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void PwmInit( void );
|
||||
extern void PwmOut( BYTE pin, WORD duty );
|
||||
|
||||
#ifdef __cpluscplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
Reference in New Issue
Block a user