MCUSW Documentation
Gpt Driver State API

Introduction

Provides the operation mode of the driver and state of each configured timer These values are valid only when the driver is initialized

Variables

Gpt_DriverObjType Gpt_DrvObj
 

Macros

#define GPT_OPERATION_MODE   (Gpt_DrvObj.sleepMode)
 
#define GPT_CHANNEL_STATE   (Gpt_DrvObj.channelState)
 
#define GPT_GET_CHANNEL_INDEX(x)
 

Macro Definition Documentation

◆ GPT_OPERATION_MODE

#define GPT_OPERATION_MODE   (Gpt_DrvObj.sleepMode)

Operation Mode of the driver can be either GPT_MODE_NORMAL or GPT_MODE_SLEEP

◆ GPT_CHANNEL_STATE

#define GPT_CHANNEL_STATE   (Gpt_DrvObj.channelState)

Channel State

◆ GPT_GET_CHANNEL_INDEX

#define GPT_GET_CHANNEL_INDEX (   x)
Value:
(((x) < GPT_CH_GPTIMER_MAX)? \
Gpt_DrvObj.channelIdMap[(x)] : 0U)
#define GPT_CH_GPTIMER_MAX
maximum GP timer channels available
Definition: Gpt.h:162

Get the index associated with channel ID, which could be used to query channel state

Variable Documentation

◆ Gpt_DrvObj

Gpt_DriverObjType Gpt_DrvObj

GPT Driver Object, instantiated in Gpt driver implementation