STM32G0 MCAL 0.0.1
Tiny MCAL for educational purpose.
Loading...
Searching...
No Matches
Gpt.h
Go to the documentation of this file.
1
12#ifndef GPT_H__
13#define GPT_H__
14
15#include "Gpt_Cfg.h" /* cppcheck-suppress misra-c2012-20.1 ; it is necesary to use a define for this function */
16
17void Gpt_Init( const Gpt_ConfigType *ConfigPtr );
18
19#if GPT_DEINIT_API == STD_ON /* cppcheck-suppress misra-c2012-20.9 ; it is necesary to use a define for this function */
20void Gpt_DeInit( void );
21#endif
22
23#if GPT_TIME_ELAPSED_API == STD_ON /* cppcheck-suppress misra-c2012-20.9 ; it is necesary to use a define for this function */
25#endif
26
27#if GPT_TIME_REMAINING_API == STD_ON /* cppcheck-suppress misra-c2012-20.9 ; it is necesary to use a define for this function */
29#endif
30
31void Gpt_StartTimer( Gpt_ChannelType Channel, Gpt_ValueType Value );
32void Gpt_StopTimer( Gpt_ChannelType Channel );
33
34#if GPT_VERSION_INFO_API == STD_ON /* cppcheck-suppress misra-c2012-20.9 ; it is necesary to use a define for this function */
35void Gpt_GetVersionInfo( Std_VersionInfoType *versioninfo );
36#endif
37
38#if GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON /* cppcheck-suppress misra-c2012-20.9 ; it is necesary to use a define for this function */
40#endif
41
42#if GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON /* cppcheck-suppress misra-c2012-20.9 ; it is necesary to use a define for this function */
44#endif
45
46#if GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON /* cppcheck-suppress misra-c2012-20.9 ; it is necesary to use a define for this function */
47void Gpt_Notification_Channel0( void );
48#endif
49
50#if GPT_ENABLE_DISABLE_NOTIFICATION_API == STD_ON /* cppcheck-suppress misra-c2012-20.9 ; it is necesary to use a define for this function */
51void Gpt_Notification_Channel1( void );
52#endif
53
54#endif
void Gpt_StopTimer(Gpt_ChannelType Channel)
Stops a timer channel.
Definition Gpt.c:226
void Gpt_Init(const Gpt_ConfigType *ConfigPtr)
Initialize the GPT registers to the configuration stored on ConfigPtr.
Definition Gpt.c:54
void Gpt_Notification_Channel0(void)
Executes the callback function defined by the user on the GPT_CHANNEL_0, validating the interrupt fla...
Definition Gpt.c:368
void Gpt_GetVersionInfo(Std_VersionInfoType *versioninfo)
Gets the current version.
Definition Gpt.c:258
Gpt_ValueType Gpt_GetTimeElapsed(Gpt_ChannelType Channel)
Returns the time already elapsed.
Definition Gpt.c:115
void Gpt_DisableNotification(Gpt_ChannelType Channel)
Disables the interrupt notification for a channel.
Definition Gpt.c:329
void Gpt_EnableNotification(Gpt_ChannelType Channel)
Enables the interrupt notification for a channel.
Definition Gpt.c:289
void Gpt_StartTimer(Gpt_ChannelType Channel, Gpt_ValueType Value)
Starts a timer channel.
Definition Gpt.c:189
void Gpt_DeInit(void)
Deinitializes the GPT driver.
Definition Gpt.c:83
Gpt_ValueType Gpt_GetTimeRemaining(Gpt_ChannelType Channel)
Returns the time remaining until the target time is reached.
Definition Gpt.c:153
void Gpt_Notification_Channel1(void)
Executes the callback function defined by the user on the GPT_CHANNEL_1, validating the interrupt fla...
Definition Gpt.c:385
Gpt_ChannelType
Numeric ID of a GPT channel
Definition Gpt_Types.h:96
struct _Gpt_ConfigType Gpt_ConfigType
Definition of the external data structure containing the initialization data
uint32 Gpt_ValueType
Type for reading and setting the timer values (in number of ticks).
Definition Gpt_Types.h:106
struct Std_VersionInfoType_Tag Std_VersionInfoType
This structure is used to request the version of a BSW module using the [Module name]_GetVersionInfo(...