IPC@CHIP® RTOS-PPC – API Documentation

Header image

Main page


GPT - General Purpose Timers API


Detailed Description

The following functions are provided to control the timer pins.

Data Structures

struct  GptSettings
 General purpose timer settings. More...

Enumerations

enum  GPT_MODE {
  GPT_DISABLED = 0,
  GPT_INPUT_CAPTURE = 1,
  GPT_OUTPUT_COMPARE = 2,
  GPT_PWM = 3,
  GPT_INTERNAL_INPUT = 4,
  GPT_INTERNAL_OUTPUT_HIGH = 5,
  GPT_INTERNAL_OUTPUT_LOW = 6
}
 

General purpose timer modes.

More...
enum  GPT_OCT {
  GPT_OCT_FORCE_LOW = 0,
  GPT_OCT_PULSE_HIGH = 1,
  GPT_OCT_PULSE_LOW = 2,
  GPT_OCT_TOGGLE = 3
}
 

General purpose timer output compare types.

More...
enum  GPT_ICT {
  GPT_ICT_ANY = 0,
  GPT_ICT_RISING_EDGE = 1,
  GPT_ICT_FALLING_EDGE = 2,
  GPT_ICT_PULSE = 3
}
 

General purpose timer input capture types.

More...

Functions

int gptSetMode (int timerIdx, GptSettings *settings)
 Init a GPT in a specific mode.
int gptSetPrescale (int timerIdx, uint16 prescale)
 Init the GPT prescale value.
int gptSetCount (int timerIdx, uint16 count)
 Init the GPT count value.
int gptSetPWMConfig (int timerIdx, uint16 width, BOOL pwmop, BOOL load)
 Setup the PWM configuration of a GPT.
int gptGetStatus (int timerIdx, uint16 *capture, uint8 *overflow, uint8 *pin, uint16 *status)
 Read the GPT status information.
int gptClearStatus (int timerIdx)
 Clear the GPT status.
int gptStartStopInternalTimer (int timerIdx, BOOL state)
 Start/Stop internal timer.





Top of page | Main page

Copyright © 2017 Beck IPC GmbH
Generated on Thu Jan 26 16:21:36 2017 by Doxygen 1.6.1