STM32G0 MCAL 0.0.1
Tiny MCAL for educational purpose.
Loading...
Searching...
No Matches
Gpt_Types.h File Reference

Gpt Driver Types More...

#include "Registers.h"

Go to the source code of this file.

Data Structures

struct  _Gpt_ChannelType
 Config Elements of a GPT More...
 
struct  _Gpt_ConfigType
 Definition of the external data structure containing the initialization data More...
 
struct  _Gpt_HwUnit
 Hardware control unit structure More...
 

Macros

#define GPT_ID_GET_VERSION_INFO   0x00u
 
#define GPT_ID_INIT   0x01u
 
#define GPT_ID_DEINIT   0x02u
 
#define GPT_ID_GET_TIME_ELAPSED   0x03u
 
#define GPT_ID_GET_TIME_REMAINING   0x04u
 
#define GPT_ID_START_TIMER   0x05u
 
#define GPT_ID_STOP_TIMER   0x06u
 
#define GPT_ID_ENABLE_NOTIFICATION   0x07u
 
#define GPT_ID_DISABLE_NOTIFICATION   0x08u
 
#define GPT_E_UNINIT   0x0Au
 
#define GPT_E_ALREADY_INITIALIZED   0x0Du
 
#define GPT_E_INIT_FAILED   0x0Eu
 
#define GPT_E_PARAM_CHANNEL   0x14u
 
#define GPT_E_PARAM_VALUE   0x15u
 
#define GPT_E_PARAM_POINTER   0x16u
 
#define GPT_E_PARAM_PREDEF_TIMER   0x17u
 
#define GPT_E_PARAM_MODE   0x1Fu
 
#define GPT_STATIC   static
 

Typedefs

typedef struct _Gpt_ChannelType Gpt_ChannelConfigType
 Config Elements of a GPT
 
typedef struct _Gpt_ConfigType Gpt_ConfigType
 Definition of the external data structure containing the initialization data
 
typedef uint32 Gpt_ValueType
 Type for reading and setting the timer values (in number of ticks).
 
typedef enum _Gpt_StatusType Gpt_StatusType
 Hardware unit status datatype
 
typedef struct _Gpt_HwUnit Gpt_HwUnit
 Hardware control unit structure
 

Enumerations

enum  Gpt_ChannelType { GPT_CHANNEL_0 = 0 , GPT_CHANNEL_1 }
 Numeric ID of a GPT channel More...
 
enum  _Gpt_StatusType { GPT_STATE_UNINIT = 0x00 , GPT_STATE_INIT }
 Hardware unit status datatype More...
 

Detailed Description

Gpt Driver Types

Author
Rodrigo Lopez

The header contains the type definitions that are used by the Gpt module. The file is implemented as a means of abstraction from the hardware, making the low level interfaces available for upper layers.

Typedef Documentation

◆ Gpt_ChannelConfigType

Config Elements of a GPT

Requirement
SWS_Gpt_00358

◆ Gpt_ConfigType

Definition of the external data structure containing the initialization data

This is the type of the data structure including the configuration set required for initializing the GPT timer unit.

Note
It is the responsibility of the user to ensure that the values defined in this structure are valid and appropriate, as the GPT Driver does not perform any validation. The values must be generated and validated within the code generation tool.
Requirement
SWS_Gpt_00357

◆ Gpt_HwUnit

typedef struct _Gpt_HwUnit Gpt_HwUnit

Hardware control unit structure

This structure contains the hardware unit configuration and the state of the hardware unit pointers to controller structures.

◆ Gpt_StatusType

Hardware unit status datatype

Data type which describes the status of GPT Module (initialized, not-initialized).

◆ Gpt_ValueType

Type for reading and setting the timer values (in number of ticks).

Requirement
SWS_Gpt_00359

Enumeration Type Documentation

◆ _Gpt_StatusType

Hardware unit status datatype

Data type which describes the status of GPT Module (initialized, not-initialized).

Enumerator
GPT_STATE_UNINIT 

GPT Module not initialized

GPT_STATE_INIT 

GPT Module has been initialized

◆ Gpt_ChannelType

Numeric ID of a GPT channel

Requirement
SWS_Gpt_00358
Enumerator
GPT_CHANNEL_0 

Gpt Channel 0

GPT_CHANNEL_1 

Gpt Channel 1