ChibiOS/HAL 9.0.0
hal_gpt.h File Reference

GPT Driver macros and structures. More...

#include "hal_gpt_lld.h"

Go to the source code of this file.

Macros

#define gptChangeIntervalI(gptp, interval)
 Changes the interval of GPT peripheral.
#define gptGetIntervalX(gptp)
 Returns the interval of GPT peripheral.
#define gptGetCounterX(gptp)
 Returns the counter value of GPT peripheral.
#define _gpt_isr_invoke_cb(gptp)
 Common ISR code, GPT period event.

Typedefs

typedef struct GPTDriver GPTDriver
 Type of a structure representing a GPT driver.
typedef void(* gptcallback_t) (GPTDriver *gptp)
 GPT notification callback type.

Enumerations

enum  gptstate_t {
  GPT_UNINIT = 0 , GPT_STOP = 1 , GPT_READY = 2 , GPT_CONTINUOUS = 3 ,
  GPT_ONESHOT = 4
}
 Driver state machine possible states. More...

Functions

void gptInit (void)
 GPT Driver initialization.
void gptObjectInit (GPTDriver *gptp)
 Initializes the standard part of a GPTDriver structure.
msg_t gptStart (GPTDriver *gptp, const GPTConfig *config)
 Configures and activates the GPT peripheral.
void gptStop (GPTDriver *gptp)
 Deactivates the GPT peripheral.
void gptStartContinuous (GPTDriver *gptp, gptcnt_t interval)
 Starts the timer in continuous mode.
void gptStartContinuousI (GPTDriver *gptp, gptcnt_t interval)
 Starts the timer in continuous mode.
void gptChangeInterval (GPTDriver *gptp, gptcnt_t interval)
 Changes the interval of GPT peripheral.
void gptStartOneShot (GPTDriver *gptp, gptcnt_t interval)
 Starts the timer in one shot mode.
void gptStartOneShotI (GPTDriver *gptp, gptcnt_t interval)
 Starts the timer in one shot mode.
void gptStopTimer (GPTDriver *gptp)
 Stops the timer.
void gptStopTimerI (GPTDriver *gptp)
 Stops the timer.
void gptPolledDelay (GPTDriver *gptp, gptcnt_t interval)
 Starts the timer in one shot mode and waits for completion.

Detailed Description

GPT Driver macros and structures.

Definition in file hal_gpt.h.